-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. SecondaryNamenode和MapReduce作业
- 3. Normal MapReduce作业和Sequential MapReduce作业有什么区别和相似之处?
- 4. 剖析MapReduce作业
- 5. Mapreduce - 序列作业?
- 6. 多个MapReduce作业
- 7. Spring MVC和Apache Hadoop启动MapReduce作业
- 8. MapReduce或批处理作业?
- 9. Avro Mapreduce作业失败org.apache.avro.AvroTypeException
- 10. 为MongoDB调度MapReduce作业
- 11. log4j for hbase mapreduce作业
- 12. 并行执行mapreduce作业
- 13. 用于mapreduce作业的StreamInputFormat
- 14. GAE的MapReduce:定义参数作业
- 15. Mapfile作为MapReduce作业的输入
- 16. 如何在AWS中为hadoop Mapreduce作业创建作业jar
- 17. 通过作业名称或id查找hadoop mapreduce作业
- 18. 使用MapReduce作业的HBase批量删除作业
- 19. 使用相同的mapreduce代码/ jar启动多个mapreduce作业
- 20. 为什么AWS MapReduce中的弹性MapReduce作业流失败?
- 21. 包含HTML标记的Hadoop MapReduce作业
- 22. 使用MapReduce作业调用StanfordCoreNLP API
- 23. MapReduce作业所花费的时间
- 24. 命令行编译mapreduce作业
- 25. 在Hadoop中链接多个MapReduce作业
- 26. MapReduce Hadoop作业的全面进展
- 27. (Hadoop)MapReduce - 链作业 - JobControl不停止
- 28. 无法使用YARN运行MapReduce作业
- 29. 使用oozie运行多个mapreduce作业?
- 30. 停止MapReduce作业,RunningJob#killJob vs YarnClient#killApplication