【Hadoop Streaming:aggregate】
1、实例1
测试文件test.txt
mapper程序:
运行:
$hadoop streaming -input /app/test.txt -output /app/test -mapper ./mapper -reducer aggregate -file mapper -jobconf mapred.reduce.tasks=1 -jobconf mapre.job.name="test"
输出:
a 142
b 20
c 30
d 16