calling erlang module,function from python-riak client in mapreduce

Erik Søe Sørensen ess at
Mon May 26 09:22:50 EDT 2014

Hello -
Did you ensure that the function in question is exported from the module?
(Also: that the beam file is placed in the Riak node's search path?)

-------- Oprindelig meddelelse --------
Fra: Gopi Krishna
Dato:26/05/2014 14.18 (GMT+01:00)
Til: riak-users at
Emne: calling erlang module,function from python-riak client in mapreduce

Hi all,

I've been doing the thing get the map phase work in in python-riak client.

I have written a function in erlang.

funs(Obj,_,_) -> [riak_object:get_value(Obj)].

I have saved it in a file called maps.erl

I have compiled the maps.erl to get the maps.beam file to give the path of the beam files under tha app.config.

 I have given path like as metnioned in the riak documents.

Now i want to get the values out from the map phase udner the python-riak client by sending erlang module and map function to the phase.I have given like :['maps','funs']) is giving me error like below, please tell me where i have done or what is the correct to way to implement it.

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/riak-1.5.2-py2.6.egg/riak/", line 234, in run
    result = t.mapred(self._inputs, query, timeout)
  File "/usr/lib/python2.6/site-packages/riak-1.5.2-py2.6.egg/riak/transports/", line 322, in mapred
    (repr(response[0]), repr(response[1])))
Exception: Error running MapReduce operation. Headers: {'date': 'Mon, 26 May 2014 11:24:04 GMT', 'content-length': '1121', 'content-type': 'application/json'
, 'http_code': 500, 'server': 'MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)'} Body: '{"phase":0,"error":"undef","input":"{ok,{r_object,<<\\"tst\


Thanks & Regards,
J.Gopi Krishna
Lintel Technologies Pvt. LTD,Hyderabad.

This message contains confidential information and is intended for recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

More information about the riak-users mailing list