Index query mapreduce error

Kelly McLaughlin mclaughlin77 at gmail.com
Fri Nov 11 12:18:58 EST 2011


Ben,

The problem is you are using the legacy MapReduce system instead of the new pipe system. If you edit the riak app.config and change the mapred_system setting to pipe instead of legacy, it should resolve the issue. The app.config file can be found in /etc/riak if you installed from one of the prebuilt packages. 

Kelly


On Nov 9, 2011, at 5:26 PM, Ben Kempe wrote:

> Hi everybody,
> We have JSON data in a Riak 1.0/leveldb bucket with an index createdat_int.
> 
> http://localhost:8098/buckets/data/index/createdat_int/50000/1320883249
> 
> works, but
> 
> curl -X POST \
> -H "content-type: application/json" \
> -d @- \
> http://localhost:8098/mapred \
> <<EOF
> {
>   "inputs":{
>       "bucket":"data",
>       "index":"createdat_int",
>       "start":"50000",
>       "end":"1320883249"
>   },
>   "query":[
>      {
>         "reduce":{
>            "language":"erlang",
>            "module":"riak_kv_mapreduce",
>            "function":"reduce_identity",
>            "keep":true
>         }
>      }
>   ]
> }
> EOF
> 
> fails with the following message:
> 
>    {throw,
>        {invalid_inputdef,
>            {index,<<"data">>,<<"createdat_int">>,50000,
>                1320883249}},
>        [{riak_client,mapred_dynamic_inputs_stream,4},
>         {riak_kv_wm_mapred,legacy_mapred,2},
>         {webmachine_resource,resource_call,3},
>         {webmachine_resource,do,3},
>         {webmachine_decision_core,resource_call,1},
>         {webmachine_decision_core,decision,1},
>         {webmachine_decision_core,handle_request,2},
>         {webmachine_mochiweb,loop,1}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web server</ADDRESS></body></html>
> 
> What's the cause for this problem?
> I tried to stay close to the examples in the docs.
> 
> Thanks, Ben
> 
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111111/9529f775/attachment.html>


More information about the riak-users mailing list