Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
316 C HAPTER 15 Big data and MapReduce Enough talk. Let's see this in action. To run the mapper only, enter the following commands in your Linux/ DOS window, not in your Python shell. The file inputFile.txt is in the Ch15 code download. %python mrMean.py --mapper < inputFile.txt You should get an output like this: 1 [100, 0.50956970000000001, 0.34443931307935999] To run the full function, remove the --mapper option. %python mrMean.py < inputFile.txt You'll get a lot of text describing the intermediate steps, and finally the output will be displayed to the screen: . . . streaming final output from c:\users\peter\appdata\local \temp\mrMean.Peter.20110228.172656.279000\output\part-00000 0.50956970000000001 0.34443931307935999 removing tmp directory c:\users\peter\appdata\local\ temp\mrMean.Peter.20110228.172656.279000 To stream the valid output into a file, enter the following command: