Hadoop Streaming Confidential

Warning: This is a short tech article.  To my usual readers that come here to read my cute daddy-daughter stories, please feel free to skip this one.

If you are working with hadoop streaming with python and see the following error in your logs:

Caused by: java.io.IOException: Cannot run program "my_mapper.py": error=2, 
    No such file or directory

What you should do is check the shebang at the top of your python script.  And make sure that the python executable is located in the same location on EVERY node of your cluster.

So, if your shebang is:

#!/opt/python/bin/python

Verify that /opt/python/bin/python is located exists on every node. Otherwise, when you try to run your hadoop streaming job, you’ll receive the error from above, when one of the nodes tries to run the python script.

Let me know in the comments below if this helped you. Thanks.

Advertisements
This entry was posted in coding, hadoop and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s