kerneltime commented on code in PR #3614:
URL: https://github.com/apache/ozone/pull/3614#discussion_r927153975


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/OmRPCLoadGenerator.java:
##########
@@ -0,0 +1,214 @@
+package org.apache.hadoop.ozone.freon;
+
+import com.codahale.metrics.Histogram;
+import com.codahale.metrics.Snapshot;
+import com.codahale.metrics.UniformReservoir;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectWriter;
+import org.apache.commons.lang3.time.DurationFormatUtils;
+import org.apache.hadoop.hdds.cli.HddsVersionProvider;
+import org.apache.hadoop.hdds.conf.OzoneConfiguration;
+import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
+import org.apache.hadoop.ozone.OzoneManagerVersion;
+import org.apache.hadoop.ozone.client.OzoneClient;
+import org.apache.hadoop.ozone.client.OzoneClientFactory;
+import org.apache.hadoop.ozone.om.helpers.ServiceInfo;
+import org.apache.hadoop.ozone.util.ShutdownHookManager;
+import org.apache.hadoop.util.Time;
+import org.apache.hadoop.util.VersionInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import picocli.CommandLine;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static 
org.apache.hadoop.ozone.conf.OzoneServiceConfig.DEFAULT_SHUTDOWN_HOOK_PRIORITY;
+
[email protected](name = "om-rpc-load",
+        aliases = "orpcl",
+        description = "Generate random RPC request to the OM with or without 
layload.",
+        versionProvider = HddsVersionProvider.class,
+        mixinStandardHelpOptions = true,
+        showDefaultValues = true)
+public class OmRPCLoadGenerator extends BaseFreonGenerator
+        implements Callable<Void> {
+
+    @CommandLine.ParentCommand
+    private Freon freon;
+
+    enum FreonOps {
+        op1,
+        op2,
+        op3,
+        op4
+    }
+
+    private static final Logger LOG =
+            LoggerFactory.getLogger(OmRPCLoadGenerator.class);
+    private volatile Throwable exception;
+
+    @CommandLine.Option(names = {"--threads"},
+            description = "Specifies numbers of thread to generate RPC 
request",
+            defaultValue = "1")
+    private int numOfThreads = 1;
+
+    @CommandLine.Option(names = {"--payload"},

Review Comment:
   Add a couple of more options
   1. Where request has a payload but response does not and
   2. Where request has the payload size as an option and the payload is part 
of the response



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to