You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ge...@apache.org on 2021/01/06 04:23:11 UTC

[iotdb] branch add_conf_0.11 created (now 9e2736c)

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

geniuspig pushed a change to branch add_conf_0.11
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at 9e2736c  add conf

This branch includes the following new commits:

     new 9e2736c  add conf

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: add conf

Posted by ge...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

geniuspig pushed a commit to branch add_conf_0.11
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 9e2736c25d320c769c020f8588fe1f72735dc992
Author: Boris <96...@qq.com>
AuthorDate: Wed Jan 6 12:22:47 2021 +0800

    add conf
---
 server/src/assembly/resources/conf/iotdb-engine.properties        | 8 +++++++-
 .../src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java   | 4 ++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/server/src/assembly/resources/conf/iotdb-engine.properties b/server/src/assembly/resources/conf/iotdb-engine.properties
index 931ee25..a436b42 100644
--- a/server/src/assembly/resources/conf/iotdb-engine.properties
+++ b/server/src/assembly/resources/conf/iotdb-engine.properties
@@ -590,4 +590,10 @@ authorizer_provider_class=org.apache.iotdb.db.auth.authorizer.LocalFileAuthorize
 
 #If OpenIdAuthorizer is enabled, then openID_url must be set.
 
-#openID_url=
\ No newline at end of file
+#openID_url=
+
+# whether enable data partition. If disabled, all data belongs to partition 0
+enable_partition=false
+
+# time range for partitioning data inside each storage group, the unit is second
+partition_interval=604800
\ No newline at end of file
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 41d3af1..0aa0c19 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
@@ -551,6 +551,10 @@ public class IoTDBDescriptor {
       //if using org.apache.iotdb.db.auth.authorizer.OpenIdAuthorizer, openID_url is needed.
       conf.setOpenIdProviderUrl(properties.getProperty("openID_url", ""));
 
+      conf.setEnablePartition(Boolean.parseBoolean(properties.getProperty("enable_partition", conf.isEnablePartition() + "")));
+
+      conf.setPartitionInterval(Long.parseLong(properties.getProperty("partition_interval", conf.getPartitionInterval() + "")));
+
       // At the same time, set TSFileConfig
       TSFileDescriptor.getInstance().getConfig()
           .setTSFileStorageFs(FSType.valueOf(