简体   繁体   中英

Error while map reduce program in python

I am executing the Map reduce program in python on local system and getting the below error:

Password:Traceback (most recent call last):
  File "./wordcount_mapper.py", line 7, in <module>
    filename = os.environ["mapreduce_map_input_file"]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'mapreduce_map_input_file'

Check your environment variable mapreduce_map_input_file to see if it is set.

Type echo $mapreduce_map_input_file in your terminal. If it's not set the terminal won't print out anything.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM