Allow group_by or search queries in run_client.sh

This commit is contained in:
Trotter Cashion 2012-10-26 10:20:56 -07:00
parent a3eb4f3293
commit bcdfece878
2 changed files with 4 additions and 2 deletions

View File

@ -7,14 +7,16 @@ shopt -s xpg_echo
shopt -s expand_aliases
trap "exit 1" 1 2 3 15
[ ! -e query.body ] && echo "expecting file query.body to be in current directory" && exit 2
QUERY_FILE="${1:-group_by}_query.body"
[ ! -e $QUERY_FILE ] && echo "expecting file $QUERY_FILE to be in current directory" && exit 2
for delay in 5 15 15 15 15 15 15 15 15 15 15
do
echo "sleep for $delay seconds..."
echo " "
sleep $delay
curl -X POST 'http://localhost:8080/druid/v2/' -H 'content-type: application/json' -d @query.body
curl -X POST 'http://localhost:8080/druid/v2/' -H 'content-type: application/json' -d @$QUERY_FILE
echo " "
echo " "
done