You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by zy...@apache.org on 2023/04/10 12:50:24 UTC
[iotdb] branch rel/1.1 updated: [To rel/1.1] Rename cluster_max_schema_count parameter name to cluster_schema_limit_threshold (#9576)
This is an automated email from the ASF dual-hosted git repository.
zyk pushed a commit to branch rel/1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.1 by this push:
new a7362fefb9 [To rel/1.1] Rename cluster_max_schema_count parameter name to cluster_schema_limit_threshold (#9576)
a7362fefb9 is described below
commit a7362fefb9352fbf470ba40125104ddf9e6f8d5f
Author: Chen YZ <43...@users.noreply.github.com>
AuthorDate: Mon Apr 10 20:50:16 2023 +0800
[To rel/1.1] Rename cluster_max_schema_count parameter name to cluster_schema_limit_threshold (#9576)
---
.../java/org/apache/iotdb/it/env/cluster/MppCommonConfig.java | 4 ++--
.../org/apache/iotdb/it/env/cluster/MppSharedCommonConfig.java | 6 +++---
.../org/apache/iotdb/it/env/remote/RemoteCommonConfig.java | 2 +-
.../main/java/org/apache/iotdb/itbase/env/CommonConfig.java | 2 +-
.../apache/iotdb/db/it/schema/IoTDBClusterDeviceQuotaIT.java | 2 +-
.../iotdb/db/it/schema/IoTDBClusterMeasurementQuotaIT.java | 2 +-
.../src/assembly/resources/conf/iotdb-common.properties | 2 +-
server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java | 10 +++++-----
.../main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java | 10 ++++++----
.../iotdb/db/metadata/rescon/DataNodeSchemaQuotaManager.java | 4 ++--
10 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/MppCommonConfig.java b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/MppCommonConfig.java
index 01948edb75..35953496e4 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/MppCommonConfig.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/MppCommonConfig.java
@@ -348,8 +348,8 @@ public class MppCommonConfig extends MppBaseConfig implements CommonConfig {
}
@Override
- public CommonConfig setClusterMaxSchemaCount(long clusterMaxSchemaCount) {
- setProperty("cluster_max_schema_count", String.valueOf(clusterMaxSchemaCount));
+ public CommonConfig setClusterSchemaLimitThreshold(long clusterSchemaLimitThreshold) {
+ setProperty("cluster_schema_limit_threshold", String.valueOf(clusterSchemaLimitThreshold));
return this;
}
}
diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/MppSharedCommonConfig.java b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/MppSharedCommonConfig.java
index 49eade65d9..50304263a0 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/MppSharedCommonConfig.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/MppSharedCommonConfig.java
@@ -359,9 +359,9 @@ public class MppSharedCommonConfig implements CommonConfig {
}
@Override
- public CommonConfig setClusterMaxSchemaCount(long clusterMaxSchemaCount) {
- dnConfig.setClusterMaxSchemaCount(clusterMaxSchemaCount);
- cnConfig.setClusterMaxSchemaCount(clusterMaxSchemaCount);
+ public CommonConfig setClusterSchemaLimitThreshold(long clusterSchemaLimitThreshold) {
+ dnConfig.setClusterSchemaLimitThreshold(clusterSchemaLimitThreshold);
+ cnConfig.setClusterSchemaLimitThreshold(clusterSchemaLimitThreshold);
return this;
}
}
diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/remote/RemoteCommonConfig.java b/integration-test/src/main/java/org/apache/iotdb/it/env/remote/RemoteCommonConfig.java
index 2a169c74e2..9940fc925c 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/remote/RemoteCommonConfig.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/remote/RemoteCommonConfig.java
@@ -258,7 +258,7 @@ public class RemoteCommonConfig implements CommonConfig {
}
@Override
- public CommonConfig setClusterMaxSchemaCount(long clusterMaxSchemaCount) {
+ public CommonConfig setClusterSchemaLimitThreshold(long clusterSchemaLimitThreshold) {
return this;
}
}
diff --git a/integration-test/src/main/java/org/apache/iotdb/itbase/env/CommonConfig.java b/integration-test/src/main/java/org/apache/iotdb/itbase/env/CommonConfig.java
index 9c7c4f60e0..ce751aa92e 100644
--- a/integration-test/src/main/java/org/apache/iotdb/itbase/env/CommonConfig.java
+++ b/integration-test/src/main/java/org/apache/iotdb/itbase/env/CommonConfig.java
@@ -115,5 +115,5 @@ public interface CommonConfig {
CommonConfig setClusterSchemaLimitLevel(String clusterSchemaLimitLevel);
- CommonConfig setClusterMaxSchemaCount(long clusterMaxSchemaCount);
+ CommonConfig setClusterSchemaLimitThreshold(long clusterSchemaLimitThreshold);
}
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBClusterDeviceQuotaIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBClusterDeviceQuotaIT.java
index 477b05806a..ae73490341 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBClusterDeviceQuotaIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBClusterDeviceQuotaIT.java
@@ -28,6 +28,6 @@ public class IoTDBClusterDeviceQuotaIT extends IoTDBClusterMeasurementQuotaIT {
@Override
protected void setUpQuotaConfig() {
EnvFactory.getEnv().getConfig().getCommonConfig().setClusterSchemaLimitLevel("device");
- EnvFactory.getEnv().getConfig().getCommonConfig().setClusterMaxSchemaCount(3);
+ EnvFactory.getEnv().getConfig().getCommonConfig().setClusterSchemaLimitThreshold(3);
}
}
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBClusterMeasurementQuotaIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBClusterMeasurementQuotaIT.java
index e6318bdbd2..09b65b6636 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBClusterMeasurementQuotaIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBClusterMeasurementQuotaIT.java
@@ -45,7 +45,7 @@ public class IoTDBClusterMeasurementQuotaIT extends AbstractSchemaIT {
protected void setUpQuotaConfig() {
EnvFactory.getEnv().getConfig().getCommonConfig().setClusterSchemaLimitLevel("timeseries");
- EnvFactory.getEnv().getConfig().getCommonConfig().setClusterMaxSchemaCount(6);
+ EnvFactory.getEnv().getConfig().getCommonConfig().setClusterSchemaLimitThreshold(6);
}
@After
diff --git a/node-commons/src/assembly/resources/conf/iotdb-common.properties b/node-commons/src/assembly/resources/conf/iotdb-common.properties
index 4d609eeb77..ba9650da7a 100644
--- a/node-commons/src/assembly/resources/conf/iotdb-common.properties
+++ b/node-commons/src/assembly/resources/conf/iotdb-common.properties
@@ -300,7 +300,7 @@ cluster_name=defaultCluster
# When the threshold is reached, users will be prohibited from creating new time series.
# Set the value based on the desired maximum number of schema for your IoTDB cluster.
# -1 means the system does not impose a limit on the maximum number of time series.
-# cluster_max_schema_count=-1
+# cluster_schema_limit_threshold=-1
####################
### Configurations for creating schema automatically
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 4e0f051641..24c7b2ee82 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
@@ -1040,7 +1040,7 @@ public class IoTDBConfig {
private String clusterSchemaLimitLevel = "timeseries";
/** This configuration parameter sets the maximum number of schema allowed in the cluster.* */
- private long clusterMaxSchemaCount = -1;
+ private long clusterSchemaLimitThreshold = -1;
/** Output location of audit logs * */
private List<AuditLogStorage> auditLogStorage =
@@ -3652,11 +3652,11 @@ public class IoTDBConfig {
this.clusterSchemaLimitLevel = clusterSchemaLimitLevel;
}
- public long getClusterMaxSchemaCount() {
- return clusterMaxSchemaCount;
+ public long getClusterSchemaLimitThreshold() {
+ return clusterSchemaLimitThreshold;
}
- public void setClusterMaxSchemaCount(long clusterMaxSchemaCount) {
- this.clusterMaxSchemaCount = clusterMaxSchemaCount;
+ public void setClusterSchemaLimitThreshold(long clusterSchemaLimitThreshold) {
+ this.clusterSchemaLimitThreshold = clusterSchemaLimitThreshold;
}
}
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 773f8732ff..57ac532d57 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
@@ -204,11 +204,12 @@ public class IoTDBDescriptor {
properties
.getProperty("cluster_schema_limit_level", conf.getClusterSchemaLimitLevel())
.trim());
- conf.setClusterMaxSchemaCount(
+ conf.setClusterSchemaLimitThreshold(
Long.parseLong(
properties
.getProperty(
- "cluster_max_schema_count", Long.toString(conf.getClusterMaxSchemaCount()))
+ "cluster_schema_limit_threshold",
+ Long.toString(conf.getClusterSchemaLimitThreshold()))
.trim()));
conf.setClusterName(
properties.getProperty(IoTDBConstant.CLUSTER_NAME, conf.getClusterName()).trim());
@@ -1489,11 +1490,12 @@ public class IoTDBDescriptor {
properties
.getProperty("cluster_schema_limit_level", conf.getClusterSchemaLimitLevel())
.trim());
- conf.setClusterMaxSchemaCount(
+ conf.setClusterSchemaLimitThreshold(
Long.parseLong(
properties
.getProperty(
- "cluster_max_schema_count", Long.toString(conf.getClusterMaxSchemaCount()))
+ "cluster_schema_limit_threshold",
+ Long.toString(conf.getClusterSchemaLimitThreshold()))
.trim()));
DataNodeSchemaQuotaManager.getInstance().updateConfiguration();
} catch (Exception e) {
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/rescon/DataNodeSchemaQuotaManager.java b/server/src/main/java/org/apache/iotdb/db/metadata/rescon/DataNodeSchemaQuotaManager.java
index 5aba66223b..ce76b2c343 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/rescon/DataNodeSchemaQuotaManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/rescon/DataNodeSchemaQuotaManager.java
@@ -32,7 +32,7 @@ public class DataNodeSchemaQuotaManager {
private long limit =
IoTDBDescriptor.getInstance()
.getConfig()
- .getClusterMaxSchemaCount(); // -1 means no limitation
+ .getClusterSchemaLimitThreshold(); // -1 means no limitation
private final AtomicLong remain = new AtomicLong(0);
public void updateRemain(long totalCount) {
@@ -64,7 +64,7 @@ public class DataNodeSchemaQuotaManager {
ClusterSchemaQuotaLevel.valueOf(
IoTDBDescriptor.getInstance().getConfig().getClusterSchemaLimitLevel().toUpperCase());
long oldLimit = limit;
- this.limit = IoTDBDescriptor.getInstance().getConfig().getClusterMaxSchemaCount();
+ this.limit = IoTDBDescriptor.getInstance().getConfig().getClusterSchemaLimitThreshold();
this.remain.addAndGet(limit - oldLimit);
}