Hi Thomas, Map phases expect a list of bucket/key pairs. The input to the second map phase would be the JSON values returned by the first map phase which is invalid.
On Thu, Jun 10, 2010 at 3:33 PM, Thomas Heller <i...@zilence.net> wrote: > Howdy folks, > > still trying to wrap my head arround riak and map/reduce, so I decided > to follow the fast-track and play arround with some of the examples. > Its easy enough and the examples work just like advertised. However, I > seem to be missing a critical part of knowledge about the map reduce > phases since I cannot explain this error. > > I loaded the goog.csv into riak and try to run this job: > > { > "inputs": [ > ["goog", "2008-10-10"] > ], > "query": [ > {"map":{"language":"javascript", "name":"Riak.mapValuesJson"}}, > {"map":{"language":"javascript", "name":"Riak.mapValuesJson"}} > ] > } > > I know its pointless, but afaict I should end up with > > "[{"Date":"2008-10-10","Open":313.16,"High":341.89,"Low":310.3,"Close":332,"Volume":10597800,"Adj. > Close":332}]", which is what I get when I run with only ONE map phase. > > However I get a 500 with: > > The server encountered an error while processing this request: > {error,{error,{case_clause,{bad_return_value,{error,bad_input}}}, > [{riak_kv_wm_mapred,process_post,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}, > {mochiweb_http,headers,5}]}} > > I thought I can chain multiple map phases together? > > Cheers, > /thomas > > PS: this is on the riak-0.11.0-osx-x86_64.tar.gz release binary btw > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com