This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch remove_list
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/remove_list by this push:
new 1fec0f1024a Finish
1fec0f1024a is described below
commit 1fec0f1024ab635460ac98558212e671993db5b7
Author: YongzaoDan <[email protected]>
AuthorDate: Thu Oct 19 00:10:56 2023 +0800
Finish
---
.../DockerCompose/docker-compose-cluster-1c2d.yml | 6 +++---
.../main/DockerCompose/docker-compose-host-3c3d.yml | 4 ++--
.../main/DockerCompose/docker-compose-standalone.yml | 4 ++--
docker/src/main/Dockerfile-1c1d | 4 ++--
.../apache/iotdb/it/env/cluster/env/AbstractEnv.java | 6 +++---
.../iotdb/it/env/cluster/node/ConfigNodeWrapper.java | 8 ++++----
.../iotdb/it/env/cluster/node/DataNodeWrapper.java | 4 ++--
.../resources/conf/iotdb-confignode.properties | 9 ++++-----
.../iotdb/confignode/conf/ConfigNodeConfig.java | 10 +++++-----
.../iotdb/confignode/conf/ConfigNodeDescriptor.java | 20 ++++++++++----------
.../confignode/conf/ConfigNodeStartupCheck.java | 10 +++++-----
.../manager/node/ClusterNodeStartUtils.java | 4 ++--
.../apache/iotdb/confignode/service/ConfigNode.java | 14 +++++++-------
.../confignode/service/ConfigNodeShutdownHook.java | 6 +++---
.../confignode1conf/iotdb-confignode.properties | 2 +-
.../confignode2conf/iotdb-confignode.properties | 2 +-
.../confignode3conf/iotdb-confignode.properties | 2 +-
.../resources/conf/iotdb-datanode.properties | 7 +++----
.../java/org/apache/iotdb/db/conf/IoTDBConfig.java | 10 +++++-----
.../org/apache/iotdb/db/conf/IoTDBDescriptor.java | 6 +++---
.../java/org/apache/iotdb/db/service/DataNode.java | 6 +++---
.../datanode1conf/iotdb-datanode.properties | 2 +-
.../datanode2conf/iotdb-datanode.properties | 2 +-
.../datanode3conf/iotdb-datanode.properties | 2 +-
.../org/apache/iotdb/commons/conf/IoTDBConstant.java | 4 ++--
25 files changed, 76 insertions(+), 78 deletions(-)
diff --git a/docker/src/main/DockerCompose/docker-compose-cluster-1c2d.yml
b/docker/src/main/DockerCompose/docker-compose-cluster-1c2d.yml
index 5b1093e3054..d7fd52ead2f 100644
--- a/docker/src/main/DockerCompose/docker-compose-cluster-1c2d.yml
+++ b/docker/src/main/DockerCompose/docker-compose-cluster-1c2d.yml
@@ -26,7 +26,7 @@ services:
- cn_internal_address=iotdb-confignode
- cn_internal_port=10710
- cn_consensus_port=10720
- - cn_target_config_node=iotdb-confignode:10710
+ - cn_seed_config_node=iotdb-confignode:10710
volumes:
- ./data/confignode:/iotdb/data
- ./logs/confignode:/iotdb/logs
@@ -43,7 +43,7 @@ services:
environment:
- dn_rpc_address=iotdb-datanode-1
- dn_internal_address=iotdb-datanode-1
- - dn_target_config_node=iotdb-confignode:10710
+ - dn_seed_config_node=iotdb-confignode:10710
- dn_rpc_port=6667
- dn_mpp_data_exchange_port=10740
- dn_schema_region_consensus_port=10750
@@ -62,7 +62,7 @@ services:
environment:
- dn_rpc_address=iotdb-datanode-2
- dn_internal_address=iotdb-datanode-2
- - dn_target_config_node=iotdb-confignode:10710
+ - dn_seed_config_node=iotdb-confignode:10710
- dn_rpc_port=6667
- dn_mpp_data_exchange_port=10740
- dn_schema_region_consensus_port=10750
diff --git a/docker/src/main/DockerCompose/docker-compose-host-3c3d.yml
b/docker/src/main/DockerCompose/docker-compose-host-3c3d.yml
index 4388f05c173..ab88c54f254 100644
--- a/docker/src/main/DockerCompose/docker-compose-host-3c3d.yml
+++ b/docker/src/main/DockerCompose/docker-compose-host-3c3d.yml
@@ -23,7 +23,7 @@ services:
container_name: iotdb-confignode
environment:
- cn_internal_address=iotdb-1
- - cn_target_config_node=iotdb-1:10710
+ - cn_seed_config_node=iotdb-1:10710
- cn_internal_port=10710
- cn_consensus_port=10720
- schema_replication_factor=3
@@ -41,7 +41,7 @@ services:
environment:
- dn_rpc_address=iotdb-1
- dn_internal_address=iotdb-1
- - dn_target_config_node=iotdb-1:10710
+ - dn_seed_config_node=iotdb-1:10710
- dn_rpc_port=6667
- dn_mpp_data_exchange_port=10740
- dn_schema_region_consensus_port=10750
diff --git a/docker/src/main/DockerCompose/docker-compose-standalone.yml
b/docker/src/main/DockerCompose/docker-compose-standalone.yml
index 6aac4496819..7193acfdcde 100644
--- a/docker/src/main/DockerCompose/docker-compose-standalone.yml
+++ b/docker/src/main/DockerCompose/docker-compose-standalone.yml
@@ -28,14 +28,14 @@ services:
- cn_internal_address=iotdb-service
- cn_internal_port=10710
- cn_consensus_port=10720
- - cn_target_config_node=iotdb-service:10710
+ - cn_seed_config_node=iotdb-service:10710
- dn_rpc_address=iotdb-service
- dn_internal_address=iotdb-service
- dn_rpc_port=6667
- dn_mpp_data_exchange_port=10740
- dn_schema_region_consensus_port=10750
- dn_data_region_consensus_port=10760
- - dn_target_config_node=iotdb-service:10710
+ - dn_seed_config_node=iotdb-service:10710
volumes:
- ./data:/iotdb/data
- ./logs:/iotdb/logs
diff --git a/docker/src/main/Dockerfile-1c1d b/docker/src/main/Dockerfile-1c1d
index d7800e24d7b..9aacd0aa0ca 100644
--- a/docker/src/main/Dockerfile-1c1d
+++ b/docker/src/main/Dockerfile-1c1d
@@ -32,8 +32,8 @@ RUN apt update \
&& mv /start-1c1d.sh /iotdb/sbin \
&& sed -i 's/dn_internal_address=127.0.0.1/dn_internal_address=0.0.0.0/g'
/iotdb/conf/iotdb-datanode.properties \
&& sed -i 's/cn_internal_address=127.0.0.1/cn_internal_address=0.0.0.0/g'
/iotdb/conf/iotdb-confignode.properties \
- && sed -i
's/cn_target_config_node=127.0.0.1:10710/cn_target_config_node=0.0.0.0:10710/g'
/iotdb/conf/iotdb-confignode.properties \
- && sed -i
's/dn_target_config_node=127.0.0.1:10710/dn_target_config_node=0.0.0.0:10710/g'
/iotdb/conf/iotdb-datanode.properties \
+ && sed -i
's/cn_seed_config_node=127.0.0.1:10710/cn_seed_config_node=0.0.0.0:10710/g'
/iotdb/conf/iotdb-confignode.properties \
+ && sed -i
's/dn_seed_config_node=127.0.0.1:10710/dn_seed_config_node=0.0.0.0:10710/g'
/iotdb/conf/iotdb-datanode.properties \
&& sed -i 's/#
config_node_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus/config_node_consensus_protocol_class=org.apache.iotdb.consensus.simple.SimpleConsensus/g'
/iotdb/conf/iotdb-common.properties \
&& sed -i 's/#
schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus/schema_region_consensus_protocol_class=org.apache.iotdb.consensus.simple.SimpleConsensus/g'
/iotdb/conf/iotdb-common.properties \
&& sed -i 's/#
data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus/data_region_consensus_protocol_class=org.apache.iotdb.consensus.simple.SimpleConsensus/g'
/iotdb/conf/iotdb-common.properties \
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
index c6108934289..6edfe0122ff 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
@@ -153,7 +153,7 @@ public abstract class AbstractEnv implements BaseEnv {
(MppJVMConfig) clusterConfig.getConfigNodeJVMConfig());
seedConfigNodeWrapper.createLogDir();
seedConfigNodeWrapper.start();
- String targetConfigNode = seedConfigNodeWrapper.getIpAndPortString();
+ String seedConfigNode = seedConfigNodeWrapper.getIpAndPortString();
this.configNodeWrapperList.add(seedConfigNodeWrapper);
// Check if the Seed-ConfigNode started successfully
@@ -171,7 +171,7 @@ public abstract class AbstractEnv implements BaseEnv {
ConfigNodeWrapper configNodeWrapper =
new ConfigNodeWrapper(
false,
- targetConfigNode,
+ seedConfigNode,
testClassName,
testMethodName,
EnvUtils.searchAvailablePorts(),
@@ -205,7 +205,7 @@ public abstract class AbstractEnv implements BaseEnv {
for (int i = 0; i < dataNodesNum; i++) {
DataNodeWrapper dataNodeWrapper =
new DataNodeWrapper(
- targetConfigNode,
+ seedConfigNode,
testClassName,
testMethodName,
EnvUtils.searchAvailablePorts(),
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
index 6c0390c1211..8aec051dc9b 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/ConfigNodeWrapper.java
@@ -70,11 +70,11 @@ public class ConfigNodeWrapper extends AbstractNodeWrapper {
super(testClassName, testMethodName, portList, clusterIndex,
isMultiCluster, startTime);
this.consensusPort = portList[1];
this.isSeed = isSeed;
- String targetConfigNodes;
+ String seedConfigNodes;
if (isSeed) {
- targetConfigNodes = getIpAndPortString();
+ seedConfigNodes = getIpAndPortString();
} else {
- targetConfigNodes = targetCNs;
+ seedConfigNodes = targetCNs;
}
this.defaultNodePropertiesFile =
EnvUtils.getFilePathFromSysVar(DEFAULT_CONFIG_NODE_PROPERTIES,
clusterIndex);
@@ -85,7 +85,7 @@ public class ConfigNodeWrapper extends AbstractNodeWrapper {
reloadMutableFields();
// initialize immutable properties
- immutableNodeProperties.setProperty(IoTDBConstant.CN_TARGET_CONFIG_NODE,
targetConfigNodes);
+ immutableNodeProperties.setProperty(IoTDBConstant.CN_SEED_CONFIG_NODE,
seedConfigNodes);
immutableNodeProperties.setProperty(CN_SYSTEM_DIR,
MppBaseConfig.NULL_VALUE);
immutableNodeProperties.setProperty(CN_CONSENSUS_DIR,
MppBaseConfig.NULL_VALUE);
immutableNodeProperties.setProperty(
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/DataNodeWrapper.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/DataNodeWrapper.java
index 2219f1f710e..e7543813599 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/DataNodeWrapper.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/node/DataNodeWrapper.java
@@ -80,7 +80,7 @@ public class DataNodeWrapper extends AbstractNodeWrapper {
private final String defaultCommonPropertiesFile;
public DataNodeWrapper(
- String targetConfigNode,
+ String seedConfigNode,
String testClassName,
String testMethodName,
int[] portList,
@@ -109,7 +109,7 @@ public class DataNodeWrapper extends AbstractNodeWrapper {
immutableCommonProperties.setProperty(
PIPE_AIR_GAP_RECEIVER_PORT,
String.valueOf(this.pipeAirGapReceiverPort));
- immutableNodeProperties.setProperty(IoTDBConstant.DN_TARGET_CONFIG_NODE,
targetConfigNode);
+ immutableNodeProperties.setProperty(IoTDBConstant.DN_SEED_CONFIG_NODE,
seedConfigNode);
immutableNodeProperties.setProperty(DN_SYSTEM_DIR,
MppBaseConfig.NULL_VALUE);
immutableNodeProperties.setProperty(DN_DATA_DIRS,
MppBaseConfig.NULL_VALUE);
immutableNodeProperties.setProperty(DN_CONSENSUS_DIR,
MppBaseConfig.NULL_VALUE);
diff --git
a/iotdb-core/confignode/src/assembly/resources/conf/iotdb-confignode.properties
b/iotdb-core/confignode/src/assembly/resources/conf/iotdb-confignode.properties
index d6b2b2c3dee..36d7e53c20c 100644
---
a/iotdb-core/confignode/src/assembly/resources/conf/iotdb-confignode.properties
+++
b/iotdb-core/confignode/src/assembly/resources/conf/iotdb-confignode.properties
@@ -35,15 +35,14 @@ cn_internal_port=10710
cn_consensus_port=10720
####################
-### Target Config Nodes
+### Seed ConfigNode
####################
-# For the first ConfigNode to start, cn_target_config_node points to its own
cn_internal_address:cn_internal_port.
-# For other ConfigNodes that to join the cluster, cn_target_config_node points
to any running ConfigNode's cn_internal_address:cn_internal_port.
-# Note: Currently only endpoints that point to a single confignode are
supported
+# For the first ConfigNode to start, cn_seed_config_node points to its own
cn_internal_address:cn_internal_port.
+# For other ConfigNodes that to join the cluster, cn_seed_config_node points
to any running ConfigNode's cn_internal_address:cn_internal_port.
# Format: address:port e.g. 127.0.0.1:10710
# Datatype: String
-cn_target_config_node=127.0.0.1:10710
+cn_seed_config_node=127.0.0.1:10710
####################
### Directory configuration
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
index 0143a0314fe..379d903c54e 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
@@ -51,7 +51,7 @@ public class ConfigNodeConfig {
private int consensusPort = 10720;
/** Used for connecting to the ConfigNodeGroup. */
- private TEndPoint targetConfigNode = new TEndPoint("127.0.0.1", 10710);
+ private TEndPoint seedConfigNode = new TEndPoint("127.0.0.1", 10710);
// TODO: Read from iotdb-confignode.properties.
private int configRegionId = 0;
@@ -383,12 +383,12 @@ public class ConfigNodeConfig {
this.consensusPort = consensusPort;
}
- public TEndPoint getTargetConfigNode() {
- return targetConfigNode;
+ public TEndPoint getSeedConfigNode() {
+ return seedConfigNode;
}
- public void setTargetConfigNode(TEndPoint targetConfigNode) {
- this.targetConfigNode = targetConfigNode;
+ public void setSeedConfigNode(TEndPoint seedConfigNode) {
+ this.seedConfigNode = seedConfigNode;
}
public int getConfigRegionId() {
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
index fbcbc090a46..f70dba5b94d 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
@@ -168,16 +168,16 @@ public class ConfigNodeDescriptor {
IoTDBConstant.CN_CONSENSUS_PORT,
String.valueOf(conf.getConsensusPort()))
.trim()));
- String targetConfigNodes =
properties.getProperty(IoTDBConstant.CN_TARGET_CONFIG_NODE, null);
- if (targetConfigNodes == null) {
- targetConfigNodes =
properties.getProperty(IoTDBConstant.CN_TARGET_CONFIG_NODE_LIST, null);
+ String seedConfigNode =
properties.getProperty(IoTDBConstant.CN_SEED_CONFIG_NODE, null);
+ if (seedConfigNode == null) {
+ seedConfigNode =
properties.getProperty(IoTDBConstant.CN_TARGET_CONFIG_NODE_LIST, null);
LOGGER.warn(
"The parameter cn_target_config_node_list has been abandoned, "
+ "only the first ConfigNode address will be used to join in the
cluster. "
- + "Please use cn_target_config_node instead.");
+ + "Please use cn_seed_config_node instead.");
}
- if (targetConfigNodes != null) {
-
conf.setTargetConfigNode(NodeUrlUtils.parseTEndPointUrls(targetConfigNodes.trim()).get(0));
+ if (seedConfigNode != null) {
+
conf.setSeedConfigNode(NodeUrlUtils.parseTEndPointUrls(seedConfigNode.trim()).get(0));
}
conf.setSeriesSlotNum(
@@ -863,13 +863,13 @@ public class ConfigNodeDescriptor {
*
* <p>Notice: Only invoke this interface when first startup.
*
- * @return True if the target_config_node points to itself
+ * @return True if the seed_config_node points to itself
*/
public boolean isSeedConfigNode() {
- return
(conf.getInternalAddress().equals(conf.getTargetConfigNode().getIp())
+ return (conf.getInternalAddress().equals(conf.getSeedConfigNode().getIp())
|| (NodeUrlUtils.isLocalAddress(conf.getInternalAddress())
- &&
NodeUrlUtils.isLocalAddress(conf.getTargetConfigNode().getIp())))
- && conf.getInternalPort() == conf.getTargetConfigNode().getPort();
+ &&
NodeUrlUtils.isLocalAddress(conf.getSeedConfigNode().getIp())))
+ && conf.getInternalPort() == conf.getSeedConfigNode().getPort();
}
public static ConfigNodeDescriptor getInstance() {
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
index ff420bb57e5..000e08d348e 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java
@@ -89,13 +89,13 @@ public class ConfigNodeStartupCheck extends StartupChecks {
*/
private void checkGlobalConfig() throws ConfigurationException {
// When the ConfigNode consensus protocol is set to SIMPLE_CONSENSUS,
- // the target_config_node needs to point to itself
+ // the seed_config_node needs to point to itself
if
(CONF.getConfigNodeConsensusProtocolClass().equals(ConsensusFactory.SIMPLE_CONSENSUS)
- &&
(!CONF.getInternalAddress().equals(CONF.getTargetConfigNode().getIp())
- || CONF.getInternalPort() !=
CONF.getTargetConfigNode().getPort())) {
+ && (!CONF.getInternalAddress().equals(CONF.getSeedConfigNode().getIp())
+ || CONF.getInternalPort() != CONF.getSeedConfigNode().getPort())) {
throw new ConfigurationException(
- IoTDBConstant.CN_TARGET_CONFIG_NODE,
- CONF.getTargetConfigNode().getIp() + ":" +
CONF.getTargetConfigNode().getPort(),
+ IoTDBConstant.CN_SEED_CONFIG_NODE,
+ CONF.getSeedConfigNode().getIp() + ":" +
CONF.getSeedConfigNode().getPort(),
CONF.getInternalAddress() + ":" + CONF.getInternalPort(),
"the config_node_consensus_protocol_class is set to" +
ConsensusFactory.SIMPLE_CONSENSUS);
}
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java
index 792cc680797..baf293ed5e4 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java
@@ -71,7 +71,7 @@ public class ClusterNodeStartUtils {
"Reject %s start. Because the ClusterName of the current %s and
the target cluster are inconsistent. "
+ "ClusterName of the current Node: %s, ClusterName of the
target cluster: %s."
+ POSSIBLE_SOLUTIONS
- + "\t1. Change the target_config_node parameter in %s to
join the correct cluster."
+ + "\t1. Change the seed_config_node parameter in %s to join
the correct cluster."
+ "\n\t2. Change the cluster_name parameter in %s to match
the target cluster",
nodeType.getNodeType(),
nodeType.getNodeType(),
@@ -145,7 +145,7 @@ public class ClusterNodeStartUtils {
"Reject %s restart. Because the ClusterName of the current %s
and the target cluster are inconsistent. "
+ "ClusterName of the current Node: %s, ClusterName of the
target cluster: %s."
+ POSSIBLE_SOLUTIONS
- + "\t1. Change the target_config_node parameter in %s to
join the correct cluster."
+ + "\t1. Change the seed_config_node parameter in %s to join
the correct cluster."
+ "\n\t2. Change the cluster_name parameter in %s to match
the target cluster",
nodeType.getNodeType(),
nodeType.getNodeType(),
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
index c3b3d1a2798..0a2a9fd9c5e 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
@@ -315,11 +315,11 @@ public class ConfigNode implements ConfigNodeMBean {
req.setVersionInfo(new TNodeVersionInfo(IoTDBConstant.VERSION,
IoTDBConstant.BUILD_INFO));
- TEndPoint targetConfigNode = CONF.getTargetConfigNode();
- if (targetConfigNode == null) {
+ TEndPoint seedConfigNode = CONF.getSeedConfigNode();
+ if (seedConfigNode == null) {
LOGGER.error(
- "Please set the cn_target_config_node parameter in
iotdb-confignode.properties file.");
- throw new StartupException("The targetConfigNode setting in conf is
empty");
+ "Please set the cn_seed_config_node parameter in
iotdb-confignode.properties file.");
+ throw new StartupException("The seedConfigNode setting in conf is
empty");
}
for (int retry = 0; retry < STARTUP_RETRY_NUM; retry++) {
@@ -328,7 +328,7 @@ public class ConfigNode implements ConfigNodeMBean {
Object obj =
SyncConfigNodeClientPool.getInstance()
.sendSyncRequestToConfigNodeWithRetry(
- targetConfigNode, req,
ConfigNodeRequestType.REGISTER_CONFIG_NODE);
+ seedConfigNode, req,
ConfigNodeRequestType.REGISTER_CONFIG_NODE);
if (obj instanceof TConfigNodeRegisterResp) {
resp = (TConfigNodeRegisterResp) obj;
@@ -347,8 +347,8 @@ public class ConfigNode implements ConfigNodeMBean {
configManager.initConsensusManager();
return;
} else if (status.getCode() ==
TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
- targetConfigNode = status.getRedirectNode();
- LOGGER.info("ConfigNode need redirect to {}, retry {} ...",
targetConfigNode, retry);
+ seedConfigNode = status.getRedirectNode();
+ LOGGER.info("ConfigNode need redirect to {}, retry {} ...",
seedConfigNode, retry);
} else if (status.getCode() ==
TSStatusCode.INTERNAL_REQUEST_RETRY_ERROR.getStatusCode()) {
LOGGER.warn("The result of register self ConfigNode is {}, retry {}
...", status, retry);
} else {
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNodeShutdownHook.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNodeShutdownHook.java
index 1089830508e..bd8ea079690 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNodeShutdownHook.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNodeShutdownHook.java
@@ -58,13 +58,13 @@ public class ConfigNodeShutdownHook extends Thread {
// Set and report shutdown to cluster ConfigNode-leader
CommonDescriptor.getInstance().getConfig().setNodeStatus(NodeStatus.Unknown);
boolean isReportSuccess = false;
- TEndPoint targetConfigNode = CONF.getTargetConfigNode();
+ TEndPoint seedConfigNode = CONF.getSeedConfigNode();
for (int retry = 0; retry < SHUTDOWN_REPORT_RETRY_NUM; retry++) {
TSStatus result =
(TSStatus)
SyncConfigNodeClientPool.getInstance()
.sendSyncRequestToConfigNodeWithRetry(
- targetConfigNode,
+ seedConfigNode,
new TConfigNodeLocation(
CONF.getConfigNodeId(),
new TEndPoint(CONF.getInternalAddress(),
CONF.getInternalPort()),
@@ -77,7 +77,7 @@ public class ConfigNodeShutdownHook extends Thread {
break;
} else if (result.getCode() ==
TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
// Redirect
- targetConfigNode = result.getRedirectNode();
+ seedConfigNode = result.getRedirectNode();
}
}
if (!isReportSuccess) {
diff --git
a/iotdb-core/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
b/iotdb-core/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
index cc1a6f589e0..0ab8e60fa71 100644
---
a/iotdb-core/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
+++
b/iotdb-core/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
@@ -20,7 +20,7 @@
cn_internal_address=127.0.0.1
cn_internal_port=10710
cn_consensus_port=10720
-cn_target_config_node=127.0.0.1:10710
+cn_seed_config_node=127.0.0.1:10710
cn_system_dir=target/confignode1/system
cn_data_dirs=target/confignode1/data
cn_consensus_dir=target/confignode1/consensus
diff --git
a/iotdb-core/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
b/iotdb-core/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
index 530af6bbfe7..b9c63f33cbd 100644
---
a/iotdb-core/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
+++
b/iotdb-core/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
@@ -20,7 +20,7 @@
cn_internal_address=127.0.0.1
cn_internal_port=10711
cn_consensus_port=10721
-cn_target_config_node=127.0.0.1:10710
+cn_seed_config_node=127.0.0.1:10710
cn_system_dir=target/confignode2/system
cn_data_dirs=target/confignode2/data
cn_consensus_dir=target/confignode2/consensus
diff --git
a/iotdb-core/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
b/iotdb-core/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
index ee34bb8d75f..a56f7cf3682 100644
---
a/iotdb-core/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
+++
b/iotdb-core/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
@@ -20,7 +20,7 @@
cn_internal_address=127.0.0.1
cn_internal_port=10712
cn_consensus_port=10722
-cn_target_config_node=127.0.0.1:10710
+cn_seed_config_node=127.0.0.1:10710
cn_system_dir=target/confignode3/system
cn_data_dirs=target/confignode3/data
cn_consensus_dir=target/confignode3/consensus
diff --git
a/iotdb-core/datanode/src/assembly/resources/conf/iotdb-datanode.properties
b/iotdb-core/datanode/src/assembly/resources/conf/iotdb-datanode.properties
index 36cb9c19765..ab37a4e2b20 100644
--- a/iotdb-core/datanode/src/assembly/resources/conf/iotdb-datanode.properties
+++ b/iotdb-core/datanode/src/assembly/resources/conf/iotdb-datanode.properties
@@ -61,14 +61,13 @@ dn_data_region_consensus_port=10760
# dn_join_cluster_retry_interval_ms=5000
####################
-### Target Config Nodes
+### Seed ConfigNode
####################
-# For the first ConfigNode to start, cn_target_config_node points to its own
cn_internal_address:cn_internal_port.
-# For other ConfigNodes that to join the cluster, target_config_node points to
any running ConfigNode's cn_internal_address:cn_internal_port.
+# dn_seed_config_node points to any running ConfigNode's
cn_internal_address:cn_internal_port.
# Format: address:port(,address:port)* e.g. 127.0.0.1:10710,127.0.0.1:10711
# Datatype: String
-dn_target_config_node=127.0.0.1:10710
+dn_seed_config_node=127.0.0.1:10710
####################
### Connection Configuration
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index 0c57692dc64..a75b1bf53d0 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -865,7 +865,7 @@ public class IoTDBConfig {
private int schemaRegionConsensusPort = 10750;
/** Ip and port of config nodes. */
- private TEndPoint targetConfigNode = new TEndPoint("127.0.0.1", 10710);
+ private TEndPoint seedConfigNode = new TEndPoint("127.0.0.1", 10710);
/** The time of data node waiting for the next retry to join into the
cluster */
private long joinClusterRetryIntervalMs = TimeUnit.SECONDS.toMillis(5);
@@ -2919,12 +2919,12 @@ public class IoTDBConfig {
this.schemaRegionConsensusPort = schemaRegionConsensusPort;
}
- public TEndPoint getTargetConfigNode() {
- return targetConfigNode;
+ public TEndPoint getSeedConfigNode() {
+ return seedConfigNode;
}
- public void setTargetConfigNode(List<TEndPoint> targetConfigNodes) {
- this.targetConfigNode = targetConfigNodes.get(0);
+ public void setSeedConfigNode(List<TEndPoint> seedConfigNodes) {
+ this.seedConfigNode = seedConfigNodes.get(0);
}
public long getJoinClusterRetryIntervalMs() {
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
index c5b5e70006f..830d7f4b7a7 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
@@ -1993,18 +1993,18 @@ public class IoTDBDescriptor {
}
public void loadClusterProps(Properties properties) {
- String configNodeUrls =
properties.getProperty(IoTDBConstant.DN_TARGET_CONFIG_NODE);
+ String configNodeUrls =
properties.getProperty(IoTDBConstant.DN_SEED_CONFIG_NODE);
if (configNodeUrls == null) {
configNodeUrls =
properties.getProperty(IoTDBConstant.DN_TARGET_CONFIG_NODE_LIST);
logger.warn(
"The parameter dn_target_config_node_list has been abandoned, "
+ "only the first ConfigNode address will be used to join in the
cluster. "
- + "Please use dn_target_config_node instead.");
+ + "Please use dn_seed_config_node instead.");
}
if (configNodeUrls != null) {
try {
configNodeUrls = configNodeUrls.trim();
-
conf.setTargetConfigNode(NodeUrlUtils.parseTEndPointUrls(configNodeUrls));
+
conf.setSeedConfigNode(NodeUrlUtils.parseTEndPointUrls(configNodeUrls));
} catch (BadNodeUrlException e) {
logger.error("ConfigNodes are set in wrong format, please set them
like 127.0.0.1:10710");
}
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
index bf6137c4854..8bba3a10d31 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java
@@ -168,7 +168,7 @@ public class DataNode implements DataNodeMBean {
// Set target ConfigNodeList from iotdb-datanode.properties file
ConfigNodeInfo.getInstance()
-
.updateConfigNodeList(Collections.singletonList(config.getTargetConfigNode()));
+
.updateConfigNodeList(Collections.singletonList(config.getSeedConfigNode()));
// Pull and check system configurations from ConfigNode-leader
pullAndCheckSystemConfigurations();
@@ -394,7 +394,7 @@ public class DataNode implements DataNodeMBean {
// All tries failed
logger.error(
"Cannot register into cluster after {} retries. "
- + "Please check dn_target_config_node in
iotdb-datanode.properties.",
+ + "Please check dn_seed_config_node in
iotdb-datanode.properties.",
DEFAULT_RETRY);
throw new StartupException("Cannot register into the cluster.");
}
@@ -455,7 +455,7 @@ public class DataNode implements DataNodeMBean {
// All tries failed
logger.error(
"Cannot send restart DataNode request to ConfigNode-leader after {}
retries. "
- + "Please check dn_target_config_node in
iotdb-datanode.properties.",
+ + "Please check dn_seed_config_node in
iotdb-datanode.properties.",
DEFAULT_RETRY);
throw new StartupException("Cannot send restart DataNode request to
ConfigNode-leader.");
}
diff --git
a/iotdb-core/datanode/src/test/resources/datanode1conf/iotdb-datanode.properties
b/iotdb-core/datanode/src/test/resources/datanode1conf/iotdb-datanode.properties
index f5e37c417f5..1e218a1aba8 100644
---
a/iotdb-core/datanode/src/test/resources/datanode1conf/iotdb-datanode.properties
+++
b/iotdb-core/datanode/src/test/resources/datanode1conf/iotdb-datanode.properties
@@ -26,7 +26,7 @@ dn_mpp_data_exchange_port=10740
dn_schema_region_consensus_port=10750
dn_data_region_consensus_port=10760
-dn_target_config_node=127.0.0.1:10710,127.0.0.1:10711,127.0.0.1:10712
+dn_seed_config_node=127.0.0.1:10710,127.0.0.1:10711,127.0.0.1:10712
dn_system_dir=target/datanode1/system
dn_data_dirs=target/datanode1/data
diff --git
a/iotdb-core/datanode/src/test/resources/datanode2conf/iotdb-datanode.properties
b/iotdb-core/datanode/src/test/resources/datanode2conf/iotdb-datanode.properties
index d5648bc7bb0..c838f509589 100644
---
a/iotdb-core/datanode/src/test/resources/datanode2conf/iotdb-datanode.properties
+++
b/iotdb-core/datanode/src/test/resources/datanode2conf/iotdb-datanode.properties
@@ -26,7 +26,7 @@ dn_mpp_data_exchange_port=10741
dn_schema_region_consensus_port=10751
dn_data_region_consensus_port=10761
-dn_target_config_node=127.0.0.1:10710,127.0.0.1:10711,127.0.0.1:10712
+dn_seed_config_node=127.0.0.1:10710,127.0.0.1:10711,127.0.0.1:10712
dn_system_dir=target/datanode2/system
dn_data_dirs=target/datanode2/data
diff --git
a/iotdb-core/datanode/src/test/resources/datanode3conf/iotdb-datanode.properties
b/iotdb-core/datanode/src/test/resources/datanode3conf/iotdb-datanode.properties
index 030fd3c28dd..4b03bc4a4f2 100644
---
a/iotdb-core/datanode/src/test/resources/datanode3conf/iotdb-datanode.properties
+++
b/iotdb-core/datanode/src/test/resources/datanode3conf/iotdb-datanode.properties
@@ -26,7 +26,7 @@ dn_mpp_data_exchange_port=10742
dn_schema_region_consensus_port=10752
dn_data_region_consensus_port=10762
-dn_target_config_node=127.0.0.1:10710,127.0.0.1:10711,127.0.0.1:10712
+dn_seed_config_node=127.0.0.1:10710,127.0.0.1:10711,127.0.0.1:10712
dn_system_dir=target/datanode3/system
dn_data_dirs=target/datanode3/data
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
index fcaaf091d5e..02cd2c2106b 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
@@ -66,9 +66,9 @@ public class IoTDBConstant {
public static final String DN_INTERNAL_PORT = "dn_internal_port";
public static final String CN_CONSENSUS_PORT = "cn_consensus_port";
- public static final String CN_TARGET_CONFIG_NODE = "cn_target_config_node";
+ public static final String CN_SEED_CONFIG_NODE = "cn_seed_config_node";
public static final String CN_TARGET_CONFIG_NODE_LIST =
"cn_target_config_node_list";
- public static final String DN_TARGET_CONFIG_NODE = "dn_target_config_node";
+ public static final String DN_SEED_CONFIG_NODE = "dn_seed_config_node";
public static final String DN_TARGET_CONFIG_NODE_LIST =
"dn_target_config_node_list ";
public static final String CLUSTER_NAME = "cluster_name";