This is an automated email from the ASF dual-hosted git repository.
ejttianyu pushed a commit to branch dynamic_compaction
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dynamic_compaction by this
push:
new 35fda10 open partition function
35fda10 is described below
commit 35fda10da2f34fab14f743c8a6ceea0e3a167c8d
Author: EJTTianyu <[email protected]>
AuthorDate: Mon Mar 8 16:06:57 2021 +0800
open partition function
---
server/src/assembly/resources/conf/iotdb-engine.properties | 6 ++++++
server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java | 6 +++---
server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java | 5 +++++
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/server/src/assembly/resources/conf/iotdb-engine.properties
b/server/src/assembly/resources/conf/iotdb-engine.properties
index d310f8a..5b482e2 100644
--- a/server/src/assembly/resources/conf/iotdb-engine.properties
+++ b/server/src/assembly/resources/conf/iotdb-engine.properties
@@ -66,6 +66,12 @@ flush_wal_threshold=10000
force_wal_period_in_ms=100
####################
+### Partition interval
+####################
+# 设置时间分区大小
+partition_interval=7200
+
+####################
### Directory Configuration
####################
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 4a6fec5..24f4556 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
@@ -672,7 +672,7 @@ public class IoTDBConfig {
/**
* the num of memtable in each storage group
*/
- private int concurrentWritingTimePartition = 1;
+ private int concurrentWritingTimePartition = 2;
/**
* the default fill interval in LinearFill and PreviousFill, -1 means
infinite past time
@@ -694,7 +694,7 @@ public class IoTDBConfig {
/**
* whether enable data partition. If disabled, all data belongs to partition 0
*/
- private boolean enablePartition = false;
+ private boolean enablePartition = true;
/**
* whether enable MTree snapshot
@@ -715,7 +715,7 @@ public class IoTDBConfig {
/**
* Time range for partitioning data inside each storage group, the unit is
second
*/
- private long partitionInterval = 604800;
+ private long partitionInterval = 3600;
//just for test
//wait for 60 second by default.
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..f9f1750 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
@@ -96,6 +96,7 @@ public class IoTDBDescriptor {
// If it wasn't, check if a home directory was provided (This usually
contains a config)
if (urlString == null) {
urlString = System.getProperty(IoTDBConstant.IOTDB_HOME, null);
+// urlString =
"/Users/tianyu/2019秋季学期/iotdb/server/src/assembly/resources";
if (urlString != null) {
urlString =
urlString + File.separatorChar + "conf" + File.separatorChar +
IoTDBConfig.CONFIG_NAME;
@@ -418,6 +419,10 @@ public class IoTDBDescriptor {
"mtree_snapshot_threshold_time",
Integer.toString(conf.getMtreeSnapshotThresholdTime()))));
+ conf.setPartitionInterval(Long.parseLong(properties.getProperty(
+ "partition_interval",
+ Long.toString(conf.getPartitionInterval()))));
+
conf.setEnablePerformanceStat(Boolean
.parseBoolean(properties.getProperty("enable_performance_stat",
Boolean.toString(conf.isEnablePerformanceStat())).trim()));