1

My hadoop streaming map-reduce jobs on Amazon EMR keep failing with the following error:

java.lang.RuntimeException: PipeMapRed.waitOutputThreads(): subprocess failed with code 143
    at org.apache.hadoop.streaming.PipeMapRed.waitOutputThreads(PipeMapRed.java:372)
    at org.apache.hadoop.streaming.PipeMapRed.mapRedFinished(PipeMapRed.java:586)
    at org.apache.hadoop.streaming.PipeMapper.close(PipeMapper.java:135)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
    at org.apache.hadoop.streaming.PipeMapRunner.run(PipeMapRunner.java:36)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:441)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:377)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1132)
    at org.apache.hadoop.mapred.Child.main(Child.java:249)

From what I have read online it appears that this is related to a SIGTERM being sent to the task (See this thread here). I have tried experimenting with --jobconf "mapred.task.timeout=X" but still receive the same error for values of X even up to an hour. I have also tried reporting reporter:status:<message> at regular intervals to the STDERR as described in the streaming docs. This also however does nothing to prevent this error occurring. As far as I can see my process starts and begins working initially as I get the expected output being produced in log files. Each task attempt however always ends in this error.

This is the code I am using to launch my streaming job with make:

instances  = 50
type       = m1.small
bid        = 0.010
maptasks   = 20000
timeout    = 3600000

hadoop: upload_scripts upload_data
    emr -c ~/.ec2/credentials.json \
        --create \
        --name "Run $(maptasks) jobs with $(timeout) minute timeout and no reducer" \
        --instance-group master \
        --instance-type $(type) \
        --instance-count 1      \
        --instance-group core   \
        --instance-type $(type) \
        --instance-count 1      \
        --instance-group task         \
        --instance-type $(type)       \
        --instance-count $(instances) \
        --bid-price $(bid)            \
        --bootstrap-action $(S3-srpt)$(bootstrap-database) \
        --args "$(database)","$(http)/data","$(hadoop)"    \
        --bootstrap-action $(S3-srpt)$(bootstrap-phmmer)   \
        --args "$(hadoop)"                                 \
        --stream \
        --jobconf "mapred.map.tasks=$(maptasks)"   \
        --jobconf "mapred.task.timeout=$(timeout)" \
        --input $(S3-data)$(database)                                      \
        --output $(S3-otpt)$(shell date +%Y-%m-%d-%H-%M-%S)                \
        --mapper '$(S3-srpt)$(mapper-phmmer) $(hadoop)/$(database) $(hadoop)/phmmer' \
        --reducer NONE
Michael Barton
  • 8,868
  • 9
  • 35
  • 43

0 Answers0