Class ConstantVenicePartitioner

java.lang.Object
com.linkedin.venice.partitioner.VenicePartitioner
com.linkedin.venice.partitioner.ConstantVenicePartitioner

public class ConstantVenicePartitioner extends VenicePartitioner
  • Field Details

  • Constructor Details

    • ConstantVenicePartitioner

      public ConstantVenicePartitioner(VeniceProperties properties)
    • ConstantVenicePartitioner

      public ConstantVenicePartitioner(VeniceProperties properties, org.apache.avro.Schema schema)
  • Method Details

    • getPartitionId

      public int getPartitionId(byte[] keyBytes, int numPartitions)
      Description copied from class: VenicePartitioner
      A function that returns the partitionId based on the key and partition count.
      Specified by:
      getPartitionId in class VenicePartitioner
      Parameters:
      keyBytes - - A key that will be mapped into a partition
      numPartitions - - The number of total partitions available in Kafka/storage
      Returns:
    • getPartitionId

      public int getPartitionId(ByteBuffer keyByteBuffer, int numPartitions)
      Specified by:
      getPartitionId in class VenicePartitioner