Hadoop Streaming Job failed error in python

前端 未结 6 686
闹比i
闹比i 2020-12-05 07:38

From this guide, I have successfully run the sample exercise. But on running my mapreduce job, I am getting the following error
ERROR streaming.StreamJob: Job not

6条回答
  •  感动是毒
    2020-12-05 08:07

    You need to explicitly instruct that mapper and reducer are used as python script, as we have several options for streaming. You can use either single quotes or double quotes.

    -mapper "python mapper.py" -reducer "python reducer.py" 
    

    or

    -mapper 'python mapper.py' -reducer 'python reducer.py'
    

    The full command goes like this:

    hadoop jar /path/to/hadoop-mapreduce/hadoop-streaming.jar \
    -input /path/to/input \
    -output /path/to/output \
    -mapper 'python mapper.py' \
    -reducer 'python reducer.py' \
    -file /path/to/mapper-script/mapper.py \
    -file /path/to/reducer-script/reducer.py
    

提交回复
热议问题