Class PartitionUtils


  • public class PartitionUtils
    extends java.lang.Object
    • Constructor Detail

      • PartitionUtils

        public PartitionUtils()
    • Method Detail

      • calculatePartitionCount

        public static int calculatePartitionCount​(java.lang.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.
      • 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​(java.lang.String partitionerClass,
                                                             VeniceProperties params,
                                                             org.apache.avro.Schema keySchema)