Class ConsistentHashBalancer
java.lang.Object
io.datarouter.client.hbase.balancer.BaseHBaseRegionBalancer
io.datarouter.client.hbase.balancer.imp.ConsistentHashBalancer
- All Implemented Interfaces:
java.util.concurrent.Callable<java.util.Map<DrRegionInfo<?>,org.apache.hadoop.hbase.ServerName>>
public class ConsistentHashBalancer extends BaseHBaseRegionBalancer
-
Field Summary
Fields Modifier and Type Field Description static java.lang.IntegerBUCKETS_PER_NODEFields inherited from class io.datarouter.client.hbase.balancer.BaseHBaseRegionBalancer
drhRegionList, drhServerList, entityPartitioner, serverByRegion, tableName -
Constructor Summary
Constructors Constructor Description ConsistentHashBalancer(java.lang.String tableName) -
Method Summary
Modifier and Type Method Description static java.util.SortedMap<java.lang.Long,org.apache.hadoop.hbase.ServerName>buildServerHashRing(DrServerList servers, int numBucketsPerNode)static org.apache.hadoop.hbase.ServerNamecalcServerNameForItem(java.util.SortedMap<java.lang.Long,org.apache.hadoop.hbase.ServerName> consistentHashRing, byte[] consistentHashInput)java.util.Map<DrRegionInfo<?>,org.apache.hadoop.hbase.ServerName>call()Methods inherited from class io.datarouter.client.hbase.balancer.BaseHBaseRegionBalancer
assertRegionCountsConsistent, getServerByRegionStringForDebug, init
-
Field Details
-
BUCKETS_PER_NODE
public static final java.lang.Integer BUCKETS_PER_NODE
-
-
Constructor Details
-
ConsistentHashBalancer
public ConsistentHashBalancer(java.lang.String tableName)
-
-
Method Details
-
call
-
buildServerHashRing
public static java.util.SortedMap<java.lang.Long,org.apache.hadoop.hbase.ServerName> buildServerHashRing(DrServerList servers, int numBucketsPerNode) -
calcServerNameForItem
public static org.apache.hadoop.hbase.ServerName calcServerNameForItem(java.util.SortedMap<java.lang.Long,org.apache.hadoop.hbase.ServerName> consistentHashRing, byte[] consistentHashInput)
-