Using the Contributed Functions
All of the functions provided that are written in Erlang should be compiled and the resulting beams placed on each of the Riak nodes. You will need to edit your app.config file and add the add_paths directive to the riak_kv section so the node is aware of the additional modules. If you plan to use several of the Erlang functions provided they should be combined into one module and compiled for use by the system. You can use the Riak provided erlc to compile the modules. The erlc executable will be either in your base Riak directory if you compiled Riak from source or in the Riak lib directory if you used a binary package provided by Basho.
Here is an example of compiling the [[bucket exporter|bucket_exporter]], loading the library dynamically into the Riak node, and using it in the Riak console.
$ /usr/lib/riak/erts-5.7.5/bin/erlc -o /tmp /tmp/bucket_reloader.erl
$ riak attach
(email@example.com)3> bucket_exporter:export_data(‘firstname.lastname@example.org’, <<"bucket">>, “json”, “/tmp/bucket_export”).