1
我正在用python编写map reduce程序。映射器工作时,我用它运行完美的罚款 -输入记录不匹配python mapreduce中的输出记录
cat input.csv|python mapper.py > output.tsv
但是,当我使用下面的命令运行它,我没有得到期望的输出 -
nohup hadoop jar /opt/mapr/hadoop/hadoop-2.7.0/share/hadoop/tools/lib/hadoop-streaming-2.7.0-mapr-1607.jar -Dmapreduce.job.queuename=queue_name -Dmapred.map.tasks=1000 -Dmapred.reduce.tasks=0 -input /path/sample_reduce.csv -output /path/map_output -mapper "mapper_try.py" -reducer NONE -file mapper_try.py > mapp_try2.out &
上面说的是工作已成功完成,但我还得到以下内容 -
Map-Reduce Framework
Map input records=1096
Map output records=92
Input split bytes=122610
Spilled Records=0
Failed Shuffles=0
Merged Map outputs=0
GC time elapsed (ms)=0
CPU time spent (ms)=840560
Physical memory (bytes) snapshot=353314721792
Virtual memory (bytes) snapshot=4310996582400
Total committed heap usage (bytes)=2036214005760
我无法解决输入记录与输出记录不匹配的问题。输出文件全部创建,92个文件各有1行,其他文件为空。请求帮助。在此先感谢...
试过了,没有成功 –