public class TablePartitioner extends org.apache.hadoop.mapreduce.Partitioner<ByteBufWritableComparable,com.mapr.db.DBDocument> implements org.apache.hadoop.conf.Configurable
| Constructor and Description |
|---|
TablePartitioner() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.conf.Configuration |
getConf()
Returns the current configuration.
|
int |
getPartition(ByteBufWritableComparable key,
com.mapr.db.DBDocument 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.
|
public int getPartition(ByteBufWritableComparable key, com.mapr.db.DBDocument value, int numPartitions)
Typically a hash function on a all or a subset of the key.
getPartition in class org.apache.hadoop.mapreduce.Partitioner<ByteBufWritableComparable,com.mapr.db.DBDocument>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)Copyright © 2015 Mapr Technologies, Inc.. All rights reserved.