odd error on mapreduce

Bryan Fink bryan at basho.com
Fri Aug 26 07:11:20 EDT 2011


On Fri, Aug 26, 2011 at 6:32 AM, Giancarlo Frison <gfrison at chelab.com> wrote:
> If i serialize the body as Json I catch errors any more instead of protobuf
> object representation (application/octet-stream).
> Would be an mapreduce bug?
> Is it possibile to skirt any body parsing during the mapreduce? Just for
> evaluating headers values?

All objects passed through Javascript map or reduce phases must be
valid UTF-8-encoded JSON.  There is no way to change that at this
time.  Erlang map/reduce phases do not have such requirements.

The fact that your earlier ProtocolBuffer-encoded object made it
through a Javascript phase was probably a fluke, based on the encoding
containing nothing that was completely invalid UTF-8.  It probably
came through as a string, maybe with one or two odd characters
prepended.

Hope that helps,
Bryan




More information about the riak-users mailing list