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

Nicer way to pass arguments to jobs #14

Open
mjwillson opened this issue Apr 9, 2013 · 0 comments
Open

Nicer way to pass arguments to jobs #14

mjwillson opened this issue Apr 9, 2013 · 0 comments

Comments

@mjwillson
Copy link

It would be nice if there was a nicer functional-feeling clojurey way to parameterise jobs with some config parameters. At the moment if I understand correctly I need to specify a :map-setup which rebinds some global state based on config arguments specified on the command line.

Would it be possible to avoid the need for this rebinding, or at least to hide it behind a nicer defjob macro along the lines of:

(defn my-map
  [ngram-order key value]
  ;; ...
  )

(defjob foo
  [config]
  {:map (partial my-map (:ngram-order config))
   ; ... etc ...
  })

Realise there are probably inherent limitations here in the way hadoop instantiates these things, but thought the API feedback might be useful :)

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

1 participant