sadanand48 commented on code in PR #4747:
URL: https://github.com/apache/ozone/pull/4747#discussion_r1199195624


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/admin/scm/RotateKeySubCommand.java:
##########
@@ -0,0 +1,40 @@
+package org.apache.hadoop.ozone.admin.scm;
+
+import java.io.IOException;
+import java.util.concurrent.TimeoutException;
+
+import org.apache.hadoop.hdds.cli.HddsVersionProvider;
+import org.apache.hadoop.hdds.scm.cli.ContainerOperationClient;
+import org.apache.hadoop.hdds.scm.cli.ScmSubcommand;
+import org.apache.hadoop.hdds.scm.client.ScmClient;
+import picocli.CommandLine;
+
+/**
+ * Handler of ozone admin scm rotate command.
+ */
[email protected](
+    name = "rotate",
+    description = "CLI command to force generate new keys (rotate)",
+    mixinStandardHelpOptions = true,
+    versionProvider = HddsVersionProvider.class)
+public class RotateKeySubCommand extends ScmSubcommand {
+
+  @CommandLine.ParentCommand
+  private ScmAdmin parent;
+
+  @Override
+  protected void execute(ScmClient scmClient) throws IOException {
+    try (ScmClient client = new ContainerOperationClient(

Review Comment:
   We can use the same scmClient here from the method. For the unit test to 
work , we could just pass a list  of config args in the args array in 
--set=key=value format.



-- 
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