Hi Jaques,

Where to start...hm.

On 2 Jun 2011, at 02:47, Jacques wrote:

> I'm using Java and looking to replicate multi-get using a map-only job per 
> everyone's recommendation.
> 
> My bucket and key names are binary values, not strings.
> 
> I attempted to run a map reduce job using a json input object, base 64 
> encoding the values.  This failed.
> 
> What is the correct way to submit a pbc map reduce job where the inputs info 
> is binary?  
> 
> Thanks,
> Jacques
> 
> 
> 
> Error when trying base 64 values:
> ** Reason for termination ==
> ** {json_encode,{bad_term,{not_found,{<<"dGVzdDI=">>,<<"dGVzdEtleQ==">>}, 
> undefined}}}

This is a bug in the pb interface of Riak that I have patched and will be in 
master soon. The error is because the {not_found} term you see in the log is 
not able to be serialised to JSON. The fix is here 
https://github.com/basho/riak_kv/pull/103

However,  this error just means that your bucket/key combo 
<<"dGVzdDI=">>,<<"dGVzdEtleQ==">> is not found. Which is another problem all 
together.

Are you're bucket and key names actual binary values, or base64 encoded binary 
values?

Cheers

Russell

> 
> 
> JSON {
>     "inputs": [
>         [
>             "dGVzdDI=",
>             "dGVzdEtleQ=="
>         ],
>         [
>             "dGVzdDI=",
>             "dGVzdEtleQ=="
>         ]
>     ],
>     "query": [{"map": {
>         "keep": true,
>         "language": "javascript",
>         "source": "function(v) { return [v]; }"
>     }}]
> }
> 
> 
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to