querySinglePointHistData.sh 690 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. ROOT=$(cd `dirname $0`/../../; pwd)
  3. cd $ROOT
  4. source $ROOT/shell/tsdb/common.sh
  5. storagePath="root.test1.wf01.wt01"
  6. days=1
  7. pointIndex=1
  8. echo "----test query range days:$days"
  9. beginDate="2018-06-01 00:00:00"
  10. echo beginDate:beginDate
  11. for days in 1 2 3 4 7 15 30 60 90
  12. do
  13. endDate=$(date -d "${beginDate} ${days} days" +"%Y-%m-%d %H:%M:%S")
  14. #endDate="2022-12-02 00:00:00"
  15. echo endDate:$endDate
  16. java -cp ./lib/iotdb.jar demo.query.histQuery.QuerySinglePointHistData \
  17. --host $host --storagePath ${storagePath} --pointNamePrefix pointName1_ --pointIndex $pointIndex \
  18. --beginDate "$beginDate" --endDate "$endDate" \
  19. --showQueryResult 0 2>&1 | tee -a ./log/iotdb/out.log
  20. done