insertSinglePointHistData.sh 1023 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env bash
  2. # 插入单点历史数据
  3. ROOT=$(cd `dirname $0`/../../; pwd)
  4. cd $ROOT
  5. source $ROOT/shell/tsdb/common.sh
  6. dataCountPerPointArray=(1000 2000 3000 5000 10000 20000 30000 50000 100000 200000)
  7. pointCountArray=(1)
  8. index=1
  9. beginDate="2017-06-01 00:00:00"
  10. echo beginDate:beginDate
  11. for(( i=0;i<${#pointCountArray[@]};i++))
  12. do
  13. pointCount=${pointCountArray[i]}
  14. for(( j=0;j<${#dataCountPerPointArray[@]};j++))
  15. do
  16. #index=`expr $index + 1`
  17. echo "[${index}] test"
  18. dataCountPerPoint=${dataCountPerPointArray[j]}
  19. pointNamePrefix="pointName${index}_"
  20. echo "----test insert pointCount:${pointCount} dataCountPerPoint:${dataCountPerPoint}"
  21. java -cp ./lib/influxdb.jar -Xmx8000m demo.allInsert.InsertHistoricalRandomData \
  22. --host $host --pointNamePrefix ${pointNamePrefix} --pointCount ${pointCount} \
  23. --dataCountPerPoint ${dataCountPerPoint} --beginDate "$beginDate" --period 70000 \
  24. --seed 1 --mean 10 --variance 1 --debug 0 2>&1 | tee -a ./log/influxdb/out.log
  25. done
  26. done