Class VeniceMRPartitioner
- java.lang.Object
-
- com.linkedin.venice.hadoop.mapreduce.datawriter.partition.VeniceMRPartitioner
-
- All Implemented Interfaces:
org.apache.hadoop.mapred.JobConfigurable
,org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>
- Direct Known Subclasses:
KafkaInputMRPartitioner
public class VeniceMRPartitioner extends java.lang.Object implements org.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>
VeniceMRPartitioner
will use the exact same partitioner as the one that will be used insideVeniceWriter
(e.g.DefaultVenicePartitioner
) to make sure the messages inside each partition belong to the same PubSub topic partition.
-
-
Field Summary
Fields Modifier and Type Field Description static int
EMPTY_KEY_LENGTH
protected VenicePartitioner
venicePartitioner
-
Constructor Summary
Constructors Constructor Description VeniceMRPartitioner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(org.apache.hadoop.mapred.JobConf job)
protected int
getPartition(org.apache.hadoop.io.BytesWritable key, int numPartitions)
int
getPartition(org.apache.hadoop.io.BytesWritable key, org.apache.hadoop.io.BytesWritable value, int numPartitions)
-
-
-
Field Detail
-
venicePartitioner
protected VenicePartitioner venicePartitioner
-
EMPTY_KEY_LENGTH
public static final int EMPTY_KEY_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPartition
public int getPartition(org.apache.hadoop.io.BytesWritable key, org.apache.hadoop.io.BytesWritable value, int numPartitions)
- Specified by:
getPartition
in interfaceorg.apache.hadoop.mapred.Partitioner<org.apache.hadoop.io.BytesWritable,org.apache.hadoop.io.BytesWritable>
-
getPartition
protected int getPartition(org.apache.hadoop.io.BytesWritable key, int numPartitions)
-
configure
public void configure(org.apache.hadoop.mapred.JobConf job)
- Specified by:
configure
in interfaceorg.apache.hadoop.mapred.JobConfigurable
-
-