Well, that's embarrassing. I cleaned my data and introduced errors. The JSON that is in the node in question is laid out like you see, but all the " characters are preceded by '\' in the error output. I looked at that funny but presumed it was part of the Erlang dump, as the nodes themselves were created by the Python API and appear to be stored without the leading backslash. I'll try the mapValues when I get a chance today and report back.
-- jeffrey k eliasen Find and follow me on: Blog: http://jeff.jke.net Twitter: http://twitter.com/jeffreyeliasen Facebook: http://facebook.com/jeffrey.eliasen On Sep 27, 2013, at 22:55 , Luke Bakken <[email protected]> wrote: >> The query: >> curl -X POST http://localhost:8098/mapred -H 'Content-Type: >> application/json' -d >> '{"inputs":"testfs","query":[{"map":{"language":"javascript","name":"Riak.mapValuesJson","keep":true}}]}' > > Since you're using mapValuesJson, the data over which you're iterating > must be valid JSON. Do you have an example (or two) of the data you're > using? > > This is the part of the output that I'm interested in - you'll notice > that it's not a valid string representation of JSON data: > > {\"items\": {\"one": null, \"two": null}, \"status\": {\"time\": > 1379469049, \"size\": 0}} > > Try changing "mapValuesJson" to just "mapValues" and check the output > there. I ran this query and saw the set of test data in my local > cluster: > > curl -X POST http://localhost:10018/mapred -H 'Content-Type: > application/json' -d > '{"inputs":"test","query":[{"map":{"language":"javascript","name":"Riak.mapValues","keep":true}}]}' > > -- > Luke Bakken > CSE > [email protected]
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
