Skip to content

Instantly share code, notes, and snippets.

@tisba
Created February 7, 2012 17:10
Show Gist options
  • Select an option

  • Save tisba/1760779 to your computer and use it in GitHub Desktop.

Select an option

Save tisba/1760779 to your computer and use it in GitHub Desktop.
-module (test).
-export([start/0]).
start() ->
{ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087),
pong = riakc_pb_socket:ping(Pid),
{ok, _} = riakc_pb_socket:mapred(Pid,
[<<"sc">>],
[
{map, {modfun, riak_kv_mapreduce, map_object_value}, none, false},
{reduce, {modfun, riak_kv_mapreduce, reduce_count_inputs}, none, true}
]
).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment