-1

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'
Aquarius24
  • 1,806
  • 6
  • 33
  • 61

1 Answers1

0

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.

Luan Nguyen
  • 993
  • 6
  • 14
  • 1
    yes it is blank, can you tell me how to set it as i am new to map reduce – Aquarius24 Sep 20 '15 at 13:59
  • That is the input file to your Map Reduce program. So you would just need to set it to the path to your input file. – Luan Nguyen Sep 20 '15 at 14:02
  • Anyway, you should read the tutorial you're following again or find any related tutorials online about this. Surely they will have some example files for you to play with – Luan Nguyen Sep 20 '15 at 14:03