Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce, mail # user - Hadoop-streaming : PYTHONPATH not working when mapper runs


Copy link to this message
-
Hadoop-streaming : PYTHONPATH not working when mapper runs
Dhanasekaran Anbalagan 2014-01-09, 00:53
Hi Guys,

I have problem when I ran hadoop streaming PYTHONPATH environment variable
not properly getting value. when I try to extend sys.path code level  not
working. It's says KeyError:'PYTHONPATH' In my case I already exported
PYTHONPATH in /etc/bashrc

mapper logs:
=========stderr logs
Traceback (most recent call last):
  File
"/disk1/mapred/local/taskTracker/tech/jobcache/job_201312121801_0053/attempt_201312121801_0053_m_000000_0/work/./cmapper.py",
line 14, in <module>
*    sys.path.extend(os.environ['PYTHONPATH'].split(os.path.pathsep))*
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
*KeyError: 'PYTHONPATH'*
I tried /etc/sudoers file I added PYTHONPATH

Defaults        env_keep ="PYTHONPATH"

also not working.

can you please guide me How to fix this.

-Dhanasekaran.

Did I learn something today? If not, I wasted it.