twitter/scalding — pull request #1003 by bholt (2014-08-06 01:07:45+00:00)
Title: Bug Fix: REPL tmp directory for sequence files

This PR is meant to make it into Twitter internal more quickly than the usual release cycle because it addresses a blocking issue with using the REPL.

Snapshots from different users were all being created in `/tmp/scalding-repl/`, which causes permissions problems (whoever creates it first owns it and no one else can add their own snapshots). This patch pulls in "hadoop.tmp.dir" from the hadoop config to determine the correct temporary directory.

@johnynek: This borrows your code from the ExecutionMonad PR. However, `Config.default` doesn't incorporate what's in `JobConf`, so to get `hadoop.tmp.dir` I had to grab the JobConf from the mode. I think this same problem will apply to what's in `develop`. Instead of doing this in `replConfig`, should `Config.default` be changed to use the implicit mode to grab JobConf?