Package com.linkedin.venice.utils
Class PartitionUtils
java.lang.Object
com.linkedin.venice.utils.PartitionUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
calculatePartitionCount
(String storeName, long storageQuota, int storePartitionCount, long partitionSize, int minPartitionCount, int maxPartitionCount, boolean isRoundUpEnabled, int roundUpSize) Calculate partition count for new version.static VenicePartitioner
This util method returns a new venice partitioner that works for user-level partition, regardless of the amplification factor in the partitioner config.static VenicePartitioner
static VenicePartitioner
static VenicePartitioner
getVenicePartitioner
(String partitionerClass, VeniceProperties params) static VenicePartitioner
getVenicePartitioner
(String partitionerClass, VeniceProperties params, org.apache.avro.Schema keySchema) static VenicePartitioner
getVenicePartitioner
(String partitionerClass, String partitionerParamsString)
-
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
-
getUserPartitionLevelVenicePartitioner
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
-