insertHistoricalRandomDataForAPoint.sh 946 B

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