You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by le...@apache.org on 2022/10/05 04:09:47 UTC

[iotdb] branch research/M4-visualization updated: fix

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

leirui pushed a commit to branch research/M4-visualization
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/research/M4-visualization by this push:
     new 8851e15e10 fix
8851e15e10 is described below

commit 8851e15e108655a9659f0159035aa0875e5b4874
Author: Lei Rui <10...@qq.com>
AuthorDate: Wed Oct 5 12:09:56 2022 +0800

    fix
---
 .../java/org/apache/iotdb/db/utils/EnvironmentUtils.java | 16 +++++++++++-----
 .../apache/iotdb/session/MyRealDataWriteQueryTest.java   | 15 ++++++++++-----
 2 files changed, 21 insertions(+), 10 deletions(-)

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 33575820e8..7090e47b99 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
@@ -63,7 +63,9 @@ import java.util.concurrent.TimeUnit;
 
 import static org.junit.Assert.fail;
 
-/** This class is used for cleaning test environment in unit test and integration test */
+/**
+ * This class is used for cleaning test environment in unit test and integration test
+ */
 public class EnvironmentUtils {
 
   private static final Logger logger = LoggerFactory.getLogger(EnvironmentUtils.class);
@@ -233,18 +235,22 @@ public class EnvironmentUtils {
     FileUtils.deleteDirectory(new File(dir));
   }
 
-  /** disable the system monitor</br> this function should be called before all code in the setup */
+  /**
+   * disable the system monitor</br> this function should be called before all code in the setup
+   */
   public static void closeStatMonitor() {
     config.setEnableStatMonitor(false);
   }
 
-  /** disable memory control</br> this function should be called before all code in the setup */
+  /**
+   * disable memory control</br> this function should be called before all code in the setup
+   */
   public static void envSetUp() {
     logger.warn("EnvironmentUtil setup...");
     IoTDBDescriptor.getInstance().getConfig().setThriftServerAwaitTimeForStopService(60);
     // we do not start 8181 port in test.
-    IoTDBDescriptor.getInstance().getConfig().setEnableMetricService(false);
-    IoTDBDescriptor.getInstance().getConfig().setAvgSeriesPointNumberThreshold(Integer.MAX_VALUE);
+//    IoTDBDescriptor.getInstance().getConfig().setEnableMetricService(false);
+//    IoTDBDescriptor.getInstance().getConfig().setAvgSeriesPointNumberThreshold(Integer.MAX_VALUE);
     if (daemon == null) {
       daemon = new IoTDB();
     }
diff --git a/session/src/test/java/org/apache/iotdb/session/MyRealDataWriteQueryTest.java b/session/src/test/java/org/apache/iotdb/session/MyRealDataWriteQueryTest.java
index 7b705e4636..0f7b743965 100644
--- a/session/src/test/java/org/apache/iotdb/session/MyRealDataWriteQueryTest.java
+++ b/session/src/test/java/org/apache/iotdb/session/MyRealDataWriteQueryTest.java
@@ -17,6 +17,7 @@ import org.apache.iotdb.jdbc.Config;
 import org.apache.iotdb.rpc.IoTDBConnectionException;
 import org.apache.iotdb.rpc.StatementExecutionException;
 import org.apache.iotdb.session.SessionDataSet.DataIterator;
+import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor;
 import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
 import org.junit.After;
 import org.junit.Assert;
@@ -51,22 +52,26 @@ public class MyRealDataWriteQueryTest {
   private static long total_time_length =
       dataMaxTime - dataMinTime; // in corresponding timestamp precision
   private static int total_point_number = 89844; // 1200000;
-  private static int iotdb_chunk_point_size = 100;
+  private static int iotdb_chunk_point_size = 50;
   private static long chunkAvgTimeLen =
       (long) Math
           .ceil(total_time_length / Math.ceil(total_point_number * 1.0 / iotdb_chunk_point_size));
   private static String filePath = "D:\\github\\m4-lsm\\iotdb\\session\\src\\test\\java\\org\\apache\\iotdb\\session\\BallSpeedSmallData.csv";
-  private static int deletePercentage = 0; // 0 means no deletes. 0-100
-  private static int deleteLenPercentage = 0; // 0-100 每次删除的时间长度,用chunkAvgTimeLen的百分比表示
+  private static int deletePercentage = 2; // 0 means no deletes. 0-100
+  private static int deleteLenPercentage = 50; // 0-100 每次删除的时间长度,用chunkAvgTimeLen的百分比表示
   private static int timeIdx = 0;   // 时间戳idx,从0开始
   private static int valueIdx = 1;   // 值idx,从0开始
 
   @Before
   public void setUp() throws Exception {
     config.setEnableCPV(true);
-
-    config.setCompactionStrategy(CompactionStrategy.NO_COMPACTION);
     config.setTimestampPrecision(timestamp_precision);
+    config.setAvgSeriesPointNumberThreshold(100);
+    config.setUnSeqTsFileSize(1073741824);
+    config.setSeqTsFileSize(1073741824);
+    config.setCompactionStrategy(CompactionStrategy.NO_COMPACTION);
+    config.setEnableUnseqCompaction(false);
+    TSFileDescriptor.getInstance().getConfig().setPageSizeInByte(1073741824);
 
     EnvironmentUtils.envSetUp();
     Class.forName(Config.JDBC_DRIVER_NAME);