#!/bin/sh -x
+RIAK=192.168.1.200:8098
+RIAK=10.60.0.92:8098
+
function execute_query {
- curl -v -X POST http://192.168.1.200:8098/mapred -H "Content-Type: application/json" -d @$1
+ curl -v -X POST http://$RIAK/mapred -H "Content-Type: application/json" -d @$1
}
+if [ ! -z "$1" ] ; then
+ execute_query $1
+ exit
+fi
+
ls query/*.json | while read file ; do
echo "executing $file"
execute_query $file