Skip to content

Commit

Permalink
exclude nodes that don't have tokens (coordinators)
Browse files Browse the repository at this point in the history
  • Loading branch information
adejanovski committed Oct 23, 2023
1 parent 7b5f26a commit 860853e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,11 @@ public Map<String, String> getTokenToEndpointMap() {
Map<String, String> tokenMap = new HashMap<>();
for (Map<String, String> states : epStates.getEntity()) {
String ip = states.get("ENDPOINT_IP");
for (String token : states.get("TOKENS").split(",")) {
tokenMap.put(token, ip);
if (!states.getOrDefault("TOKENS", "null").equals("null")) {
LOG.info("Endpoint IP: {} has tokens: {}", ip, states.get("TOKENS"));
for (String token : states.get("TOKENS").split(",")) {
tokenMap.put(token, ip);
}
}
}
return tokenMap;
Expand Down

0 comments on commit 860853e

Please sign in to comment.