alexott/clojure-hadoop — pull request #17 by va1en0k (2013-08-03 08:54:51+00:00)
Title: Allow calculated params in defjob (relax args checking)

Hey there!

`defjob` won't allow constructs like `:output (str "/tmp/" (System/currentTimeMillis))`. This is a little bit annoying, and I don't really see the point of disallowing calculation of config values during runtime (especially since one can do that by replacing `defjob` with a simple function or something like that, losing (alleged) purity of DSL in the process).

This fixes the problem. I tried to preserve the fact that config defined with `defjob` stays constant though, so the code in `defjob` runs only once – to me, that seems desirable, but I'm not sure.

Tests are included.

I also think the API would benefit if args checking/conversion was pushed down the call stack, happening closer to `config/conf` instead of in `defjob` (as it's not the only entry point for config), but I may be unaware of some subtle considerations against that – what do you think?