Package com.linkedin.venice.partitioner
Class ConstantVenicePartitioner
java.lang.Object
com.linkedin.venice.partitioner.VenicePartitioner
com.linkedin.venice.partitioner.ConstantVenicePartitioner
-
Nested Class Summary
Nested classes/interfaces inherited from class com.linkedin.venice.partitioner.VenicePartitioner
VenicePartitioner.VenicePartitionerType -
Field Summary
FieldsFields inherited from class com.linkedin.venice.partitioner.VenicePartitioner
props -
Constructor Summary
ConstructorsConstructorDescriptionConstantVenicePartitioner(VeniceProperties properties) ConstantVenicePartitioner(VeniceProperties properties, org.apache.avro.Schema schema) -
Method Summary
Modifier and TypeMethodDescriptionintgetPartitionId(byte[] keyBytes, int numPartitions) A function that returns the partitionId based on the key and partition count.intgetPartitionId(ByteBuffer keyByteBuffer, int numPartitions) Methods inherited from class com.linkedin.venice.partitioner.VenicePartitioner
checkSchema, getPartitionerType, getPartitionId
-
Field Details
-
CONSTANT_PARTITION
- See Also:
-
-
Constructor Details
-
ConstantVenicePartitioner
-
ConstantVenicePartitioner
-
-
Method Details
-
getPartitionId
public int getPartitionId(byte[] keyBytes, int numPartitions) Description copied from class:VenicePartitionerA function that returns the partitionId based on the key and partition count.- Specified by:
getPartitionIdin classVenicePartitioner- Parameters:
keyBytes- - A key that will be mapped into a partitionnumPartitions- - The number of total partitions available in Kafka/storage- Returns:
-
getPartitionId
- Specified by:
getPartitionIdin classVenicePartitioner
-