Преглед изворни кода

修改日志配置文件目录

sensordb2 пре 2 година
родитељ
комит
280f4b1ff3
81 измењених фајлова са 318 додато и 568 уклоњено
  1. 1 0
      .gitignore
  2. 33 0
      conf/influxdb/log.properties
  3. 33 0
      conf/iotdb/log.properties
  4. 33 0
      conf/tsdb/log.properties
  5. 1 1
      influxdb/src/main/java/log/LogConfig.java
  6. 1 1
      influxdb/src/main/java/util/Config.java
  7. 1 1
      iotdb/src/main/java/log/LogConfig.java
  8. 4 3
      package.sh
  9. 0 0
      shell/influxdb/mt/flow/queryMultiplePointHistData.sh
  10. 0 0
      shell/influxdb/mt/flow/querySinglePointHistData.sh
  11. 0 0
      shell/influxdb/mt/histData/queryMultiplePointHistData.sh
  12. 0 0
      shell/influxdb/mt/histData/querySinglePointHistData.sh
  13. 0 0
      shell/influxdb/mt/insert/insertHistoricalRandomDataInertPerPoint.sh
  14. 0 0
      shell/influxdb/mt/insert/insertHistoricalRandomDataMultiPoint.sh
  15. 0 0
      shell/influxdb/mt/lastData/queryMultiPointLastData.sh
  16. 0 0
      shell/influxdb/mt/lastData/querySinglePointLastData.sh
  17. 3 0
      shell/influxdb/test/aggHistDataOverTime.sh
  18. 3 0
      shell/influxdb/test/insertHistoricalRandomData.sh
  19. 5 2
      shell/influxdb/test/insertRealtimeRandomData.sh
  20. 4 1
      shell/influxdb/test/queryDataAtNow.sh
  21. 4 2
      shell/influxdb/test/queryDataAtTime.sh
  22. 3 0
      shell/influxdb/test/queryFlowHistData.sh
  23. 5 2
      shell/influxdb/test/queryHistData.sh
  24. 3 0
      shell/iotdb/histData/QueryMultiPointHistData
  25. 3 0
      shell/iotdb/histData/QuerySinglePointHistData
  26. 3 0
      shell/iotdb/insert/insertHistoricalRandomDataPerPoint
  27. 3 0
      shell/iotdb/insert/insertRealtimeRandomData
  28. 3 1
      shell/iotdb/lastData/queryMultiPointLastData
  29. 3 0
      shell/iotdb/lastData/querySinglePointLastData
  30. 28 0
      shell/iotdb/test/QueryMultiPointHistData.sh
  31. 25 0
      shell/iotdb/test/QuerySinglePointHistData.sh
  32. 31 0
      shell/iotdb/test/insertHistoricalRandomDataPerPoint.sh
  33. 19 0
      shell/iotdb/test/insertRealtimeRandomData.sh
  34. 19 0
      shell/iotdb/test/queryMultiPointLastData.sh
  35. 14 0
      shell/iotdb/test/querySinglePointLastData.sh
  36. 0 0
      shell/tsdb/compressTest/insertHistoricalRandomData.sh
  37. 0 0
      shell/tsdb/concurTest/insertRealtimeRandomData.sh
  38. 0 0
      shell/tsdb/concurTest/insertRealtimeRandomDataMultiClient.sh
  39. 0 0
      shell/tsdb/concurTest/queryDataAtNowMultiClient.sh
  40. 0 0
      shell/tsdb/indepTest/aggHistDataOverTime.sh
  41. 0 0
      shell/tsdb/indepTest/insertHistoricalRandomData.sh
  42. 0 0
      shell/tsdb/indepTest/insertRealtimeRandomData.sh
  43. 0 0
      shell/tsdb/indepTest/queryHistData.sh
  44. 0 0
      shell/tsdb/newData/queryNewData.sh
  45. 0 0
      shell/tsdb/randomData/aggHistDataOverTime.sh
  46. 0 0
      shell/tsdb/randomData/insertHistoricalRandomData.sh
  47. 0 0
      shell/tsdb/randomData/insertHistoricalRandomDataAPointAYear.sh
  48. 0 0
      shell/tsdb/randomData/insertRealtimeRandomData.sh
  49. 0 0
      shell/tsdb/randomData/insertRealtimeRandomDataInCycle.sh
  50. 0 0
      shell/tsdb/randomData/insertRealtimeRandomDataInCycleNohup.sh
  51. 0 0
      shell/tsdb/randomData/queryDataAtNow.sh
  52. 0 0
      shell/tsdb/randomData/queryDataAtNowInCycle.sh
  53. 0 0
      shell/tsdb/randomData/queryDataAtTime.sh
  54. 0 0
      shell/tsdb/randomData/queryDataAtTimeInCycle.sh
  55. 0 0
      shell/tsdb/randomData/queryHistData.sh
  56. 0 0
      shell/tsdb/sshRemoteServer.sh
  57. 3 0
      shell/tsdb/test/aggHistDataOverTime.sh
  58. 3 1
      shell/tsdb/test/insertHistoricalRandomData.sh
  59. 3 0
      shell/tsdb/test/insertHistoricalRandomDataMultiPoint.sh
  60. 4 1
      shell/tsdb/test/insertRealtimeRandomData.sh
  61. 4 2
      shell/tsdb/test/queryDataAtNow.sh
  62. 5 1
      shell/tsdb/test/queryDataAtTime.sh
  63. 6 1
      shell/tsdb/test/queryHistData.sh
  64. 0 0
      shell/tsdb/tools/calDBDiskSize.sh
  65. 0 0
      shell/tsdb/tools/deleteAllDBData.sh
  66. 0 0
      shell/tsdb/tools/grepSpendTime.sh
  67. 0 35
      tsdb/src/main/java/demo/query/abtask/OtherA.java
  68. 0 72
      tsdb/src/main/java/demo/query/abtask/OtherAWithTwoStep.java
  69. 0 39
      tsdb/src/main/java/demo/query/abtask/SumBInA.java
  70. 0 49
      tsdb/src/main/java/demo/query/abtask/TopkATaskInTimeRange.java
  71. 0 47
      tsdb/src/main/java/demo/query/abtask/TopkBTaskInTimeRange.java
  72. 0 29
      tsdb/src/main/java/demo/query/exetime/TaskAvgExeTime.java
  73. 0 29
      tsdb/src/main/java/demo/query/exetime/TaskMaxExeTime.java
  74. 0 27
      tsdb/src/main/java/demo/query/exetime/TaskMinExeTime.java
  75. 0 42
      tsdb/src/main/java/demo/query/exetimeAgg/TaskAvgExeTime.java
  76. 0 42
      tsdb/src/main/java/demo/query/exetimeAgg/TaskMaxExeTime.java
  77. 0 42
      tsdb/src/main/java/demo/query/exetimeAgg/TaskMinExeTime.java
  78. 0 42
      tsdb/src/main/java/demo/query/exetimeAgg/TaskSumExeTime.java
  79. 0 51
      tsdb/src/main/java/demo/query/topkValueChange/TopkValueChange.java
  80. 1 1
      tsdb/src/main/java/log/LogConfig.java
  81. 1 1
      tsdb/src/main/java/util/Config.java

+ 1 - 0
.gitignore

@@ -14,3 +14,4 @@ log.log.*
 */*.iml
 .DS_Store
 lib/
+release/

+ 33 - 0
conf/influxdb/log.properties

@@ -0,0 +1,33 @@
+handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+
+# Default global logging level.
+#SEVERE(最高值)
+#WARNING
+#INFO
+#CONFIG
+#FINE
+#FINER
+#FINEST(最低值)
+#OFF
+
+.level = ALL
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = log/influxdb/log.log
+java.util.logging.FileHandler.count = 100
+java.util.logging.FileHandler.level = FINE
+#java.util.logging.FileHandler.level = WARNING
+java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
+
+# Limit the message that are printed on the console to INFO and above.
+java.util.logging.ConsoleHandler.level = FINE
+#java.util.logging.ConsoleHandler.level = WARNING
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+############################################################
+java.level = WARNING
+javax.level = WARNING
+sun.level = WARNING

+ 33 - 0
conf/iotdb/log.properties

@@ -0,0 +1,33 @@
+handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+
+# Default global logging level.
+#SEVERE(最高值)
+#WARNING
+#INFO
+#CONFIG
+#FINE
+#FINER
+#FINEST(最低值)
+#OFF
+
+.level = ALL
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = log/iotdb/log.log
+java.util.logging.FileHandler.count = 100
+java.util.logging.FileHandler.level = FINE
+#java.util.logging.FileHandler.level = WARNING
+java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
+
+# Limit the message that are printed on the console to INFO and above.
+java.util.logging.ConsoleHandler.level = FINE
+#java.util.logging.ConsoleHandler.level = WARNING
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+############################################################
+java.level = WARNING
+javax.level = WARNING
+sun.level = WARNING

+ 33 - 0
conf/tsdb/log.properties

@@ -0,0 +1,33 @@
+handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+
+# Default global logging level.
+#SEVERE(最高值)
+#WARNING
+#INFO
+#CONFIG
+#FINE
+#FINER
+#FINEST(最低值)
+#OFF
+
+.level = ALL
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = log/tsdb/log.log
+java.util.logging.FileHandler.count = 100
+java.util.logging.FileHandler.level = FINE
+#java.util.logging.FileHandler.level = WARNING
+java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
+
+# Limit the message that are printed on the console to INFO and above.
+java.util.logging.ConsoleHandler.level = FINE
+#java.util.logging.ConsoleHandler.level = WARNING
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+############################################################
+java.level = WARNING
+javax.level = WARNING
+sun.level = WARNING

+ 1 - 1
influxdb/src/main/java/log/LogConfig.java

@@ -8,7 +8,7 @@ import java.util.logging.LogManager;
 public class LogConfig {
     public static void init() {
         try {
-            InputStream in = new FileInputStream(new File("./influxdb/log.properties"));
+            InputStream in = new FileInputStream(new File("./conf/influxdb/log.properties"));
             LogManager.getLogManager().readConfiguration(in);
         } catch (Exception e) {
             e.printStackTrace();

+ 1 - 1
influxdb/src/main/java/util/Config.java

@@ -16,7 +16,7 @@ public class Config {
     public Config() {
         try {
             InputStream inputStream = new BufferedInputStream(
-                    new FileInputStream(new File("./influxdb/sys.properties")));
+                    new FileInputStream(new File("./conf/influxdb/sys.properties")));
             resource = new PropertyResourceBundle(inputStream);
             String host = resource.getString("host");
             Globals.HOST = host;

+ 1 - 1
iotdb/src/main/java/log/LogConfig.java

@@ -8,7 +8,7 @@ import java.util.logging.LogManager;
 public class LogConfig {
     public static void init() {
         try {
-            InputStream in = new FileInputStream(new File("./iotdb/log.properties"));
+            InputStream in = new FileInputStream(new File("./conf/iotdb/log.properties"));
             LogManager.getLogManager().readConfiguration(in);
         } catch (Exception e) {
             e.printStackTrace();

+ 4 - 3
package.sh

@@ -12,10 +12,11 @@ mkdir -p $ROOT/tmp/log/influxdb
 mkdir -p $ROOT/tmp/log/iotdb
 mkdir -p $ROOT/tmp/log/tsdb
 
-cp -rf $ROOT/influxdb/target/influxdb-0.0.1-SNAPSHOT-jar-with-dependencies $ROOT/tmp/lib/influxdb.jar
-cp -rf $ROOT/iotdb/target/iotdb-0.0.1-SNAPSHOT-jar-with-dependencies $ROOT/tmp/lib/iotdb.jar
-cp -rf $ROOT/tsdb/target/tsdb-0.0.1-SNAPSHOT-jar-with-dependencies $ROOT/tmp/lib/tsdb.jar
+cp -rf $ROOT/influxdb/target/influxdb-0.0.1-SNAPSHOT-jar-with-dependencies.jar $ROOT/tmp/lib/influxdb.jar
+cp -rf $ROOT/iotdb/target/iotdb-0.0.1-SNAPSHOT-jar-with-dependencies.jar $ROOT/tmp/lib/iotdb.jar
+cp -rf $ROOT/tsdb/target/tsdb-0.0.1-SNAPSHOT-jar-with-dependencies.jar $ROOT/tmp/lib/tsdb.jar
 cp -rf $ROOT/shell $ROOT/tmp/
+cp -rf $ROOT/conf $ROOT/tmp/
 chmod -R +x $ROOT/shell/
 
 cd $ROOT

+ 0 - 0
shell/influxdb/mt/flow/queryMultiplePointHistData.sh


+ 0 - 0
shell/influxdb/mt/flow/querySinglePointHistData.sh


+ 0 - 0
shell/influxdb/mt/histData/queryMultiplePointHistData.sh


+ 0 - 0
shell/influxdb/mt/histData/querySinglePointHistData.sh


+ 0 - 0
shell/influxdb/mt/insert/insertHistoricalRandomDataInertPerPoint.sh


+ 0 - 0
shell/influxdb/mt/insert/insertHistoricalRandomDataMultiPoint.sh


+ 0 - 0
shell/influxdb/mt/lastData/queryMultiPointLastData.sh


+ 0 - 0
shell/influxdb/mt/lastData/querySinglePointLastData.sh


+ 3 - 0
shell/influxdb/test/aggHistDataOverTime.sh

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 

+ 3 - 0
shell/influxdb/test/insertHistoricalRandomData.sh

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 

+ 5 - 2
shell/influxdb/test/insertRealtimeRandomData.sh

@@ -1,11 +1,14 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 
 clear
-for pointCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000 200000
-#for pointCount in 1000 2000 5000
+#for pointCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000 200000
+for pointCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000
 do
   echo "----test insert dataCountPerPoint:${pointCount}"
   java -cp ./lib/influxdb.jar demo.allInsert.InsertRealtimeRandomData \

+ 4 - 1
shell/influxdb/test/queryDataAtNow.sh

@@ -1,10 +1,13 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 
 #pointCountArray=(1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000 30000 50000 100000 200000)
-pointCountArray=(1 2 3 5 10 20 30 50 100 200)
+pointCountArray=(1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000)
 pointIndex=1
 
 for(( i=0;i<${#pointCountArray[@]};i++))

+ 4 - 2
shell/influxdb/test/queryDataAtTime.sh

@@ -1,10 +1,12 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 
-pointCountArray=(1000 2000 3000)
-
+pointCountArray=(1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000)
 for(( i=0;i<${#pointCountArray[@]};i++))
 do
   echo "----test query realtime data pointCount:${pointCountArray[i]}"

+ 3 - 0
shell/influxdb/test/queryFlowHistData.sh

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 

+ 5 - 2
shell/influxdb/test/queryHistData.sh

@@ -1,12 +1,15 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 
-pointCount=10
+pointCount=1
 pointIndex=1
 
-for days in 1 2 3 4 7 15
+for days in 1 2 3 4 7 15 30 60 90 180
 do
   echo "----test query range days:$days"
   beginDate="2022-11-27 00:00:00"

+ 3 - 0
shell/iotdb/histData/QueryMultiPointHistData

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 storagePath="root.test1.wf01.wt01"

+ 3 - 0
shell/iotdb/histData/QuerySinglePointHistData

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 storagePath="root.test1.wf01.wt01"

+ 3 - 0
shell/iotdb/insert/insertHistoricalRandomDataPerPoint

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 

+ 3 - 0
shell/iotdb/insert/insertRealtimeRandomData

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 storagePath="root.test1.wf01.wt01"

+ 3 - 1
shell/iotdb/lastData/queryMultiPointLastData

@@ -1,12 +1,14 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 storagePath="root.test1.wf01.wt01";
 pointIndex=1
 pointCount=10
 for pointCount in 1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000
-#for pointCount in 5000
 do
 #API规定Limit上限1000,多的需要更改iotdb配置
 echo "----test query points last data pointIndex:${pointIndex} pointCount:${pointCount}"

+ 3 - 0
shell/iotdb/lastData/querySinglePointLastData

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 

+ 28 - 0
shell/iotdb/test/QueryMultiPointHistData.sh

@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
+#host=39.104.80.229
+host=127.0.0.1
+storagePath="root.test1.wf01.wt01"
+days=1
+pointIndex=1
+pointCount=10
+
+echo "----test query range days:$days"
+beginDate="2022-12-06 10:59:09"
+echo beginDate:beginDate
+
+#endDate=$(date -d "${beginDate} ${days} days" +"%Y-%m-%d %H:%M:%S")
+endDate="2022-12-06 10:59:10"
+echo endDate:$endDate
+
+for pointCount in  1 2 3 5 10 20 30 50 100 200 300 500 1000 2000
+do
+
+java -cp ./lib/iotdb.jar demo.query.histQuery.QueryMultiPointHistData \
+--host $host --storagePath ${storagePath} --pointNamePrefix pointName1_ --pointCount $pointCount \
+--pointIndex $pointIndex --beginDate "$beginDate" --endDate "$endDate" \
+--showQueryResult 0 2>&1 | tee -a ./log/iotdb/out.log
+done

+ 25 - 0
shell/iotdb/test/QuerySinglePointHistData.sh

@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
+#host=39.104.80.229
+host=127.0.0.1
+storagePath="root.test1.wf01.wt01"
+days=1
+pointIndex=1
+
+echo "----test query range days:$days"
+beginDate="2018-06-01 00:00:00"
+echo beginDate:beginDate
+for days in 1 2 3 4 7 15 30 60 90
+do
+endDate=$(date -d "${beginDate} ${days} days" +"%Y-%m-%d %H:%M:%S")
+#endDate="2022-12-02 00:00:00"
+echo endDate:$endDate
+
+java -cp ./lib/iotdb.jar demo.query.histQuery.QuerySinglePointHistData \
+--host $host --storagePath ${storagePath} --pointNamePrefix pointName1_ --pointIndex $pointIndex \
+--beginDate "$beginDate" --endDate "$endDate" \
+--showQueryResult 0 2>&1 | tee -a ./log/iotdb/out.log
+done

+ 31 - 0
shell/iotdb/test/insertHistoricalRandomDataPerPoint.sh

@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
+#host=39.104.80.229
+host=127.0.0.1
+
+dataCountPerPoint=1
+pointCount=1
+
+index=1
+
+#存在插入数据太长将导致连接被断开而退出的问题
+#出现AutoResizingBuffer告警,可能和iotdb配置缓存区大小相关。
+echo "[${index}] test"
+
+pointNamePrefix="pointName${index}_"
+storagePath="root.test1.wf01.wt01"
+beginDate="2017-06-01 00:00:00"
+echo beginDate:beginDate
+
+# 单点插入
+for dataCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000 200000 300000 500000
+do
+echo "----test insert pointCount:${pointCount} dataCountPerPoint:${dataCountPerPoint}"
+nohup java -cp ./lib/iotdb.jar -Xmx8000m demo.insert.InsertHistoricalRandomData \
+--host ${host} --storagePath ${storagePath} --pointNamePrefix ${pointNamePrefix} --pointCount ${pointCount} \
+--dataCountPerPoint ${dataCountPerPoint} --beginDate "$beginDate" --period 7000 \
+--seed 1 --mean 10 --variance 1 --debug 0 2>&1 | tee -a ./log/iotdb/out.log
+done

+ 19 - 0
shell/iotdb/test/insertRealtimeRandomData.sh

@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
+#host=39.104.80.229
+host=127.0.0.1
+storagePath="root.test1.wf01.wt01"
+
+clear
+#for pointCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000 200000 300000
+for pointCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000
+do
+  echo "----test insert dataCountPerPoint:${pointCount}"
+  java -cp ./lib/iotdb.jar demo.insert.InsertRealtimeRandomData \
+  --host $host --storagePath ${storagePath} --pointNamePrefix pointName1_ --pointCount $pointCount --seed 1 \
+  --mean 10 --variance 1 --debug 0 2>&1 | tee -a ./log/iotdb/out.log
+  sleep 1 #1 second
+done

+ 19 - 0
shell/iotdb/test/queryMultiPointLastData.sh

@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
+#host=39.104.80.229
+host=127.0.0.1
+storagePath="root.test1.wf01.wt01";
+pointIndex=1
+pointCount=10
+for pointCount in 1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000
+do
+#API规定Limit上限1000,多的需要更改iotdb配置
+echo "----test query points last data pointIndex:${pointIndex} pointCount:${pointCount}"
+java -cp ./lib/iotdb.jar demo.query.last.QueryMultiPointLastData \
+--host $host --storagePath ${storagePath} --pointNamePrefix pointName1_ --pointIndex ${pointIndex} --pointCount ${pointCount} \
+--showQueryResult 0 2>&1 | tee -a ./log/iotdb/out.log
+
+done

+ 14 - 0
shell/iotdb/test/querySinglePointLastData.sh

@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
+#host=39.104.80.229
+host=127.0.0.1
+
+pointIndex=1
+storagePath="root.test1.wf01.wt01";
+echo "----test query point last data pointIndex:${pointIndex}"
+java -cp ./lib/iotdb.jar demo.query.last.QuerySinglePointLastData \
+--host $host --storagePath ${storagePath} --pointNamePrefix pointName1_ --pointIndex ${pointIndex} \
+--showQueryResult 1 2>&1 | tee -a ./log/iotdb/out.log

+ 0 - 0
shell/tsdb/compressTest/insertHistoricalRandomData.sh


+ 0 - 0
shell/tsdb/concurTest/insertRealtimeRandomData.sh


+ 0 - 0
shell/tsdb/concurTest/insertRealtimeRandomDataMultiClient.sh


+ 0 - 0
shell/tsdb/concurTest/queryDataAtNowMultiClient.sh


+ 0 - 0
shell/tsdb/indepTest/aggHistDataOverTime.sh


+ 0 - 0
shell/tsdb/indepTest/insertHistoricalRandomData.sh


+ 0 - 0
shell/tsdb/indepTest/insertRealtimeRandomData.sh


+ 0 - 0
shell/tsdb/indepTest/queryHistData.sh


+ 0 - 0
shell/tsdb/newData/queryNewData.sh


+ 0 - 0
shell/tsdb/randomData/aggHistDataOverTime.sh


+ 0 - 0
shell/tsdb/randomData/insertHistoricalRandomData.sh


+ 0 - 0
shell/tsdb/randomData/insertHistoricalRandomDataAPointAYear.sh


+ 0 - 0
shell/tsdb/randomData/insertRealtimeRandomData.sh


+ 0 - 0
shell/tsdb/randomData/insertRealtimeRandomDataInCycle.sh


+ 0 - 0
shell/tsdb/randomData/insertRealtimeRandomDataInCycleNohup.sh


+ 0 - 0
shell/tsdb/randomData/queryDataAtNow.sh


+ 0 - 0
shell/tsdb/randomData/queryDataAtNowInCycle.sh


+ 0 - 0
shell/tsdb/randomData/queryDataAtTime.sh


+ 0 - 0
shell/tsdb/randomData/queryDataAtTimeInCycle.sh


+ 0 - 0
shell/tsdb/randomData/queryHistData.sh


+ 0 - 0
shell/tsdb/sshRemoteServer.sh


+ 3 - 0
shell/tsdb/test/aggHistDataOverTime.sh

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 

+ 3 - 1
shell/tsdb/test/insertHistoricalRandomData.sh

@@ -1,11 +1,13 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
 
 #host=39.104.80.229
 host=127.0.0.1
 
 #for dataCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000 200000 300000 500000 1000000
-for dataCount in 1036800
+for dataCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000 200000 300000 500000
 do
   echo "----test insert dataCountPerPoint:${dataCount}"
   java -cp ./lib/tsdb.jar demo.allInsert.InsertHistoricalRandomData \

+ 3 - 0
shell/tsdb/test/insertHistoricalRandomDataMultiPoint.sh

@@ -1,5 +1,8 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 

+ 4 - 1
shell/tsdb/test/insertRealtimeRandomData.sh

@@ -1,10 +1,13 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 
 #for pointCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000 200000 300000
-for pointCount in 30000
+for pointCount in 1000 2000 3000 5000 10000 20000 30000 50000 100000
 do
   echo "----test insert dataCountPerPoint:${pointCount}"
   java -cp ./lib/tsdb.jar demo.allInsert.InsertRealtimeRandomData \

+ 4 - 2
shell/tsdb/test/queryDataAtNow.sh

@@ -1,11 +1,13 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
 
 #host=39.104.80.229
 host=127.0.0.1
 
-pointCountArray=(1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000 30000 50000 100000)
-#pointCountArray=(30000)
+#pointCountArray=(1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000 30000 50000 100000)
+pointCountArray=(1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000)
 
 for(( i=0;i<${#pointCountArray[@]};i++))
 do

+ 5 - 1
shell/tsdb/test/queryDataAtTime.sh

@@ -1,12 +1,16 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
+
 #host=39.104.80.229
 host=127.0.0.1
 
 # 查询某历史数据时修改,先调用函数插入,再进一步查询
 pointName=pointName0_
 # pointCountArray=(1000 2000 3000 5000 10000 20000 50000 100000)
-pointCountArray=(1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000 30000 50000)
+#pointCountArray=(1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000 30000 50000)
+pointCountArray=(1 2 3 5 10 20 30 50 100 200 300 500 1000 2000 3000 5000 10000 20000)
 
 for(( i=0;i<${#pointCountArray[@]};i++))
 do

+ 6 - 1
shell/tsdb/test/queryHistData.sh

@@ -1,9 +1,14 @@
 #!/usr/bin/env bash
 
+ROOT=$(cd `dirname $0`/../../../; pwd)
+cd $ROOT
 
 #host=39.104.80.229
 host=127.0.0.1
 
+pointCount=1
+pointIndex=1
+
 for days in 1 2 3 4 7 15 30 60 90 180
 do
   echo "----test query range days:$days"
@@ -12,7 +17,7 @@ do
   endDate=$(date -d "${beginDate} ${days} days" +"%Y-%m-%d %H:%M:%S")
   echo endDate:$endDate
   java -cp ./lib/tsdb.jar demo.query.histQuery.QueryHistData \
-  --host=$host --pointNamePrefix=pointName_ --pointCount=1 \
+  --host=$host --pointNamePrefix=pointName_ --pointCount=$pointCount \
   --beginDate="$beginDate" --endDate="$endDate" \
   --showQueryResult=0 2>&1 | tee -a ./log/tsdb/out.log
 done

+ 0 - 0
shell/tsdb/tools/calDBDiskSize.sh


+ 0 - 0
shell/tsdb/tools/deleteAllDBData.sh


+ 0 - 0
shell/tsdb/tools/grepSpendTime.sh


+ 0 - 35
tsdb/src/main/java/demo/query/abtask/OtherA.java

@@ -1,35 +0,0 @@
-package demo.query.abtask;
-
-import java.sql.*;
-import java.util.logging.Logger;
-
-public class OtherA {
-    private static Logger logger = Logger.getLogger("CFilesToOlap");
-    private static final String DATABASE_HOST = "192.168.3.42";
-    private static final int DATABASE_PORT = 8123;
-
-
-    public static void main(String[] args) throws SQLException {
-        try {
-            Class.forName("ru.yandex.clickhouse.ClickHouseDriver");
-            Connection connection = DriverManager.getConnection(
-                    String.format("jdbc:clickhouse://%s:%d", DATABASE_HOST, DATABASE_PORT));
-            Statement statement = connection.createStatement();
-
-            long aid = 9298;
-            ResultSet resultSet = statement.executeQuery(String.format("select * from tasks.atask a1 cross join tasks.atask a2" +
-                    " where a2.aid=%d and a1.end>=a2.begin and a1.begin<=a2.end", aid));
-            ResultSetMetaData metaData = resultSet.getMetaData();
-            int columnCount = metaData.getColumnCount();
-            while (resultSet.next()) {
-                for (int i = 1; i <= columnCount; i++) {
-                    System.out.println(metaData.getColumnName(i) + ":" + resultSet.getString(i));
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-    }
-
-}

+ 0 - 72
tsdb/src/main/java/demo/query/abtask/OtherAWithTwoStep.java

@@ -1,72 +0,0 @@
-package demo.query.abtask;
-
-import db.Util;
-import util.Config;
-
-import java.sql.*;
-import java.util.logging.Logger;
-
-public class OtherAWithTwoStep {
-    private static Logger logger = Logger.getLogger("OtherAWithTwoStep");
-//    private static final String DATABASE_HOST = "192.168.3.42";
-    private static String DATABASE_HOST = "192.168.50.181";
-    private static int DATABASE_PORT = 8123;
-
-
-    public static void main(String[] args) throws SQLException {
-        Config.init();
-        DATABASE_HOST = Config.getInstance().getDbHost();
-
-        try {
-            Class.forName("ru.yandex.clickhouse.ClickHouseDriver");
-            Connection connection = DriverManager.getConnection(
-                    String.format("jdbc:clickhouse://%s:%d", DATABASE_HOST, DATABASE_PORT));
-            Statement statement = connection.createStatement();
-
-            long aid = Config.getInstance().getAid();
-            ResultSet resultSet = statement.executeQuery(String.format("select begin, end from tasks.atask a where aid=%d", aid));
-            ResultSetMetaData metaData = resultSet.getMetaData();
-            int columnCount = metaData.getColumnCount();
-
-            boolean hasAtaskResutl = false;
-            long baseLineBegin = -1;
-            long baseLineEnd = -1;
-            while (resultSet.next()) {
-                for (int i = 1; i <= columnCount; i++) {
-                    logger.info(metaData.getColumnName(i) + ":" + resultSet.getString(i));
-                    if(metaData.getColumnName(i).equals("begin")) {
-                        baseLineBegin = resultSet.getTimestamp(i).getTime();
-                    }
-                    else if(metaData.getColumnName(i).equals("end")) {
-                        baseLineEnd = resultSet.getTimestamp(i).getTime();
-                    }
-                }
-                hasAtaskResutl = true;
-                break;
-            }
-
-            if(!hasAtaskResutl) {
-                logger.severe("aid does not exist");
-                return;
-            }
-            logger.info(String.format("queryResult: aid:%d begin:%d end:%d", aid, baseLineBegin, baseLineEnd));
-
-
-            String sql = String.format("select aid from tasks.atask where end>=toDateTime('%s') and begin<=toDateTime('%s')",
-                    Util.uTCMilliSecondsToDateString(baseLineBegin), Util.uTCMilliSecondsToDateString(baseLineEnd));
-            logger.info(String.format("sql:%s", sql));
-            ResultSet resultSetOtherA = statement.executeQuery(sql);
-            ResultSetMetaData metaDataOtherA = resultSetOtherA.getMetaData();
-            while (resultSetOtherA.next()) {
-                for (int i = 1; i <= metaDataOtherA.getColumnCount(); i++) {
-                    logger.info(" " + metaData.getColumnName(i) + ":" + resultSet.getString(i));
-                }
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-    }
-
-}

+ 0 - 39
tsdb/src/main/java/demo/query/abtask/SumBInA.java

@@ -1,39 +0,0 @@
-package demo.query.abtask;
-
-import util.Config;
-
-import java.sql.*;
-import java.util.logging.Logger;
-
-public class SumBInA {
-    private static Logger logger = Logger.getLogger("CFilesToOlap");
-    private static String DATABASE_HOST = "192.168.3.42";
-    private static int DATABASE_PORT = 8123;
-
-
-    public static void main(String[] args) throws SQLException {
-        Config.init();
-        DATABASE_HOST = Config.getInstance().getDbHost();
-
-        try {
-            Class.forName("ru.yandex.clickhouse.ClickHouseDriver");
-            Connection connection = DriverManager.getConnection(
-                    String.format("jdbc:clickhouse://%s:%d", DATABASE_HOST, DATABASE_PORT));
-            Statement statement = connection.createStatement();
-
-            long aid = Config.getInstance().getAid();
-            ResultSet resultSet = statement.executeQuery(String.format("select count(distinct bid) from tasks.btask where aid=%d", aid));
-            ResultSetMetaData metaData = resultSet.getMetaData();
-            int columnCount = metaData.getColumnCount();
-            while (resultSet.next()) {
-                for (int i = 1; i <= columnCount; i++) {
-                    System.out.println(metaData.getColumnName(i) + ":" + resultSet.getString(i));
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-    }
-
-}

+ 0 - 49
tsdb/src/main/java/demo/query/abtask/TopkATaskInTimeRange.java

@@ -1,49 +0,0 @@
-package demo.query.abtask;
-
-import util.Config;
-
-import java.sql.*;
-import java.util.logging.Logger;
-
-public class TopkATaskInTimeRange {
-    private static Logger logger = Logger.getLogger("CFilesToOlap");
-//    private static final String DATABASE_HOST = "192.168.3.42";
-    private static String DATABASE_HOST = "192.168.50.181";
-    private static int DATABASE_PORT = 8123;
-
-
-    public static void main(String[] args) throws SQLException {
-        Config.init();
-        DATABASE_HOST = Config.getInstance().getDbHost();
-
-        try {
-            String start = Config.getInstance().getBegin();
-            String end =  Config.getInstance().getEnd();
-//            String start = "2021-05-15 10:00:00";
-//            String end =  "2021-07-15 10:03:00";
-            int k = Config.getInstance().getK();
-
-            Class.forName("ru.yandex.clickhouse.ClickHouseDriver");
-            Connection connection = DriverManager.getConnection(
-                    String.format("jdbc:clickhouse://%s:%d", DATABASE_HOST, DATABASE_PORT));
-            Statement statement = connection.createStatement();
-
-            String sql = String.format("select aid, spendTime from tasks.atask where begin>=toDateTime('%s') and end<=toDateTime('%s') order by spendTime desc limit %d ",
-                    start, end, k);
-            logger.info(String.format("sql:%s", sql));
-
-            ResultSet resultSet = statement.executeQuery(sql);
-            ResultSetMetaData metaData = resultSet.getMetaData();
-            int columnCount = metaData.getColumnCount();
-            while (resultSet.next()) {
-                for (int i = 1; i <= columnCount; i++) {
-                    System.out.println(metaData.getColumnName(i) + ":" + resultSet.getString(i));
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-    }
-
-}

+ 0 - 47
tsdb/src/main/java/demo/query/abtask/TopkBTaskInTimeRange.java

@@ -1,47 +0,0 @@
-package demo.query.abtask;
-
-import util.Config;
-
-import java.sql.*;
-import java.util.logging.Logger;
-
-public class TopkBTaskInTimeRange {
-    private static Logger logger = Logger.getLogger("CFilesToOlap");
-//    private static final String DATABASE_HOST = "192.168.3.42";
-    private static String DATABASE_HOST = "192.168.50.181";
-    private static int DATABASE_PORT = 8123;
-
-
-    public static void main(String[] args) throws SQLException {
-        Config.init();
-        DATABASE_HOST = Config.getInstance().getDbHost();
-
-        try {
-            String start = "2021-05-15 10:00:00";
-            String end =  "2021-07-15 10:03:00";
-            int k = 10;
-
-            Class.forName("ru.yandex.clickhouse.ClickHouseDriver");
-            Connection connection = DriverManager.getConnection(
-                    String.format("jdbc:clickhouse://%s:%d", DATABASE_HOST, DATABASE_PORT));
-            Statement statement = connection.createStatement();
-
-            String sql = String.format("select bid, spendTime from tasks.btask where begin>=toDateTime('%s') and end<=toDateTime('%s') order by spendTime desc limit %d ",
-                    start, end, k);
-            logger.info(String.format("sql:%s", sql));
-
-            ResultSet resultSet = statement.executeQuery(sql);
-            ResultSetMetaData metaData = resultSet.getMetaData();
-            int columnCount = metaData.getColumnCount();
-            while (resultSet.next()) {
-                for (int i = 1; i <= columnCount; i++) {
-                    System.out.println(metaData.getColumnName(i) + ":" + resultSet.getString(i));
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-    }
-
-}

+ 0 - 29
tsdb/src/main/java/demo/query/exetime/TaskAvgExeTime.java

@@ -1,29 +0,0 @@
-package demo.query.exetime;
-
-import db.DBApiEntry;
-import db.DBVal;
-import db.Util;
-import demo.Globals;
-
-import java.text.ParseException;
-
-public class TaskAvgExeTime {
-    public static void main(String[] args) throws ParseException {
-        String host = Globals.HOST;
-        int port = Globals.port;
-        String pointName = Globals.ATASK_POINT_NAME;
-        String start = "2021-05-00 00:00:00";
-        String end =  "2021-06-01 00:00:00";
-        long startTime = Util.dateStringToUTCSeconds(start);
-//        long endTime = Util.dateStringToUTCSeconds(end);
-        long endTime = Util.currentUTCSeconds();
-
-        long testBegin = System.currentTimeMillis();
-        DBApiEntry entry = DBApiEntry.initApiEntry(host,port,false);
-        DBVal dbval = entry.getRTAvgValue(pointName,startTime,endTime);
-        long testEnd = System.currentTimeMillis();
-        System.out.println(String.format("spend %d (ms)", testEnd-testBegin));
-
-        System.out.println(String.format("result:%s", dbval));
-    }
-}

+ 0 - 29
tsdb/src/main/java/demo/query/exetime/TaskMaxExeTime.java

@@ -1,29 +0,0 @@
-package demo.query.exetime;
-
-import db.DBApiEntry;
-import db.DBVal;
-import db.Util;
-import demo.Globals;
-
-import java.text.ParseException;
-
-public class TaskMaxExeTime {
-
-    public static void main(String[] args) throws ParseException {
-        String host = Globals.HOST;
-        int port = Globals.port;
-        String pointName = Globals.ATASK_POINT_NAME;
-        String start = "2021-06-00 00:00:00";
-        String end =  "2021-06-01 00:00:00";
-        long startTime = Util.dateStringToUTCSeconds(start);
-        long endTime = Util.dateStringToUTCSeconds(end);
-
-        long testBegin = System.currentTimeMillis();
-        DBApiEntry entry = DBApiEntry.initApiEntry(host,port,false);
-        DBVal dbval = entry.getRTAvgValue(pointName,startTime,endTime);
-        long testEnd = System.currentTimeMillis();
-        System.out.println(String.format("spend %d (ms)", testEnd-testBegin));
-        System.out.println(String.format("result:%s", dbval));
-    }
-
-}

+ 0 - 27
tsdb/src/main/java/demo/query/exetime/TaskMinExeTime.java

@@ -1,27 +0,0 @@
-package demo.query.exetime;
-
-import db.DBApiEntry;
-import db.DBVal;
-import db.Util;
-import demo.Globals;
-
-import java.text.ParseException;
-
-public class TaskMinExeTime {
-    public static void main(String[] args) throws ParseException {
-        String host = Globals.HOST;
-        int port = Globals.port;
-        String pointName = Globals.ATASK_POINT_NAME;
-        String start = "2021-06-00 00:00:00";
-        String end =  "2021-06-01 00:00:00";
-        long startTime = Util.dateStringToUTCSeconds(start);
-        long endTime = Util.dateStringToUTCSeconds(end);
-
-        long testBegin = System.currentTimeMillis();
-        DBApiEntry entry = DBApiEntry.initApiEntry(host,port,false);
-        DBVal dbval = entry.getRTMinValue(pointName,startTime,endTime);
-        long testEnd = System.currentTimeMillis();
-        System.out.println(String.format("spend %d (ms)", testEnd-testBegin));
-        System.out.println(String.format("result:%s", dbval));
-    }
-}

+ 0 - 42
tsdb/src/main/java/demo/query/exetimeAgg/TaskAvgExeTime.java

@@ -1,42 +0,0 @@
-package demo.query.exetimeAgg;
-
-import db.*;
-import demo.Globals;
-
-import java.util.List;
-import java.util.Map;
-
-public class TaskAvgExeTime {
-
-    public static void main(String[] args) throws Exception {
-        String host = Globals.HOST;
-        int port = Globals.port;
-
-//        String pointName = Globals.ATASK_POINT_NAME;
-        String pointName = "pt1";
-        String start = "2021-05-15 10:00:00";
-        String end =  "2021-05-15 10:03:00";
-        long startTime = Util.dateStringToUTCMilliSeconds(start);
-        long endTime = Util.dateStringToUTCMilliSeconds(end);
-        long timeBucketSize = 1*1000*60; //ms , 1 min aggregation
-
-        long testBegin = System.currentTimeMillis();
-
-        String url = UrlGenerator.create(host, port).aggOverTime(Constants.AVG,
-                pointName, System.currentTimeMillis(), startTime, endTime, timeBucketSize);
-        System.out.println(String.format("url:%s", url));
-
-        Map<String, List<DBVal>> dbVals = SendRequest.getValuesByUrl(url);
-
-        long testEnd = System.currentTimeMillis();
-        System.out.println(String.format("spend %d (ms)", testEnd-testBegin));
-
-        for (String key : dbVals.keySet()) {
-            List<DBVal> dbValList = dbVals.get(key);
-            for (DBVal dbVal : dbValList) {
-                System.out.println(String.format("result:%s", dbVal));
-            }
-        }
-    }
-
-}

+ 0 - 42
tsdb/src/main/java/demo/query/exetimeAgg/TaskMaxExeTime.java

@@ -1,42 +0,0 @@
-package demo.query.exetimeAgg;
-
-import db.*;
-import demo.Globals;
-
-import java.util.List;
-import java.util.Map;
-
-public class TaskMaxExeTime {
-
-    public static void main(String[] args) throws Exception {
-        String host = Globals.HOST;
-        int port = Globals.port;
-
-        String pointName = Globals.ATASK_POINT_NAME;
-//        String pointName = "pt1";
-        String start = "2021-05-15 10:00:00";
-        String end =  "2021-05-15 10:03:00";
-        long startTime = Util.dateStringToUTCMilliSeconds(start);
-        long endTime = Util.dateStringToUTCMilliSeconds(end);
-        long timeBucketSize = 1*1000*60; //ms , 1 min aggregation
-
-        long testBegin = System.currentTimeMillis();
-
-        String url = UrlGenerator.create(host, port).aggOverTime(Constants.MAX,
-                pointName, System.currentTimeMillis(), startTime, endTime, timeBucketSize);
-        System.out.println(String.format("url:%s", url));
-
-        Map<String, List<DBVal>> dbVals = SendRequest.getValuesByUrl(url);
-
-        long testEnd = System.currentTimeMillis();
-        System.out.println(String.format("spend %d (ms)", testEnd-testBegin));
-
-        for (String key : dbVals.keySet()) {
-            List<DBVal> dbValList = dbVals.get(key);
-            for (DBVal dbVal : dbValList) {
-                System.out.println(String.format("result:%s", dbVal));
-            }
-        }
-    }
-
-}

+ 0 - 42
tsdb/src/main/java/demo/query/exetimeAgg/TaskMinExeTime.java

@@ -1,42 +0,0 @@
-package demo.query.exetimeAgg;
-
-import db.*;
-import demo.Globals;
-
-import java.util.List;
-import java.util.Map;
-
-public class TaskMinExeTime {
-
-    public static void main(String[] args) throws Exception {
-        String host = Globals.HOST;
-        int port = Globals.port;
-
-//        String pointName = Globals.ATASK_POINT_NAME;
-        String pointName = "pt1";
-        String start = "2021-05-15 10:00:00";
-        String end =  "2021-05-15 10:03:00";
-        long startTime = Util.dateStringToUTCMilliSeconds(start);
-        long endTime = Util.dateStringToUTCMilliSeconds(end);
-        long timeBucketSize = 1*1000*60; //ms , 1 min aggregation
-
-        long testBegin = System.currentTimeMillis();
-
-        String url = UrlGenerator.create(host, port).aggOverTime(Constants.MIN,
-                pointName, System.currentTimeMillis(), startTime, endTime, timeBucketSize);
-        System.out.println(String.format("url:%s", url));
-
-        Map<String, List<DBVal>> dbVals = SendRequest.getValuesByUrl(url);
-
-        long testEnd = System.currentTimeMillis();
-        System.out.println(String.format("spend %d (ms)", testEnd-testBegin));
-
-        for (String key : dbVals.keySet()) {
-            List<DBVal> dbValList = dbVals.get(key);
-            for (DBVal dbVal : dbValList) {
-                System.out.println(String.format("result:%s", dbVal));
-            }
-        }
-    }
-
-}

+ 0 - 42
tsdb/src/main/java/demo/query/exetimeAgg/TaskSumExeTime.java

@@ -1,42 +0,0 @@
-package demo.query.exetimeAgg;
-
-import db.*;
-import demo.Globals;
-
-import java.util.List;
-import java.util.Map;
-
-public class TaskSumExeTime {
-
-    public static void main(String[] args) throws Exception {
-        String host = Globals.HOST;
-        int port = Globals.port;
-
-//        String pointName = Globals.ATASK_POINT_NAME;
-        String pointName = "pt1";
-        String start = "2021-05-15 10:00:00";
-        String end =  "2021-05-15 10:03:00";
-        long startTime = Util.dateStringToUTCMilliSeconds(start);
-        long endTime = Util.dateStringToUTCMilliSeconds(end);
-        long timeBucketSize = 1*1000*60; //ms , 1 min aggregation
-
-        long testBegin = System.currentTimeMillis();
-
-        String url = UrlGenerator.create(host, port).aggOverTime(Constants.SUM,
-                pointName, System.currentTimeMillis(), startTime, endTime, timeBucketSize);
-        System.out.println(String.format("url:%s", url));
-
-        Map<String, List<DBVal>> dbVals = SendRequest.getValuesByUrl(url);
-
-        long testEnd = System.currentTimeMillis();
-        System.out.println(String.format("spend %d (ms)", testEnd-testBegin));
-
-        for (String key : dbVals.keySet()) {
-            List<DBVal> dbValList = dbVals.get(key);
-            for (DBVal dbVal : dbValList) {
-                System.out.println(String.format("result:%s", dbVal));
-            }
-        }
-    }
-
-}

+ 0 - 51
tsdb/src/main/java/demo/query/topkValueChange/TopkValueChange.java

@@ -1,51 +0,0 @@
-package demo.query.topkValueChange;
-
-import db.*;
-import demo.Globals;
-import util.Config;
-
-import java.util.List;
-import java.util.Map;
-
-public class TopkValueChange {
-
-    public static void main(String[] args) throws Exception {
-        Config.init();
-
-        String host = Globals.HOST;
-        int port = Globals.port;
-
-        String pointName = Config.getInstance().getPointName();
-//        String pointName = "pt1";
-
-        String start =  Config.getInstance().getBegin();
-//        String start =  "2021-05-15 10:01:00";
-
-        String end =  Config.getInstance().getEnd();
-//        String end =  "2021-07-15 10:01:00";
-        long startTime = Util.dateStringToUTCMilliSeconds(start);
-        long endTime = Util.dateStringToUTCMilliSeconds(end);
-
-        long testBegin = System.currentTimeMillis();
-
-        int k = Config.getInstance().getK();
-//        int k = 3;
-
-        String url = UrlGenerator.create(host, port).topkValueChange(Constants.MAX,
-                k, pointName, System.currentTimeMillis(), startTime, endTime);
-        System.out.println(String.format("url:%s", url));
-
-        Map<String, List<DBVal>> dbVals = SendRequest.getValuesByUrl(url);
-
-        long testEnd = System.currentTimeMillis();
-        System.out.println(String.format("spend %d (ms)", testEnd-testBegin));
-
-        for (String key : dbVals.keySet()) {
-            List<DBVal> dbValList = dbVals.get(key);
-            for (DBVal dbVal : dbValList) {
-                System.out.println(String.format("result:%s", dbVal));
-            }
-        }
-    }
-
-}

+ 1 - 1
tsdb/src/main/java/log/LogConfig.java

@@ -8,7 +8,7 @@ import java.util.logging.LogManager;
 public class LogConfig {
     public static void init() {
         try {
-            InputStream in = new FileInputStream(new File("./tsdb/log.properties"));
+            InputStream in = new FileInputStream(new File("./conf/tsdb/log.properties"));
             LogManager.getLogManager().readConfiguration(in);
         } catch (Exception e) {
             e.printStackTrace();

+ 1 - 1
tsdb/src/main/java/util/Config.java

@@ -16,7 +16,7 @@ public class Config {
     public Config() {
         try {
             InputStream inputStream = new BufferedInputStream(
-                    new FileInputStream(new File("./tsdb/sys.properties")));
+                    new FileInputStream(new File("./conf/tsdb/sys.properties")));
             resource = new PropertyResourceBundle(inputStream);
             String host = resource.getString("host");
             Globals.HOST = host;