Class MurmurPartitionFunction
- java.lang.Object
-
- org.apache.pinot.segment.spi.partition.MurmurPartitionFunction
-
- All Implemented Interfaces:
Serializable,PartitionFunction
public class MurmurPartitionFunction extends Object implements PartitionFunction
Implementation ofPartitionFunctionwhich partitions based on 32 bit murmur hash- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MurmurPartitionFunction(int numPartitions)Constructor for the class.
-
Method Summary
Modifier and Type Method Description StringgetName()Returns the name of the partition function.intgetNumPartitions()Returns the total number of possible partitions.intgetPartition(Object value)Method to compute and return partition id for the given value.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.pinot.segment.spi.partition.PartitionFunction
getFunctionConfig
-
-
-
-
Method Detail
-
getPartition
public int getPartition(Object value)
Description copied from interface:PartitionFunctionMethod to compute and return partition id for the given value.- Specified by:
getPartitionin interfacePartitionFunction- Parameters:
value- Value for which to determine the partition id.- Returns:
- partition id for the value.
-
getName
public String getName()
Description copied from interface:PartitionFunctionReturns the name of the partition function.- Specified by:
getNamein interfacePartitionFunction- Returns:
- Name of the partition function.
-
getNumPartitions
public int getNumPartitions()
Description copied from interface:PartitionFunctionReturns the total number of possible partitions.- Specified by:
getNumPartitionsin interfacePartitionFunction- Returns:
- Number of possible partitions.
-
-