Package com.linkedin.venice.utils
Class PartitionUtils
- java.lang.Object
-
- com.linkedin.venice.utils.PartitionUtils
-
public class PartitionUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PartitionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.static VenicePartitioner
getVenicePartitioner(PartitionerConfig config)
static VenicePartitioner
getVenicePartitioner(VeniceProperties props)
static VenicePartitioner
getVenicePartitioner(java.lang.String partitionerClass, VeniceProperties params)
static VenicePartitioner
getVenicePartitioner(java.lang.String partitionerClass, VeniceProperties params, org.apache.avro.Schema keySchema)
-
-
-
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.
-
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(java.lang.String partitionerClass, VeniceProperties params)
-
getVenicePartitioner
public static VenicePartitioner getVenicePartitioner(java.lang.String partitionerClass, VeniceProperties params, org.apache.avro.Schema keySchema)
-
getVenicePartitioner
public static VenicePartitioner getVenicePartitioner(VeniceProperties props)
-
-