Class ConsistentHashBalancer

java.lang.Object
io.datarouter.client.hbase.balancer.BaseHBaseRegionBalancer
io.datarouter.client.hbase.balancer.imp.ConsistentHashBalancer
All Implemented Interfaces:
Callable<Map<DrRegionInfo<?>,​org.apache.hadoop.hbase.ServerName>>

public class ConsistentHashBalancer
extends BaseHBaseRegionBalancer
  • Field Details

    • BUCKETS_PER_NODE

      public static final Integer BUCKETS_PER_NODE
  • Constructor Details

    • ConsistentHashBalancer

      public ConsistentHashBalancer​(String tableName)
  • Method Details

    • call

      public Map<DrRegionInfo<?>,​org.apache.hadoop.hbase.ServerName> call()
    • buildServerHashRing

      public static SortedMap<Long,​org.apache.hadoop.hbase.ServerName> buildServerHashRing​(DrServerList servers, int numBucketsPerNode)
    • calcServerNameForItem

      public static org.apache.hadoop.hbase.ServerName calcServerNameForItem​(SortedMap<Long,​org.apache.hadoop.hbase.ServerName> consistentHashRing, byte[] consistentHashInput)