Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass arguments to mapper/reducer? #396

Closed
gglanzani opened this issue Jan 13, 2015 · 3 comments
Closed

How to pass arguments to mapper/reducer? #396

gglanzani opened this issue Jan 13, 2015 · 3 comments

Comments

@gglanzani
Copy link

I'm trying to pass some arguments to a mapper.

With the Riak client I trivially do it with the snippet erlang-shell in this gist

The problem is how to achieve the same with Python. In the same gist as above, I have the snippets python-{first,second}-try and python-first-fail which is the traceback.

In the gist I've also included the Erlang code (sorry if it's ugly, it's my first Erlang week).

Am I doing something wrong? I couldn't find much in the documentation.

@hazen
Copy link

hazen commented Jan 21, 2015

@gglanzani It looks like you are passing in the options dict with a key of args instead of arg. See if that works any better for you. I think we should make the values to options a bit clearer in the documentation.

http://basho.github.io/riak-python-client/query.html#riak.mapreduce.RiakMapReduce.map

@gglanzani
Copy link
Author

@javajolt Yes, you are right, sorry for the inconvenience. As an aside: I still don't get the results because of #394 :)

Regarding the docs: I think the could use some love too. A working MR example would be appreciated by the audience.

Keep up the good work!

@hazen
Copy link

hazen commented Jan 21, 2015

@lucperkins Your fans would love more M/R examples. Do we have something more detailed? Or are there plans to add other language examples to http://docs.basho.com/riak/latest/dev/using/mapreduce/?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants