Class ConsistentHasher

java.lang.Object
org.apache.druid.server.router.ConsistentHasher

public class ConsistentHasher extends Object
Distributes objects across a set of node keys using consistent hashing. See https://en.wikipedia.org/wiki/Consistent_hashing Not thread-safe.
  • Constructor Details

    • ConsistentHasher

      public ConsistentHasher(com.google.common.hash.HashFunction hashFunction)
  • Method Details

    • updateKeys

      public void updateKeys(Set<String> currentKeys)
    • findKey

      public String findKey(byte[] obj)