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

Config evaluated values #1014

Closed
bholt opened this issue Aug 12, 2014 · 0 comments
Closed

Config evaluated values #1014

bholt opened this issue Aug 12, 2014 · 0 comments

Comments

@bholt
Copy link
Contributor

bholt commented Aug 12, 2014

The whole "hadoop.tmp.dir" situation has exposed something I didn't realize about Config and Hadoop's JobConf. Apparently when you call JobConf.get, it evaluates any variables in it. But the way we extract key/values from JobConf, we don't get this behavior:

scalding> val jc = new org.apache.hadoop.mapred.JobConf
scalding> jc.get("hadoop.tmp.dir")
res0: java.lang.String = /tmp/hadoop-bholt

scalding> val c = Config.fromHadoop(jc)
scalding> c.get("hadoop.tmp.dir")
res1: Option[String] = Some(/tmp/hadoop-${user.name})

It seems to work out alright in some situations, since Hadoop/Cascading must be evaluating it to get the actual path later. But this causes validateSources to fail when "strict" is set on the mode.

Seems like it would be preferable to force Hadoop to evaluate each of these values in Config.fromHadoop(). @johnynek (or anyone else): do you forsee any problems with this?

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