The Hadoop framework does not know how to run your mapper and reducer. There's two possible fixes:
FIX 1: explicitly call python.
-mapper "python mapper.py" -reducer "python reducer.py"
FIX 2: tell Hadoop where to find the python interpreter. To do this, you need to explicitly tell it where to find it, in the top line of your
*.py files. For example:
Hope this helps.
Thanks Abhijit for the answer. Fix 2 was already mentioned in my .py file. But changing -mapper "python /home/cloudera/class3/streaming/mapper.py" to -mapper "python mapper.py" and same to reducer in my command worked for me. Thanks for help.
@Abhishek, thanks for the confirmation.