-3
A
回答
1
这是字面上上的减速机的Hadoop documentation给出的示例。
public class IntSumReducer extends Reducer {
private IntWritable result = new IntWritable();
public void reduce(Key key, Iterable values,
Context context) throws IOException {
int sum = 0;
for (IntWritable val : values) {
sum += val.get();
}
result.set(sum);
context.collect(key, result);
}
}
相关问题
- 1. HbaseTestingUtility和MapReduce作业
- 2. 剖析MapReduce作业
- 3. GAE的MapReduce:定义参数作业
- 4. 为MongoDB调度MapReduce作业
- 5. Avro Mapreduce作业失败org.apache.avro.AvroTypeException
- 6. MapReduce或批处理作业?
- 7. Mapfile作为MapReduce作业的输入
- 8. 为什么AWS MapReduce中的弹性MapReduce作业流失败?
- 9. 亚马逊MapReduce没有reducer作业
- 10. python mapreduce作业返回错误
- 11. 在Hadoop中链接多个MapReduce作业
- 12. 包含HTML标记的Hadoop MapReduce作业
- 13. MapReduce作业所花费的时间
- 14. 在Hadoop mapreduce作业中重用JVM
- 15. 编写一个空的MapReduce作业
- 16. 停止MapReduce作业,RunningJob#killJob vs YarnClient#killApplication
- 17. 远程启动Amazon Elastic MapReduce作业?
- 18. Hadoop MapReduce作业权限被拒绝
- 19. (Hadoop)MapReduce - 链作业 - JobControl不停止
- 20. mapreduce - 找不到带作业ID的MR
- 21. 如何远程运行mapreduce作业
- 22. 配置的MapReduce作业提交
- 23. MapReduce作业中的多个键
- 24. 从jsp运行mapreduce作业servlet
- 25. 使用纯文本输入和avro输出的mapreduce作业
- 26. 使用mapreduce作业连接到MySql数据库时出错
- 27. Mapreduce combinefileinputformat java.lang.reflect.InvocationTargetException当两个作业访问相同的数据时
- 28. 在mapreduce作业中,何时将数据写入磁盘?
- 29. 如何增加WSO2 BAM上的MapReduce作业的数量
- 30. Cassandra和MapReduce - 最低设置要求