Malka, If you want to throw away not_found results (and not do anything with them), then add a reduce phase in-between your map phases that uses the function Riak.filterNotFounds. That will remove any not_found objects produced by the previous map phase.
Sean Cribbs <[email protected]> Developer Advocate Basho Technologies, Inc. http://basho.com/ On Aug 15, 2010, at 5:33 AM, malka feldman wrote: > Hi, > I have a node.js app with riak-js. > I wrote a map job that collect pairs of [bucket, key] and send them to > another map phase. Some of the keys may not found. > So,I try to use the Riak.mapByFields method(in the second map), but it > doesn't work for me and it has strange behavior too. > > > For some keys I get this error : > {"message":"<html><head><title>500 Internal Server > Error</title></head><body><h1>Internal Server Error</h1>The server > encountered an error while processing this > request:<br><pre>{error,{error,{case_clause,no_vnodes},\n > [{riak_kv_wm_mapred,process_post,2},\n > {webmachine_resource,resource_call,3},\n > {webmachine_resource,do,3},\n > {webmachine_decision_core,resource_call,1},\n > {webmachine_decision_core,decision,1},\n > {webmachine_decision_core,handle_request,2},\n > {webmachine_mochiweb,loop,1},\n > {mochiweb_http,headers,5}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web > server</ADDRESS></body></html>","stack":"Error: <html><head><title>500 > Internal Server Error</title></head><body><h1>Internal Server Error</h1>The > server encountered an error while processing this > request:<br><pre>{error,{error,{case_clause,no_vnodes},\n > [{riak_kv_wm_mapred,process_post,2},\n > {webmachine_resource,resource_call,3},\n > {webmachine_resource,do,3},\n > {webmachine_decision_core,resource_call,1},\n > {webmachine_decision_core,decision,1},\n > {webmachine_decision_core,handle_request,2},\n > {webmachine_mochiweb,loop,1},\n > {mochiweb_http,headers,5}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web > server</ADDRESS></body></html>\n at IncomingMessage.<anonymous> > (/usr/local/lib/node/riak-js/lib/riak-node.js:68:44)\n at > IncomingMessage.emit (events:43:20)\n at HTTPParser.onMessageComplete > (http:107:23)\n at Client.ondata (http:871:22)\n at IOWatcher.callback > (net:517:29)\n at node.js:265:9"} > and for other keys: > [{"not_found":{"bucket":"user_apps","key":"156","keydata":"undefined"}}] > If I understood right - I have to get an empty array when the key is not > found, but I never get it. > I hope you can help me. > thanks, Malka > > > > -- > Sincerely, > Malka Feldman > Tribase LTD. > 41 Shimon Hatzadik St. > Elad, Israel > Tel. 074-7122736 Fax. 03-9075211 > [email protected] > www.tribasesoft.com > > <image001.jpg> > > > _______________________________________________ > 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
