inferTokenOwnerFromGossip
public static TokenRetrieverUtils.InferredTokenOwnership inferTokenOwnerFromGossip(com.google.common.collect.ImmutableSet<PriamInstance> allIds,
java.lang.String token,
java.lang.String dc)
Utility method to infer the IP of the owner of a token in a given datacenter. This method
uses Cassandra status information to find the owner. While it is ideal to check all the nodes
in the ring to see if they agree on the IP to be replaced, in large clusters it may affect
the startup performance. This method picks at most 3 random hosts from the ring and see if
they all agree on the IP to be replaced. If not, it returns null.
- Parameters:
allIds
-
token
-
dc
-
- Returns:
- IP of the token owner based on gossip information or null if C* status doesn't
converge.