Class PartitionUtils

java.lang.Object
com.linkedin.venice.utils.PartitionUtils

public class PartitionUtils extends Object
  • Constructor Details

    • PartitionUtils

      public PartitionUtils()
  • Method Details

    • calculatePartitionCount

      public static int calculatePartitionCount(String storeName, long storageQuota, int storePartitionCount, long partitionSize, int minPartitionCount, int maxPartitionCount, boolean isRoundUpEnabled, int roundUpSize)
      Calculate partition count for new version. If store level partition count is not configured (0), calculate the number by storage quota and partition size. Otherwise, use the store level partition count.
    • getVenicePartitioner

      public static VenicePartitioner getVenicePartitioner(PartitionerConfig config)
    • getUserPartitionLevelVenicePartitioner

      public static VenicePartitioner getUserPartitionLevelVenicePartitioner(PartitionerConfig config)
      This util method returns a new venice partitioner that works for user-level partition, regardless of the amplification factor in the partitioner config.
    • getVenicePartitioner

      public static VenicePartitioner getVenicePartitioner(String partitionerClass, String partitionerParamsString)
    • getVenicePartitioner

      public static VenicePartitioner getVenicePartitioner(String partitionerClass, VeniceProperties params)
    • getVenicePartitioner

      public static VenicePartitioner getVenicePartitioner(String partitionerClass, VeniceProperties params, org.apache.avro.Schema keySchema)
    • getVenicePartitioner

      public static VenicePartitioner getVenicePartitioner(VeniceProperties props)