You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "Phillippko (via GitHub)" <gi...@apache.org> on 2024/10/22 07:38:55 UTC

[PR] IGNITE-22897 CLI for initiating MG repair [ignite-3]

Phillippko opened a new pull request, #4611:
URL: https://github.com/apache/ignite-3/pull/4611

   https://issues.apache.org/jira/browse/IGNITE-22897


-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-22897 CLI for initiating MG repair [ignite-3]

Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch merged PR #4611:
URL: https://github.com/apache/ignite-3/pull/4611


-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-22897 CLI for initiating MG repair [ignite-3]

Posted by "Phillippko (via GitHub)" <gi...@apache.org>.
Phillippko commented on code in PR #4611:
URL: https://github.com/apache/ignite-3/pull/4611#discussion_r1810132985


##########
modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/Options.java:
##########
@@ -292,6 +292,11 @@ public static final class Constants {
         public static final String RECOVERY_NODE_NAMES_OPTION_DESC = "Names specifying nodes to get partition states from. "
                 + "Case-sensitive, without quotes, all nodes if not set";
 
+        public static final String RECOVERY_METASTORAGE_REPLICATION_OPTION = "--metastorage-replication-factor";
+
+        public static final String RECOVERY_METASTORAGE_REPLICATION_DESC = "Number of nodes in the voting member set of the Metastorage "

Review Comment:
   (Will consult with Alex about args descriptions)



-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-22897 CLI for initiating MG repair [ignite-3]

Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch commented on code in PR #4611:
URL: https://github.com/apache/ignite-3/pull/4611#discussion_r1810183388


##########
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:
   What's the purpose of this class? Why couldn't we just declare 2 fields in the mixin itself?



-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-22897 CLI for initiating MG repair [ignite-3]

Posted by "Phillippko (via GitHub)" <gi...@apache.org>.
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-unsubscribe@ignite.apache.org

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