ctubbsii commented on code in PR #5350:
URL: https://github.com/apache/accumulo/pull/5350#discussion_r1972465412


##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java:
##########
@@ -534,12 +534,10 @@ static TabletMetadata create(String id, String 
prevEndRow, String endRow) {
   public static synchronized Set<TServerInstance> 
getLiveTServers(ClientContext context) {
     final Set<TServerInstance> liveServers = new HashSet<>();
 
-    final String path = context.getZooKeeperRoot() + Constants.ZTSERVERS;
-
-    for (String child : context.getZooCache().getChildren(path)) {
-      checkServer(context, path, child).ifPresent(liveServers::add);
+    for (String child : 
context.getZooCache().getChildren(Constants.ZTSERVERS)) {
+      checkServer(context, Constants.ZTSERVERS, 
child).ifPresent(liveServers::add);
     }
-    log.trace("Found {} live tservers at ZK path: {}", liveServers.size(), 
path);
+    log.trace("Found {} live tservers at ZK path: {}", liveServers.size(), 
Constants.ZTSERVERS);

Review Comment:
   The whole point of this is to avoid passing around the pieces of the path 
that we don't need to pass around, like instanceId. So, there is no full path 
to get... it's always a path relative to the ZooKeeper connectString. So, the 
constant *is* the full path (at least, the full path that any of this code has 
any knowledge of).



-- 
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