|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapreduce.Partitioner<ImmutableBytesWritable,VALUE>
org.apache.hadoop.hbase.mapreduce.HRegionPartitioner<KEY,VALUE>
KEY - The type of the key.VALUE - The type of the value.public class HRegionPartitioner<KEY,VALUE>
This is used to partition the output keys into groups of keys. Keys are grouped according to the regions that currently exist so that each reducer fills a single region so load is distributed.
| Constructor Summary | |
|---|---|
HRegionPartitioner()
|
|
| Method Summary | |
|---|---|
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. |
void |
setConf(org.apache.hadoop.conf.Configuration configuration)
Sets the configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HRegionPartitioner()
| Method Detail |
|---|
public int getPartition(ImmutableBytesWritable key,
VALUE value,
int numPartitions)
Typically a hash function on a all or a subset of the key.
getPartition in class 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 in interface org.apache.hadoop.conf.ConfigurableConfigurable.getConf()public void setConf(org.apache.hadoop.conf.Configuration configuration)
setConf in interface org.apache.hadoop.conf.Configurableconfiguration - The configuration to set.Configurable.setConf(
org.apache.hadoop.conf.Configuration)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||