Phillippko commented on code in PR #4611:
URL: https://github.com/apache/ignite-3/pull/4611#discussion_r1810262536


##########
modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/recovery/cluster/reset/ResetClusterMixin.java:
##########
@@ -19,17 +19,34 @@
 
 import static 
org.apache.ignite.internal.cli.commands.Options.Constants.RECOVERY_CMG_NODES_OPTION;
 import static 
org.apache.ignite.internal.cli.commands.Options.Constants.RECOVERY_CMG_NODES_OPTION_DESC;
+import static 
org.apache.ignite.internal.cli.commands.Options.Constants.RECOVERY_METASTORAGE_REPLICATION_DESC;
+import static 
org.apache.ignite.internal.cli.commands.Options.Constants.RECOVERY_METASTORAGE_REPLICATION_OPTION;
 
 import java.util.List;
+import org.jetbrains.annotations.Nullable;
+import picocli.CommandLine.ArgGroup;
 import picocli.CommandLine.Option;
 
 /** Arguments for 'recovery cluster reset' command. */
 public class ResetClusterMixin {
-    @Option(names = RECOVERY_CMG_NODES_OPTION, description = 
RECOVERY_CMG_NODES_OPTION_DESC, split = ",", required = true)
-    private List<String> cmgNodeNames;
+    @ArgGroup(multiplicity = "1", exclusive = false)
+    private Options options;
 
     /** Returns names of the proposed CMG nodes. */
-    public List<String> cmgNodeNames() {
-        return cmgNodeNames;
+    public @Nullable List<String> cmgNodeNames() {
+        return options.cmgNodeNames;
+    }
+
+    /** Returns metastorage replication factor. */
+    public @Nullable Integer metastorageReplicationFactor() {
+        return options.metastorageReplicationFactor;
+    }
+
+    private static class Options {

Review Comment:
   To use picocli's ArgGroup and check that at least one of this fields is 
specified



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to