public class RangePartitioner
extends org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Writable>
implements org.apache.hadoop.conf.Configurable
Constructor and Description |
---|
RangePartitioner() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.conf.Configuration |
getConf() |
int |
getPartition(org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Writable value,
int numPartitions) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
static void |
setNumSubBins(org.apache.hadoop.mapreduce.Job job,
int num)
Sets the number of random sub-bins per range
|
static void |
setSplitFile(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
|
public int getPartition(org.apache.hadoop.io.Text key, org.apache.hadoop.io.Writable value, int numPartitions)
getPartition
in class org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Writable>
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public static void setSplitFile(org.apache.hadoop.mapreduce.Job job, String file)
public static void setNumSubBins(org.apache.hadoop.mapreduce.Job job, int num)
Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.