You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/06/27 08:15:38 UTC

[GitHub] [ignite-3] valepakh commented on a diff in pull request #895: IGNITE-17162 Fix init cluster command options

valepakh commented on code in PR #895:
URL: https://github.com/apache/ignite-3/pull/895#discussion_r907102175


##########
modules/cli/src/main/java/org/apache/ignite/cli/commands/cluster/ClusterInitReplSubCommand.java:
##########
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.cli.commands.cluster;
+
+import static picocli.CommandLine.Command;
+
+import jakarta.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.ignite.cli.call.cluster.ClusterInitCall;
+import org.apache.ignite.cli.call.cluster.ClusterInitCallInput;
+import org.apache.ignite.cli.call.cluster.ClusterInitCallInput.ClusterInitCallInputBuilder;
+import org.apache.ignite.cli.commands.BaseCommand;
+import org.apache.ignite.cli.core.call.CallExecutionPipeline;
+import org.apache.ignite.cli.core.repl.Session;
+import picocli.CommandLine.Option;
+
+/**
+ * Initializes an Ignite cluster.
+ */
+@Command(name = "init", description = "Initializes an Ignite cluster.")
+public class ClusterInitReplSubCommand extends BaseCommand implements Runnable {
+
+    /**
+     * Node url option.
+     */
+    @Option(
+            names = {"--cluster-url"}, description = "Url to ignite node.",
+            descriptionKey = "ignite.cluster-url", defaultValue = "http://localhost:10300"
+    )
+    private String clusterUrl;
+
+    /**
+     * List of names of the nodes (each represented by a separate command line argument) that will host the Metastorage Raft group. If the
+     * "--cmg-nodes" parameter is omitted, the same nodes will also host the Cluster Management Raft group.
+     */
+    @Option(names = "--meta-storage-node", required = true, description = {
+            "Name of the node (repeat like '--meta-storage-node node1 --meta-storage-node node2' to specify more than one node)",
+            "that will host the Meta Storage Raft group.",

Review Comment:
   Maybe we should use the same terminology as in the [IEP-77](https://cwiki.apache.org/confluence/display/IGNITE/IEP-77%3A+Node+Join+Protocol+and+Initialization+for+Ignite+3#IEP77:NodeJoinProtocolandInitializationforIgnite3-MetaStorage)? That is, `Meta Storage` and `Cluster Management Group`.



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