import records in batches, support w=2
[NoSQL-toys.git] / riak / query.sh
index f5e459a..1b600e9 100755 (executable)
@@ -1,9 +1,17 @@
 #!/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