KEY
- The type of the key.VALUE
- The type of the value.@InterfaceAudience.Public @InterfaceStability.Stable public class HRegionPartitioner<KEY,VALUE> extends <any>
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.
Constructor and Description |
---|
HRegionPartitioner() |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
setConf(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.
key
- The key to be partitioned.value
- The entry value.numPartitions
- The total number of partitions.key
.org.apache.hadoop.mapreduce.Partitioner#getPartition(
java.lang.Object, java.lang.Object, int)
public Configuration getConf()
org.apache.hadoop.conf.Configurable#getConf()
public void setConf(Configuration configuration)
configuration
- The configuration to set.org.apache.hadoop.conf.Configurable#setConf(
org.apache.hadoop.conf.Configuration)