Pass keyarg from one map phase to another?
For situations in which one map phase passes output to a subsequent map phase, the documentation states: These map functions filter their inputs based on the arg and return bucket-key pairs for a subsequent map phase Is it possible to also return a keyarg? So a three-element array? Thanks! Mat ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: Pass keyarg from one map phase to another?
Mat, Absolutely, we do recommend doing that. Hopefully this blog post will help: http://basho.com/blog/technical/2010/04/14/practical-map-reduce:-forwarding-and-collecting/ On Fri, Mar 23, 2012 at 11:37 AM, Matthew A. Brown wrote: > For situations in which one map phase passes output to a subsequent > map phase, the documentation states: > >These map functions filter their inputs based on the arg and > return bucket-key pairs for a subsequent map phase > > Is it possible to also return a keyarg? So a three-element array? > > Thanks! > Mat > > ___ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > -- Sean Cribbs Software Engineer Basho Technologies, Inc. http://basho.com/ ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: Pass keyarg from one map phase to another?
Hi Mat, Yes, a map function may return a three element array with the third element being used as keydata to a subsequent map phase. A quick example: # create an object curl http://localhost:8098/riak/bucket/key -XPUT -d 'hello' -H 'content-type:text/plain' # example MapReduce query curl http://localhost:8098/mapred -XPOST -H 'content-type:application/json' -d '{"inputs":[["bucket","key"]],"query":[{"map":{"language":"javascript","source":"function(v) { return [[\"bucket\",\"key\",\"keyarg\"]] }"}},{"map":{"language":"javascript","source":"function(v, keyData) { return [keyData] }"}}]}' Thanks, Dan -- Daniel Reverri Developer Advocate Basho Technologies, Inc. d...@basho.com Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Friday, March 23, 2012 at 8:37 AM, Matthew A. Brown wrote: > For situations in which one map phase passes output to a subsequent > map phase, the documentation states: > > These map functions filter their inputs based on the arg and > return bucket-key pairs for a subsequent map phase > > Is it possible to also return a keyarg? So a three-element array? > > Thanks! > Mat > > ___ > riak-users mailing list > riak-users@lists.basho.com (mailto: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
Riak Recap for March 19 - 22
Afternoon, Evening, Morning to All - Nice Recap to take everyone into the weekend: talks, blog posts, and more. Enjoy. As usual, thanks for being a part of Riak. Mark Community Manager Basho Technologies wiki.basho.com/Riak.html twitter.com/pharkmillups Riak Recap for March 19 - 22 == 1) The video of Bob Ippolito's "Statebox" talk from QCon SF is now on the internet. * Watch here ---> http://www.infoq.com/presentations/Eventually-Consistent-HTTP-with-Statebox-and-Riak 2) John Leach is giving a talk at FlossUK all about distributed storage systems. I'm sure Riak will get some nice coverage. (Right, John???) * Details here ---> http://www.flossuk.org/Events/Spring2012/Talks#Top_10_distributed_storage_systems 3) DZone posted a piece from Paul Gross and the Braintree team all about how they use Curator to do lazy data migration into Riak. * Read here ---> http://architects.dzone.com/articles/curator-helps-data-migrations 4) Some new Riak content is up on StackOverflow: * Riak special chars in keys ---> http://stackoverflow.com/questions/9789813/riak-special-chars-in-keys * Riak sort on MapReduce ---> http://stackoverflow.com/questions/9752931/riak-sort-on-mapreduce(continual thanks to Srdjan Pejic his SA awesomeness) 5) Some new Riak content on SA that needs answering: * Search error from the Java Client ---> http://stackoverflow.com/questions/9830579/riak-map-reduce-enableforsearch-error * What is the purposed of the Riak 2i index type? ---> http://stackoverflow.com/questions/9817521/whats-the-purpose-of-riak-secondary-index-data-type 6) Justin Sheehy is giving a talk in Chicago next month at a GOTO event. Mark your calendars. * Details here ---> http://gotonightchicago.eventbrite.com/ ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: Riak Recap for March 19 - 22
Oops. On Fri, Mar 23, 2012 at 3:56 PM, Mark Phillips wrote: > > > 4) Some new Riak content is up on StackOverflow: > > * Riak special chars in keys ---> > http://stackoverflow.com/questions/9789813/riak-special-chars-in-keys > * Riak sort on MapReduce ---> > http://stackoverflow.com/questions/9752931/riak-sort-on-mapreduce(continual > thanks to Srdjan Pejic his SA awesomeness) > > ... for* his SA awesomeness :) Mark ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: Riak Recap for March 19 - 22
In the statebox presentation, Andy hints that there's statebox like capabilities are slated to be built into Riak. Any timelines on that? Cheers, Mark Steele, CISSP, CSM Bering Media Inc. On Fri, Mar 23, 2012 at 3:56 PM, Mark Phillips wrote: > Afternoon, Evening, Morning to All - > > Nice Recap to take everyone into the weekend: talks, blog posts, and more. > > Enjoy. As usual, thanks for being a part of Riak. > > Mark > > Community Manager > Basho Technologies > wiki.basho.com/Riak.html > twitter.com/pharkmillups > > > Riak Recap for March 19 - 22 > == > > 1) The video of Bob Ippolito's "Statebox" talk from QCon SF is now on the > internet. > > * Watch here ---> > http://www.infoq.com/presentations/Eventually-Consistent-HTTP-with-Statebox-and-Riak > > 2) John Leach is giving a talk at FlossUK all about distributed storage > systems. I'm sure Riak will get some nice coverage. (Right, John???) > > * Details here ---> > http://www.flossuk.org/Events/Spring2012/Talks#Top_10_distributed_storage_systems > > 3) DZone posted a piece from Paul Gross and the Braintree team all about > how they use Curator to do lazy data migration into Riak. > > * Read here ---> > http://architects.dzone.com/articles/curator-helps-data-migrations > > 4) Some new Riak content is up on StackOverflow: > > * Riak special chars in keys ---> > http://stackoverflow.com/questions/9789813/riak-special-chars-in-keys > * Riak sort on MapReduce ---> > http://stackoverflow.com/questions/9752931/riak-sort-on-mapreduce(continual > thanks to Srdjan Pejic his SA awesomeness) > > 5) Some new Riak content on SA that needs answering: > > * Search error from the Java Client ---> > http://stackoverflow.com/questions/9830579/riak-map-reduce-enableforsearch-error > * What is the purposed of the Riak 2i index type? ---> > http://stackoverflow.com/questions/9817521/whats-the-purpose-of-riak-secondary-index-data-type > > 6) Justin Sheehy is giving a talk in Chicago next month at a GOTO event. > Mark your calendars. > > * Details here ---> http://gotonightchicago.eventbrite.com/ > > > > ___ > 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