Partitioner类中的参数numPartitions

时间:2012-06-18 10:54:48

标签: hadoop mapreduce partitioner

大师!

任何人都可以回答:Partitioner类中定义的参数numPartitions(此参数的值)?

3 个答案:

答案 0 :(得分:3)

这是为Map Reduce作业定义的缩减器数量

答案 1 :(得分:0)

你是说那个意思吗? numPartition in partition class。我刚刚使用了搜索there

* @param numPartitions the total number of partitions. (as integer)
* [...] The total number of partitions 
* is the same as the number of reduce tasks for the job. 

答案 2 :(得分:0)

在Driver类中,您将提到作业所需的减速器数量。该计数称为numPartion计数。 像:

job.setNumReduceTasks(4);