KEY - The type of the key.VALUE - The type of the value.@InterfaceAudience.Public @InterfaceStability.Stable public class HRegionPartitioner<KEY,VALUE> extends org.apache.hadoop.mapreduce.Partitioner<ImmutableBytesWritable,VALUE> implements org.apache.hadoop.conf.Configurable
This class is not suitable as partitioner creating hfiles
for incremental bulk loads as region spread will likely change between time of
hfile creation and load time. See LoadIncrementalHFiles
and Bulk Load.
| 构造器和说明 |
|---|
HRegionPartitioner() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.hadoop.conf.Configuration |
getConf()
Returns the current configuration.
|
int |
getPartition(ImmutableBytesWritable key,
VALUE value,
int numPartitions)
Gets the partition number for a given key (hence record) given the total
number of partitions i.e. number of reduce-tasks for the job.
|
void |
setConf(org.apache.hadoop.conf.Configuration configuration)
Sets the configuration.
|
public int getPartition(ImmutableBytesWritable key, VALUE value, int numPartitions)
Typically a hash function on a all or a subset of the key.
getPartition 在类中 org.apache.hadoop.mapreduce.Partitioner<ImmutableBytesWritable,VALUE>key - The key to be partitioned.value - The entry value.numPartitions - The total number of partitions.key.Partitioner.getPartition(
java.lang.Object, java.lang.Object, int)public org.apache.hadoop.conf.Configuration getConf()
getConf 在接口中 org.apache.hadoop.conf.ConfigurableConfigurable.getConf()public void setConf(org.apache.hadoop.conf.Configuration configuration)
setConf 在接口中 org.apache.hadoop.conf.Configurableconfiguration - The configuration to set.Configurable.setConf(
org.apache.hadoop.conf.Configuration)Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.