GitHub user tgravescs opened a pull request:

    https://github.com/apache/spark/pull/94

    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?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tgravescs/spark map_input_file

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/94.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #94
    
----
commit 2ba805ee7af681dce75d203816222779ccff45f2
Author: Thomas Graves <tgra...@apache.org>
Date:   2014-03-06T20:12:26Z

    set map_input_file environment variable in PipedRDD

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to