Browse files


  • Loading branch information...
beerriot committed Jan 16, 2011
1 parent 7467b94 commit 3691bcf6d413cfd5ac99aa35a42ea9bb05d95d2c
Showing with 37 additions and 0 deletions.
  1. +37 −0
@@ -0,0 +1,37 @@
+Utilities for map/reducing Luwak data
+* Description
+The main purpose of this application is to expose a function that
+conforms to Riak's dynamic map/reduce inputs interface, allowing a
+user to compute a map/reduce query over a Luwak file (see
+src/luwak_mr.erl). An example use is also included for reference
+* Setup
+To use it, build the project. First edit rebar.config such that the
+include path in the erl_opts line points to the "luwak-*/include"
+directory in your Riak installation (the home of luwak.hrl).
+Then run:
+: rebar compile
+Add the path to the beams to each of your Riak nodes by either adding
+an 'add_paths' setting to the riak_kv section of your app.config
+before starting the nodes, or by using code:add_path from each node's
+* Use
+You can map/reduce across any Luwak file using the Erlang client:
+: C:mapred({modfun, luwak_mr, file, <<"my_file_name">>},
+: [... your query ...]).
+: {"inputs":{"module":"luwak_mr",
+: "function":"file",
+: "arg":"my_file_name"},
+: "query":[... your query ...]}
+If you start your query with a map phase, your map function will be
+evaluated for each luwak_block object in the file. The KeyData
+argument to the function will be the block's offset in the file.

0 comments on commit 3691bcf

Please sign in to comment.