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

yongzao pushed a commit to branch Move-ConfigNodeConfig-into-CommonConfig
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit ea7858309ad1d3ccddfa55af57d25e81ed0be132
Author: YongzaoDan <[email protected]>
AuthorDate: Thu Jan 12 14:46:19 2023 +0800

    stash
---
 .../apache/iotdb/commons/conf/CommonConfig.java    |   20 -
 .../iotdb/commons/conf/CommonDescriptor.java       |   11 -
 .../java/org/apache/iotdb/db/conf/IoTDBConfig.java | 1392 ++------------------
 .../org/apache/iotdb/db/conf/IoTDBDescriptor.java  |  804 +++++------
 .../db/consensus/SchemaRegionConsensusImpl.java    |    4 +-
 .../apache/iotdb/db/utils/EnvironmentUtils.java    |    2 +-
 6 files changed, 485 insertions(+), 1748 deletions(-)

diff --git 
a/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java 
b/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java
index 55f06d6871..f340c69b9d 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java
@@ -629,10 +629,6 @@ public class CommonConfig {
     userFolder = addHomeDir(userFolder, homeDir);
     roleFolder = addHomeDir(roleFolder, homeDir);
     procedureWalFolder = addHomeDir(procedureWalFolder, homeDir);
-    syncDir = addHomeDir(syncDir, homeDir);
-    for (int i = 0; i < walDirs.length; i++) {
-      walDirs[i] = addHomeDir(walDirs[i], homeDir);
-    }
   }
 
   private String addHomeDir(String dir, String homeDir) {
@@ -1511,22 +1507,6 @@ public class CommonConfig {
     this.procedureWalFolder = procedureWalFolder;
   }
 
-  public String getSyncDir() {
-    return syncDir;
-  }
-
-  public void setSyncDir(String syncDir) {
-    this.syncDir = syncDir;
-  }
-
-  public String[] getWalDirs() {
-    return walDirs;
-  }
-
-  public void setWalDirs(String[] walDirs) {
-    this.walDirs = walDirs;
-  }
-
   public FSType getSystemFileStorageFs() {
     return systemFileStorageFs;
   }
diff --git 
a/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonDescriptor.java
 
b/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonDescriptor.java
index cf4d022b72..dc2d49ab5a 100644
--- 
a/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonDescriptor.java
+++ 
b/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonDescriptor.java
@@ -653,15 +653,6 @@ public class CommonDescriptor {
         properties
           .getProperty("influxdb_rpc_port", 
Integer.toString(CONF.getInfluxDBRpcPort()))
           .trim()));
-
-
-    CONF.setSyncDir(properties.getProperty("dn_sync_dir", 
CONF.getSyncDir()).trim());
-
-    CONF.setWalDirs(
-        properties
-            .getProperty("dn_wal_dirs", String.join(",", CONF.getWalDirs()))
-            .trim()
-            .split(","));
   }
 
   private void initMemoryAllocate(Properties properties) {
@@ -1598,8 +1589,6 @@ public class CommonDescriptor {
 
   // Mqtt related
   private void loadMqttProps(Properties properties) {
-    CONF.setMqttDir(properties.getProperty("mqtt_root_dir", 
CONF.getMqttDir()));
-
     if (properties.getProperty(IoTDBConstant.ENABLE_MQTT) != null) {
       CONF.setEnableMqttService(
         
Boolean.parseBoolean(properties.getProperty(IoTDBConstant.ENABLE_MQTT)));
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 b97b24a859..b8b25ce5d6 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
@@ -22,8 +22,6 @@ import org.apache.iotdb.common.rpc.thrift.TEndPoint;
 import 
org.apache.iotdb.commons.client.property.ClientPoolProperty.DefaultProperty;
 import org.apache.iotdb.commons.conf.IoTDBConstant;
 import org.apache.iotdb.commons.utils.TestOnly;
-import org.apache.iotdb.commons.utils.datastructure.TVListSortAlgorithm;
-import org.apache.iotdb.commons.wal.WALMode;
 import org.apache.iotdb.db.audit.AuditLogOperation;
 import org.apache.iotdb.db.audit.AuditLogStorage;
 import org.apache.iotdb.db.conf.directories.DirectoryManager;
@@ -65,6 +63,20 @@ public class IoTDBConfig {
   public static final String CONFIG_NAME = "iotdb-datanode.properties";
   private static final Logger logger = 
LoggerFactory.getLogger(IoTDBConfig.class);
 
+  private static final String STORAGE_GROUP_MATCHER = 
"([a-zA-Z0-9`_.\\-\\u2E80-\\u9FFF]+)";
+  public static final Pattern STORAGE_GROUP_PATTERN = 
Pattern.compile(STORAGE_GROUP_MATCHER);
+
+  // e.g., a31+/$%#&[]{}3e4, "a.b", 'a.b'
+  private static final String NODE_NAME_MATCHER = "([^\n\t]+)";
+
+  // e.g.,  .s1
+  private static final String PARTIAL_NODE_MATCHER = "[" + PATH_SEPARATOR + 
"]" + NODE_NAME_MATCHER;
+
+  private static final String NODE_MATCHER =
+    "([" + PATH_SEPARATOR + "])?" + NODE_NAME_MATCHER + "(" + 
PARTIAL_NODE_MATCHER + ")*";
+
+  public static final Pattern NODE_PATTERN = Pattern.compile(NODE_MATCHER);
+
   /** DataNode RPC Configuration */
   // Rpc binding address
   private String dnRpcAddress = "127.0.0.1";
@@ -124,10 +136,17 @@ public class IoTDBConfig {
   private String dnSystemDir =
       IoTDBConstant.DEFAULT_BASE_DIR + File.separator + 
IoTDBConstant.SYSTEM_FOLDER_NAME;
 
+  // External lib directory, stores user-uploaded JAR files
+  private String dnExtDir = IoTDBConstant.EXT_FOLDER_NAME;
+
   // Data directories. It can be settled as dataDirs = {"data1", "data2", 
"data3"};
   private String[] dnDataDirs = {
     IoTDBConstant.DEFAULT_BASE_DIR + File.separator + 
IoTDBConstant.DATA_FOLDER_NAME
   };
+
+  private static final String MULTI_DIR_STRATEGY_PREFIX =
+    "org.apache.iotdb.db.conf.directories.strategy.";
+  private static final String DEFAULT_MULTI_DIR_STRATEGY = 
"MaxDiskUsableSpaceFirstStrategy";
   // Strategy of multiple directories
   private String dnMultiDirStrategyClassName = null;
 
@@ -147,131 +166,23 @@ public class IoTDBConfig {
   private String dnSyncDir =
       IoTDBConstant.DEFAULT_BASE_DIR + File.separator + 
IoTDBConstant.SYNC_FOLDER_NAME;
 
-  /** Metric Configuration */
-  // TODO: Add if necessary
-
-  /* Names of Watermark methods */
-  private static final String MULTI_DIR_STRATEGY_PREFIX =
-      "org.apache.iotdb.db.conf.directories.strategy.";
-
-  private static final String DEFAULT_MULTI_DIR_STRATEGY = 
"MaxDiskUsableSpaceFirstStrategy";
-
-  private static final String STORAGE_GROUP_MATCHER = 
"([a-zA-Z0-9`_.\\-\\u2E80-\\u9FFF]+)";
-  public static final Pattern STORAGE_GROUP_PATTERN = 
Pattern.compile(STORAGE_GROUP_MATCHER);
-
-  // e.g., a31+/$%#&[]{}3e4, "a.b", 'a.b'
-  private static final String NODE_NAME_MATCHER = "([^\n\t]+)";
-
-  // e.g.,  .s1
-  private static final String PARTIAL_NODE_MATCHER = "[" + PATH_SEPARATOR + 
"]" + NODE_NAME_MATCHER;
-
-  private static final String NODE_MATCHER =
-      "([" + PATH_SEPARATOR + "])?" + NODE_NAME_MATCHER + "(" + 
PARTIAL_NODE_MATCHER + ")*";
-
-  public static final Pattern NODE_PATTERN = Pattern.compile(NODE_MATCHER);
-
-  /** The proportion of write memory for loading TsFile */
-  private double loadTsFileProportion = 0.125;
-
-  /** Size threshold of each checkpoint file. Unit: byte */
-  private volatile long checkpointFileSizeThresholdInByte = 3 * 1024 * 1024L;
-
-  /** Buffer entry size of each wal buffer. Unit: byte */
-  private int walBufferEntrySize = 16 * 1024;
-
-  /** Schema directory, including storage set of values. */
+  // Schema directory, including storage set of values
   private String schemaDir =
-      IoTDBConstant.DEFAULT_BASE_DIR
-          + File.separator
-          + IoTDBConstant.SYSTEM_FOLDER_NAME
-          + File.separator
-          + IoTDBConstant.SCHEMA_FOLDER_NAME;
+    IoTDBConstant.DEFAULT_BASE_DIR
+      + File.separator
+      + IoTDBConstant.SYSTEM_FOLDER_NAME
+      + File.separator
+      + IoTDBConstant.SCHEMA_FOLDER_NAME;
 
-  /** Query directory, stores temporary files of query */
+  // Query directory, stores temporary files of query
   private String queryDir =
-      IoTDBConstant.DEFAULT_BASE_DIR + File.separator + 
IoTDBConstant.QUERY_FOLDER_NAME;
-
-  /** External lib directory, stores user-uploaded JAR files */
-  private String extDir = IoTDBConstant.EXT_FOLDER_NAME;
-
-  /** External lib directory for UDF, stores user-uploaded JAR files */
-  private String udfDir =
-      IoTDBConstant.EXT_FOLDER_NAME + File.separator + 
IoTDBConstant.UDF_FOLDER_NAME;
-
-  /** External temporary lib directory for storing downloaded udf JAR files */
-  private String udfTemporaryLibDir = udfDir + File.separator + 
IoTDBConstant.TMP_FOLDER_NAME;
-
-  /** External lib directory for trigger, stores user-uploaded JAR files */
-  private String triggerDir =
-      IoTDBConstant.EXT_FOLDER_NAME + File.separator + 
IoTDBConstant.TRIGGER_FOLDER_NAME;
-
-  /** External temporary lib directory for storing downloaded trigger JAR 
files */
-  private String triggerTemporaryLibDir =
-      triggerDir + File.separator + IoTDBConstant.TMP_FOLDER_NAME;
-
-  /** External lib directory for ext Pipe plugins, stores user-defined JAR 
files */
-  private String extPipeDir =
-      IoTDBConstant.EXT_FOLDER_NAME + File.separator + 
IoTDBConstant.EXT_PIPE_FOLDER_NAME;
-
-  /** External lib directory for MQTT, stores user-uploaded JAR files */
-  private String mqttDir =
-      IoTDBConstant.EXT_FOLDER_NAME + File.separator + 
IoTDBConstant.MQTT_FOLDER_NAME;
-
-  private String loadTsFileDir =
-      dnDataDirs[0] + File.separator + IoTDBConstant.LOAD_TSFILE_FOLDER_NAME;
-
-  private String ratisDataRegionSnapshotDir =
-      IoTDBConstant.DEFAULT_BASE_DIR
-          + File.separator
-          + IoTDBConstant.DATA_FOLDER_NAME
-          + File.separator
-          + IoTDBConstant.SNAPSHOT_FOLDER_NAME;
-
-  private String dataRegionConsensusDir = dnConsensusDir + File.separator + 
"data_region";
-
-  private String schemaRegionConsensusDir = dnConsensusDir + File.separator + 
"schema_region";
-
-  /** Maximum MemTable number. Invalid when enableMemControl is true. */
-  private int maxMemtableNumber = 0;
-
-  /**
-   * How many threads can concurrently read data for raw data query. When <= 
0, use CPU core number.
-   */
-  private int subRawQueryThreadCount = 8;
-
-  /** Blocking queue size for read task in raw data query. */
-  private int rawQueryBlockingQueueCapacity = 5;
-
-  /** How many threads can concurrently evaluate windows. When <= 0, use CPU 
core number. */
-  private int windowEvaluationThreadCount = 
Runtime.getRuntime().availableProcessors();
-
-  /**
-   * Max number of window evaluation tasks that can be pending for execution. 
When <= 0, the value
-   * is 64 by default.
-   */
-  private int maxPendingWindowEvaluationTasks = 64;
-
-  /** Is the write ahead log enable. */
-  private boolean enableIndex = false;
-
-  /** How many threads can concurrently build index. When <= 0, use CPU core 
number. */
-  private int concurrentIndexBuildThread = 
Runtime.getRuntime().availableProcessors();
-
-  /**
-   * the index framework adopts sliding window model to preprocess the 
original tv list in the
-   * subsequence matching task.
-   */
-  private int defaultIndexWindowRange = 10;
-
-  /** index directory. */
-  private String indexRootFolder = "data" + File.separator + "index";
-
-  /** When a unSequence TsFile's file size (in byte) exceed this, the TsFile 
is forced closed. */
-  private long unSeqTsFileSize = 0L;
+    IoTDBConstant.DEFAULT_BASE_DIR + File.separator + 
IoTDBConstant.QUERY_FOLDER_NAME;
 
-  /** When a sequence TsFile's file size (in byte) exceed this, the TsFile is 
forced closed. */
-  private long seqTsFileSize = 0L;
+  /** Metric Configuration */
+  // TODO: Add if necessary
 
+  /** Compaction Configurations */
+  // TODO: Move to CommonConfig
   // Enable inner space compaction for sequence files
   private boolean enableSeqSpaceCompaction = true;
   // Enable inner space compaction for unsequence files
@@ -279,34 +190,27 @@ public class IoTDBConfig {
   // Compact the unsequence files into the overlapped sequence files
   private boolean enableCrossSpaceCompaction = true;
 
-  // TODO: Move it to CommonConfig
   /**
    * The strategy of inner space compaction task. There are just one inner 
space compaction strategy
    * SIZE_TIRED_COMPACTION:
    */
   private InnerSequenceCompactionSelector innerSequenceCompactionSelector =
-      InnerSequenceCompactionSelector.SIZE_TIERED;
+    InnerSequenceCompactionSelector.SIZE_TIERED;
 
-  // TODO: Move it to CommonConfig
   private InnerSeqCompactionPerformer innerSeqCompactionPerformer =
-      InnerSeqCompactionPerformer.READ_CHUNK;
+    InnerSeqCompactionPerformer.READ_CHUNK;
 
-  // TODO: Move it to CommonConfig
   private InnerUnsequenceCompactionSelector innerUnsequenceCompactionSelector =
-      InnerUnsequenceCompactionSelector.SIZE_TIERED;
+    InnerUnsequenceCompactionSelector.SIZE_TIERED;
 
-  // TODO: Move it to CommonConfig
   private InnerUnseqCompactionPerformer innerUnseqCompactionPerformer =
-      InnerUnseqCompactionPerformer.READ_POINT;
+    InnerUnseqCompactionPerformer.READ_POINT;
 
-  // TODO: Move it to CommonConfig
   // The strategy of cross space compaction task. There are just one cross 
space compaction strategy
   // SIZE_TIRED_COMPACTION:
   private CrossCompactionSelector crossCompactionSelector = 
CrossCompactionSelector.REWRITE;
-  // TODO: Move it to CommonConfig
   private CrossCompactionPerformer crossCompactionPerformer = 
CrossCompactionPerformer.READ_POINT;
 
-  // TODO: Move it to CommonConfig
   /**
    * The priority of compaction task execution. There are three priority 
strategy INNER_CROSS:
    * prioritize inner space compaction, reduce the number of files first CROSS 
INNER: prioritize
@@ -365,28 +269,75 @@ public class IoTDBConfig {
 
   private boolean enableCompactionValidation = true;
 
-  /** Set true to enable statistics monitor service, false to disable 
statistics service. */
-  private boolean enableStatMonitor = false;
 
-  /** Set true to enable writing monitor time series. */
-  private boolean enableMonitorSeriesWrite = false;
+  /**
+   * If one merge file selection runs for more than this time, it will be 
ended and its current
+   * selection will be used as final selection. When < 0, it means time is 
unbounded. Unit:
+   * millisecond
+   */
+  private long crossCompactionFileSelectionTimeBudget = 30 * 1000L;
 
-  /** Cache size of {@code checkAndGetDataTypeCache}. */
-  private int mRemoteSchemaCacheSize = 100000;
+  /** End Compaction Configurations */
 
-  /** Is external sort enable. */
-  private boolean enableExternalSort = true;
 
-  /**
-   * The threshold of items in external sort. If the number of chunks 
participating in sorting
-   * exceeds this threshold, external sorting is enabled, otherwise memory 
sorting is used.
-   */
-  private int externalSortThreshold = 1000;
+
+
+  /* Names of Watermark methods */
+
+  /** The proportion of write memory for loading TsFile */
+  private double loadTsFileProportion = 0.125;
+
+  /** Size threshold of each checkpoint file. Unit: byte */
+  private volatile long checkpointFileSizeThresholdInByte = 3 * 1024 * 1024L;
+
+  /** Buffer entry size of each wal buffer. Unit: byte */
+  private int walBufferEntrySize = 16 * 1024;
+
+  /** External lib directory for ext Pipe plugins, stores user-defined JAR 
files */
+  private String extPipeDir =
+      IoTDBConstant.EXT_FOLDER_NAME + File.separator + 
IoTDBConstant.EXT_PIPE_FOLDER_NAME;
+
+  /** External lib directory for MQTT, stores user-uploaded JAR files */
+  private String mqttDir =
+      IoTDBConstant.EXT_FOLDER_NAME + File.separator + 
IoTDBConstant.MQTT_FOLDER_NAME;
+
+  private String loadTsFileDir =
+      dnDataDirs[0] + File.separator + IoTDBConstant.LOAD_TSFILE_FOLDER_NAME;
+
+  private String ratisDataRegionSnapshotDir =
+      IoTDBConstant.DEFAULT_BASE_DIR
+          + File.separator
+          + IoTDBConstant.DATA_FOLDER_NAME
+          + File.separator
+          + IoTDBConstant.SNAPSHOT_FOLDER_NAME;
+
+  private String dataRegionConsensusDir = dnConsensusDir + File.separator + 
"data_region";
+
+  private String schemaRegionConsensusDir = dnConsensusDir + File.separator + 
"schema_region";
+
+  /** Maximum MemTable number. Invalid when enableMemControl is true. */
+  private int maxMemtableNumber = 0;
+
+  /** How many threads can concurrently evaluate windows. When <= 0, use CPU 
core number. */
+  private int windowEvaluationThreadCount = 
Runtime.getRuntime().availableProcessors();
 
   /**
-   * Set the language version when loading file including error information, 
default value is "EN"
+   * Max number of window evaluation tasks that can be pending for execution. 
When <= 0, the value
+   * is 64 by default.
    */
-  private String languageVersion = "EN";
+  private int maxPendingWindowEvaluationTasks = 64;
+
+  /** When a unSequence TsFile's file size (in byte) exceed this, the TsFile 
is forced closed. */
+  private long unSeqTsFileSize = 0L;
+
+  /** When a sequence TsFile's file size (in byte) exceed this, the TsFile is 
forced closed. */
+  private long seqTsFileSize = 0L;
+
+  /** Set true to enable statistics monitor service, false to disable 
statistics service. */
+  private boolean enableStatMonitor = false;
+
+  /** Set true to enable writing monitor time series. */
+  private boolean enableMonitorSeriesWrite = false;
 
   /** Examining period of cache file reader : 100 seconds. Unit: millisecond */
   private long cacheFileReaderClearPeriod = 100000;
@@ -412,25 +363,9 @@ public class IoTDBConfig {
   /** Replace implementation class of influxdb protocol service */
   private String influxdbImplClassName = 
NewInfluxDBServiceImpl.class.getName();
 
-  /** whether use chunkBufferPool. */
-  private boolean chunkBufferPoolEnable = false;
-
   /** How many threads will be set up to perform settle tasks. */
   private int settleThreadNum = 1;
 
-  /**
-   * If one merge file selection runs for more than this time, it will be 
ended and its current
-   * selection will be used as final selection. When < 0, it means time is 
unbounded. Unit:
-   * millisecond
-   */
-  private long crossCompactionFileSelectionTimeBudget = 30 * 1000L;
-
-  /**
-   * A global merge will be performed each such interval, that is, each 
database will be merged (if
-   * proper merge candidates can be found). Unit: second.
-   */
-  private long mergeIntervalSec = 0L;
-
   /** The limit of compaction merge can reach per second */
   private int compactionWriteThroughputMbPerSec = 16;
 
@@ -534,75 +469,9 @@ public class IoTDBConfig {
   /** maximum number of logged pages before log erased */
   private int schemaFileLogSize = 16384;
 
-  /** Thrift socket and connection timeout between data node and config node. 
*/
-  private int connectionTimeoutInMS = (int) TimeUnit.SECONDS.toMillis(20);
-
-  /**
-   * ClientManager will have so many selector threads (TAsyncClientManager) to 
distribute to its
-   * clients.
-   */
-  private int selectorNumOfClientManager =
-      Runtime.getRuntime().availableProcessors() / 4 > 0
-          ? Runtime.getRuntime().availableProcessors() / 4
-          : 1;
-
-  /**
-   * The maximum number of clients that can be idle for a node in a 
clientManager. When the number
-   * of idle clients on a node exceeds this number, newly returned clients 
will be released
-   */
-  private int coreClientNumForEachNode = 
DefaultProperty.CORE_CLIENT_NUM_FOR_EACH_NODE;
-
-  /**
-   * The maximum number of clients that can be allocated for a node in a 
clientManager. When the
-   * number of the client to a single node exceeds this number, the thread for 
applying for a client
-   * will be blocked for a while, then ClientManager will throw 
ClientManagerException if there are
-   * no clients after the block time.
-   */
-  private int maxClientNumForEachNode = 
DefaultProperty.MAX_CLIENT_NUM_FOR_EACH_NODE;
-
-  private long dataRatisConsensusLogAppenderBufferSizeMax = 4 * 1024 * 1024L;
-  private long schemaRatisConsensusLogAppenderBufferSizeMax = 4 * 1024 * 1024L;
-
-  private long dataRatisConsensusSnapshotTriggerThreshold = 400000L;
-  private long schemaRatisConsensusSnapshotTriggerThreshold = 400000L;
-
-  private boolean dataRatisConsensusLogUnsafeFlushEnable = false;
-  private boolean schemaRatisConsensusLogUnsafeFlushEnable = false;
-
-  private long dataRatisConsensusLogSegmentSizeMax = 24 * 1024 * 1024L;
-  private long schemaRatisConsensusLogSegmentSizeMax = 24 * 1024 * 1024L;
-
-  private long dataRatisConsensusGrpcFlowControlWindow = 4 * 1024 * 1024L;
-  private long schemaRatisConsensusGrpcFlowControlWindow = 4 * 1024 * 1024L;
-
-  private long dataRatisConsensusLeaderElectionTimeoutMinMs = 2000L;
-  private long schemaRatisConsensusLeaderElectionTimeoutMinMs = 2000L;
-
-  private long dataRatisConsensusLeaderElectionTimeoutMaxMs = 4000L;
-  private long schemaRatisConsensusLeaderElectionTimeoutMaxMs = 4000L;
-
   /** CQ related */
   private long cqMinEveryIntervalInMs = 1_000;
 
-  private long dataRatisConsensusRequestTimeoutMs = 10000L;
-  private long schemaRatisConsensusRequestTimeoutMs = 10000L;
-
-  private int dataRatisConsensusMaxRetryAttempts = 10;
-  private int schemaRatisConsensusMaxRetryAttempts = 10;
-  private long dataRatisConsensusInitialSleepTimeMs = 100L;
-  private long schemaRatisConsensusInitialSleepTimeMs = 100L;
-  private long dataRatisConsensusMaxSleepTimeMs = 10000L;
-  private long schemaRatisConsensusMaxSleepTimeMs = 10000L;
-
-  private long dataRatisConsensusPreserveWhenPurge = 1000L;
-  private long schemaRatisConsensusPreserveWhenPurge = 1000L;
-
-  private long ratisFirstElectionTimeoutMinMs = 50L;
-  private long ratisFirstElectionTimeoutMaxMs = 150L;
-
-  private long dataRatisLogMax = 20L * 1024 * 1024 * 1024; // 20G
-  private long schemaRatisLogMax = 2L * 1024 * 1024 * 1024; // 2G
-
   /** whether to enable the audit log * */
   private boolean enableAuditLog = false;
 
@@ -622,14 +491,6 @@ public class IoTDBConfig {
 
   IoTDBConfig() {}
 
-  public float getUdfMemoryBudgetInMB() {
-    return udfMemoryBudgetInMB;
-  }
-
-  public void setUdfMemoryBudgetInMB(float udfMemoryBudgetInMB) {
-    this.udfMemoryBudgetInMB = udfMemoryBudgetInMB;
-  }
-
   public float getGroupByFillCacheSizeInMB() {
     return groupByFillCacheSizeInMB;
   }
@@ -638,47 +499,6 @@ public class IoTDBConfig {
     this.groupByFillCacheSizeInMB = groupByFillCacheSizeInMB;
   }
 
-  public float getUdfReaderMemoryBudgetInMB() {
-    return udfReaderMemoryBudgetInMB;
-  }
-
-  public void setUdfReaderMemoryBudgetInMB(float udfReaderMemoryBudgetInMB) {
-    this.udfReaderMemoryBudgetInMB = udfReaderMemoryBudgetInMB;
-  }
-
-  public float getUdfTransformerMemoryBudgetInMB() {
-    return udfTransformerMemoryBudgetInMB;
-  }
-
-  public void setUdfTransformerMemoryBudgetInMB(float 
udfTransformerMemoryBudgetInMB) {
-    this.udfTransformerMemoryBudgetInMB = udfTransformerMemoryBudgetInMB;
-  }
-
-  public float getUdfCollectorMemoryBudgetInMB() {
-    return udfCollectorMemoryBudgetInMB;
-  }
-
-  public void setUdfCollectorMemoryBudgetInMB(float 
udfCollectorMemoryBudgetInMB) {
-    this.udfCollectorMemoryBudgetInMB = udfCollectorMemoryBudgetInMB;
-  }
-
-  public int getUdfInitialByteArrayLengthForMemoryControl() {
-    return udfInitialByteArrayLengthForMemoryControl;
-  }
-
-  public void setUdfInitialByteArrayLengthForMemoryControl(
-      int udfInitialByteArrayLengthForMemoryControl) {
-    this.udfInitialByteArrayLengthForMemoryControl = 
udfInitialByteArrayLengthForMemoryControl;
-  }
-
-  public int getConcurrentWritingTimePartition() {
-    return concurrentWritingTimePartition;
-  }
-
-  public void setConcurrentWritingTimePartition(int 
concurrentWritingTimePartition) {
-    this.concurrentWritingTimePartition = concurrentWritingTimePartition;
-  }
-
   public int getDefaultFillInterval() {
     return defaultFillInterval;
   }
@@ -719,7 +539,7 @@ public class IoTDBConfig {
     ratisDataRegionSnapshotDir = addDataHomeDir(ratisDataRegionSnapshotDir);
     schemaRegionConsensusDir = addDataHomeDir(schemaRegionConsensusDir);
     indexRootFolder = addDataHomeDir(indexRootFolder);
-    extDir = addDataHomeDir(extDir);
+    dnExtDir = addDataHomeDir(dnExtDir);
     udfDir = addDataHomeDir(udfDir);
     udfTemporaryLibDir = addDataHomeDir(udfTemporaryLibDir);
     triggerDir = addDataHomeDir(triggerDir);
@@ -917,6 +737,22 @@ public class IoTDBConfig {
     setSchemaRegionConsensusDir(dnConsensusDir + File.separator + 
"schema_region");
   }
 
+  public String[] getDnWalDirs() {
+    return dnWalDirs;
+  }
+
+  public void setDnWalDirs(String[] dnWalDirs) {
+    this.dnWalDirs = dnWalDirs;
+  }
+
+  public String getDnSyncDir() {
+    return dnSyncDir;
+  }
+
+  public void setDnSyncDir(String dnSyncDir) {
+    this.dnSyncDir = dnSyncDir;
+  }
+
   public String getDataRegionConsensusDir() {
     return dataRegionConsensusDir;
   }
@@ -933,12 +769,12 @@ public class IoTDBConfig {
     this.schemaRegionConsensusDir = schemaRegionConsensusDir;
   }
 
-  public String getExtDir() {
-    return extDir;
+  public String getDnExtDir() {
+    return dnExtDir;
   }
 
-  public void setExtDir(String extDir) {
-    this.extDir = extDir;
+  public void setDnExtDir(String dnExtDir) {
+    this.dnExtDir = dnExtDir;
   }
 
   public String getUdfDir() {
@@ -1005,14 +841,6 @@ public class IoTDBConfig {
     }
   }
 
-  public int getBatchSize() {
-    return batchSize;
-  }
-
-  void setBatchSize(int batchSize) {
-    this.batchSize = batchSize;
-  }
-
   public int getMaxMemtableNumber() {
     return maxMemtableNumber;
   }
@@ -1021,49 +849,25 @@ public class IoTDBConfig {
     this.maxMemtableNumber = maxMemtableNumber;
   }
 
-  public int getFlushThreadCount() {
-    return flushThreadCount;
+  public int getSubRawQueryThreadCount() {
+    return subRawQueryThreadCount;
   }
 
-  void setFlushThreadCount(int flushThreadCount) {
-    this.flushThreadCount = flushThreadCount;
+  void setSubRawQueryThreadCount(int subRawQueryThreadCount) {
+    this.subRawQueryThreadCount = subRawQueryThreadCount;
   }
 
-  public int getQueryThreadCount() {
-    return queryThreadCount;
+  public long getMaxBytesPerFragmentInstance() {
+    return maxBytesPerFragmentInstance;
   }
 
-  public void setQueryThreadCount(int queryThreadCount) {
-    this.queryThreadCount = queryThreadCount;
+  @TestOnly
+  public void setMaxBytesPerFragmentInstance(long maxBytesPerFragmentInstance) 
{
+    this.maxBytesPerFragmentInstance = maxBytesPerFragmentInstance;
   }
 
-  public int getMaxAllowedConcurrentQueries() {
-    return maxAllowedConcurrentQueries;
-  }
-
-  public void setMaxAllowedConcurrentQueries(int maxAllowedConcurrentQueries) {
-    this.maxAllowedConcurrentQueries = maxAllowedConcurrentQueries;
-  }
-
-  public int getSubRawQueryThreadCount() {
-    return subRawQueryThreadCount;
-  }
-
-  void setSubRawQueryThreadCount(int subRawQueryThreadCount) {
-    this.subRawQueryThreadCount = subRawQueryThreadCount;
-  }
-
-  public long getMaxBytesPerFragmentInstance() {
-    return maxBytesPerFragmentInstance;
-  }
-
-  @TestOnly
-  public void setMaxBytesPerFragmentInstance(long maxBytesPerFragmentInstance) 
{
-    this.maxBytesPerFragmentInstance = maxBytesPerFragmentInstance;
-  }
-
-  public int getRawQueryBlockingQueueCapacity() {
-    return rawQueryBlockingQueueCapacity;
+  public int getRawQueryBlockingQueueCapacity() {
+    return rawQueryBlockingQueueCapacity;
   }
 
   public void setRawQueryBlockingQueueCapacity(int 
rawQueryBlockingQueueCapacity) {
@@ -1134,14 +938,6 @@ public class IoTDBConfig {
     this.mRemoteSchemaCacheSize = mRemoteSchemaCacheSize;
   }
 
-  public int getMaxNumberOfSyncFileRetry() {
-    return maxNumberOfSyncFileRetry;
-  }
-
-  public void setMaxNumberOfSyncFileRetry(int maxNumberOfSyncFileRetry) {
-    this.maxNumberOfSyncFileRetry = maxNumberOfSyncFileRetry;
-  }
-
   String getLanguageVersion() {
     return languageVersion;
   }
@@ -1180,14 +976,6 @@ public class IoTDBConfig {
     this.cacheFileReaderClearPeriod = cacheFileReaderClearPeriod;
   }
 
-  public long getQueryTimeoutThreshold() {
-    return queryTimeoutThreshold;
-  }
-
-  public void setQueryTimeoutThreshold(long queryTimeoutThreshold) {
-    this.queryTimeoutThreshold = queryTimeoutThreshold;
-  }
-
   public int getDnSessionTimeoutThreshold() {
     return dnSessionTimeoutThreshold;
   }
@@ -1208,38 +996,6 @@ public class IoTDBConfig {
     this.rpcImplClassName = rpcImplClassName;
   }
 
-  public WALMode getWalMode() {
-    return walMode;
-  }
-
-  public void setWalMode(WALMode walMode) {
-    this.walMode = walMode;
-  }
-
-  public int getMaxWalNodesNum() {
-    return maxWalNodesNum;
-  }
-
-  void setMaxWalNodesNum(int maxWalNodesNum) {
-    this.maxWalNodesNum = maxWalNodesNum;
-  }
-
-  public long getFsyncWalDelayInMs() {
-    return fsyncWalDelayInMs;
-  }
-
-  void setFsyncWalDelayInMs(long fsyncWalDelayInMs) {
-    this.fsyncWalDelayInMs = fsyncWalDelayInMs;
-  }
-
-  public int getWalBufferSize() {
-    return walBufferSize;
-  }
-
-  public void setWalBufferSize(int walBufferSize) {
-    this.walBufferSize = walBufferSize;
-  }
-
   public int getWalBufferEntrySize() {
     return walBufferEntrySize;
   }
@@ -1248,22 +1004,6 @@ public class IoTDBConfig {
     this.walBufferEntrySize = walBufferEntrySize;
   }
 
-  public int getWalBufferQueueCapacity() {
-    return walBufferQueueCapacity;
-  }
-
-  void setWalBufferQueueCapacity(int walBufferQueueCapacity) {
-    this.walBufferQueueCapacity = walBufferQueueCapacity;
-  }
-
-  public long getWalFileSizeThresholdInByte() {
-    return walFileSizeThresholdInByte;
-  }
-
-  void setWalFileSizeThresholdInByte(long walFileSizeThresholdInByte) {
-    this.walFileSizeThresholdInByte = walFileSizeThresholdInByte;
-  }
-
   public long getCheckpointFileSizeThresholdInByte() {
     return checkpointFileSizeThresholdInByte;
   }
@@ -1272,38 +1012,6 @@ public class IoTDBConfig {
     this.checkpointFileSizeThresholdInByte = checkpointFileSizeThresholdInByte;
   }
 
-  public double getWalMinEffectiveInfoRatio() {
-    return walMinEffectiveInfoRatio;
-  }
-
-  void setWalMinEffectiveInfoRatio(double walMinEffectiveInfoRatio) {
-    this.walMinEffectiveInfoRatio = walMinEffectiveInfoRatio;
-  }
-
-  public long getWalMemTableSnapshotThreshold() {
-    return walMemTableSnapshotThreshold;
-  }
-
-  void setWalMemTableSnapshotThreshold(long walMemTableSnapshotThreshold) {
-    this.walMemTableSnapshotThreshold = walMemTableSnapshotThreshold;
-  }
-
-  public int getMaxWalMemTableSnapshotNum() {
-    return maxWalMemTableSnapshotNum;
-  }
-
-  void setMaxWalMemTableSnapshotNum(int maxWalMemTableSnapshotNum) {
-    this.maxWalMemTableSnapshotNum = maxWalMemTableSnapshotNum;
-  }
-
-  public long getDeleteWalFilesPeriodInMs() {
-    return deleteWalFilesPeriodInMs;
-  }
-
-  void setDeleteWalFilesPeriodInMs(long deleteWalFilesPeriodInMs) {
-    this.deleteWalFilesPeriodInMs = deleteWalFilesPeriodInMs;
-  }
-
   public boolean isChunkBufferPoolEnable() {
     return chunkBufferPoolEnable;
   }
@@ -1320,54 +1028,11 @@ public class IoTDBConfig {
     this.mergeIntervalSec = mergeIntervalSec;
   }
 
-  public double getBufferedArraysMemoryProportion() {
-    return bufferedArraysMemoryProportion;
-  }
-
-  public void setBufferedArraysMemoryProportion(double 
bufferedArraysMemoryProportion) {
-    this.bufferedArraysMemoryProportion = bufferedArraysMemoryProportion;
-  }
-
-  public double getFlushProportion() {
-    return flushProportion;
-  }
-
-  public void setFlushProportion(double flushProportion) {
-    this.flushProportion = flushProportion;
-  }
-
-  public double getRejectProportion() {
-    return rejectProportion;
-  }
-
-  public void setRejectProportion(double rejectProportion) {
-    this.rejectProportion = rejectProportion;
-  }
-
-  public double getWriteMemoryVariationReportProportion() {
-    return writeMemoryVariationReportProportion;
-  }
-
-  public void setWriteMemoryVariationReportProportion(double 
writeMemoryVariationReportProportion) {
-    this.writeMemoryVariationReportProportion = 
writeMemoryVariationReportProportion;
-  }
-
-  public long getAllocateMemoryForStorageEngine() {
-    return allocateMemoryForStorageEngine;
-  }
-
   public void setAllocateMemoryForStorageEngine(long 
allocateMemoryForStorageEngine) {
     this.allocateMemoryForStorageEngine = allocateMemoryForStorageEngine;
     this.allocateMemoryForTimePartitionInfo = allocateMemoryForStorageEngine * 
50 / 1001;
   }
 
-  public long getAllocateMemoryForSchema() {
-    return allocateMemoryForSchema;
-  }
-
-  public long getAllocateMemoryForConsensus() {
-    return allocateMemoryForConsensus;
-  }
 
   public void setAllocateMemoryForSchema(long allocateMemoryForSchema) {
     this.allocateMemoryForSchema = allocateMemoryForSchema;
@@ -1377,14 +1042,6 @@ public class IoTDBConfig {
     this.allocateMemoryForLastCache = allocateMemoryForSchema / 10;
   }
 
-  public void setAllocateMemoryForConsensus(long allocateMemoryForConsensus) {
-    this.allocateMemoryForConsensus = allocateMemoryForConsensus;
-  }
-
-  public long getAllocateMemoryForRead() {
-    return allocateMemoryForRead;
-  }
-
   void setAllocateMemoryForRead(long allocateMemoryForRead) {
     this.allocateMemoryForRead = allocateMemoryForRead;
 
@@ -1404,30 +1061,6 @@ public class IoTDBConfig {
         - allocateMemoryForSchema;
   }
 
-  public boolean isEnableExternalSort() {
-    return enableExternalSort;
-  }
-
-  void setEnableExternalSort(boolean enableExternalSort) {
-    this.enableExternalSort = enableExternalSort;
-  }
-
-  public int getExternalSortThreshold() {
-    return externalSortThreshold;
-  }
-
-  void setExternalSortThreshold(int externalSortThreshold) {
-    this.externalSortThreshold = externalSortThreshold;
-  }
-
-  public boolean isEnablePartialInsert() {
-    return enablePartialInsert;
-  }
-
-  public void setEnablePartialInsert(boolean enablePartialInsert) {
-    this.enablePartialInsert = enablePartialInsert;
-  }
-
   public int getCompactionThreadCount() {
     return compactionThreadCount;
   }
@@ -1436,38 +1069,6 @@ public class IoTDBConfig {
     this.compactionThreadCount = compactionThreadCount;
   }
 
-  public int getContinuousQueryThreadNum() {
-    return continuousQueryThreadNum;
-  }
-
-  public void setContinuousQueryThreadNum(int continuousQueryThreadNum) {
-    this.continuousQueryThreadNum = continuousQueryThreadNum;
-  }
-
-  public long getContinuousQueryMinimumEveryInterval() {
-    return continuousQueryMinimumEveryInterval;
-  }
-
-  public void setContinuousQueryMinimumEveryInterval(long 
minimumEveryInterval) {
-    this.continuousQueryMinimumEveryInterval = minimumEveryInterval;
-  }
-
-  public void setSelectIntoInsertTabletPlanRowLimit(int 
selectIntoInsertTabletPlanRowLimit) {
-    this.selectIntoInsertTabletPlanRowLimit = 
selectIntoInsertTabletPlanRowLimit;
-  }
-
-  public int getSelectIntoInsertTabletPlanRowLimit() {
-    return selectIntoInsertTabletPlanRowLimit;
-  }
-
-  public int getIntoOperationExecutionThreadCount() {
-    return intoOperationExecutionThreadCount;
-  }
-
-  public void setIntoOperationExecutionThreadCount(int 
intoOperationExecutionThreadCount) {
-    this.intoOperationExecutionThreadCount = intoOperationExecutionThreadCount;
-  }
-
   public int getCompactionWriteThroughputMbPerSec() {
     return compactionWriteThroughputMbPerSec;
   }
@@ -1476,86 +1077,6 @@ public class IoTDBConfig {
     this.compactionWriteThroughputMbPerSec = compactionWriteThroughputMbPerSec;
   }
 
-  public boolean isEnableMemControl() {
-    return enableMemControl;
-  }
-
-  public void setEnableMemControl(boolean enableMemControl) {
-    this.enableMemControl = enableMemControl;
-  }
-
-  public long getMemtableSizeThreshold() {
-    return memtableSizeThreshold;
-  }
-
-  public void setMemtableSizeThreshold(long memtableSizeThreshold) {
-    this.memtableSizeThreshold = memtableSizeThreshold;
-  }
-
-  public boolean isEnableTimedFlushSeqMemtable() {
-    return enableTimedFlushSeqMemtable;
-  }
-
-  public void setEnableTimedFlushSeqMemtable(boolean 
enableTimedFlushSeqMemtable) {
-    this.enableTimedFlushSeqMemtable = enableTimedFlushSeqMemtable;
-  }
-
-  public long getSeqMemtableFlushInterval() {
-    return seqMemtableFlushInterval;
-  }
-
-  public void setSeqMemtableFlushInterval(long seqMemtableFlushInterval) {
-    this.seqMemtableFlushInterval = seqMemtableFlushInterval;
-  }
-
-  public long getSeqMemtableFlushCheckInterval() {
-    return seqMemtableFlushCheckInterval;
-  }
-
-  public void setSeqMemtableFlushCheckInterval(long 
seqMemtableFlushCheckInterval) {
-    this.seqMemtableFlushCheckInterval = seqMemtableFlushCheckInterval;
-  }
-
-  public boolean isEnableTimedFlushUnseqMemtable() {
-    return enableTimedFlushUnseqMemtable;
-  }
-
-  public void setEnableTimedFlushUnseqMemtable(boolean 
enableTimedFlushUnseqMemtable) {
-    this.enableTimedFlushUnseqMemtable = enableTimedFlushUnseqMemtable;
-  }
-
-  public long getUnseqMemtableFlushInterval() {
-    return unseqMemtableFlushInterval;
-  }
-
-  public void setUnseqMemtableFlushInterval(long unseqMemtableFlushInterval) {
-    this.unseqMemtableFlushInterval = unseqMemtableFlushInterval;
-  }
-
-  public long getUnseqMemtableFlushCheckInterval() {
-    return unseqMemtableFlushCheckInterval;
-  }
-
-  public void setUnseqMemtableFlushCheckInterval(long 
unseqMemtableFlushCheckInterval) {
-    this.unseqMemtableFlushCheckInterval = unseqMemtableFlushCheckInterval;
-  }
-
-  public TVListSortAlgorithm getTvListSortAlgorithm() {
-    return tvListSortAlgorithm;
-  }
-
-  public void setTvListSortAlgorithm(TVListSortAlgorithm tvListSortAlgorithm) {
-    this.tvListSortAlgorithm = tvListSortAlgorithm;
-  }
-
-  public int getAvgSeriesPointNumberThreshold() {
-    return avgSeriesPointNumberThreshold;
-  }
-
-  public void setAvgSeriesPointNumberThreshold(int 
avgSeriesPointNumberThreshold) {
-    this.avgSeriesPointNumberThreshold = avgSeriesPointNumberThreshold;
-  }
-
   public long getCrossCompactionFileSelectionTimeBudget() {
     return crossCompactionFileSelectionTimeBudget;
   }
@@ -1572,119 +1093,6 @@ public class IoTDBConfig {
     this.dnRpcThriftCompressionEnable = dnRpcThriftCompressionEnable;
   }
 
-  public boolean isMetaDataCacheEnable() {
-    return metaDataCacheEnable;
-  }
-
-  public void setMetaDataCacheEnable(boolean metaDataCacheEnable) {
-    this.metaDataCacheEnable = metaDataCacheEnable;
-  }
-
-  public long getAllocateMemoryForBloomFilterCache() {
-    return allocateMemoryForBloomFilterCache;
-  }
-
-  public void setAllocateMemoryForBloomFilterCache(long 
allocateMemoryForBloomFilterCache) {
-    this.allocateMemoryForBloomFilterCache = allocateMemoryForBloomFilterCache;
-  }
-
-  public long getAllocateMemoryForTimeSeriesMetaDataCache() {
-    return allocateMemoryForTimeSeriesMetaDataCache;
-  }
-
-  public void setAllocateMemoryForTimeSeriesMetaDataCache(
-      long allocateMemoryForTimeSeriesMetaDataCache) {
-    this.allocateMemoryForTimeSeriesMetaDataCache = 
allocateMemoryForTimeSeriesMetaDataCache;
-  }
-
-  public long getAllocateMemoryForChunkCache() {
-    return allocateMemoryForChunkCache;
-  }
-
-  public void setAllocateMemoryForChunkCache(long allocateMemoryForChunkCache) 
{
-    this.allocateMemoryForChunkCache = allocateMemoryForChunkCache;
-  }
-
-  public long getAllocateMemoryForCoordinator() {
-    return allocateMemoryForCoordinator;
-  }
-
-  public void setAllocateMemoryForCoordinator(long 
allocateMemoryForCoordinator) {
-    this.allocateMemoryForCoordinator = allocateMemoryForCoordinator;
-  }
-
-  public long getAllocateMemoryForOperators() {
-    return allocateMemoryForOperators;
-  }
-
-  public void setAllocateMemoryForOperators(long allocateMemoryForOperators) {
-    this.allocateMemoryForOperators = allocateMemoryForOperators;
-  }
-
-  public long getAllocateMemoryForDataExchange() {
-    return allocateMemoryForDataExchange;
-  }
-
-  public void setAllocateMemoryForDataExchange(long 
allocateMemoryForDataExchange) {
-    this.allocateMemoryForDataExchange = allocateMemoryForDataExchange;
-  }
-
-  public long getAllocateMemoryForTimeIndex() {
-    return allocateMemoryForTimeIndex;
-  }
-
-  public void setAllocateMemoryForTimeIndex(long allocateMemoryForTimeIndex) {
-    this.allocateMemoryForTimeIndex = allocateMemoryForTimeIndex;
-  }
-
-  public long getAllocateMemoryForTimePartitionInfo() {
-    return allocateMemoryForTimePartitionInfo;
-  }
-
-  public void setAllocateMemoryForTimePartitionInfo(long 
allocateMemoryForTimePartitionInfo) {
-    this.allocateMemoryForTimePartitionInfo = 
allocateMemoryForTimePartitionInfo;
-  }
-
-  public boolean isEnableQueryMemoryEstimation() {
-    return enableQueryMemoryEstimation;
-  }
-
-  public void setEnableQueryMemoryEstimation(boolean 
enableQueryMemoryEstimation) {
-    this.enableQueryMemoryEstimation = enableQueryMemoryEstimation;
-  }
-
-  public boolean isEnableWatermark() {
-    return enableWatermark;
-  }
-
-  public void setEnableWatermark(boolean enableWatermark) {
-    this.enableWatermark = enableWatermark;
-  }
-
-  public String getWatermarkSecretKey() {
-    return watermarkSecretKey;
-  }
-
-  public void setWatermarkSecretKey(String watermarkSecretKey) {
-    this.watermarkSecretKey = watermarkSecretKey;
-  }
-
-  public String getWatermarkBitString() {
-    return watermarkBitString;
-  }
-
-  public void setWatermarkBitString(String watermarkBitString) {
-    this.watermarkBitString = watermarkBitString;
-  }
-
-  public String getWatermarkMethod() {
-    return this.watermarkMethod;
-  }
-
-  public void setWatermarkMethod(String watermarkMethod) {
-    this.watermarkMethod = watermarkMethod;
-  }
-
   public String getWatermarkMethodName() {
     return watermarkMethod.split("\\(")[0];
   }
@@ -1759,18 +1167,10 @@ public class IoTDBConfig {
     this.hdfsPort = hdfsPort;
   }
 
-  public int getUpgradeThreadCount() {
-    return upgradeThreadCount;
-  }
-
   public int getSettleThreadNum() {
     return settleThreadNum;
   }
 
-  void setUpgradeThreadCount(int upgradeThreadCount) {
-    this.upgradeThreadCount = upgradeThreadCount;
-  }
-
   String getDfsNameServices() {
     return dfsNameServices;
   }
@@ -1839,78 +1239,6 @@ public class IoTDBConfig {
     this.thriftServerAwaitTimeForStopService = 
thriftServerAwaitTimeForStopService;
   }
 
-  public boolean isEnableMQTTService() {
-    return enableMQTTService;
-  }
-
-  public void setEnableMQTTService(boolean enableMQTTService) {
-    this.enableMQTTService = enableMQTTService;
-  }
-
-  public String getMqttHost() {
-    return mqttHost;
-  }
-
-  public void setMqttHost(String mqttHost) {
-    this.mqttHost = mqttHost;
-  }
-
-  public int getMqttPort() {
-    return mqttPort;
-  }
-
-  public void setMqttPort(int mqttPort) {
-    this.mqttPort = mqttPort;
-  }
-
-  public int getMqttHandlerPoolSize() {
-    return mqttHandlerPoolSize;
-  }
-
-  public void setMqttHandlerPoolSize(int mqttHandlerPoolSize) {
-    this.mqttHandlerPoolSize = mqttHandlerPoolSize;
-  }
-
-  public String getMqttPayloadFormatter() {
-    return mqttPayloadFormatter;
-  }
-
-  public void setMqttPayloadFormatter(String mqttPayloadFormatter) {
-    this.mqttPayloadFormatter = mqttPayloadFormatter;
-  }
-
-  public int getMqttMaxMessageSize() {
-    return mqttMaxMessageSize;
-  }
-
-  public void setMqttMaxMessageSize(int mqttMaxMessageSize) {
-    this.mqttMaxMessageSize = mqttMaxMessageSize;
-  }
-
-  public int getTagAttributeTotalSize() {
-    return tagAttributeTotalSize;
-  }
-
-  public void setTagAttributeTotalSize(int tagAttributeTotalSize) {
-    this.tagAttributeTotalSize = tagAttributeTotalSize;
-  }
-
-  public int getTagAttributeFlushInterval() {
-    return tagAttributeFlushInterval;
-  }
-
-  public void setTagAttributeFlushInterval(int tagAttributeFlushInterval) {
-    this.tagAttributeFlushInterval = tagAttributeFlushInterval;
-  }
-
-  public int getPrimitiveArraySize() {
-    return primitiveArraySize;
-  }
-
-  public void setPrimitiveArraySize(int primitiveArraySize) {
-    this.primitiveArraySize = primitiveArraySize;
-  }
-
   public long getStartUpNanosecond() {
     return startUpNanosecond;
   }
@@ -1933,94 +1261,6 @@ public class IoTDBConfig {
     RpcTransportFactory.setDefaultBufferCapacity(this.dnThriftInitBufferSize);
   }
 
-  public int getMaxQueryDeduplicatedPathNum() {
-    return maxQueryDeduplicatedPathNum;
-  }
-
-  public void setMaxQueryDeduplicatedPathNum(int maxQueryDeduplicatedPathNum) {
-    this.maxQueryDeduplicatedPathNum = maxQueryDeduplicatedPathNum;
-  }
-
-  public int getCheckPeriodWhenInsertBlocked() {
-    return checkPeriodWhenInsertBlocked;
-  }
-
-  public void setCheckPeriodWhenInsertBlocked(int 
checkPeriodWhenInsertBlocked) {
-    this.checkPeriodWhenInsertBlocked = checkPeriodWhenInsertBlocked;
-  }
-
-  public int getMaxWaitingTimeWhenInsertBlocked() {
-    return maxWaitingTimeWhenInsertBlockedInMs;
-  }
-
-  public void setMaxWaitingTimeWhenInsertBlocked(int 
maxWaitingTimeWhenInsertBlocked) {
-    this.maxWaitingTimeWhenInsertBlockedInMs = maxWaitingTimeWhenInsertBlocked;
-  }
-
-  public int getFrequencyIntervalInMinute() {
-    return frequencyIntervalInMinute;
-  }
-
-  public void setFrequencyIntervalInMinute(int frequencyIntervalInMinute) {
-    this.frequencyIntervalInMinute = frequencyIntervalInMinute;
-  }
-
-  public long getSlowQueryThreshold() {
-    return slowQueryThreshold;
-  }
-
-  public void setSlowQueryThreshold(long slowQueryThreshold) {
-    this.slowQueryThreshold = slowQueryThreshold;
-  }
-
-  public boolean isEnableIndex() {
-    return enableIndex;
-  }
-
-  public void setEnableIndex(boolean enableIndex) {
-    this.enableIndex = enableIndex;
-  }
-
-  void setConcurrentIndexBuildThread(int concurrentIndexBuildThread) {
-    this.concurrentIndexBuildThread = concurrentIndexBuildThread;
-  }
-
-  public int getConcurrentIndexBuildThread() {
-    return concurrentIndexBuildThread;
-  }
-
-  public String getIndexRootFolder() {
-    return indexRootFolder;
-  }
-
-  public void setIndexRootFolder(String indexRootFolder) {
-    this.indexRootFolder = indexRootFolder;
-  }
-
-  public int getDefaultIndexWindowRange() {
-    return defaultIndexWindowRange;
-  }
-
-  public void setDefaultIndexWindowRange(int defaultIndexWindowRange) {
-    this.defaultIndexWindowRange = defaultIndexWindowRange;
-  }
-
-  public int getDataRegionNum() {
-    return dataRegionNum;
-  }
-
-  public void setDataRegionNum(int dataRegionNum) {
-    this.dataRegionNum = dataRegionNum;
-  }
-
-  public long getRecoveryLogIntervalInMs() {
-    return recoveryLogIntervalInMs;
-  }
-
-  public void setRecoveryLogIntervalInMs(long recoveryLogIntervalInMs) {
-    this.recoveryLogIntervalInMs = recoveryLogIntervalInMs;
-  }
-
   public boolean isDnRpcAdvancedCompressionEnable() {
     return dnRpcAdvancedCompressionEnable;
   }
@@ -2030,30 +1270,6 @@ public class IoTDBConfig {
     RpcTransportFactory.setUseSnappy(this.dnRpcAdvancedCompressionEnable);
   }
 
-  public int getMlogBufferSize() {
-    return mlogBufferSize;
-  }
-
-  public void setMlogBufferSize(int mlogBufferSize) {
-    this.mlogBufferSize = mlogBufferSize;
-  }
-
-  public long getSyncMlogPeriodInMs() {
-    return syncMlogPeriodInMs;
-  }
-
-  public void setSyncMlogPeriodInMs(long syncMlogPeriodInMs) {
-    this.syncMlogPeriodInMs = syncMlogPeriodInMs;
-  }
-
-  public int getTlogBufferSize() {
-    return tlogBufferSize;
-  }
-
-  public void setTlogBufferSize(int tlogBufferSize) {
-    this.tlogBufferSize = tlogBufferSize;
-  }
-
   public boolean isEnableRpcService() {
     return enableRpcService;
   }
@@ -2062,22 +1278,6 @@ public class IoTDBConfig {
     this.enableRpcService = enableRpcService;
   }
 
-  public boolean isEnableInfluxDBRpcService() {
-    return enableInfluxDBRpcService;
-  }
-
-  public void setEnableInfluxDBRpcService(boolean enableInfluxDBRpcService) {
-    this.enableInfluxDBRpcService = enableInfluxDBRpcService;
-  }
-
-  public int getIoTaskQueueSizeForFlushing() {
-    return ioTaskQueueSizeForFlushing;
-  }
-
-  public void setIoTaskQueueSizeForFlushing(int ioTaskQueueSizeForFlushing) {
-    this.ioTaskQueueSizeForFlushing = ioTaskQueueSizeForFlushing;
-  }
-
   public boolean isEnableSeqSpaceCompaction() {
     return enableSeqSpaceCompaction;
   }
@@ -2370,38 +1570,6 @@ public class IoTDBConfig {
     this.dnJoinClusterRetryIntervalMs = dnJoinClusterRetryIntervalMs;
   }
 
-  public String getDataRegionConsensusProtocolClass() {
-    return dataRegionConsensusProtocolClass;
-  }
-
-  public void setDataRegionConsensusProtocolClass(String 
dataRegionConsensusProtocolClass) {
-    this.dataRegionConsensusProtocolClass = dataRegionConsensusProtocolClass;
-  }
-
-  public String getSchemaRegionConsensusProtocolClass() {
-    return schemaRegionConsensusProtocolClass;
-  }
-
-  public void setSchemaRegionConsensusProtocolClass(String 
schemaRegionConsensusProtocolClass) {
-    this.schemaRegionConsensusProtocolClass = 
schemaRegionConsensusProtocolClass;
-  }
-
-  public String getSeriesPartitionExecutorClass() {
-    return seriesPartitionExecutorClass;
-  }
-
-  public void setSeriesPartitionExecutorClass(String 
seriesPartitionExecutorClass) {
-    this.seriesPartitionExecutorClass = seriesPartitionExecutorClass;
-  }
-
-  public int getSeriesPartitionSlotNum() {
-    return seriesPartitionSlotNum;
-  }
-
-  public void setSeriesPartitionSlotNum(int seriesPartitionSlotNum) {
-    this.seriesPartitionSlotNum = seriesPartitionSlotNum;
-  }
-
   public int getDnMppDataExchangePort() {
     return dnMppDataExchangePort;
   }
@@ -2477,62 +1645,6 @@ public class IoTDBConfig {
     this.extPipeDir = extPipeDir;
   }
 
-  public int getTriggerForwardMaxQueueNumber() {
-    return triggerForwardMaxQueueNumber;
-  }
-
-  public void setTriggerForwardMaxQueueNumber(int 
triggerForwardMaxQueueNumber) {
-    this.triggerForwardMaxQueueNumber = triggerForwardMaxQueueNumber;
-  }
-
-  public int getTriggerForwardMaxSizePerQueue() {
-    return triggerForwardMaxSizePerQueue;
-  }
-
-  public void setTriggerForwardMaxSizePerQueue(int 
triggerForwardMaxSizePerQueue) {
-    this.triggerForwardMaxSizePerQueue = triggerForwardMaxSizePerQueue;
-  }
-
-  public int getTriggerForwardBatchSize() {
-    return triggerForwardBatchSize;
-  }
-
-  public void setTriggerForwardBatchSize(int triggerForwardBatchSize) {
-    this.triggerForwardBatchSize = triggerForwardBatchSize;
-  }
-
-  public int getTriggerForwardHTTPPoolSize() {
-    return triggerForwardHTTPPoolSize;
-  }
-
-  public void setTriggerForwardHTTPPoolSize(int triggerForwardHTTPPoolSize) {
-    this.triggerForwardHTTPPoolSize = triggerForwardHTTPPoolSize;
-  }
-
-  public int getTriggerForwardHTTPPOOLMaxPerRoute() {
-    return triggerForwardHTTPPOOLMaxPerRoute;
-  }
-
-  public void setTriggerForwardHTTPPOOLMaxPerRoute(int 
triggerForwardHTTPPOOLMaxPerRoute) {
-    this.triggerForwardHTTPPOOLMaxPerRoute = triggerForwardHTTPPOOLMaxPerRoute;
-  }
-
-  public int getTriggerForwardMQTTPoolSize() {
-    return triggerForwardMQTTPoolSize;
-  }
-
-  public void setTriggerForwardMQTTPoolSize(int triggerForwardMQTTPoolSize) {
-    this.triggerForwardMQTTPoolSize = triggerForwardMQTTPoolSize;
-  }
-
-  public int getRetryNumToFindStatefulTrigger() {
-    return retryNumToFindStatefulTrigger;
-  }
-
-  public void setRetryNumToFindStatefulTrigger(int 
retryNumToFindStatefulTrigger) {
-    this.retryNumToFindStatefulTrigger = retryNumToFindStatefulTrigger;
-  }
-
   public TEndPoint getAddressAndPort() {
     return new TEndPoint(dnRpcAddress, dnRpcPort);
   }
@@ -2541,15 +1653,6 @@ public class IoTDBConfig {
     return loadTsFileProportion;
   }
 
-  public long getDataRatisConsensusLogAppenderBufferSizeMax() {
-    return dataRatisConsensusLogAppenderBufferSizeMax;
-  }
-
-  public void setDataRatisConsensusLogAppenderBufferSizeMax(
-      long dataRatisConsensusLogAppenderBufferSizeMax) {
-    this.dataRatisConsensusLogAppenderBufferSizeMax = 
dataRatisConsensusLogAppenderBufferSizeMax;
-  }
-
   public String getConfigMessage() {
     String configMessage = "";
     String configContent;
@@ -2583,127 +1686,6 @@ public class IoTDBConfig {
     return configMessage;
   }
 
-  public long getDataRatisConsensusSnapshotTriggerThreshold() {
-    return dataRatisConsensusSnapshotTriggerThreshold;
-  }
-
-  public void setDataRatisConsensusSnapshotTriggerThreshold(
-      long dataRatisConsensusSnapshotTriggerThreshold) {
-    this.dataRatisConsensusSnapshotTriggerThreshold = 
dataRatisConsensusSnapshotTriggerThreshold;
-  }
-
-  public boolean isDataRatisConsensusLogUnsafeFlushEnable() {
-    return dataRatisConsensusLogUnsafeFlushEnable;
-  }
-
-  public void setDataRatisConsensusLogUnsafeFlushEnable(
-      boolean dataRatisConsensusLogUnsafeFlushEnable) {
-    this.dataRatisConsensusLogUnsafeFlushEnable = 
dataRatisConsensusLogUnsafeFlushEnable;
-  }
-
-  public long getDataRatisConsensusLogSegmentSizeMax() {
-    return dataRatisConsensusLogSegmentSizeMax;
-  }
-
-  public void setDataRatisConsensusLogSegmentSizeMax(long 
dataRatisConsensusLogSegmentSizeMax) {
-    this.dataRatisConsensusLogSegmentSizeMax = 
dataRatisConsensusLogSegmentSizeMax;
-  }
-
-  public long getDataRatisConsensusGrpcFlowControlWindow() {
-    return dataRatisConsensusGrpcFlowControlWindow;
-  }
-
-  public void setDataRatisConsensusGrpcFlowControlWindow(
-      long dataRatisConsensusGrpcFlowControlWindow) {
-    this.dataRatisConsensusGrpcFlowControlWindow = 
dataRatisConsensusGrpcFlowControlWindow;
-  }
-
-  public long getDataRatisConsensusLeaderElectionTimeoutMinMs() {
-    return dataRatisConsensusLeaderElectionTimeoutMinMs;
-  }
-
-  public void setDataRatisConsensusLeaderElectionTimeoutMinMs(
-      long dataRatisConsensusLeaderElectionTimeoutMinMs) {
-    this.dataRatisConsensusLeaderElectionTimeoutMinMs =
-        dataRatisConsensusLeaderElectionTimeoutMinMs;
-  }
-
-  public long getDataRatisConsensusLeaderElectionTimeoutMaxMs() {
-    return dataRatisConsensusLeaderElectionTimeoutMaxMs;
-  }
-
-  public void setDataRatisConsensusLeaderElectionTimeoutMaxMs(
-      long dataRatisConsensusLeaderElectionTimeoutMaxMs) {
-    this.dataRatisConsensusLeaderElectionTimeoutMaxMs =
-        dataRatisConsensusLeaderElectionTimeoutMaxMs;
-  }
-
-  public long getSchemaRatisConsensusLogAppenderBufferSizeMax() {
-    return schemaRatisConsensusLogAppenderBufferSizeMax;
-  }
-
-  public void setSchemaRatisConsensusLogAppenderBufferSizeMax(
-      long schemaRatisConsensusLogAppenderBufferSizeMax) {
-    this.schemaRatisConsensusLogAppenderBufferSizeMax =
-        schemaRatisConsensusLogAppenderBufferSizeMax;
-  }
-
-  public long getSchemaRatisConsensusSnapshotTriggerThreshold() {
-    return schemaRatisConsensusSnapshotTriggerThreshold;
-  }
-
-  public void setSchemaRatisConsensusSnapshotTriggerThreshold(
-      long schemaRatisConsensusSnapshotTriggerThreshold) {
-    this.schemaRatisConsensusSnapshotTriggerThreshold =
-        schemaRatisConsensusSnapshotTriggerThreshold;
-  }
-
-  public boolean isSchemaRatisConsensusLogUnsafeFlushEnable() {
-    return schemaRatisConsensusLogUnsafeFlushEnable;
-  }
-
-  public void setSchemaRatisConsensusLogUnsafeFlushEnable(
-      boolean schemaRatisConsensusLogUnsafeFlushEnable) {
-    this.schemaRatisConsensusLogUnsafeFlushEnable = 
schemaRatisConsensusLogUnsafeFlushEnable;
-  }
-
-  public long getSchemaRatisConsensusLogSegmentSizeMax() {
-    return schemaRatisConsensusLogSegmentSizeMax;
-  }
-
-  public void setSchemaRatisConsensusLogSegmentSizeMax(long 
schemaRatisConsensusLogSegmentSizeMax) {
-    this.schemaRatisConsensusLogSegmentSizeMax = 
schemaRatisConsensusLogSegmentSizeMax;
-  }
-
-  public long getSchemaRatisConsensusGrpcFlowControlWindow() {
-    return schemaRatisConsensusGrpcFlowControlWindow;
-  }
-
-  public void setSchemaRatisConsensusGrpcFlowControlWindow(
-      long schemaRatisConsensusGrpcFlowControlWindow) {
-    this.schemaRatisConsensusGrpcFlowControlWindow = 
schemaRatisConsensusGrpcFlowControlWindow;
-  }
-
-  public long getSchemaRatisConsensusLeaderElectionTimeoutMinMs() {
-    return schemaRatisConsensusLeaderElectionTimeoutMinMs;
-  }
-
-  public void setSchemaRatisConsensusLeaderElectionTimeoutMinMs(
-      long schemaRatisConsensusLeaderElectionTimeoutMinMs) {
-    this.schemaRatisConsensusLeaderElectionTimeoutMinMs =
-        schemaRatisConsensusLeaderElectionTimeoutMinMs;
-  }
-
-  public long getSchemaRatisConsensusLeaderElectionTimeoutMaxMs() {
-    return schemaRatisConsensusLeaderElectionTimeoutMaxMs;
-  }
-
-  public void setSchemaRatisConsensusLeaderElectionTimeoutMaxMs(
-      long schemaRatisConsensusLeaderElectionTimeoutMaxMs) {
-    this.schemaRatisConsensusLeaderElectionTimeoutMaxMs =
-        schemaRatisConsensusLeaderElectionTimeoutMaxMs;
-  }
-
   public long getCqMinEveryIntervalInMs() {
     return cqMinEveryIntervalInMs;
   }
@@ -2712,70 +1694,6 @@ public class IoTDBConfig {
     this.cqMinEveryIntervalInMs = cqMinEveryIntervalInMs;
   }
 
-  public long getDataRatisConsensusRequestTimeoutMs() {
-    return dataRatisConsensusRequestTimeoutMs;
-  }
-
-  public void setDataRatisConsensusRequestTimeoutMs(long 
dataRatisConsensusRequestTimeoutMs) {
-    this.dataRatisConsensusRequestTimeoutMs = 
dataRatisConsensusRequestTimeoutMs;
-  }
-
-  public long getSchemaRatisConsensusRequestTimeoutMs() {
-    return schemaRatisConsensusRequestTimeoutMs;
-  }
-
-  public void setSchemaRatisConsensusRequestTimeoutMs(long 
schemaRatisConsensusRequestTimeoutMs) {
-    this.schemaRatisConsensusRequestTimeoutMs = 
schemaRatisConsensusRequestTimeoutMs;
-  }
-
-  public int getDataRatisConsensusMaxRetryAttempts() {
-    return dataRatisConsensusMaxRetryAttempts;
-  }
-
-  public void setDataRatisConsensusMaxRetryAttempts(int 
dataRatisConsensusMaxRetryAttempts) {
-    this.dataRatisConsensusMaxRetryAttempts = 
dataRatisConsensusMaxRetryAttempts;
-  }
-
-  public int getSchemaRatisConsensusMaxRetryAttempts() {
-    return schemaRatisConsensusMaxRetryAttempts;
-  }
-
-  public void setSchemaRatisConsensusMaxRetryAttempts(int 
schemaRatisConsensusMaxRetryAttempts) {
-    this.schemaRatisConsensusMaxRetryAttempts = 
schemaRatisConsensusMaxRetryAttempts;
-  }
-
-  public long getDataRatisConsensusInitialSleepTimeMs() {
-    return dataRatisConsensusInitialSleepTimeMs;
-  }
-
-  public void setDataRatisConsensusInitialSleepTimeMs(long 
dataRatisConsensusInitialSleepTimeMs) {
-    this.dataRatisConsensusInitialSleepTimeMs = 
dataRatisConsensusInitialSleepTimeMs;
-  }
-
-  public long getSchemaRatisConsensusInitialSleepTimeMs() {
-    return schemaRatisConsensusInitialSleepTimeMs;
-  }
-
-  public void setSchemaRatisConsensusInitialSleepTimeMs(
-      long schemaRatisConsensusInitialSleepTimeMs) {
-    this.schemaRatisConsensusInitialSleepTimeMs = 
schemaRatisConsensusInitialSleepTimeMs;
-  }
-
-  public long getDataRatisConsensusMaxSleepTimeMs() {
-    return dataRatisConsensusMaxSleepTimeMs;
-  }
-
-  public void setDataRatisConsensusMaxSleepTimeMs(long 
dataRatisConsensusMaxSleepTimeMs) {
-    this.dataRatisConsensusMaxSleepTimeMs = dataRatisConsensusMaxSleepTimeMs;
-  }
-
-  public long getSchemaRatisConsensusMaxSleepTimeMs() {
-    return schemaRatisConsensusMaxSleepTimeMs;
-  }
-
-  public void setSchemaRatisConsensusMaxSleepTimeMs(long 
schemaRatisConsensusMaxSleepTimeMs) {
-    this.schemaRatisConsensusMaxSleepTimeMs = 
schemaRatisConsensusMaxSleepTimeMs;
-  }
 
   public Properties getCustomizedProperties() {
     return customizedProperties;
@@ -2785,54 +1703,6 @@ public class IoTDBConfig {
     this.customizedProperties = customizedProperties;
   }
 
-  public long getDataRatisConsensusPreserveWhenPurge() {
-    return dataRatisConsensusPreserveWhenPurge;
-  }
-
-  public void setDataRatisConsensusPreserveWhenPurge(long 
dataRatisConsensusPreserveWhenPurge) {
-    this.dataRatisConsensusPreserveWhenPurge = 
dataRatisConsensusPreserveWhenPurge;
-  }
-
-  public long getSchemaRatisConsensusPreserveWhenPurge() {
-    return schemaRatisConsensusPreserveWhenPurge;
-  }
-
-  public void setSchemaRatisConsensusPreserveWhenPurge(long 
schemaRatisConsensusPreserveWhenPurge) {
-    this.schemaRatisConsensusPreserveWhenPurge = 
schemaRatisConsensusPreserveWhenPurge;
-  }
-
-  public long getRatisFirstElectionTimeoutMinMs() {
-    return ratisFirstElectionTimeoutMinMs;
-  }
-
-  public void setRatisFirstElectionTimeoutMinMs(long 
ratisFirstElectionTimeoutMinMs) {
-    this.ratisFirstElectionTimeoutMinMs = ratisFirstElectionTimeoutMinMs;
-  }
-
-  public long getRatisFirstElectionTimeoutMaxMs() {
-    return ratisFirstElectionTimeoutMaxMs;
-  }
-
-  public void setRatisFirstElectionTimeoutMaxMs(long 
ratisFirstElectionTimeoutMaxMs) {
-    this.ratisFirstElectionTimeoutMaxMs = ratisFirstElectionTimeoutMaxMs;
-  }
-
-  public long getDataRatisLogMax() {
-    return dataRatisLogMax;
-  }
-
-  public void setDataRatisLogMax(long dataRatisLogMax) {
-    this.dataRatisLogMax = dataRatisLogMax;
-  }
-
-  public long getSchemaRatisLogMax() {
-    return schemaRatisLogMax;
-  }
-
-  public void setSchemaRatisLogMax(long schemaRatisLogMax) {
-    this.schemaRatisLogMax = schemaRatisLogMax;
-  }
-
   public boolean isEnableCompactionValidation() {
     return enableCompactionValidation;
   }
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 d6682ae904..12af768942 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
@@ -19,12 +19,10 @@
 package org.apache.iotdb.db.conf;
 
 import org.apache.iotdb.commons.conf.CommonConfig;
-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.service.metric.MetricService;
 import org.apache.iotdb.commons.utils.NodeUrlUtils;
-import org.apache.iotdb.commons.wal.WALMode;
 import org.apache.iotdb.confignode.rpc.thrift.TCQConfig;
 import org.apache.iotdb.confignode.rpc.thrift.TGlobalConfig;
 import org.apache.iotdb.confignode.rpc.thrift.TRatisConfig;
@@ -71,8 +69,6 @@ public class IoTDBDescriptor {
 
   private static final Logger logger = 
LoggerFactory.getLogger(IoTDBDescriptor.class);
 
-  private final CommonDescriptor commonDescriptor = 
CommonDescriptor.getInstance();
-
   private final IoTDBConfig CONF = new IoTDBConfig();
 
   protected IoTDBDescriptor() {
@@ -91,6 +87,15 @@ public class IoTDBDescriptor {
     }
   }
 
+  private static class IoTDBDescriptorHolder {
+
+    private static final IoTDBDescriptor INSTANCE = new IoTDBDescriptor();
+
+    private IoTDBDescriptorHolder() {
+      // Empty constructor
+    }
+  }
+
   public static IoTDBDescriptor getInstance() {
     return IoTDBDescriptorHolder.INSTANCE;
   }
@@ -183,7 +188,6 @@ public class IoTDBDescriptor {
       } finally {
         // update all data seriesPath
         CONF.updatePath();
-        
commonDescriptor.getConfig().updatePath(System.getProperty(IoTDBConstant.IOTDB_HOME,
 null));
         MetricConfigDescriptor.getInstance().loadProps(commonProperties);
         MetricConfigDescriptor.getInstance()
             .getMetricConfig()
@@ -197,347 +201,22 @@ public class IoTDBDescriptor {
   }
 
   public void loadProperties(Properties properties) {
+    /* DataNode RPC Configuration */
+    loadDataNodeRPCConfiguration(properties);
 
-    CONF.setClusterName(
-        properties.getProperty(IoTDBConstant.CLUSTER_NAME, 
CONF.getClusterName()).trim());
-
-    CONF.setDnRpcAddress(
-        properties.getProperty(IoTDBConstant.DN_RPC_ADDRESS, 
CONF.getDnRpcAddress()).trim());
-
-    CONF.setDnRpcThriftCompressionEnable(
-        Boolean.parseBoolean(
-            properties
-                .getProperty(
-                    "dn_rpc_thrift_compression_enable",
-                    Boolean.toString(CONF.isDnRpcThriftCompressionEnable()))
-                .trim()));
-
-    CONF.setDnRpcAdvancedCompressionEnable(
-        Boolean.parseBoolean(
-            properties
-                .getProperty(
-                    "dn_rpc_advanced_compression_enable",
-                    Boolean.toString(CONF.isDnRpcAdvancedCompressionEnable()))
-                .trim()));
-
-    CONF.setDnConnectionTimeoutInMS(
-        Integer.parseInt(
-            properties
-                .getProperty(
-                    "dn_connection_timeout_ms", 
String.valueOf(CONF.getDnConnectionTimeoutInMS()))
-                .trim()));
-
-    CONF.setCoreClientNumForEachNode(
-        Integer.parseInt(
-            properties
-                .getProperty(
-                    "dn_core_client_count_for_each_node_in_client_manager",
-                    String.valueOf(CONF.getCoreClientNumForEachNode()))
-                .trim()));
-
-    CONF.setMaxClientNumForEachNode(
-        Integer.parseInt(
-            properties
-                .getProperty(
-                    "dn_max_client_count_for_each_node_in_client_manager",
-                    String.valueOf(CONF.getMaxClientNumForEachNode()))
-                .trim()));
-
-    CONF.setDnSelectorThreadCountOfClientManager(
-        Integer.parseInt(
-            properties
-                .getProperty(
-                    "dn_selector_thread_count_of_client_manager",
-                    
String.valueOf(CONF.getDnSelectorThreadCountOfClientManager()))
-                .trim()));
-
-    CONF.setDnRpcPort(
-        Integer.parseInt(
-            properties
-                .getProperty(IoTDBConstant.DN_RPC_PORT, 
Integer.toString(CONF.getDnRpcPort()))
-                .trim()));
-
-    loadWALProps(properties);
-
-    String systemDir = properties.getProperty("dn_system_dir");
-    if (systemDir == null) {
-      systemDir = properties.getProperty("base_dir");
-      if (systemDir != null) {
-        systemDir = FilePathUtils.regularizePath(systemDir) + 
IoTDBConstant.SYSTEM_FOLDER_NAME;
-      } else {
-        systemDir = CONF.getDnSystemDir();
-      }
-    }
-    CONF.setDnSystemDir(systemDir);
-
-    CONF.setSchemaDir(
-        FilePathUtils.regularizePath(CONF.getDnSystemDir()) + 
IoTDBConstant.SCHEMA_FOLDER_NAME);
-
-    CONF.setQueryDir(
-        FilePathUtils.regularizePath(CONF.getDnSystemDir() + 
IoTDBConstant.QUERY_FOLDER_NAME));
-
-    CONF.setDnTracingDir(properties.getProperty("dn_tracing_dir", 
CONF.getDnTracingDir()));
-
-    CONF.setDnDataDirs(properties.getProperty("dn_data_dirs", 
CONF.getDnDataDirs()[0]).split(","));
-
-    CONF.setDnConsensusDir(properties.getProperty("dn_consensus_dir", 
CONF.getDnConsensusDir()));
-
-    String oldMultiDirStrategyClassName = 
CONF.getDnMultiDirStrategyClassName();
-    CONF.setDnMultiDirStrategyClassName(
-        properties.getProperty("dn_multi_dir_strategy", 
CONF.getDnMultiDirStrategyClassName()));
-    try {
-      CONF.checkMultiDirStrategyClassName();
-    } catch (Exception e) {
-      CONF.setDnMultiDirStrategyClassName(oldMultiDirStrategyClassName);
-      throw e;
-    }
-
-    long memTableSizeThreshold =
-        Long.parseLong(
-            properties
-                .getProperty(
-                    "memtable_size_threshold", 
Long.toString(CONF.getMemtableSizeThreshold()))
-                .trim());
-    if (memTableSizeThreshold > 0) {
-      CONF.setMemtableSizeThreshold(memTableSizeThreshold);
-    }
-
-    CONF.setCompactionScheduleIntervalInMs(
-        Long.parseLong(
-            properties.getProperty(
-                "compaction_schedule_interval_in_ms",
-                Long.toString(CONF.getCompactionScheduleIntervalInMs()))));
-
-    CONF.setCompactionSubmissionIntervalInMs(
-        Long.parseLong(
-            properties.getProperty(
-                "compaction_submission_interval_in_ms",
-                Long.toString(CONF.getCompactionSubmissionIntervalInMs()))));
-
-    CONF.setEnableCrossSpaceCompaction(
-        Boolean.parseBoolean(
-            properties.getProperty(
-                "enable_cross_space_compaction",
-                Boolean.toString(CONF.isEnableCrossSpaceCompaction()))));
-
-    CONF.setEnableSeqSpaceCompaction(
-        Boolean.parseBoolean(
-            properties.getProperty(
-                "enable_seq_space_compaction",
-                Boolean.toString(CONF.isEnableSeqSpaceCompaction()))));
-
-    CONF.setEnableUnseqSpaceCompaction(
-        Boolean.parseBoolean(
-            properties.getProperty(
-                "enable_unseq_space_compaction",
-                Boolean.toString(CONF.isEnableUnseqSpaceCompaction()))));
-
-    CONF.setCrossCompactionSelector(
-        CrossCompactionSelector.getCrossCompactionSelector(
-            properties.getProperty(
-                "cross_selector", 
CONF.getCrossCompactionSelector().toString())));
-
-    CONF.setInnerSequenceCompactionSelector(
-        InnerSequenceCompactionSelector.getInnerSequenceCompactionSelector(
-            properties.getProperty(
-                "inner_seq_selector", 
CONF.getInnerSequenceCompactionSelector().toString())));
-
-    CONF.setInnerUnsequenceCompactionSelector(
-        InnerUnsequenceCompactionSelector.getInnerUnsequenceCompactionSelector(
-            properties.getProperty(
-                "inner_unseq_selector", 
CONF.getInnerUnsequenceCompactionSelector().toString())));
-
-    CONF.setInnerSeqCompactionPerformer(
-        InnerSeqCompactionPerformer.getInnerSeqCompactionPerformer(
-            properties.getProperty(
-                "inner_seq_performer", 
CONF.getInnerSeqCompactionPerformer().toString())));
-
-    CONF.setInnerUnseqCompactionPerformer(
-        InnerUnseqCompactionPerformer.getInnerUnseqCompactionPerformer(
-            properties.getProperty(
-                "inner_unseq_performer", 
CONF.getInnerUnseqCompactionPerformer().toString())));
-
-    CONF.setCrossCompactionPerformer(
-        CrossCompactionPerformer.getCrossCompactionPerformer(
-            properties.getProperty(
-                "cross_performer", 
CONF.getCrossCompactionPerformer().toString())));
-
-    CONF.setCompactionPriority(
-        CompactionPriority.valueOf(
-            properties.getProperty(
-                "compaction_priority", 
CONF.getCompactionPriority().toString())));
-
-    int subtaskNum =
-        Integer.parseInt(
-            properties.getProperty(
-                "sub_compaction_thread_count", 
Integer.toString(CONF.getSubCompactionTaskNum())));
-    subtaskNum = subtaskNum <= 0 ? 1 : subtaskNum;
-    CONF.setSubCompactionTaskNum(subtaskNum);
-
-    CONF.setDnSessionTimeoutThreshold(
-        Integer.parseInt(
-            properties.getProperty(
-                "dn_session_timeout_threshold",
-                Integer.toString(CONF.getDnSessionTimeoutThreshold()))));
-
-    CONF.setIpWhiteList(properties.getProperty("ip_white_list", 
CONF.getIpWhiteList()));
-
-    // start: index parameter setting
-    CONF.setIndexRootFolder(properties.getProperty("index_root_dir", 
CONF.getIndexRootFolder()));
-
-    CONF.setEnableIndex(
-        Boolean.parseBoolean(
-            properties.getProperty("enable_index", 
Boolean.toString(CONF.isEnableIndex()))));
-
-    CONF.setConcurrentIndexBuildThread(
-        Integer.parseInt(
-            properties.getProperty(
-                "concurrent_index_build_thread",
-                Integer.toString(CONF.getConcurrentIndexBuildThread()))));
-    if (CONF.getConcurrentIndexBuildThread() <= 0) {
-      
CONF.setConcurrentIndexBuildThread(Runtime.getRuntime().availableProcessors());
-    }
-
-    CONF.setDefaultIndexWindowRange(
-        Integer.parseInt(
-            properties.getProperty(
-                "default_index_window_range",
-                Integer.toString(CONF.getDefaultIndexWindowRange()))));
-
-    CONF.setSubRawQueryThreadCount(
-        Integer.parseInt(
-            properties.getProperty(
-                "sub_rawQuery_thread_count", 
Integer.toString(CONF.getSubRawQueryThreadCount()))));
+    /* Target ConfigNodes */
+    loadTargetConfigNodes(properties);
 
-    if (CONF.getSubRawQueryThreadCount() <= 0) {
-      
CONF.setSubRawQueryThreadCount(Runtime.getRuntime().availableProcessors());
-    }
+    /* Connection Configuration */
+    loadConnectionConfiguration(properties);
 
-    CONF.setRawQueryBlockingQueueCapacity(
-        Integer.parseInt(
-            properties.getProperty(
-                "raw_query_blocking_queue_capacity",
-                Integer.toString(CONF.getRawQueryBlockingQueueCapacity()))));
-
-    CONF.setmRemoteSchemaCacheSize(
-        Integer.parseInt(
-            properties
-                .getProperty(
-                    "remote_schema_cache_size", 
Integer.toString(CONF.getmRemoteSchemaCacheSize()))
-                .trim()));
+    /* Directory Configuration */
+    loadDirectoryConfiguration(properties);
 
-    CONF.setLanguageVersion(
-        properties.getProperty("language_version", 
CONF.getLanguageVersion()).trim());
+    /* Compaction Configurations */
+    // TODO: Move to CommonDescriptor
+    loadCompactionConfigurations(properties);
 
-    if (properties.containsKey("chunk_buffer_pool_enable")) {
-      CONF.setChunkBufferPoolEnable(
-          
Boolean.parseBoolean(properties.getProperty("chunk_buffer_pool_enable")));
-    }
-
-    CONF.setEnableExternalSort(
-        Boolean.parseBoolean(
-            properties.getProperty(
-                "enable_external_sort", 
Boolean.toString(CONF.isEnableExternalSort()))));
-    CONF.setExternalSortThreshold(
-        Integer.parseInt(
-            properties.getProperty(
-                "external_sort_threshold", 
Integer.toString(CONF.getExternalSortThreshold()))));
-    CONF.setCrossCompactionFileSelectionTimeBudget(
-        Long.parseLong(
-            properties.getProperty(
-                "cross_compaction_file_selection_time_budget",
-                
Long.toString(CONF.getCrossCompactionFileSelectionTimeBudget()))));
-    CONF.setMergeIntervalSec(
-        Long.parseLong(
-            properties.getProperty(
-                "merge_interval_sec", 
Long.toString(CONF.getMergeIntervalSec()))));
-    CONF.setCompactionThreadCount(
-        Integer.parseInt(
-            properties.getProperty(
-                "compaction_thread_count", 
Integer.toString(CONF.getCompactionThreadCount()))));
-    CONF.setTargetCompactionFileSize(
-        Long.parseLong(
-            properties.getProperty(
-                "target_compaction_file_size", 
Long.toString(CONF.getTargetCompactionFileSize()))));
-    CONF.setTargetChunkSize(
-        Long.parseLong(
-            properties.getProperty("target_chunk_size", 
Long.toString(CONF.getTargetChunkSize()))));
-    CONF.setTargetChunkPointNum(
-        Long.parseLong(
-            properties.getProperty(
-                "target_chunk_point_num", 
Long.toString(CONF.getTargetChunkPointNum()))));
-    CONF.setChunkPointNumLowerBoundInCompaction(
-        Long.parseLong(
-            properties.getProperty(
-                "chunk_point_num_lower_bound_in_compaction",
-                
Long.toString(CONF.getChunkPointNumLowerBoundInCompaction()))));
-    CONF.setChunkSizeLowerBoundInCompaction(
-        Long.parseLong(
-            properties.getProperty(
-                "chunk_size_lower_bound_in_compaction",
-                Long.toString(CONF.getChunkSizeLowerBoundInCompaction()))));
-    CONF.setMaxInnerCompactionCandidateFileNum(
-        Integer.parseInt(
-            properties.getProperty(
-                "max_inner_compaction_candidate_file_num",
-                
Integer.toString(CONF.getMaxInnerCompactionCandidateFileNum()))));
-    CONF.setMaxCrossCompactionCandidateFileNum(
-        Integer.parseInt(
-            properties.getProperty(
-                "max_cross_compaction_candidate_file_num",
-                
Integer.toString(CONF.getMaxCrossCompactionCandidateFileNum()))));
-    CONF.setMaxCrossCompactionCandidateFileSize(
-        Long.parseLong(
-            properties.getProperty(
-                "max_cross_compaction_candidate_file_size",
-                
Long.toString(CONF.getMaxCrossCompactionCandidateFileSize()))));
-
-    CONF.setCompactionWriteThroughputMbPerSec(
-        Integer.parseInt(
-            properties.getProperty(
-                "compaction_write_throughput_mb_per_sec",
-                
Integer.toString(CONF.getCompactionWriteThroughputMbPerSec()))));
-
-    CONF.setEnableCompactionValidation(
-        Boolean.parseBoolean(
-            properties.getProperty(
-                "enable_compaction_validation",
-                Boolean.toString(CONF.isEnableCompactionValidation()))));
-
-    int rpcSelectorThreadNum =
-        Integer.parseInt(
-            properties.getProperty(
-                "dn_rpc_selector_thread_count",
-                Integer.toString(CONF.getDnRpcSelectorThreadCount()).trim()));
-    if (rpcSelectorThreadNum <= 0) {
-      rpcSelectorThreadNum = 1;
-    }
-
-    CONF.setDnRpcSelectorThreadCount(rpcSelectorThreadNum);
-
-    int minConcurrentClientNum =
-        Integer.parseInt(
-            properties.getProperty(
-                "dn_rpc_min_concurrent_client_num",
-                
Integer.toString(CONF.getDnRpcMinConcurrentClientNum()).trim()));
-    if (minConcurrentClientNum <= 0) {
-      minConcurrentClientNum = Runtime.getRuntime().availableProcessors();
-    }
-
-    CONF.setDnRpcMinConcurrentClientNum(minConcurrentClientNum);
-
-    int maxConcurrentClientNum =
-        Integer.parseInt(
-            properties.getProperty(
-                "dn_rpc_max_concurrent_client_num",
-                
Integer.toString(CONF.getDnRpcMaxConcurrentClientNum()).trim()));
-    if (maxConcurrentClientNum <= 0) {
-      maxConcurrentClientNum = 65535;
-    }
-
-    CONF.setDnRpcMaxConcurrentClientNum(maxConcurrentClientNum);
-
-    loadAutoCreateSchemaProps(properties);
 
     CONF.setTsFileStorageFs(
         properties.getProperty("tsfile_storage_fs", 
CONF.getTsFileStorageFs().toString()));
@@ -570,20 +249,10 @@ public class IoTDBDescriptor {
             properties.getProperty(
                 "default_fill_interval", 
String.valueOf(CONF.getDefaultFillInterval()))));
 
-    CONF.setDnThriftMaxFrameSize(
-        Integer.parseInt(
-            properties.getProperty(
-                "dn_thrift_max_frame_size", 
String.valueOf(CONF.getDnThriftMaxFrameSize()))));
-
     if (CONF.getDnThriftMaxFrameSize() < IoTDBConstant.LEFT_SIZE_IN_REQUEST * 
2) {
       CONF.setDnThriftMaxFrameSize(IoTDBConstant.LEFT_SIZE_IN_REQUEST * 2);
     }
 
-    CONF.setDnThriftInitBufferSize(
-        Integer.parseInt(
-            properties.getProperty(
-                "dn_thrift_init_buffer_size", 
String.valueOf(CONF.getDnThriftInitBufferSize()))));
-
     CONF.setFrequencyIntervalInMinute(
         Integer.parseInt(
             properties.getProperty(
@@ -647,9 +316,6 @@ public class IoTDBDescriptor {
             properties.getProperty(
                 "schema_file_log_size", 
String.valueOf(CONF.getSchemaFileLogSize()))));
 
-    // mqtt
-    loadMqttProps(properties);
-
     CONF.setExtPipeDir(properties.getProperty("ext_pipe_dir", 
CONF.getExtPipeDir()).trim());
 
     // At the same time, set TSFileConfig
@@ -740,6 +406,336 @@ public class IoTDBDescriptor {
             CONF.getTimePartitionInterval(), CONF.getTimestampPrecision()));
   }
 
+  private void loadDataNodeRPCConfiguration(Properties properties) {
+    CONF.setDnRpcAddress(
+      properties.getProperty(IoTDBConstant.DN_RPC_ADDRESS, 
CONF.getDnRpcAddress()).trim());
+
+    CONF.setDnRpcPort(
+      Integer.parseInt(
+        properties
+          .getProperty(IoTDBConstant.DN_RPC_PORT, 
Integer.toString(CONF.getDnRpcPort()))
+          .trim()));
+
+    CONF.setDnInternalAddress(
+      properties.getProperty(IoTDBConstant.DN_INTERNAL_ADDRESS, 
CONF.getDnInternalAddress()));
+
+    CONF.setDnInternalPort(
+      Integer.parseInt(
+        properties.getProperty(
+          IoTDBConstant.DN_INTERNAL_PORT, 
Integer.toString(CONF.getDnInternalPort()))));
+
+    CONF.setDnMppDataExchangePort(
+      Integer.parseInt(
+        properties.getProperty(
+          "dn_mpp_data_exchange_port", 
Integer.toString(CONF.getDnMppDataExchangePort()))));
+
+    CONF.setDnSchemaRegionConsensusPort(
+      Integer.parseInt(
+        properties.getProperty(
+          "dn_schema_region_consensus_port",
+          Integer.toString(CONF.getDnSchemaRegionConsensusPort()))));
+
+    CONF.setDnDataRegionConsensusPort(
+      Integer.parseInt(
+        properties.getProperty(
+          "dn_data_region_consensus_port",
+          Integer.toString(CONF.getDnDataRegionConsensusPort()))));
+
+    CONF.setDnJoinClusterRetryIntervalMs(
+      Long.parseLong(
+        properties.getProperty(
+          "dn_join_cluster_retry_interval_ms",
+          Long.toString(CONF.getDnJoinClusterRetryIntervalMs()))));
+  }
+
+  private void loadTargetConfigNodes(Properties properties) {
+    String configNodeUrls = 
properties.getProperty(IoTDBConstant.DN_TARGET_CONFIG_NODE_LIST);
+    if (configNodeUrls != null) {
+      try {
+        
CONF.setDnTargetConfigNodeList(NodeUrlUtils.parseTEndPointUrls(configNodeUrls));
+      } catch (BadNodeUrlException e) {
+        logger.error(
+          "ConfigNodes are set in wrong format, please set them like 
127.0.0.1:10710,127.0.0.1:10712");
+      }
+    }
+  }
+
+  private void loadConnectionConfiguration(Properties properties) {
+    CONF.setDnSessionTimeoutThreshold(
+      Integer.parseInt(
+        properties.getProperty(
+          "dn_session_timeout_threshold",
+          Integer.toString(CONF.getDnSessionTimeoutThreshold()))));
+
+    CONF.setDnRpcThriftCompressionEnable(
+      Boolean.parseBoolean(
+        properties
+          .getProperty(
+            "dn_rpc_thrift_compression_enable",
+            Boolean.toString(CONF.isDnRpcThriftCompressionEnable()))
+          .trim()));
+
+    CONF.setDnRpcAdvancedCompressionEnable(
+      Boolean.parseBoolean(
+        properties
+          .getProperty(
+            "dn_rpc_advanced_compression_enable",
+            Boolean.toString(CONF.isDnRpcAdvancedCompressionEnable()))
+          .trim()));
+
+    int rpcSelectorThreadNum =
+      Integer.parseInt(
+        properties.getProperty(
+          "dn_rpc_selector_thread_count",
+          Integer.toString(CONF.getDnRpcSelectorThreadCount()).trim()));
+    if (rpcSelectorThreadNum <= 0) {
+      rpcSelectorThreadNum = 1;
+    }
+    CONF.setDnRpcSelectorThreadCount(rpcSelectorThreadNum);
+
+    int minConcurrentClientNum =
+      Integer.parseInt(
+        properties.getProperty(
+          "dn_rpc_min_concurrent_client_num",
+          Integer.toString(CONF.getDnRpcMinConcurrentClientNum()).trim()));
+    if (minConcurrentClientNum <= 0) {
+      minConcurrentClientNum = Runtime.getRuntime().availableProcessors();
+    }
+    CONF.setDnRpcMinConcurrentClientNum(minConcurrentClientNum);
+
+    int maxConcurrentClientNum =
+      Integer.parseInt(
+        properties.getProperty(
+          "dn_rpc_max_concurrent_client_num",
+          Integer.toString(CONF.getDnRpcMaxConcurrentClientNum()).trim()));
+    if (maxConcurrentClientNum <= 0) {
+      maxConcurrentClientNum = 65535;
+    }
+    CONF.setDnRpcMaxConcurrentClientNum(maxConcurrentClientNum);
+
+    CONF.setDnThriftMaxFrameSize(
+      Integer.parseInt(
+        properties.getProperty(
+          "dn_thrift_max_frame_size", 
String.valueOf(CONF.getDnThriftMaxFrameSize()))));
+
+    CONF.setDnThriftInitBufferSize(
+      Integer.parseInt(
+        properties.getProperty(
+          "dn_thrift_init_buffer_size", 
String.valueOf(CONF.getDnThriftInitBufferSize()))));
+
+    CONF.setDnConnectionTimeoutInMS(
+      Integer.parseInt(
+        properties
+          .getProperty(
+            "dn_connection_timeout_ms", 
String.valueOf(CONF.getDnConnectionTimeoutInMS()))
+          .trim()));
+
+    CONF.setDnSelectorThreadCountOfClientManager(
+      Integer.parseInt(
+        properties
+          .getProperty(
+            "dn_selector_thread_count_of_client_manager",
+            String.valueOf(CONF.getDnSelectorThreadCountOfClientManager()))
+          .trim()));
+
+    CONF.setDnCoreClientCountForEachNodeInClientManager(
+      Integer.parseInt(
+        
properties.getProperty("dn_core_client_count_for_each_node_in_client_manager",
+          
String.valueOf(CONF.getDnCoreClientCountForEachNodeInClientManager())).trim()
+      )
+    );
+
+    CONF.setDnMaxClientCountForEachNodeInClientManager(
+      Integer.parseInt(
+        
properties.getProperty("dn_max_client_count_for_each_node_in_client_manager",
+          
String.valueOf(CONF.getDnMaxClientCountForEachNodeInClientManager())).trim()
+      )
+    );
+  }
+
+  private void loadDirectoryConfiguration(Properties properties) {
+    String systemDir = properties.getProperty("dn_system_dir");
+    if (systemDir == null) {
+      systemDir = properties.getProperty("base_dir");
+      if (systemDir != null) {
+        systemDir = FilePathUtils.regularizePath(systemDir) + 
IoTDBConstant.SYSTEM_FOLDER_NAME;
+      } else {
+        systemDir = CONF.getDnSystemDir();
+      }
+    }
+    CONF.setDnSystemDir(systemDir);
+
+    CONF.setSchemaDir(
+      FilePathUtils.regularizePath(CONF.getDnSystemDir()) + 
IoTDBConstant.SCHEMA_FOLDER_NAME);
+
+    CONF.setQueryDir(
+      FilePathUtils.regularizePath(CONF.getDnSystemDir() + 
IoTDBConstant.QUERY_FOLDER_NAME));
+
+    CONF.setDnDataDirs(properties.getProperty("dn_data_dirs", 
CONF.getDnDataDirs()[0]).split(","));
+
+    String oldMultiDirStrategyClassName = 
CONF.getDnMultiDirStrategyClassName();
+    CONF.setDnMultiDirStrategyClassName(
+      properties.getProperty("dn_multi_dir_strategy", 
CONF.getDnMultiDirStrategyClassName()));
+    try {
+      CONF.checkMultiDirStrategyClassName();
+    } catch (Exception e) {
+      CONF.setDnMultiDirStrategyClassName(oldMultiDirStrategyClassName);
+      throw e;
+    }
+
+    CONF.setDnConsensusDir(properties.getProperty("dn_consensus_dir", 
CONF.getDnConsensusDir()));
+
+    CONF.setDnWalDirs(
+      properties
+        .getProperty("dn_wal_dirs", String.join(",", CONF.getDnWalDirs()))
+        .trim()
+        .split(","));
+
+    CONF.setDnTracingDir(properties.getProperty("dn_tracing_dir", 
CONF.getDnTracingDir()));
+
+    CONF.setDnSyncDir(properties.getProperty("dn_sync_dir", 
CONF.getDnSyncDir()).trim());
+  }
+
+  private void loadCompactionConfigurations(Properties properties) {
+    CONF.setEnableSeqSpaceCompaction(
+      Boolean.parseBoolean(
+        properties.getProperty(
+          "enable_seq_space_compaction",
+          Boolean.toString(CONF.isEnableSeqSpaceCompaction()))));
+
+    CONF.setEnableUnseqSpaceCompaction(
+      Boolean.parseBoolean(
+        properties.getProperty(
+          "enable_unseq_space_compaction",
+          Boolean.toString(CONF.isEnableUnseqSpaceCompaction()))));
+
+    CONF.setEnableCrossSpaceCompaction(
+      Boolean.parseBoolean(
+        properties.getProperty(
+          "enable_cross_space_compaction",
+          Boolean.toString(CONF.isEnableCrossSpaceCompaction()))));
+
+    CONF.setCrossCompactionSelector(
+      CrossCompactionSelector.getCrossCompactionSelector(
+        properties.getProperty(
+          "cross_selector", CONF.getCrossCompactionSelector().toString())));
+
+    CONF.setCrossCompactionPerformer(
+      CrossCompactionPerformer.getCrossCompactionPerformer(
+        properties.getProperty(
+          "cross_performer", CONF.getCrossCompactionPerformer().toString())));
+
+    CONF.setInnerSequenceCompactionSelector(
+      InnerSequenceCompactionSelector.getInnerSequenceCompactionSelector(
+        properties.getProperty(
+          "inner_seq_selector", 
CONF.getInnerSequenceCompactionSelector().toString())));
+
+    CONF.setInnerSeqCompactionPerformer(
+      InnerSeqCompactionPerformer.getInnerSeqCompactionPerformer(
+        properties.getProperty(
+          "inner_seq_performer", 
CONF.getInnerSeqCompactionPerformer().toString())));
+
+    CONF.setInnerUnsequenceCompactionSelector(
+      InnerUnsequenceCompactionSelector.getInnerUnsequenceCompactionSelector(
+        properties.getProperty(
+          "inner_unseq_selector", 
CONF.getInnerUnsequenceCompactionSelector().toString())));
+
+    CONF.setInnerUnseqCompactionPerformer(
+      InnerUnseqCompactionPerformer.getInnerUnseqCompactionPerformer(
+        properties.getProperty(
+          "inner_unseq_performer", 
CONF.getInnerUnseqCompactionPerformer().toString())));
+
+    CONF.setCompactionPriority(
+      CompactionPriority.valueOf(
+        properties.getProperty(
+          "compaction_priority", CONF.getCompactionPriority().toString())));
+
+    CONF.setTargetCompactionFileSize(
+      Long.parseLong(
+        properties.getProperty(
+          "target_compaction_file_size", 
Long.toString(CONF.getTargetCompactionFileSize()))));
+
+    CONF.setTargetChunkSize(
+      Long.parseLong(
+        properties.getProperty("target_chunk_size", 
Long.toString(CONF.getTargetChunkSize()))));
+
+    CONF.setTargetChunkPointNum(
+      Long.parseLong(
+        properties.getProperty(
+          "target_chunk_point_num", 
Long.toString(CONF.getTargetChunkPointNum()))));
+
+    CONF.setChunkPointNumLowerBoundInCompaction(
+      Long.parseLong(
+        properties.getProperty(
+          "chunk_point_num_lower_bound_in_compaction",
+          Long.toString(CONF.getChunkPointNumLowerBoundInCompaction()))));
+
+    CONF.setChunkSizeLowerBoundInCompaction(
+      Long.parseLong(
+        properties.getProperty(
+          "chunk_size_lower_bound_in_compaction",
+          Long.toString(CONF.getChunkSizeLowerBoundInCompaction()))));
+
+    CONF.setMaxInnerCompactionCandidateFileNum(
+      Integer.parseInt(
+        properties.getProperty(
+          "max_inner_compaction_candidate_file_num",
+          Integer.toString(CONF.getMaxInnerCompactionCandidateFileNum()))));
+
+    CONF.setMaxCrossCompactionCandidateFileNum(
+      Integer.parseInt(
+        properties.getProperty(
+          "max_cross_compaction_candidate_file_num",
+          Integer.toString(CONF.getMaxCrossCompactionCandidateFileNum()))));
+
+    CONF.setMaxCrossCompactionCandidateFileSize(
+      Long.parseLong(
+        properties.getProperty(
+          "max_cross_compaction_candidate_file_size",
+          Long.toString(CONF.getMaxCrossCompactionCandidateFileSize()))));
+
+    CONF.setCompactionWriteThroughputMbPerSec(
+      Integer.parseInt(
+        properties.getProperty(
+          "compaction_write_throughput_mb_per_sec",
+          Integer.toString(CONF.getCompactionWriteThroughputMbPerSec()))));
+
+    CONF.setEnableCompactionValidation(
+      Boolean.parseBoolean(
+        properties.getProperty(
+          "enable_compaction_validation",
+          Boolean.toString(CONF.isEnableCompactionValidation()))));
+
+    CONF.setCompactionScheduleIntervalInMs(
+      Long.parseLong(
+        properties.getProperty(
+          "compaction_schedule_interval_in_ms",
+          Long.toString(CONF.getCompactionScheduleIntervalInMs()))));
+
+    CONF.setCompactionSubmissionIntervalInMs(
+      Long.parseLong(
+        properties.getProperty(
+          "compaction_submission_interval_in_ms",
+          Long.toString(CONF.getCompactionSubmissionIntervalInMs()))));
+
+    int subtaskNum =
+      Integer.parseInt(
+        properties.getProperty(
+          "sub_compaction_thread_count", 
Integer.toString(CONF.getSubCompactionTaskNum())));
+    subtaskNum = subtaskNum <= 0 ? 1 : subtaskNum;
+    CONF.setSubCompactionTaskNum(subtaskNum);
+
+    CONF.setCompactionThreadCount(
+      Integer.parseInt(
+        properties.getProperty(
+          "compaction_thread_count", 
Integer.toString(CONF.getCompactionThreadCount()))));
+
+    CONF.setCrossCompactionFileSelectionTimeBudget(
+      Long.parseLong(
+        properties.getProperty(
+          "cross_compaction_file_selection_time_budget",
+          Long.toString(CONF.getCrossCompactionFileSelectionTimeBudget()))));
+  }
 
   public void loadHotModifiedProps(Properties properties) throws 
QueryProcessException {
     try {
@@ -874,50 +870,6 @@ public class IoTDBDescriptor {
             CONF.getTimestampPrecision()));
   }
 
-  public void loadClusterProps(Properties properties) {
-    String configNodeUrls = 
properties.getProperty(IoTDBConstant.DN_TARGET_CONFIG_NODE_LIST);
-    if (configNodeUrls != null) {
-      try {
-        
CONF.setDnTargetConfigNodeList(NodeUrlUtils.parseTEndPointUrls(configNodeUrls));
-      } catch (BadNodeUrlException e) {
-        logger.error(
-            "Config nodes are set in wrong format, please set them like 
127.0.0.1:10710,127.0.0.1:10712");
-      }
-    }
-
-    CONF.setDnInternalAddress(
-        properties.getProperty(IoTDBConstant.DN_INTERNAL_ADDRESS, 
CONF.getDnInternalAddress()));
-
-    CONF.setDnInternalPort(
-        Integer.parseInt(
-            properties.getProperty(
-                IoTDBConstant.DN_INTERNAL_PORT, 
Integer.toString(CONF.getDnInternalPort()))));
-
-    CONF.setDnDataRegionConsensusPort(
-        Integer.parseInt(
-            properties.getProperty(
-                "dn_data_region_consensus_port",
-                Integer.toString(CONF.getDnDataRegionConsensusPort()))));
-
-    CONF.setDnSchemaRegionConsensusPort(
-        Integer.parseInt(
-            properties.getProperty(
-                "dn_schema_region_consensus_port",
-                Integer.toString(CONF.getDnSchemaRegionConsensusPort()))));
-    CONF.setDnJoinClusterRetryIntervalMs(
-        Long.parseLong(
-            properties.getProperty(
-                "dn_join_cluster_retry_interval_ms",
-                Long.toString(CONF.getDnJoinClusterRetryIntervalMs()))));
-  }
-
-  public void loadShuffleProps(Properties properties) {
-    CONF.setDnMppDataExchangePort(
-        Integer.parseInt(
-            properties.getProperty(
-                "dn_mpp_data_exchange_port", 
Integer.toString(CONF.getDnMppDataExchangePort()))));
-  }
-
   /** Get default encode algorithm by data type */
   public TSEncoding getDefaultEncodingByType(TSDataType dataType) {
     switch (dataType) {
@@ -946,55 +898,6 @@ public class IoTDBDescriptor {
     CONF.setReadConsistencyLevel(globalConfig.getReadConsistencyLevel());
   }
 
-  public void loadRatisConfig(TRatisConfig ratisConfig) {
-    
CONF.setDataRatisConsensusLogAppenderBufferSizeMax(ratisConfig.getDataAppenderBufferSize());
-    
CONF.setSchemaRatisConsensusLogAppenderBufferSizeMax(ratisConfig.getSchemaAppenderBufferSize());
-
-    CONF.setDataRatisConsensusSnapshotTriggerThreshold(
-        ratisConfig.getDataSnapshotTriggerThreshold());
-    CONF.setSchemaRatisConsensusSnapshotTriggerThreshold(
-        ratisConfig.getSchemaSnapshotTriggerThreshold());
-
-    
CONF.setDataRatisConsensusLogUnsafeFlushEnable(ratisConfig.isDataLogUnsafeFlushEnable());
-    
CONF.setSchemaRatisConsensusLogUnsafeFlushEnable(ratisConfig.isSchemaLogUnsafeFlushEnable());
-
-    
CONF.setDataRatisConsensusLogSegmentSizeMax(ratisConfig.getDataLogSegmentSizeMax());
-    
CONF.setSchemaRatisConsensusLogSegmentSizeMax(ratisConfig.getSchemaLogSegmentSizeMax());
-
-    
CONF.setDataRatisConsensusGrpcFlowControlWindow(ratisConfig.getDataGrpcFlowControlWindow());
-    
CONF.setSchemaRatisConsensusGrpcFlowControlWindow(ratisConfig.getSchemaGrpcFlowControlWindow());
-
-    CONF.setDataRatisConsensusLeaderElectionTimeoutMinMs(
-        ratisConfig.getDataLeaderElectionTimeoutMin());
-    CONF.setSchemaRatisConsensusLeaderElectionTimeoutMinMs(
-        ratisConfig.getSchemaLeaderElectionTimeoutMin());
-
-    CONF.setDataRatisConsensusLeaderElectionTimeoutMaxMs(
-        ratisConfig.getDataLeaderElectionTimeoutMax());
-    CONF.setSchemaRatisConsensusLeaderElectionTimeoutMaxMs(
-        ratisConfig.getSchemaLeaderElectionTimeoutMax());
-
-    
CONF.setDataRatisConsensusRequestTimeoutMs(ratisConfig.getDataRequestTimeout());
-    
CONF.setSchemaRatisConsensusRequestTimeoutMs(ratisConfig.getSchemaRequestTimeout());
-
-    
CONF.setDataRatisConsensusMaxRetryAttempts(ratisConfig.getDataMaxRetryAttempts());
-    
CONF.setDataRatisConsensusInitialSleepTimeMs(ratisConfig.getDataInitialSleepTime());
-    
CONF.setDataRatisConsensusMaxSleepTimeMs(ratisConfig.getDataMaxSleepTime());
-
-    
CONF.setSchemaRatisConsensusMaxRetryAttempts(ratisConfig.getSchemaMaxRetryAttempts());
-    
CONF.setSchemaRatisConsensusInitialSleepTimeMs(ratisConfig.getSchemaInitialSleepTime());
-    
CONF.setSchemaRatisConsensusMaxSleepTimeMs(ratisConfig.getSchemaMaxSleepTime());
-
-    
CONF.setDataRatisConsensusPreserveWhenPurge(ratisConfig.getDataPreserveWhenPurge());
-    
CONF.setSchemaRatisConsensusPreserveWhenPurge(ratisConfig.getSchemaPreserveWhenPurge());
-
-    
CONF.setRatisFirstElectionTimeoutMinMs(ratisConfig.getFirstElectionTimeoutMin());
-    
CONF.setRatisFirstElectionTimeoutMaxMs(ratisConfig.getFirstElectionTimeoutMax());
-
-    CONF.setSchemaRatisLogMax(ratisConfig.getSchemaRegionRatisLogMax());
-    CONF.setDataRatisLogMax(ratisConfig.getDataRegionRatisLogMax());
-  }
-
   public void loadCQConfig(TCQConfig cqConfig) {
     CONF.setCqMinEveryIntervalInMs(cqConfig.getCqMinEveryIntervalInMs());
   }
@@ -1038,11 +941,4 @@ public class IoTDBDescriptor {
     CONF.setAllocateMemoryForLastCache(schemaMemoryTotal * lastCacheProportion 
/ proportionSum);
     logger.info("Cluster allocateMemoryForLastCache = {}", 
CONF.getAllocateMemoryForLastCache());
   }
-
-  private static class IoTDBDescriptorHolder {
-
-    private static final IoTDBDescriptor INSTANCE = new IoTDBDescriptor();
-
-    private IoTDBDescriptorHolder() {}
-  }
 }
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 f57dd5330b..13ae55971f 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
@@ -20,6 +20,8 @@
 package org.apache.iotdb.db.consensus;
 
 import org.apache.iotdb.common.rpc.thrift.TEndPoint;
+import org.apache.iotdb.commons.conf.CommonConfig;
+import org.apache.iotdb.commons.conf.CommonDescriptor;
 import org.apache.iotdb.commons.consensus.SchemaRegionId;
 import org.apache.iotdb.consensus.ConsensusFactory;
 import org.apache.iotdb.consensus.IConsensus;
@@ -41,7 +43,7 @@ import java.util.concurrent.TimeUnit;
  */
 public class SchemaRegionConsensusImpl {
 
-  private static final IoTDBConfig conf = 
IoTDBDescriptor.getInstance().getConfig();
+  private static final CommonConfig conf = 
CommonDescriptor.getInstance().getConfig();
 
   private static IConsensus INSTANCE = null;
 
diff --git 
a/server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java 
b/server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java
index ad8b4efe4d..d6af5b6d94 100644
--- a/server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java
+++ b/server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java
@@ -250,7 +250,7 @@ public class EnvironmentUtils {
     // delete extPipe
     cleanDir(config.getExtPipeDir());
     // delete ext
-    cleanDir(config.getExtDir());
+    cleanDir(config.getDnExtDir());
     // delete mqtt dir
     cleanDir(config.getMqttDir());
     // delete wal

Reply via email to