PakhomovAlexander commented on code in PR #961:
URL: https://github.com/apache/ignite-3/pull/961#discussion_r934361402


##########
modules/cli/src/main/java/org/apache/ignite/cli/deprecated/spec/NodeCommandSpec.java:
##########
@@ -100,12 +123,36 @@ public Integer call() {
             out.println(tbl);
             return 0;
         }
+
+        private Path getConfigPath() {
+            return configOptions != null ? configOptions.configPath : null;
+        }
+
+        private String getConfigStr() {
+            if (configOptions == null || configOptions.configPath != null) {
+                return null;
+            }
+            // port is required
+            StringBuilder sb = new StringBuilder();

Review Comment:
   I think it is better to use `Config` class from `typesafe` lib to construct 
a configuration representation.



##########
modules/cli/src/main/java/org/apache/ignite/cli/deprecated/spec/NodeCommandSpec.java:
##########
@@ -62,12 +65,31 @@ public static class StartNodeCommandSpec extends 
BaseCommand implements Callable
         private NodeManager nodeMgr;
 
         /** Consistent id, which will be used by new node. */
-        @CommandLine.Parameters(paramLabel = "name", description = "Name of 
the new node")
+        @Parameters(paramLabel = "name", description = "Name of the new node")
         public String nodeName;
 
-        /** Path to node config. */
-        @CommandLine.Option(names = "--config", description = "Configuration 
file to start the node with")
-        private Path configPath;
+        @ArgGroup
+        private ConfigOptions configOptions;
+
+        private static class ConfigOptions {
+            @ArgGroup(exclusive = false)

Review Comment:
   Could you add an unit test to verify that it is truly exclusive?
   



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

Reply via email to