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 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 inside
VeniceWriter (e.g. DefaultVenicePartitioner)
to make sure the messages inside each partition belong to the same PubSub topic partition.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(org.apache.hadoop.mapred.JobConf job) protected intgetPartition(org.apache.hadoop.io.BytesWritable key, int numPartitions) intgetPartition(org.apache.hadoop.io.BytesWritable key, org.apache.hadoop.io.BytesWritable value, int numPartitions)
-
Field Details
-
venicePartitioner
-
EMPTY_KEY_LENGTH
public static final int EMPTY_KEY_LENGTH- See Also:
-
-
Constructor Details
-
VeniceMRPartitioner
public VeniceMRPartitioner()
-
-
Method Details
-
getPartition
public int getPartition(org.apache.hadoop.io.BytesWritable key, org.apache.hadoop.io.BytesWritable value, int numPartitions) - Specified by:
getPartitionin 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:
configurein interfaceorg.apache.hadoop.mapred.JobConfigurable
-