keith-turner commented on code in PR #4861:
URL: https://github.com/apache/accumulo/pull/4861#discussion_r1759113750


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java:
##########
@@ -234,20 +235,14 @@ public Set<String> getScanServers() {
 
   @Override
   public List<String> getTabletServers() {
-    ZooCache cache = context.getZooCache();
-    String path = context.getZooKeeperRoot() + Constants.ZTSERVERS;
+    Set<ServiceLockPath> paths =
+        context.getServerPaths().getTabletServer(Optional.empty(), 
Optional.empty());
     List<String> results = new ArrayList<>();
-    for (String candidate : cache.getChildren(path)) {
-      var children = cache.getChildren(path + "/" + candidate);
-      if (children != null && !children.isEmpty()) {
-        var copy = new ArrayList<>(children);
-        Collections.sort(copy);
-        var data = cache.get(path + "/" + candidate + "/" + copy.get(0));
-        if (data != null && !"manager".equals(new String(data, UTF_8))) {
-          results.add(candidate);
-        }
+    paths.forEach(p -> {
+      if (!p.getServer().equals("manager")) {

Review Comment:
   Ok I will do some digging and see if I can figure anything out.  Hopefully 
its no longer needed and can be dropped.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to