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 4de4242
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);
LOG.info("Endpoint IP: {} has tokens: {}", ip, states.get("TOKENS"));
if (!states.getOrDefault("TOKENS", "").equals("")) {
for (String token : states.get("TOKENS").split(",")) {
tokenMap.put(token, ip);
}
}
}
return tokenMap;
Expand Down

0 comments on commit 4de4242

Please sign in to comment.