public class HashPartitioner<K2,V2> extends Object implements Partitioner<K2,V2>
Object.hashCode()
.构造器和说明 |
---|
HashPartitioner() |
public void configure(JobConf job)
JobConfigurable
JobConf
.configure
在接口中 JobConfigurable
job
- the configurationpublic int getPartition(K2 key, V2 value, int numReduceTasks)
Object.hashCode()
to partition.getPartition
在接口中 Partitioner<K2,V2>
key
- the key to be paritioned.value
- the entry value.numReduceTasks
- the total number of partitions.key
.Copyright © 2009 The Apache Software Foundation