本文介绍了如何写'仅地图'hadoop工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是hadoop的新手,我对map-reduce编程的风格很熟悉,但现在我遇到了一个问题:有时候我只需要映射一个工作,我只需要map结果直接作为输出,这意味着减少阶段在这里是不需要的,我怎样才能达到目的?
这会关闭reducer。 job.setNumReduceTasks(0);
I'm a novice on hadoop, I'm getting familiar to the style of map-reduce programing but now I faced a problem : Sometimes I need only map for a job and I only need the map result directly as output, which means reduce phase is not needed here, how can I achive that?
解决方案
This turns off the reducer.
job.setNumReduceTasks(0);
这篇关于如何写'仅地图'hadoop工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!