Class GafferRangePartitioner
- java.lang.Object
-
- org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Writable>
-
- uk.gov.gchq.gaffer.accumulostore.operation.hdfs.handler.job.partitioner.GafferRangePartitioner
-
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
public class GafferRangePartitioner extends org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Writable> implements org.apache.hadoop.conf.ConfigurableCopy ofRangePartitionerbut with a fix for opening the cut points file.
-
-
Constructor Summary
Constructors Constructor Description GafferRangePartitioner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.hadoop.conf.ConfigurationgetConf()intgetPartition(org.apache.hadoop.io.Text 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
-
-
-
Method Detail
-
getPartition
public int getPartition(org.apache.hadoop.io.Text key, org.apache.hadoop.io.Writable value, int numPartitions)- Specified by:
getPartitionin classorg.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,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
public 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- Parameters:
job- the jobfile- the splits file
-
setNumSubBins
public static void setNumSubBins(org.apache.hadoop.mapreduce.Job job, int num)Sets the number of random sub-bins per range- Parameters:
job- the jobnum- the number of sub bins
-
-