diff options
author | Thomas Graves <tgraves@apache.org> | 2014-03-07 10:36:55 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-03-07 10:36:55 -0800 |
commit | b7cd9e992cbc2e649534a2cdf9b8bde2c1ee26bd (patch) | |
tree | ac2a9164c182f753611d6f5326834f1895d460e6 /python | |
parent | dabeb6f160f7ad7df1c54b1b8b069700dd4b74dd (diff) | |
download | spark-b7cd9e992cbc2e649534a2cdf9b8bde2c1ee26bd.tar.gz spark-b7cd9e992cbc2e649534a2cdf9b8bde2c1ee26bd.tar.bz2 spark-b7cd9e992cbc2e649534a2cdf9b8bde2c1ee26bd.zip |
SPARK-1195: set map_input_file environment variable in PipedRDD
Hadoop uses the config mapreduce.map.input.file to indicate the input filename to the map when the input split is of type FileSplit. Some of the hadoop input and output formats set or use this config. This config can also be used by user code.
PipedRDD runs an external process and the configs aren't available to that process. Hadoop Streaming does something very similar and the way they make configs available is exporting them into the environment replacing '.' with '_'. Spark should also export this variable when launching the pipe command so the user code has access to that config.
Note that the config mapreduce.map.input.file is the new one, the old one which is deprecated but not yet removed is map.input.file. So we should handle both.
Perhaps it would be better to abstract this out somehow so it goes into the HadoopParition code?
Author: Thomas Graves <tgraves@apache.org>
Closes #94 from tgravescs/map_input_file and squashes the following commits:
cc97a6a [Thomas Graves] Update test to check for existence of command, add a getPipeEnvVars function to HadoopRDD
e3401dc [Thomas Graves] Merge remote-tracking branch 'upstream/master' into map_input_file
2ba805e [Thomas Graves] set map_input_file environment variable in PipedRDD
Diffstat (limited to 'python')
0 files changed, 0 insertions, 0 deletions