java.lang.Object | |
↳ | org.apache.helix.controller.strategy.ConsistentHashingMasterSlaveStrategy |
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ConsistentHashingMasterSlaveStrategy.FnvHash | The default string hash function. | ||||||||||
ConsistentHashingMasterSlaveStrategy.HashFunction | Interface to calculate the hash function value of a string |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calculate the ideal state for list of instances clusters using consistent
hashing.
| |||||||||||
Calculate the ideal state for list of instances clusters using consistent
hashing.
| |||||||||||
Helper function to compare the difference between two hashing buffers
| |||||||||||
Generate the has ring for consistent hashing.
| |||||||||||
Helper function to see how many partitions are mapped to different
instances in two ideal states
| |||||||||||
Helper function to calculate and print the standard deviation of the
partition assignment ideal state, also the min/max of master partitions
that is hosted on each node
| |||||||||||
Uniformly put node values on the hash ring.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Calculate the ideal state for list of instances clusters using consistent hashing.
instanceNames | List of instance names. |
---|---|
partitions | the partition number of the database |
replicas | the replication degree |
resourceName | the name of the database |
hashRingSize | the size of the hash ring used by consistent hashing |
Calculate the ideal state for list of instances clusters using consistent hashing.
instanceNames | List of instance names. |
---|---|
partitions | the partition number of the database |
replicas | the replication degree |
resourceName | the name of the database |
Helper function to compare the difference between two hashing buffers
Generate the has ring for consistent hashing.
instanceNames | List of instance names. |
---|---|
hashRingSize | the size of the hash ring used by consistent hashing |
Helper function to see how many partitions are mapped to different instances in two ideal states
Helper function to calculate and print the standard deviation of the partition assignment ideal state, also the min/max of master partitions that is hosted on each node
Uniformly put node values on the hash ring. Derived from the shuffling algorithm
result | the hash ring array. |
---|---|
nodeValue | the int value to be added to the hash ring this time |
numberOfNodes | number of node values to put on the hash ring array |
randomSeed | the random seed |