Class KeyRangePartitioner
java.lang.Object
org.apache.hadoop.mapreduce.Partitioner<Key,org.apache.hadoop.io.Writable>
org.apache.accumulo.hadoop.mapreduce.partition.KeyRangePartitioner
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
public class KeyRangePartitioner
extends org.apache.hadoop.mapreduce.Partitioner<Key,org.apache.hadoop.io.Writable>
implements org.apache.hadoop.conf.Configurable
Hadoop partitioner that uses ranges based on row keys, and optionally sub-bins based on hashing.
- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.conf.ConfigurationgetConf()intgetPartition(Key key, org.apache.hadoop.io.Writable value, int numPartitions) voidsetConf(org.apache.hadoop.conf.Configuration conf) static voidsetNumSubBins(org.apache.hadoop.mapreduce.Job job, int num) Sets the number of random sub-bins per rangestatic voidsetSplitFile(org.apache.hadoop.mapreduce.Job job, String file) Sets the hdfs file name to use, containing a newline separated list of Base64 encoded split points that represent ranges for partitioning
-
Constructor Details
-
KeyRangePartitioner
public KeyRangePartitioner()
-
-
Method Details
-
getPartition
- Specified by:
getPartitionin classorg.apache.hadoop.mapreduce.Partitioner<Key,org.apache.hadoop.io.Writable>
-
getConf
public org.apache.hadoop.conf.Configuration getConf()- Specified by:
getConfin interfaceorg.apache.hadoop.conf.Configurable
-
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf) - Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable
-
setSplitFile
Sets the hdfs file name to use, containing a newline separated list of Base64 encoded split points that represent ranges for partitioning -
setNumSubBins
public static void setNumSubBins(org.apache.hadoop.mapreduce.Job job, int num) Sets the number of random sub-bins per range
-