Hi, I have an Erlang module added to the Riak cluster via the add_paths config. It has some custom functions for map/reduce phases. In one of them I'm using the map argument to pass some configuration information.
At first, I was just developing with the Erlang client, so I was passing a proplist to riakc_pb_socket:mapred. That worked great. However, I also have to support Python here. I thought for a second and figured that I can't expect to be able to send an Erlang-specific data format from Python, so I changed my map function to expect a binary JSON blob. It seems like a binary would be the simplest thing to get working for Python. However, sending a string doesn't get the arg as a binary to the map function. I have an is_binary guard to the function, map_reindex(RiakObject, _KeyData, IndexJson) when is_binary(IndexJson) -> and the error that the python client gets starts with Exception: {"phase":0,"error":"function_clause" so I don't think it's being received as a binary. And how do I print out some logging information from my map function? I tried using lager like I found in the riak code, lager:error("Arg is ~p", [IndexJson]), but I can't find the message in any of the Riak logs. Thanks, Julian
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com