You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/03/26 16:49:50 UTC

[GitHub] [iotdb] OneSizeFitsQuorum commented on a change in pull request #5347: [IOTDB-2780] Config node ratis consensus protocol implementation

OneSizeFitsQuorum commented on a change in pull request #5347:
URL: https://github.com/apache/iotdb/pull/5347#discussion_r835784975



##########
File path: confignode/src/test/java/org/apache/iotdb/confignode/manager/ConfigManagerTest.java
##########
@@ -0,0 +1,129 @@
+/*
+ * 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.iotdb.confignode.manager;
+
+import org.apache.iotdb.confignode.rpc.thrift.ConfigIService;
+import org.apache.iotdb.confignode.rpc.thrift.DataNodeMessage;
+import org.apache.iotdb.confignode.rpc.thrift.DataNodeRegisterReq;
+import org.apache.iotdb.confignode.rpc.thrift.DataNodeRegisterResp;
+import org.apache.iotdb.rpc.RpcTransportFactory;
+import org.apache.iotdb.rpc.TSStatusCode;
+import org.apache.iotdb.service.rpc.thrift.EndPoint;
+
+import org.apache.thrift.TException;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.junit.Assert;
+
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+public class ConfigManagerTest {

Review comment:
       Since the class is not in the Test package, might it be better to have a name that doesn't end with Test? Or just put it in the test package,  the test will not run it without the corresponding overloaded function

##########
File path: confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
##########
@@ -175,6 +175,24 @@ private void loadProps() {
               properties.getProperty(
                   "data_region_count", String.valueOf(conf.getDataRegionCount()))));
 
+      String addresses = properties.getProperty("config_node_group_address_list", null);

Review comment:
       Maybe we can abstract these method to iotdb-common so that datanode can use this logic too?




-- 
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: reviews-unsubscribe@iotdb.apache.org

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