How to write 'map only' hadoop jobs?

后端 未结 4 2420
误落风尘
误落风尘 2020-12-25 10:36

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

4条回答
  •  佛祖请我去吃肉
    2020-12-25 11:11

    This turns off the reducer.

    job.setNumReduceTasks(0);
    

    http://hadoop.apache.org/docs/current/api/org/apache/hadoop/mapreduce/Job.html#setNumReduceTasks(int)

提交回复
热议问题