You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2020/12/22 02:58:03 UTC

[iotdb] 04/04: test

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

jackietien pushed a commit to branch TimeSeriesMetadataCache
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 5ee697103e3618fd812f525d806e2faa319ae0ef
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Tue Dec 22 10:55:47 2020 +0800

    test
---
 .../src/main/java/org/apache/iotdb/SessionExample.java       | 12 ++++++------
 hive-connector/pom.xml                                       |  2 +-
 .../src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java  |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/example/session/src/main/java/org/apache/iotdb/SessionExample.java b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
index e4a4fb8..be00c33 100644
--- a/example/session/src/main/java/org/apache/iotdb/SessionExample.java
+++ b/example/session/src/main/java/org/apache/iotdb/SessionExample.java
@@ -71,11 +71,11 @@ public class SessionExample {
 
   private static void query() throws InterruptedException {
     long startTime = System.nanoTime();
-    CountDownLatch countDownLatch = new CountDownLatch(6);
+    CountDownLatch countDownLatch = new CountDownLatch(1);
     for (int device = 0; device < 1; device++) {
-      new Thread(new SumTask(device, countDownLatch)).start();
-      for (int i = 0; i < 5; i++) {
-        new Thread(new GroupByTask(device, i * 20, i * 20 + 20, countDownLatch)).start();
+//      new Thread(new SumTask(device, countDownLatch)).start();
+      for (int i = 0; i < 1; i++) {
+        new Thread(new GroupByTask(device, 0, 100, countDownLatch)).start();
       }
     }
     countDownLatch.await();
@@ -100,8 +100,8 @@ public class SessionExample {
     public void run() {
       SessionDataSet dataSet;
       try {
-        dataSet = session.executeQueryStatement(String.format("select last_value(*) from root.sg1.d%d group by ([%d,%d),1ms)", device, start, end));
-        dataSet.setFetchSize(1); // default is 10000
+        dataSet = session.executeQueryStatement(String.format("select last_value(*) from root.sg1.d%d group by ([%d,%d),10ms)", device, start, end));
+        dataSet.setFetchSize(10); // default is 10000
         while (dataSet.hasNext()) {
           dataSet.next();
         }
diff --git a/hive-connector/pom.xml b/hive-connector/pom.xml
index 77f3124..8786ad1 100644
--- a/hive-connector/pom.xml
+++ b/hive-connector/pom.xml
@@ -179,7 +179,7 @@
         <repository>
             <id>for_pentaho</id>
             <name>spring.io</name>
-            <url>https://repo.spring.io/libs-milestone</url>
+            <url>https://repo.spring.io/milestone</url>
             <layout>default</layout>
             <releases>
                 <enabled>true</enabled>
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 ddd925d..8c23d1d 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
@@ -297,12 +297,12 @@ public class IoTDBConfig {
   /**
    * whether to cache meta data(ChunkMetaData and TsFileMetaData) or not.
    */
-  private boolean metaDataCacheEnable = false;
+  private boolean metaDataCacheEnable = true;
 
   /**
    * Memory allocated for timeSeriesMetaData cache in read process
    */
-  private long allocateMemoryForTimeSeriesMetaDataCache = allocateMemoryForRead * 2 / 15;
+  private long allocateMemoryForTimeSeriesMetaDataCache = allocateMemoryForRead / 6;
 
   /**
    * Memory allocated for chunkMetaData cache in read process