This is an automated email from the ASF dual-hosted git repository.

xingtanzjr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 62eeda76db Change rpc_address of ConfigNode to internal_address (#6506)
62eeda76db is described below

commit 62eeda76db660e5b680b0b1b60bd6e3a787cf212
Author: Jialin Qiao <[email protected]>
AuthorDate: Thu Jun 30 13:20:25 2022 +0800

    Change rpc_address of ConfigNode to internal_address (#6506)
---
 .../resources/conf/iotdb-confignode.properties     |  12 +--
 .../assembly/resources/sbin/stop-confignode.bat    |   6 +-
 .../client/SyncConfigNodeClientPool.java           |   2 +-
 .../iotdb/confignode/conf/ConfigNodeConfig.java    |  20 ++--
 .../iotdb/confignode/conf/ConfigNodeConstant.java  |   8 --
 .../confignode/conf/ConfigNodeDescriptor.java      |  17 ++--
 .../confignode/conf/ConfigNodeRemoveCheck.java     |   6 +-
 .../confignode/conf/ConfigNodeStartupCheck.java    |  64 +++++++------
 .../statemachine/PartitionRegionStateMachine.java  |   2 +-
 .../iotdb/confignode/manager/ConsensusManager.java |   2 +-
 .../iotdb/confignode/persistence/NodeInfo.java     |   4 +-
 .../service/thrift/ConfigNodeRPCService.java       |   4 +-
 .../iotdb/confignode/cli/TemporaryClientDemo.java  |  76 ----------------
 .../confignode1conf/iotdb-confignode.properties    |   4 +-
 .../confignode2conf/iotdb-confignode.properties    |   4 +-
 .../confignode3conf/iotdb-confignode.properties    |   4 +-
 docs/UserGuide/Cluster/Cluster-Setup.md            |   4 +-
 .../Reference/ConfigNode-Config-Manual.md          |  18 ++--
 docs/UserGuide/Reference/DataNode-Config-Manual.md |   2 +-
 docs/zh/UserGuide/Cluster/Cluster-Setup.md         |   4 +-
 .../Reference/ConfigNode-Config-Manual.md          |  14 +--
 .../UserGuide/Reference/DataNode-Config-Manual.md  |   4 +-
 .../org/apache/iotdb/it/env/ConfigNodeWrapper.java |  18 ++--
 .../org/apache/iotdb/it/env/DataNodeWrapper.java   |  12 ++-
 .../apache/iotdb/integration/env/ClusterNode.java  |   4 +-
 .../apache/iotdb/commons/conf/IoTDBConstant.java   |   7 ++
 .../iotdb/commons/partition/SerializeTest.java     | 101 ---------------------
 .../resources/conf/iotdb-datanode.properties       |   4 +-
 .../java/org/apache/iotdb/db/conf/IoTDBConfig.java |  12 +--
 .../org/apache/iotdb/db/conf/IoTDBDescriptor.java  |  20 ++--
 .../db/consensus/DataRegionConsensusImpl.java      |   3 +-
 .../db/consensus/SchemaRegionConsensusImpl.java    |   3 +-
 .../db/mpp/plan/constant/DataNodeEndPoints.java    |   4 +-
 .../scheduler/FragmentInstanceDispatcherImpl.java  |   2 +-
 .../java/org/apache/iotdb/db/service/DataNode.java |  24 ++---
 .../java/org/apache/iotdb/db/service/NewIoTDB.java |   4 +-
 .../org/apache/iotdb/db/service/RPCService.java    |   6 +-
 .../thrift/handler/RPCServiceThriftHandler.java    |   7 +-
 ...SServiceImpl.java => ClientRPCServiceImpl.java} |   6 +-
 ...dler.java => IClientRPCServiceWithHandler.java} |   2 +-
 .../db/service/thrift/impl/TSServiceImpl.java      |   4 +-
 .../plan/scheduler/StandaloneSchedulerTest.java    |   8 +-
 .../iotdb/db/service/ClientRPCServiceImplTest.java |   8 +-
 43 files changed, 196 insertions(+), 344 deletions(-)

diff --git a/confignode/src/assembly/resources/conf/iotdb-confignode.properties 
b/confignode/src/assembly/resources/conf/iotdb-confignode.properties
index 58913c796d..4753238c6a 100644
--- a/confignode/src/assembly/resources/conf/iotdb-confignode.properties
+++ b/confignode/src/assembly/resources/conf/iotdb-confignode.properties
@@ -24,12 +24,12 @@
 
 # could set ip or hostname
 # Datatype: String
-rpc_address=0.0.0.0
+internal_address=0.0.0.0
 
 
 # Used for cluster internal RPC communication
 # Datatype: int
-rpc_port=22277
+internal_port=22277
 
 
 # Used for ConfigNodeGroup's ConsensusLayer interior communication
@@ -39,10 +39,10 @@ consensus_port=22278
 
 # At least one running ConfigNode should be set for joining the cluster
 # Format: ip:port
-# where the ip should be consistent with the target ConfigNode's 
confignode_rpc_address,
-# and the port should be consistent with the target ConfigNode's 
confignode_rpc_port.
-# For the first ConfigNode to start, target_config_nodes points to its own 
ip:port.
-# For other ConfigNodes that are started or restarted, target_config_nodes 
points to any running ConfigNode's ip:port.
+# where the ip should be consistent with the target ConfigNode's 
confignode_internal_address,
+# and the port should be consistent with the target ConfigNode's 
confignode_internal_port.
+# For the first ConfigNode to start, target_config_nodes points to its own 
internal_address:internal_port.
+# For other ConfigNodes that are started or restarted, target_config_nodes 
points to any running ConfigNode's internal_address:internal_port.
 # Datatype: String
 target_config_nodes=0.0.0.0:22277
 
diff --git a/confignode/src/assembly/resources/sbin/stop-confignode.bat 
b/confignode/src/assembly/resources/sbin/stop-confignode.bat
index bcfc5d8643..d71f45dffc 100644
--- a/confignode/src/assembly/resources/sbin/stop-confignode.bat
+++ b/confignode/src/assembly/resources/sbin/stop-confignode.bat
@@ -27,12 +27,12 @@ for /f  "eol=; tokens=2,2 delims==" %%i in ('findstr /i 
"^rpc_port"
   set rpc_port=%%i
 )
 
-for /f  "eol=; tokens=2,2 delims==" %%i in ('findstr /i "rpc_address"
+for /f  "eol=; tokens=2,2 delims==" %%i in ('findstr /i "internal_address"
 %superior_dir%\conf\iotdb-confignode.properties') do (
-  set rpc_address=%%i
+  set internal_address=%%i
 )
 
-for /f "tokens=5" %%a in ('netstat /ano ^| findstr %rpc_address%:%rpc_port%') 
do (
+for /f "tokens=5" %%a in ('netstat /ano ^| findstr 
%internal_address%:%rpc_port%') do (
   taskkill /f /pid %%a
 )
 rem ps ax | grep -i 'confignode.ConfigNode' | grep -v grep | awk '{print $1}' 
| xargs kill -SIGTERM
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/client/SyncConfigNodeClientPool.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/client/SyncConfigNodeClientPool.java
index 1ac87a6764..477416f8ec 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/client/SyncConfigNodeClientPool.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/client/SyncConfigNodeClientPool.java
@@ -108,7 +108,7 @@ public class SyncConfigNodeClientPool {
   /**
    * ConfigNode Leader stop any ConfigNode in the cluster
    *
-   * @param configNodeLocations confignode_list of confignode-system.properties
+   * @param configNodeLocations target_config_nodes of 
confignode-system.properties
    * @param configNodeLocation To be removed ConfigNode
    * @return SUCCESS_STATUS: remove ConfigNode success, other status remove 
failed
    */
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
index 3c13a3965d..1e02b95b8d 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
@@ -32,10 +32,10 @@ import java.util.concurrent.TimeUnit;
 public class ConfigNodeConfig {
 
   /** could set ip or hostname */
-  private String rpcAddress = "0.0.0.0";
+  private String internalAddress = "0.0.0.0";
 
   /** used for communication between data node and config node */
-  private int rpcPort = 22277;
+  private int internalPort = 22277;
 
   /** used for communication between config node and config node */
   private int consensusPort = 22278;
@@ -173,20 +173,20 @@ public class ConfigNodeConfig {
     return dir;
   }
 
-  public String getRpcAddress() {
-    return rpcAddress;
+  public String getInternalAddress() {
+    return internalAddress;
   }
 
-  public void setRpcAddress(String rpcAddress) {
-    this.rpcAddress = rpcAddress;
+  public void setInternalAddress(String internalAddress) {
+    this.internalAddress = internalAddress;
   }
 
-  public int getRpcPort() {
-    return rpcPort;
+  public int getInternalPort() {
+    return internalPort;
   }
 
-  public void setRpcPort(int rpcPort) {
-    this.rpcPort = rpcPort;
+  public void setInternalPort(int internalPort) {
+    this.internalPort = internalPort;
   }
 
   public int getConsensusPort() {
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConstant.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConstant.java
index da179fc8a7..425becaad4 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConstant.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConstant.java
@@ -20,18 +20,10 @@ package org.apache.iotdb.confignode.conf;
 
 public class ConfigNodeConstant {
 
-  // when running the program in IDE, we can not get the version info using
-  // getImplementationVersion()
-  public static final String VERSION =
-      ConfigNodeConstant.class.getPackage().getImplementationVersion() != null
-          ? ConfigNodeConstant.class.getPackage().getImplementationVersion()
-          : "UNKNOWN";
-
   public static final String GLOBAL_NAME = "IoTDB-ConfigNode";
   public static final String CONFIGNODE_CONF = "CONFIGNODE_CONF";
   public static final String CONFIGNODE_HOME = "CONFIGNODE_HOME";
 
-  public static final String ENV_FILE_NAME = "confignode-env";
   public static final String CONF_FILE_NAME = "iotdb-confignode.properties";
   public static final String SYSTEM_FILE_NAME = "confignode-system.properties";
 
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
index 53256d91fd..29b1feb008 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
@@ -19,6 +19,7 @@
 package org.apache.iotdb.confignode.conf;
 
 import org.apache.iotdb.commons.conf.CommonDescriptor;
+import org.apache.iotdb.commons.conf.IoTDBConstant;
 import org.apache.iotdb.commons.exception.BadNodeUrlException;
 import org.apache.iotdb.commons.utils.NodeUrlUtils;
 import org.apache.iotdb.metrics.config.MetricConfigDescriptor;
@@ -106,17 +107,21 @@ public class ConfigNodeDescriptor {
       Properties properties = new Properties();
       properties.load(inputStream);
 
-      conf.setRpcAddress(properties.getProperty("rpc_address", 
conf.getRpcAddress()));
+      conf.setInternalAddress(
+          properties.getProperty(IoTDBConstant.INTERNAL_ADDRESS, 
conf.getInternalAddress()));
 
-      conf.setRpcPort(
-          Integer.parseInt(properties.getProperty("rpc_port", 
String.valueOf(conf.getRpcPort()))));
+      conf.setInternalPort(
+          Integer.parseInt(
+              properties.getProperty(
+                  IoTDBConstant.INTERNAL_PORT, 
String.valueOf(conf.getInternalPort()))));
 
       conf.setConsensusPort(
           Integer.parseInt(
-              properties.getProperty("consensus_port", 
String.valueOf(conf.getConsensusPort()))));
+              properties.getProperty(
+                  IoTDBConstant.CONSENSUS_PORT, 
String.valueOf(conf.getConsensusPort()))));
 
       // TODO: Enable multiple target_config_nodes
-      String targetConfigNodes = properties.getProperty("target_config_nodes", 
null);
+      String targetConfigNodes = 
properties.getProperty(IoTDBConstant.TARGET_CONFIG_NODES, null);
       if (targetConfigNodes != null) {
         
conf.setTargetConfigNode(NodeUrlUtils.parseTEndPointUrl(targetConfigNodes));
       }
@@ -253,7 +258,7 @@ public class ConfigNodeDescriptor {
           .updatePath(System.getProperty(ConfigNodeConstant.CONFIGNODE_HOME, 
null));
       MetricConfigDescriptor.getInstance()
           .getMetricConfig()
-          .updateRpcInstance(conf.getRpcAddress(), conf.getRpcPort());
+          .updateRpcInstance(conf.getInternalAddress(), 
conf.getInternalPort());
     }
   }
 
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeRemoveCheck.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeRemoveCheck.java
index 169e1509f5..ab18779c92 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeRemoveCheck.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeRemoveCheck.java
@@ -21,6 +21,7 @@ package org.apache.iotdb.confignode.conf;
 import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation;
 import org.apache.iotdb.common.rpc.thrift.TEndPoint;
 import org.apache.iotdb.common.rpc.thrift.TSStatus;
+import org.apache.iotdb.commons.conf.IoTDBConstant;
 import org.apache.iotdb.commons.exception.BadNodeUrlException;
 import org.apache.iotdb.commons.utils.NodeUrlUtils;
 import org.apache.iotdb.confignode.client.SyncConfigNodeClientPool;
@@ -80,11 +81,12 @@ public class ConfigNodeRemoveCheck {
   }
 
   public List<TConfigNodeLocation> getConfigNodeList() throws 
BadNodeUrlException {
-    return 
NodeUrlUtils.parseTConfigNodeUrls(systemProperties.getProperty("confignode_list"));
+    return NodeUrlUtils.parseTConfigNodeUrls(
+        systemProperties.getProperty(IoTDBConstant.TARGET_CONFIG_NODES));
   }
 
   public int getConsensusPort() {
-    return Integer.parseInt(systemProperties.getProperty("consensus_port"));
+    return 
Integer.parseInt(systemProperties.getProperty(IoTDBConstant.CONSENSUS_PORT));
   }
 
   private static class ConfigNodeConfRemoveCheckHolder {
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
index 7775cb2c8a..1f6f769529 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
@@ -21,6 +21,7 @@ package org.apache.iotdb.confignode.conf;
 import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation;
 import org.apache.iotdb.common.rpc.thrift.TEndPoint;
 import org.apache.iotdb.commons.conf.CommonDescriptor;
+import org.apache.iotdb.commons.conf.IoTDBConstant;
 import org.apache.iotdb.commons.exception.BadNodeUrlException;
 import org.apache.iotdb.commons.exception.ConfigurationException;
 import org.apache.iotdb.commons.exception.StartupException;
@@ -85,12 +86,12 @@ public class ConfigNodeStartupCheck {
     // When the ConfigNode consensus protocol is set to StandAlone,
     // the target_config_nodes needs to point to itself
     if 
(conf.getConfigNodeConsensusProtocolClass().equals(ConsensusFactory.StandAloneConsensus)
-        && (!conf.getRpcAddress().equals(conf.getTargetConfigNode().getIp())
-            || conf.getRpcPort() != conf.getTargetConfigNode().getPort())) {
+        && 
(!conf.getInternalAddress().equals(conf.getTargetConfigNode().getIp())
+            || conf.getInternalPort() != 
conf.getTargetConfigNode().getPort())) {
       throw new ConfigurationException(
-          "target_config_nodes",
+          IoTDBConstant.TARGET_CONFIG_NODES,
           conf.getTargetConfigNode().getIp() + ":" + 
conf.getTargetConfigNode().getPort(),
-          conf.getRpcAddress() + ":" + conf.getRpcPort());
+          conf.getInternalAddress() + ":" + conf.getInternalPort());
     }
 
     // When the data region consensus protocol is set to StandAlone,
@@ -164,16 +165,16 @@ public class ConfigNodeStartupCheck {
    */
   private boolean isSeedConfigNode() {
     boolean result =
-        conf.getRpcAddress().equals(conf.getTargetConfigNode().getIp())
-            && conf.getRpcPort() == conf.getTargetConfigNode().getPort();
+        conf.getInternalAddress().equals(conf.getTargetConfigNode().getIp())
+            && conf.getInternalPort() == conf.getTargetConfigNode().getPort();
     if (result) {
       // TODO: Set PartitionRegionId from iotdb-confignode.properties
       conf.setConfigNodeList(
           Collections.singletonList(
               new TConfigNodeLocation(
                   0,
-                  new TEndPoint(conf.getRpcAddress(), conf.getRpcPort()),
-                  new TEndPoint(conf.getRpcAddress(), 
conf.getConsensusPort()))));
+                  new TEndPoint(conf.getInternalAddress(), 
conf.getInternalPort()),
+                  new TEndPoint(conf.getInternalAddress(), 
conf.getConsensusPort()))));
     }
     return result;
   }
@@ -184,8 +185,8 @@ public class ConfigNodeStartupCheck {
         new TConfigNodeRegisterReq(
             new TConfigNodeLocation(
                 -1,
-                new TEndPoint(conf.getRpcAddress(), conf.getRpcPort()),
-                new TEndPoint(conf.getRpcAddress(), conf.getConsensusPort())),
+                new TEndPoint(conf.getInternalAddress(), 
conf.getInternalPort()),
+                new TEndPoint(conf.getInternalAddress(), 
conf.getConsensusPort())),
             conf.getDataRegionConsensusProtocolClass(),
             conf.getSchemaRegionConsensusProtocolClass(),
             conf.getSeriesPartitionSlotNum(),
@@ -242,9 +243,12 @@ public class ConfigNodeStartupCheck {
     }
 
     // Startup configuration
-    systemProperties.setProperty("rpc_address", 
String.valueOf(conf.getRpcAddress()));
-    systemProperties.setProperty("rpc_port", 
String.valueOf(conf.getRpcPort()));
-    systemProperties.setProperty("consensus_port", 
String.valueOf(conf.getConsensusPort()));
+    systemProperties.setProperty(
+        IoTDBConstant.INTERNAL_ADDRESS, 
String.valueOf(conf.getInternalAddress()));
+    systemProperties.setProperty(
+        IoTDBConstant.INTERNAL_PORT, String.valueOf(conf.getInternalPort()));
+    systemProperties.setProperty(
+        IoTDBConstant.CONSENSUS_PORT, String.valueOf(conf.getConsensusPort()));
 
     // Consensus protocol configuration
     systemProperties.setProperty(
@@ -262,7 +266,8 @@ public class ConfigNodeStartupCheck {
 
     // ConfigNodeList
     systemProperties.setProperty(
-        "confignode_list", 
NodeUrlUtils.convertTConfigNodeUrls(conf.getConfigNodeList()));
+        IoTDBConstant.TARGET_CONFIG_NODES,
+        NodeUrlUtils.convertTConfigNodeUrls(conf.getConfigNodeList()));
 
     try (FileOutputStream fileOutputStream = new 
FileOutputStream(systemPropertiesFile)) {
       systemProperties.store(fileOutputStream, "");
@@ -285,30 +290,35 @@ public class ConfigNodeStartupCheck {
     boolean needReWrite = false;
 
     // Startup configuration
-    String rpcAddress = systemProperties.getProperty("rpc_address", null);
-    if (rpcAddress == null) {
+    String internalAddress = 
systemProperties.getProperty(IoTDBConstant.INTERNAL_ADDRESS, null);
+    if (internalAddress == null) {
       needReWrite = true;
-    } else if (!rpcAddress.equals(conf.getRpcAddress())) {
-      throw new ConfigurationException("rpc_address", conf.getRpcAddress(), 
rpcAddress);
+    } else if (!internalAddress.equals(conf.getInternalAddress())) {
+      throw new ConfigurationException(
+          IoTDBConstant.INTERNAL_ADDRESS, conf.getInternalAddress(), 
internalAddress);
     }
 
-    if (systemProperties.getProperty("rpc_port", null) == null) {
+    if (systemProperties.getProperty(IoTDBConstant.INTERNAL_PORT, null) == 
null) {
       needReWrite = true;
     } else {
-      int rpcPort = Integer.parseInt(systemProperties.getProperty("rpc_port"));
-      if (rpcPort != conf.getRpcPort()) {
+      int internalPort =
+          
Integer.parseInt(systemProperties.getProperty(IoTDBConstant.INTERNAL_PORT));
+      if (internalPort != conf.getInternalPort()) {
         throw new ConfigurationException(
-            "rpc_port", String.valueOf(conf.getRpcPort()), 
String.valueOf(rpcPort));
+            IoTDBConstant.INTERNAL_PORT,
+            String.valueOf(conf.getInternalPort()),
+            String.valueOf(internalPort));
       }
     }
 
-    if (systemProperties.getProperty("consensus_port", null) == null) {
+    if (systemProperties.getProperty(IoTDBConstant.CONSENSUS_PORT, null) == 
null) {
       needReWrite = true;
     } else {
-      int consensusPort = 
Integer.parseInt(systemProperties.getProperty("consensus_port"));
+      int consensusPort =
+          
Integer.parseInt(systemProperties.getProperty(IoTDBConstant.CONSENSUS_PORT));
       if (consensusPort != conf.getConsensusPort()) {
         throw new ConfigurationException(
-            "consensus_port",
+            IoTDBConstant.CONSENSUS_PORT,
             String.valueOf(conf.getConsensusPort()),
             String.valueOf(consensusPort));
       }
@@ -385,12 +395,12 @@ public class ConfigNodeStartupCheck {
 
   /** Only load ConfigNodeList from confignode-system.properties when restart 
*/
   private void loadConfigNodeList() throws StartupException {
-    String addresses = systemProperties.getProperty("confignode_list", null);
+    String addresses = 
systemProperties.getProperty(IoTDBConstant.TARGET_CONFIG_NODES, null);
     if (addresses != null && !addresses.isEmpty()) {
       try {
         conf.setConfigNodeList(NodeUrlUtils.parseTConfigNodeUrls(addresses));
       } catch (BadNodeUrlException e) {
-        throw new StartupException("Parse ConfigNodeList failed: {}", 
e.getMessage());
+        throw new StartupException("Parse target_config_nodes failed: {}", 
e.getMessage());
       }
     }
   }
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/PartitionRegionStateMachine.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/PartitionRegionStateMachine.java
index 4b53904626..1afcde2f4c 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/PartitionRegionStateMachine.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/PartitionRegionStateMachine.java
@@ -52,7 +52,7 @@ public class PartitionRegionStateMachine implements 
IStateMachine, IStateMachine
     this.configManager = configManager;
     this.currentNode =
         new TEndPoint()
-            
.setIp(ConfigNodeDescriptor.getInstance().getConf().getRpcAddress())
+            
.setIp(ConfigNodeDescriptor.getInstance().getConf().getInternalAddress())
             
.setPort(ConfigNodeDescriptor.getInstance().getConf().getConsensusPort());
   }
 
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
index e210535f01..3bb9a56414 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
@@ -75,7 +75,7 @@ public class ConsensusManager {
         ConsensusFactory.getConsensusImpl(
                 conf.getConfigNodeConsensusProtocolClass(),
                 ConsensusConfig.newBuilder()
-                    .setThisNode(new TEndPoint(conf.getRpcAddress(), 
conf.getConsensusPort()))
+                    .setThisNode(new TEndPoint(conf.getInternalAddress(), 
conf.getConsensusPort()))
                     .setStorageDir(conf.getConsensusDir())
                     .build(),
                 gid -> stateMachine)
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/NodeInfo.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/NodeInfo.java
index 366ea4866c..939f030080 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/NodeInfo.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/NodeInfo.java
@@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation;
 import org.apache.iotdb.common.rpc.thrift.TDataNodeInfo;
 import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
 import org.apache.iotdb.common.rpc.thrift.TSStatus;
+import org.apache.iotdb.commons.conf.IoTDBConstant;
 import org.apache.iotdb.commons.snapshot.SnapshotProcessor;
 import org.apache.iotdb.commons.utils.NodeUrlUtils;
 import org.apache.iotdb.commons.utils.TestOnly;
@@ -337,7 +338,8 @@ public class NodeInfo implements SnapshotProcessor {
       systemProperties.load(inputStream);
     }
     systemProperties.setProperty(
-        "confignode_list", NodeUrlUtils.convertTConfigNodeUrls(new 
ArrayList<>(onlineConfigNodes)));
+        IoTDBConstant.TARGET_CONFIG_NODES,
+        NodeUrlUtils.convertTConfigNodeUrls(new 
ArrayList<>(onlineConfigNodes)));
     try (FileOutputStream fileOutputStream = new 
FileOutputStream(systemPropertiesFile)) {
       systemProperties.store(fileOutputStream, "");
     }
diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCService.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCService.java
index eef7337bf1..973f565bac 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCService.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCService.java
@@ -79,11 +79,11 @@ public class ConfigNodeRPCService extends ThriftService 
implements ConfigNodeRPC
 
   @Override
   public String getBindIP() {
-    return conf.getRpcAddress();
+    return conf.getInternalAddress();
   }
 
   @Override
   public int getBindPort() {
-    return conf.getRpcPort();
+    return conf.getInternalPort();
   }
 }
diff --git 
a/confignode/src/test/java/org/apache/iotdb/confignode/cli/TemporaryClientDemo.java
 
b/confignode/src/test/java/org/apache/iotdb/confignode/cli/TemporaryClientDemo.java
deleted file mode 100644
index 0c77e5d974..0000000000
--- 
a/confignode/src/test/java/org/apache/iotdb/confignode/cli/TemporaryClientDemo.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.cli;
-
-import org.apache.iotdb.common.rpc.thrift.TSStatus;
-import org.apache.iotdb.confignode.rpc.thrift.IConfigNodeRPCService;
-import org.apache.iotdb.confignode.rpc.thrift.TSetStorageGroupReq;
-import org.apache.iotdb.confignode.rpc.thrift.TStorageGroupSchema;
-import org.apache.iotdb.rpc.RpcTransportFactory;
-import org.apache.iotdb.rpc.TSStatusCode;
-
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.transport.TTransport;
-import org.apache.thrift.transport.TTransportException;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-
-public class TemporaryClientDemo {
-
-  private static final int timeOutInMS = 10000;
-
-  private final Random random = new Random();
-  private Map<Integer, IConfigNodeRPCService.Client> clients;
-  private IConfigNodeRPCService.Client defaultClient;
-
-  public void setStorageGroupsDemo() throws TException {
-    createClients();
-    defaultClient = clients.get(22277);
-
-    for (int i = 0; i < 5; i++) {
-      TSetStorageGroupReq setReq =
-          new TSetStorageGroupReq(new TStorageGroupSchema().setName("root.sg" 
+ i));
-      while (true) {
-        TSStatus status = defaultClient.setStorageGroup(setReq);
-        System.out.println(status.toString());
-        if (status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
-          break;
-        } else if (status.getCode() == 
TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
-          int port = random.nextInt(3) * 2 + 22277;
-          if (status.getRedirectNode() != null) {
-            port = status.getRedirectNode().getPort();
-          }
-          defaultClient = clients.get(port);
-        }
-      }
-    }
-  }
-
-  private void createClients() throws TTransportException {
-    clients = new HashMap<>();
-    for (int i = 22277; i <= 22281; i += 2) {
-      TTransport transport = 
RpcTransportFactory.INSTANCE.getTransport("0.0.0.0", i, timeOutInMS);
-      transport.open();
-      clients.put(i, new IConfigNodeRPCService.Client(new 
TBinaryProtocol(transport)));
-    }
-  }
-}
diff --git 
a/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties 
b/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
index bedc6540f5..85572adee2 100644
--- a/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
+++ b/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-rpc_address=0.0.0.0
-rpc_port=22277
+internal_address=0.0.0.0
+internal_port=22277
 consensus_port=22278
 target_config_nodes=0.0.0.0:22277
 
config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
diff --git 
a/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties 
b/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
index d9a1710a3f..4b76839b60 100644
--- a/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
+++ b/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-rpc_address=0.0.0.0
-rpc_port=22279
+internal_address=0.0.0.0
+internal_port=22279
 consensus_port=22280
 target_config_nodes=0.0.0.0:22277
 
config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
diff --git 
a/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties 
b/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
index 37d54351d2..0fe0c138b9 100644
--- a/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
+++ b/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
@@ -17,8 +17,8 @@
 # under the License.
 #
 
-rpc_address=0.0.0.0
-rpc_port=22281
+internal_address=0.0.0.0
+internal_port=22281
 consensus_port=22282
 target_config_nodes=0.0.0.0:22277
 
config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
diff --git a/docs/UserGuide/Cluster/Cluster-Setup.md 
b/docs/UserGuide/Cluster/Cluster-Setup.md
index 40b74f5fe5..f8f477e9a7 100644
--- a/docs/UserGuide/Cluster/Cluster-Setup.md
+++ b/docs/UserGuide/Cluster/Cluster-Setup.md
@@ -86,8 +86,8 @@ Please set the important parameters in 
iotdb-confignode.properties:
 
 | **Configuration** | **Description**                                      |
 | -------- | -------------------------------------------- |
-| rpc\_address    | Internal rpc service address of ConfigNode          |
-| rpc\_port    | Internal rpc service address of ConfigNode       |
+| internal\_address    | Internal rpc service address of ConfigNode          |
+| internal\_port    | Internal rpc service address of ConfigNode       |
 | consensus\_port    | ConfigNode replication consensus protocol communication 
port    |
 | target\_config\_nodes    | Target ConfigNode address, if the current is the 
first ConfigNode, then set its address:port    |
 | data\_replication\_factor  | Data replication factor, no more than DataNode 
number        |
diff --git a/docs/UserGuide/Reference/ConfigNode-Config-Manual.md 
b/docs/UserGuide/Reference/ConfigNode-Config-Manual.md
index 13009ef280..1e474458a6 100644
--- a/docs/UserGuide/Reference/ConfigNode-Config-Manual.md
+++ b/docs/UserGuide/Reference/ConfigNode-Config-Manual.md
@@ -63,26 +63,26 @@ The details of each parameter are as follows:
 
 ## ConfigNode Configuration File(iotdb-confignode.properties)
 
-IoTDB Cluster configuration is in ConfigNode.
+The global configuration of cluster is in ConfigNode.
 
 ### Internal RPC Service Configurations
 
-* rpc\_address
+* internal\_address
 
-|Name| rpc\_address |
+|Name| internal\_address |
 |:---:|:---|
-|Description| Client rpc service address |
+|Description| ConfigNode internal service address |
 |Type| String |
 |Default| 0.0.0.0|
 |Effective|After restarting system|
 
-* rpc\_port
+* internal\_port
 
-|Name| rpc\_port |
+|Name| internal\_port |
 |:---:|:---|
-|Description| Client RPC service port|
+|Description| ConfigNode internal service port|
 |Type| Short Int : [0,65535] |
-|Default| 6667 |
+|Default| 22277 |
 |Effective|After restarting system|
 
 * target\_config\_nodes
@@ -91,7 +91,7 @@ IoTDB Cluster configuration is in ConfigNode.
 |:---:|:---|
 |Description| Target ConfigNode address, for current ConfigNode to join the 
cluster |
 |Type| String |
-|Default| 0.0.0.0:22277 |
+|Default| 127.0.0.1:22277 |
 |Effective|After restarting system|
 
 * rpc\_thrift\_compression\_enable
diff --git a/docs/UserGuide/Reference/DataNode-Config-Manual.md 
b/docs/UserGuide/Reference/DataNode-Config-Manual.md
index 7f62659ed1..5e5c5ba473 100644
--- a/docs/UserGuide/Reference/DataNode-Config-Manual.md
+++ b/docs/UserGuide/Reference/DataNode-Config-Manual.md
@@ -112,7 +112,7 @@ The permission definitions are in 
${IOTDB\_CONF}/conf/jmx.access.
 |:---:|:---|
 |Description| The client rpc service listens on the address.|
 |Type|String|
-|Default| "0.0.0.0" |
+|Default| 0.0.0.0 |
 |Effective|After restarting system|
 
 * rpc\_port
diff --git a/docs/zh/UserGuide/Cluster/Cluster-Setup.md 
b/docs/zh/UserGuide/Cluster/Cluster-Setup.md
index a9e64a4ab6..1a92a9c0ae 100644
--- a/docs/zh/UserGuide/Cluster/Cluster-Setup.md
+++ b/docs/zh/UserGuide/Cluster/Cluster-Setup.md
@@ -86,8 +86,8 @@ mvn clean package -pl distribution -am -DskipTests
 
 | **配置项** | **说明**                                      |
 | -------- | -------------------------------------------- |
-| rpc\_address    | ConfigNode 在集群内部通讯使用的地址          |
-| rpc\_port    | ConfigNode 在集群内部通讯使用的端口           |
+| internal\_address    | ConfigNode 在集群内部通讯使用的地址          |
+| internal\_port    | ConfigNode 在集群内部通讯使用的端口           |
 | consensus\_port    | ConfigNode 副本组共识协议通信使用的端口         |
 | target\_config\_nodes    | 种子 ConfigNode 地址,第一个 ConfigNode 配置自己的 
address:port        |
 | data\_replication\_factor  | 数据副本数,DataNode 数量不应少于此数目        |
diff --git a/docs/zh/UserGuide/Reference/ConfigNode-Config-Manual.md 
b/docs/zh/UserGuide/Reference/ConfigNode-Config-Manual.md
index fd2a4859dc..9ba96f9e55 100644
--- a/docs/zh/UserGuide/Reference/ConfigNode-Config-Manual.md
+++ b/docs/zh/UserGuide/Reference/ConfigNode-Config-Manual.md
@@ -65,20 +65,20 @@ IoTDB 集群的全局配置通过 ConfigNode 配置。
 
 ### Internal RPC Service 配置
 
-* rpc\_address
+* internal\_address
 
-|名字| rpc\_address |
+|名字| internal\_address |
 |:---:|:---|
-|描述| rpc地址 |
+|描述| ConfigNode 集群内部地址 |
 |类型| String |
 |默认值| 0.0.0.0|
 |改后生效方式|重启服务生效|
 
-* rpc\_port
+* internal\_port
 
-|名字| rpc\_port |
+|名字| internal\_port |
 |:---:|:---|
-|描述| jdbc 服务监听端口。请确认该端口不是系统保留端口并且未被占用。|
+|描述| ConfigNode 集群服务监听端口|
 |类型| Short Int : [0,65535] |
 |默认值| 6667 |
 |改后生效方式|重启服务生效|
@@ -89,7 +89,7 @@ IoTDB 集群的全局配置通过 ConfigNode 配置。
 |:---:|:---|
 |描述| 目标 ConfigNode 地址,ConfigNode 通过此地址加入集群 |
 |类型| String |
-|默认值| 0.0.0.0:22277 |
+|默认值| 127.0.0.1:22277 |
 |改后生效方式|重启服务生效|
 
 * rpc\_thrift\_compression\_enable
diff --git a/docs/zh/UserGuide/Reference/DataNode-Config-Manual.md 
b/docs/zh/UserGuide/Reference/DataNode-Config-Manual.md
index 0a08bc6907..c6f8f36671 100644
--- a/docs/zh/UserGuide/Reference/DataNode-Config-Manual.md
+++ b/docs/zh/UserGuide/Reference/DataNode-Config-Manual.md
@@ -93,7 +93,7 @@ IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 
 
 |名字| rpc\_address |
 |:---:|:---|
-|描述| rpc地址 |
+|描述| 客户端 RPC 服务监听地址 |
 |类型| String |
 |默认值| 0.0.0.0|
 |改后生效方式|重启服务生效|
@@ -102,7 +102,7 @@ IoTDB DataNode 与 Standalone 模式共用一套配置文件,均位于 IoTDB 
 
 |名字| rpc\_port |
 |:---:|:---|
-|描述| Client RPC 服务监听端口。|
+|描述| Client RPC 服务监听端口|
 |类型| Short Int : [0,65535] |
 |默认值| 6667 |
 |改后生效方式|重启服务生效|
diff --git 
a/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNodeWrapper.java 
b/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNodeWrapper.java
index 468312edb7..b581a16d75 100644
--- 
a/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNodeWrapper.java
+++ 
b/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNodeWrapper.java
@@ -18,6 +18,8 @@
  */
 package org.apache.iotdb.it.env;
 
+import org.apache.iotdb.commons.conf.IoTDBConstant;
+
 import org.apache.commons.lang3.SystemUtils;
 
 import java.io.File;
@@ -26,12 +28,12 @@ import java.util.Properties;
 public class ConfigNodeWrapper extends AbstractNodeWrapper {
 
   private final int consensusPort;
-  private final String targetConfigNode;
+  private final String targetConfigNodes;
   private final boolean isSeed;
 
   public ConfigNodeWrapper(
       boolean isSeed,
-      String targetConfigNode,
+      String targetConfigNodes,
       String testClassName,
       String testMethodName,
       int[] portList) {
@@ -39,18 +41,18 @@ public class ConfigNodeWrapper extends AbstractNodeWrapper {
     this.consensusPort = portList[1];
     this.isSeed = isSeed;
     if (isSeed) {
-      this.targetConfigNode = getIpAndPortString();
+      this.targetConfigNodes = getIpAndPortString();
     } else {
-      this.targetConfigNode = targetConfigNode;
+      this.targetConfigNodes = targetConfigNodes;
     }
   }
 
   @Override
   protected void updateConfig(Properties properties) {
-    properties.setProperty("rpc_address", super.getIp());
-    properties.setProperty("rpc_port", String.valueOf(getPort()));
-    properties.setProperty("consensus_port", 
String.valueOf(this.consensusPort));
-    properties.setProperty("target_config_nodes", this.targetConfigNode);
+    properties.setProperty(IoTDBConstant.INTERNAL_ADDRESS, super.getIp());
+    properties.setProperty(IoTDBConstant.INTERNAL_PORT, 
String.valueOf(getPort()));
+    properties.setProperty(IoTDBConstant.CONSENSUS_PORT, 
String.valueOf(this.consensusPort));
+    properties.setProperty(IoTDBConstant.TARGET_CONFIG_NODES, 
this.targetConfigNodes);
     properties.setProperty(
         "config_node_consensus_protocol_class",
         "org.apache.iotdb.consensus.standalone.StandAloneConsensus");
diff --git 
a/integration-test/src/main/java/org/apache/iotdb/it/env/DataNodeWrapper.java 
b/integration-test/src/main/java/org/apache/iotdb/it/env/DataNodeWrapper.java
index 965ce1c2b3..5e9848f117 100644
--- 
a/integration-test/src/main/java/org/apache/iotdb/it/env/DataNodeWrapper.java
+++ 
b/integration-test/src/main/java/org/apache/iotdb/it/env/DataNodeWrapper.java
@@ -18,6 +18,8 @@
  */
 package org.apache.iotdb.it.env;
 
+import org.apache.iotdb.commons.conf.IoTDBConstant;
+
 import org.apache.commons.lang3.SystemUtils;
 
 import java.io.File;
@@ -43,18 +45,18 @@ public class DataNodeWrapper extends AbstractNodeWrapper {
 
   @Override
   protected void updateConfig(Properties properties) {
-    properties.setProperty("rpc_address", super.getIp());
-    properties.setProperty("internal_address", "127.0.0.1");
-    properties.setProperty("rpc_port", String.valueOf(getPort()));
+    properties.setProperty(IoTDBConstant.RPC_ADDRESS, super.getIp());
+    properties.setProperty(IoTDBConstant.INTERNAL_ADDRESS, "127.0.0.1");
+    properties.setProperty(IoTDBConstant.RPC_PORT, String.valueOf(getPort()));
     properties.setProperty("mpp_data_exchange_port", 
String.valueOf(this.mppDataExchangePort));
-    properties.setProperty("internal_port", String.valueOf(this.internalPort));
+    properties.setProperty(IoTDBConstant.INTERNAL_PORT, 
String.valueOf(this.internalPort));
     properties.setProperty(
         "data_region_consensus_port", 
String.valueOf(this.dataRegionConsensusPort));
     properties.setProperty(
         "schema_region_consensus_port", 
String.valueOf(this.schemaRegionConsensusPort));
     properties.setProperty("connection_timeout_ms", "30000");
     if (this.targetConfigNode != null) {
-      properties.setProperty("target_config_nodes", this.targetConfigNode);
+      properties.setProperty(IoTDBConstant.TARGET_CONFIG_NODES, 
this.targetConfigNode);
     }
   }
 
diff --git 
a/integration/src/main/java/org/apache/iotdb/integration/env/ClusterNode.java 
b/integration/src/main/java/org/apache/iotdb/integration/env/ClusterNode.java
index f3764894cb..59a12a6106 100644
--- 
a/integration/src/main/java/org/apache/iotdb/integration/env/ClusterNode.java
+++ 
b/integration/src/main/java/org/apache/iotdb/integration/env/ClusterNode.java
@@ -18,6 +18,8 @@
  */
 package org.apache.iotdb.integration.env;
 
+import org.apache.iotdb.commons.conf.IoTDBConstant;
+
 import org.apache.commons.io.FileUtils;
 
 import java.io.File;
@@ -127,7 +129,7 @@ public class ClusterNode {
 
       Properties engineConfig = new Properties();
       engineConfig.load(new FileInputStream(engineConfigPath));
-      engineConfig.setProperty("rpc_port", String.valueOf(this.rpcPort));
+      engineConfig.setProperty(IoTDBConstant.RPC_PORT, 
String.valueOf(this.rpcPort));
       engineConfig.setProperty("enable_influxdb_rpc_service", 
Boolean.toString(false));
       engineConfig.putAll(engineProperties);
       engineConfig.store(new FileWriter(engineConfigPath), null);
diff --git 
a/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java 
b/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
index 5c29deb183..313a7850f5 100644
--- 
a/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
+++ 
b/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
@@ -29,6 +29,13 @@ public class IoTDBConstant {
   public static final String IOTDB_CONF = "IOTDB_CONF";
   public static final String GLOBAL_DB_NAME = "IoTDB";
 
+  public static final String RPC_ADDRESS = "rpc_address";
+  public static final String RPC_PORT = "rpc_port";
+  public static final String INTERNAL_ADDRESS = "internal_address";
+  public static final String INTERNAL_PORT = "internal_port";
+  public static final String CONSENSUS_PORT = "consensus_port";
+  public static final String TARGET_CONFIG_NODES = "target_config_nodes";
+
   // when running the program in IDE, we can not get the version info using
   // getImplementationVersion()
   public static final String VERSION =
diff --git 
a/node-commons/src/test/java/org/apache/iotdb/commons/partition/SerializeTest.java
 
b/node-commons/src/test/java/org/apache/iotdb/commons/partition/SerializeTest.java
deleted file mode 100644
index 6011c2ee16..0000000000
--- 
a/node-commons/src/test/java/org/apache/iotdb/commons/partition/SerializeTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.commons.partition;
-
-import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId;
-import org.apache.iotdb.common.rpc.thrift.TConsensusGroupType;
-import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
-import org.apache.iotdb.common.rpc.thrift.TEndPoint;
-import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
-import org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot;
-import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot;
-
-import org.apache.thrift.TException;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public abstract class SerializeTest {
-
-  abstract void testSerialize() throws TException, IOException;
-
-  public String seriesPartitionExecutorClass =
-      "org.apache.iotdb.commons.partition.executor.hash.APHashExecutor";
-
-  public Map<String, Map<TSeriesPartitionSlot, TRegionReplicaSet>> 
generateCreateSchemaPartitionMap(
-      int startFlag, TConsensusGroupId tConsensusGroupId) {
-    // Map<StorageGroup, Map<TSeriesPartitionSlot, TSchemaRegionPlaceInfo>>
-    Map<String, Map<TSeriesPartitionSlot, TRegionReplicaSet>> 
assignedSchemaPartition =
-        new HashMap<>();
-    Map<TSeriesPartitionSlot, TRegionReplicaSet> relationInfo = new 
HashMap<>();
-    relationInfo.put(
-        new TSeriesPartitionSlot(startFlag),
-        generateTRegionReplicaSet(startFlag, tConsensusGroupId));
-    assignedSchemaPartition.put("root.test.sg", relationInfo);
-    return assignedSchemaPartition;
-  }
-
-  public TRegionReplicaSet generateTRegionReplicaSet(
-      int startFlag, TConsensusGroupId tConsensusGroupId) {
-    TRegionReplicaSet tRegionReplicaSet = new TRegionReplicaSet();
-    tRegionReplicaSet.setRegionId(tConsensusGroupId);
-    List<TDataNodeLocation> dataNodeLocations = new ArrayList<>();
-    int locationNum = 5;
-    for (int i = startFlag; i < locationNum + startFlag; i++) {
-      TDataNodeLocation tDataNodeLocation = new TDataNodeLocation();
-      tDataNodeLocation.setDataNodeId(i);
-      tDataNodeLocation.setClientRpcEndPoint(new TEndPoint("127.0.0.1", 6000 + 
i));
-      tDataNodeLocation.setInternalEndPoint(new TEndPoint("127.0.0.1", 7000 + 
i));
-      tDataNodeLocation.setMPPDataExchangeEndPoint(new TEndPoint("127.0.0.1", 
8000 + i));
-      tDataNodeLocation.setDataRegionConsensusEndPoint(new 
TEndPoint("127.0.0.1", 9000 + i));
-      tDataNodeLocation.setSchemaRegionConsensusEndPoint(new 
TEndPoint("127.0.0.1", 10000 + i));
-      dataNodeLocations.add(tDataNodeLocation);
-    }
-    tRegionReplicaSet.setDataNodeLocations(dataNodeLocations);
-    return tRegionReplicaSet;
-  }
-
-  public TConsensusGroupId generateTConsensusGroupId(int startFlag) {
-    return new TConsensusGroupId(TConsensusGroupType.PartitionRegion, 111000 + 
startFlag);
-  }
-
-  public Map<String, Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, 
List<TRegionReplicaSet>>>>
-      generateCreateDataPartitionMap(int startFlag, TConsensusGroupId 
tConsensusGroupId) {
-    // Map<StorageGroup, Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, 
List<TRegionMessage>>>>
-    Map<String, Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, 
List<TRegionReplicaSet>>>>
-        dataPartitionMap = new HashMap<>();
-
-    Map<TTimePartitionSlot, List<TRegionReplicaSet>> relationInfo = new 
HashMap<>();
-    relationInfo.put(
-        new TTimePartitionSlot(System.currentTimeMillis() / 1000),
-        Collections.singletonList(generateTRegionReplicaSet(startFlag, 
tConsensusGroupId)));
-
-    Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, 
List<TRegionReplicaSet>>> slotInfo =
-        new HashMap<>();
-    slotInfo.put(new TSeriesPartitionSlot(startFlag), relationInfo);
-
-    dataPartitionMap.put("root.test.data.sg", slotInfo);
-    return dataPartitionMap;
-  }
-}
diff --git a/server/src/assembly/resources/conf/iotdb-datanode.properties 
b/server/src/assembly/resources/conf/iotdb-datanode.properties
index 3393731f21..5f7eb7c0a1 100644
--- a/server/src/assembly/resources/conf/iotdb-datanode.properties
+++ b/server/src/assembly/resources/conf/iotdb-datanode.properties
@@ -61,8 +61,8 @@ schema_region_consensus_port=50010
 
 # At least one running ConfigNode should be set for joining the cluster
 # Format: ip:port
-# where the ip should be consistent with the target ConfigNode's 
confignode_rpc_address,
-# and the port should be consistent with the target ConfigNode's 
confignode_rpc_port.
+# where the ip should be consistent with the target ConfigNode's 
confignode_internal_address,
+# and the port should be consistent with the target ConfigNode's 
confignode_internal_port.
 # When successfully connecting to the ConfigNodeGroup, DataNode will get all 
online
 # config nodes and store them in memory.
 # Datatype: String
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java 
b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index 30d9fe70a3..e8470e94ef 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -827,8 +827,8 @@ public class IoTDBConfig {
   /** cache size for pages in one schema file */
   private int pageCacheSizeInSchemaFile = 1024;
 
-  /** Internal ip for data node */
-  private String internalIp = "127.0.0.1";
+  /** Internal address for data node */
+  private String internalAddress = "127.0.0.1";
 
   /** Internal port for coordinator */
   private int internalPort = 9003;
@@ -2704,12 +2704,12 @@ public class IoTDBConfig {
     this.pageCacheSizeInSchemaFile = pageCacheSizeInSchemaFile;
   }
 
-  public String getInternalIp() {
-    return internalIp;
+  public String getInternalAddress() {
+    return internalAddress;
   }
 
-  public void setInternalIp(String internalIp) {
-    this.internalIp = internalIp;
+  public void setInternalAddress(String internalAddress) {
+    this.internalAddress = internalAddress;
   }
 
   public int getInternalPort() {
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java 
b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
index fd148559e0..8668ab986a 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
@@ -144,7 +144,7 @@ public class IoTDBDescriptor {
       Properties properties = new Properties();
       properties.load(inputStream);
 
-      conf.setRpcAddress(properties.getProperty("rpc_address", 
conf.getRpcAddress()));
+      conf.setRpcAddress(properties.getProperty(IoTDBConstant.RPC_ADDRESS, 
conf.getRpcAddress()));
 
       loadClusterProps(properties);
 
@@ -180,7 +180,7 @@ public class IoTDBDescriptor {
 
       conf.setRpcPort(
           Integer.parseInt(
-              properties.getProperty("rpc_port", 
Integer.toString(conf.getRpcPort()))));
+              properties.getProperty(IoTDBConstant.RPC_PORT, 
Integer.toString(conf.getRpcPort()))));
 
       conf.setEnableInfluxDBRpcService(
           Boolean.parseBoolean(
@@ -930,9 +930,9 @@ public class IoTDBDescriptor {
       
conf.setRpcAddress(InetAddress.getByName(conf.getRpcAddress()).getHostAddress());
     }
 
-    boolean isInvalidInternalIp = 
InetAddresses.isInetAddress(conf.getInternalIp());
+    boolean isInvalidInternalIp = 
InetAddresses.isInetAddress(conf.getInternalAddress());
     if (!isInvalidInternalIp) {
-      
conf.setInternalIp(InetAddress.getByName(conf.getInternalIp()).getHostAddress());
+      
conf.setInternalAddress(InetAddress.getByName(conf.getInternalAddress()).getHostAddress());
     }
 
     for (TEndPoint configNode : conf.getTargetConfigNodeList()) {
@@ -946,7 +946,7 @@ public class IoTDBDescriptor {
     logger.debug(
         "after replace, the rpcIP={}, internalIP={}, configNodeUrls={}",
         conf.getRpcAddress(),
-        conf.getInternalIp(),
+        conf.getInternalAddress(),
         conf.getTargetConfigNodeList());
   }
 
@@ -1645,21 +1645,23 @@ public class IoTDBDescriptor {
   }
 
   public void loadClusterProps(Properties properties) {
-    String configNodeUrls = properties.getProperty("target_config_nodes");
+    String configNodeUrls = 
properties.getProperty(IoTDBConstant.TARGET_CONFIG_NODES);
     if (configNodeUrls != null) {
       try {
         
conf.setTargetConfigNodeList(NodeUrlUtils.parseTEndPointUrls(configNodeUrls));
       } catch (BadNodeUrlException e) {
         logger.error(
-            "Config nodes are set in wrong format, please set them like 
0.0.0.0:22277,0.0.0.0:22281");
+            "Config nodes are set in wrong format, please set them like 
127.0.0.1:22277,127.0.0.1:22281");
       }
     }
 
-    conf.setInternalIp(properties.getProperty("internal_address", 
conf.getInternalIp()));
+    conf.setInternalAddress(
+        properties.getProperty(IoTDBConstant.INTERNAL_ADDRESS, 
conf.getInternalAddress()));
 
     conf.setInternalPort(
         Integer.parseInt(
-            properties.getProperty("internal_port", 
Integer.toString(conf.getInternalPort()))));
+            properties.getProperty(
+                IoTDBConstant.INTERNAL_PORT, 
Integer.toString(conf.getInternalPort()))));
 
     conf.setDataRegionConsensusPort(
         Integer.parseInt(
diff --git 
a/server/src/main/java/org/apache/iotdb/db/consensus/DataRegionConsensusImpl.java
 
b/server/src/main/java/org/apache/iotdb/db/consensus/DataRegionConsensusImpl.java
index 54d70ab164..08e3e74ef1 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/consensus/DataRegionConsensusImpl.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/consensus/DataRegionConsensusImpl.java
@@ -56,7 +56,8 @@ public class DataRegionConsensusImpl {
                   conf.getDataRegionConsensusProtocolClass(),
                   ConsensusConfig.newBuilder()
                       .setThisNode(
-                          new TEndPoint(conf.getInternalIp(), 
conf.getDataRegionConsensusPort()))
+                          new TEndPoint(
+                              conf.getInternalAddress(), 
conf.getDataRegionConsensusPort()))
                       .setStorageDir(conf.getDataRegionConsensusDir())
                       .setMultiLeaderConfig(
                           MultiLeaderConfig.newBuilder()
diff --git 
a/server/src/main/java/org/apache/iotdb/db/consensus/SchemaRegionConsensusImpl.java
 
b/server/src/main/java/org/apache/iotdb/db/consensus/SchemaRegionConsensusImpl.java
index bcc8f584c0..af95eb6fa4 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/consensus/SchemaRegionConsensusImpl.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/consensus/SchemaRegionConsensusImpl.java
@@ -53,7 +53,8 @@ public class SchemaRegionConsensusImpl {
                   conf.getSchemaRegionConsensusProtocolClass(),
                   ConsensusConfig.newBuilder()
                       .setThisNode(
-                          new TEndPoint(conf.getInternalIp(), 
conf.getSchemaRegionConsensusPort()))
+                          new TEndPoint(
+                              conf.getInternalAddress(), 
conf.getSchemaRegionConsensusPort()))
                       .setStorageDir(conf.getSchemaRegionConsensusDir())
                       .build(),
                   gid ->
diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/constant/DataNodeEndPoints.java
 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/constant/DataNodeEndPoints.java
index f09c67fc5b..5e8ec756a9 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/constant/DataNodeEndPoints.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/constant/DataNodeEndPoints.java
@@ -25,12 +25,12 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor;
 public class DataNodeEndPoints {
   public static final TEndPoint LOCAL_HOST_DATA_BLOCK_ENDPOINT =
       new TEndPoint(
-          IoTDBDescriptor.getInstance().getConfig().getInternalIp(),
+          IoTDBDescriptor.getInstance().getConfig().getInternalAddress(),
           IoTDBDescriptor.getInstance().getConfig().getMppDataExchangePort());
 
   public static final TEndPoint LOCAL_HOST_INTERNAL_ENDPOINT =
       new TEndPoint(
-          IoTDBDescriptor.getInstance().getConfig().getInternalIp(),
+          IoTDBDescriptor.getInstance().getConfig().getInternalAddress(),
           IoTDBDescriptor.getInstance().getConfig().getInternalPort());
 
   public static boolean isSameNode(TEndPoint endPoint) {
diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/FragmentInstanceDispatcherImpl.java
 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/FragmentInstanceDispatcherImpl.java
index 35c301e230..8e21fb108e 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/FragmentInstanceDispatcherImpl.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/FragmentInstanceDispatcherImpl.java
@@ -81,7 +81,7 @@ public class FragmentInstanceDispatcherImpl implements 
IFragInstanceDispatcher {
     this.executor = executor;
     this.writeOperationExecutor = writeOperationExecutor;
     this.internalServiceClientManager = internalServiceClientManager;
-    this.localhostIpAddr = 
IoTDBDescriptor.getInstance().getConfig().getInternalIp();
+    this.localhostIpAddr = 
IoTDBDescriptor.getInstance().getConfig().getInternalAddress();
     this.localhostInternalPort = 
IoTDBDescriptor.getInstance().getConfig().getInternalPort();
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java 
b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
index 4762f54a41..10a78ab8b8 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
@@ -60,7 +60,7 @@ import org.apache.iotdb.db.protocol.rest.RestService;
 import org.apache.iotdb.db.service.basic.ServiceProvider;
 import org.apache.iotdb.db.service.basic.StandaloneServiceProvider;
 import org.apache.iotdb.db.service.metrics.MetricsService;
-import org.apache.iotdb.db.service.thrift.impl.DataNodeTSServiceImpl;
+import org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl;
 import org.apache.iotdb.db.sync.receiver.ReceiverService;
 import org.apache.iotdb.db.sync.sender.service.SenderService;
 import org.apache.iotdb.db.wal.WALManager;
@@ -113,10 +113,10 @@ public class DataNode implements DataNodeMBean {
 
     // if client ip is the default address, set it same with internal ip
     if (config.getRpcAddress().equals("0.0.0.0")) {
-      config.setRpcAddress(config.getInternalIp());
+      config.setRpcAddress(config.getInternalAddress());
     }
 
-    thisNode.setIp(IoTDBDescriptor.getInstance().getConfig().getInternalIp());
+    
thisNode.setIp(IoTDBDescriptor.getInstance().getConfig().getInternalAddress());
     
thisNode.setPort(IoTDBDescriptor.getInstance().getConfig().getInternalPort());
   }
 
@@ -180,13 +180,13 @@ public class DataNode implements DataNodeMBean {
         location.setDataNodeId(config.getDataNodeId());
         location.setClientRpcEndPoint(new TEndPoint(config.getRpcAddress(), 
config.getRpcPort()));
         location.setInternalEndPoint(
-            new TEndPoint(config.getInternalIp(), config.getInternalPort()));
+            new TEndPoint(config.getInternalAddress(), 
config.getInternalPort()));
         location.setMPPDataExchangeEndPoint(
-            new TEndPoint(config.getInternalIp(), 
config.getMppDataExchangePort()));
+            new TEndPoint(config.getInternalAddress(), 
config.getMppDataExchangePort()));
         location.setDataRegionConsensusEndPoint(
-            new TEndPoint(config.getInternalIp(), 
config.getDataRegionConsensusPort()));
+            new TEndPoint(config.getInternalAddress(), 
config.getDataRegionConsensusPort()));
         location.setSchemaRegionConsensusEndPoint(
-            new TEndPoint(config.getInternalIp(), 
config.getSchemaRegionConsensusPort()));
+            new TEndPoint(config.getInternalAddress(), 
config.getSchemaRegionConsensusPort()));
 
         // Set DataNodeInfo
         TDataNodeInfo info = new TDataNodeInfo();
@@ -354,13 +354,13 @@ public class DataNode implements DataNodeMBean {
         location.setDataNodeId(config.getDataNodeId());
         location.setClientRpcEndPoint(new TEndPoint(config.getRpcAddress(), 
config.getRpcPort()));
         location.setInternalEndPoint(
-            new TEndPoint(config.getInternalIp(), config.getInternalPort()));
+            new TEndPoint(config.getInternalAddress(), 
config.getInternalPort()));
         location.setMPPDataExchangeEndPoint(
-            new TEndPoint(config.getInternalIp(), 
config.getMppDataExchangePort()));
+            new TEndPoint(config.getInternalAddress(), 
config.getMppDataExchangePort()));
         location.setDataRegionConsensusEndPoint(
-            new TEndPoint(config.getInternalIp(), 
config.getDataRegionConsensusPort()));
+            new TEndPoint(config.getInternalAddress(), 
config.getDataRegionConsensusPort()));
         location.setSchemaRegionConsensusEndPoint(
-            new TEndPoint(config.getInternalIp(), 
config.getSchemaRegionConsensusPort()));
+            new TEndPoint(config.getInternalAddress(), 
config.getSchemaRegionConsensusPort()));
         TDataNodeActiveReq req = new TDataNodeActiveReq();
         req.setLocation(location);
         req.setDataNodeId(config.getDataNodeId());
@@ -394,7 +394,7 @@ public class DataNode implements DataNodeMBean {
     // init rpc service
     IoTDBDescriptor.getInstance()
         .getConfig()
-        .setRpcImplClassName(DataNodeTSServiceImpl.class.getName());
+        .setRpcImplClassName(ClientRPCServiceImpl.class.getName());
     if (IoTDBDescriptor.getInstance().getConfig().isEnableRpcService()) {
       registerManager.register(RPCService.getInstance());
     }
diff --git a/server/src/main/java/org/apache/iotdb/db/service/NewIoTDB.java 
b/server/src/main/java/org/apache/iotdb/db/service/NewIoTDB.java
index 853931db1f..99bdf64ef9 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/NewIoTDB.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/NewIoTDB.java
@@ -48,7 +48,7 @@ import org.apache.iotdb.db.protocol.rest.RestService;
 import org.apache.iotdb.db.rescon.PrimitiveArrayManager;
 import org.apache.iotdb.db.rescon.SystemInfo;
 import org.apache.iotdb.db.service.metrics.MetricsService;
-import org.apache.iotdb.db.service.thrift.impl.DataNodeTSServiceImpl;
+import org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl;
 import org.apache.iotdb.db.sync.receiver.ReceiverService;
 import org.apache.iotdb.db.sync.sender.service.SenderService;
 import org.apache.iotdb.db.wal.WALManager;
@@ -120,7 +120,7 @@ public class NewIoTDB implements NewIoTDBMBean {
     // init rpc service
     IoTDBDescriptor.getInstance()
         .getConfig()
-        .setRpcImplClassName(DataNodeTSServiceImpl.class.getName());
+        .setRpcImplClassName(ClientRPCServiceImpl.class.getName());
 
     registerManager.register(MetricsService.getInstance());
     logger.info("recover the schema...");
diff --git a/server/src/main/java/org/apache/iotdb/db/service/RPCService.java 
b/server/src/main/java/org/apache/iotdb/db/service/RPCService.java
index 85b3d128b9..e38823a4ed 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/RPCService.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/RPCService.java
@@ -27,7 +27,7 @@ import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
 import org.apache.iotdb.db.service.thrift.ProcessorWithMetrics;
 import org.apache.iotdb.db.service.thrift.handler.RPCServiceThriftHandler;
-import org.apache.iotdb.db.service.thrift.impl.TSIEventHandler;
+import org.apache.iotdb.db.service.thrift.impl.IClientRPCServiceWithHandler;
 import org.apache.iotdb.metrics.config.MetricConfigDescriptor;
 import org.apache.iotdb.service.rpc.thrift.IClientRPCService.Processor;
 
@@ -36,7 +36,7 @@ import java.lang.reflect.InvocationTargetException;
 /** A service to handle jdbc request from client. */
 public class RPCService extends ThriftService implements RPCServiceMBean {
 
-  private TSIEventHandler impl;
+  private IClientRPCServiceWithHandler impl;
 
   public static RPCService getInstance() {
     return RPCServiceHolder.INSTANCE;
@@ -47,7 +47,7 @@ public class RPCService extends ThriftService implements 
RPCServiceMBean {
       throws ClassNotFoundException, IllegalAccessException, 
InstantiationException,
           NoSuchMethodException, InvocationTargetException {
     impl =
-        (TSIEventHandler)
+        (IClientRPCServiceWithHandler)
             
Class.forName(IoTDBDescriptor.getInstance().getConfig().getRpcImplClassName())
                 .getDeclaredConstructor()
                 .newInstance();
diff --git 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/handler/RPCServiceThriftHandler.java
 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/handler/RPCServiceThriftHandler.java
index 1501402b08..d6dd456370 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/handler/RPCServiceThriftHandler.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/handler/RPCServiceThriftHandler.java
@@ -16,7 +16,7 @@
  */
 package org.apache.iotdb.db.service.thrift.handler;
 
-import org.apache.iotdb.db.service.thrift.impl.TSIEventHandler;
+import org.apache.iotdb.db.service.thrift.impl.IClientRPCServiceWithHandler;
 
 import org.apache.thrift.protocol.TProtocol;
 import org.apache.thrift.server.ServerContext;
@@ -24,9 +24,10 @@ import org.apache.thrift.server.TServerEventHandler;
 import org.apache.thrift.transport.TTransport;
 
 public class RPCServiceThriftHandler implements TServerEventHandler {
-  private TSIEventHandler eventHandler;
 
-  public RPCServiceThriftHandler(TSIEventHandler eventHandler) {
+  private final IClientRPCServiceWithHandler eventHandler;
+
+  public RPCServiceThriftHandler(IClientRPCServiceWithHandler eventHandler) {
     this.eventHandler = eventHandler;
   }
 
diff --git 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeTSServiceImpl.java
 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
similarity index 99%
rename from 
server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeTSServiceImpl.java
rename to 
server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
index cf06db5a88..f28f53ec14 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeTSServiceImpl.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
@@ -121,9 +121,9 @@ import static 
org.apache.iotdb.db.utils.ErrorHandlingUtils.onIoTDBException;
 import static 
org.apache.iotdb.db.utils.ErrorHandlingUtils.onNPEOrUnexpectedException;
 import static org.apache.iotdb.db.utils.ErrorHandlingUtils.onQueryException;
 
-public class DataNodeTSServiceImpl implements TSIEventHandler {
+public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
 
-  private static final Logger LOGGER = 
LoggerFactory.getLogger(DataNodeTSServiceImpl.class);
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ClientRPCServiceImpl.class);
 
   private static final IoTDBConfig config = 
IoTDBDescriptor.getInstance().getConfig();
 
@@ -135,7 +135,7 @@ public class DataNodeTSServiceImpl implements 
TSIEventHandler {
 
   private final ISchemaFetcher SCHEMA_FETCHER;
 
-  public DataNodeTSServiceImpl() {
+  public ClientRPCServiceImpl() {
     if (config.isClusterMode()) {
       PARTITION_FETCHER = ClusterPartitionFetcher.getInstance();
       SCHEMA_FETCHER = ClusterSchemaFetcher.getInstance();
diff --git 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSIEventHandler.java
 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/IClientRPCServiceWithHandler.java
similarity index 92%
rename from 
server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSIEventHandler.java
rename to 
server/src/main/java/org/apache/iotdb/db/service/thrift/impl/IClientRPCServiceWithHandler.java
index 33fb4d8875..57a7dd0364 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSIEventHandler.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/IClientRPCServiceWithHandler.java
@@ -20,6 +20,6 @@ package org.apache.iotdb.db.service.thrift.impl;
 
 import org.apache.iotdb.service.rpc.thrift.IClientRPCService;
 
-public interface TSIEventHandler extends IClientRPCService.Iface {
+public interface IClientRPCServiceWithHandler extends IClientRPCService.Iface {
   void handleClientExit();
 }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
index 659698b997..77f101207e 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
@@ -161,13 +161,13 @@ import static 
org.apache.iotdb.db.utils.ErrorHandlingUtils.onNonQueryException;
 import static org.apache.iotdb.db.utils.ErrorHandlingUtils.onQueryException;
 
 /** Thrift RPC implementation at server side. */
-public class TSServiceImpl implements TSIEventHandler {
+public class TSServiceImpl implements IClientRPCServiceWithHandler {
 
   private static final SessionManager SESSION_MANAGER = 
SessionManager.getInstance();
 
   private class QueryTask implements Callable<TSExecuteStatementResp> {
 
-    private PhysicalPlan plan;
+    private final PhysicalPlan plan;
     private final long queryStartTime;
     private final long sessionId;
     private final String statement;
diff --git 
a/server/src/test/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneSchedulerTest.java
 
b/server/src/test/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneSchedulerTest.java
index 5bfdb231ac..6a19ade539 100644
--- 
a/server/src/test/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneSchedulerTest.java
+++ 
b/server/src/test/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneSchedulerTest.java
@@ -504,13 +504,13 @@ public class StandaloneSchedulerTest {
     dataNodeList.add(
         new TDataNodeLocation()
             .setClientRpcEndPoint(new TEndPoint(conf.getRpcAddress(), 
conf.getRpcPort()))
-            .setInternalEndPoint(new TEndPoint(conf.getInternalIp(), 
conf.getInternalPort()))
+            .setInternalEndPoint(new TEndPoint(conf.getInternalAddress(), 
conf.getInternalPort()))
             .setMPPDataExchangeEndPoint(
-                new TEndPoint(conf.getInternalIp(), 
conf.getMppDataExchangePort()))
+                new TEndPoint(conf.getInternalAddress(), 
conf.getMppDataExchangePort()))
             .setDataRegionConsensusEndPoint(
-                new TEndPoint(conf.getInternalIp(), 
conf.getDataRegionConsensusPort()))
+                new TEndPoint(conf.getInternalAddress(), 
conf.getDataRegionConsensusPort()))
             .setSchemaRegionConsensusEndPoint(
-                new TEndPoint(conf.getInternalIp(), 
conf.getSchemaRegionConsensusPort())));
+                new TEndPoint(conf.getInternalAddress(), 
conf.getSchemaRegionConsensusPort())));
 
     // construct fragmentInstance
     return new TRegionReplicaSet(new TConsensusGroupId(type, 0), dataNodeList);
diff --git 
a/server/src/test/java/org/apache/iotdb/db/service/ClientRPCServiceImplTest.java
 
b/server/src/test/java/org/apache/iotdb/db/service/ClientRPCServiceImplTest.java
index 17be292632..01d8e44461 100644
--- 
a/server/src/test/java/org/apache/iotdb/db/service/ClientRPCServiceImplTest.java
+++ 
b/server/src/test/java/org/apache/iotdb/db/service/ClientRPCServiceImplTest.java
@@ -319,13 +319,13 @@ public class ClientRPCServiceImplTest {
     dataNodeList.add(
         new TDataNodeLocation()
             .setClientRpcEndPoint(new TEndPoint(conf.getRpcAddress(), 
conf.getRpcPort()))
-            .setInternalEndPoint(new TEndPoint(conf.getInternalIp(), 
conf.getInternalPort()))
+            .setInternalEndPoint(new TEndPoint(conf.getInternalAddress(), 
conf.getInternalPort()))
             .setMPPDataExchangeEndPoint(
-                new TEndPoint(conf.getInternalIp(), 
conf.getMppDataExchangePort()))
+                new TEndPoint(conf.getInternalAddress(), 
conf.getMppDataExchangePort()))
             .setDataRegionConsensusEndPoint(
-                new TEndPoint(conf.getInternalIp(), 
conf.getDataRegionConsensusPort()))
+                new TEndPoint(conf.getInternalAddress(), 
conf.getDataRegionConsensusPort()))
             .setSchemaRegionConsensusEndPoint(
-                new TEndPoint(conf.getInternalIp(), 
conf.getSchemaRegionConsensusPort())));
+                new TEndPoint(conf.getInternalAddress(), 
conf.getSchemaRegionConsensusPort())));
 
     // construct fragmentInstance
     return new TRegionReplicaSet(

Reply via email to