Hi Riak-users,

I'm looking for an efficient way of passing multiple arguments to mapreduce
functions, Instead of
passing a JSON (or other custom string representation of arguments) and
being forced to parse
it on every map/reduce function call, i.e.:

Now:
//Passing:  arg = {"a":"0", "b":"1"}
//Example map function
function(v, kd, arg) {
  var args = JSON.parse(arg).values;
  var a = args[0]; var b = args[1];
  //.....
}

Desired:
//Passing:  arg = {"a":"0", "b":"1"}
//Example map function
function(v, kd, arg) {
  var a = args.a; var b = args.b;
  //.....
}



-Matthew
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to