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


##########
server/base/src/main/java/org/apache/accumulo/server/util/ServiceStatusCmd.java:
##########
@@ -59,19 +59,24 @@ public void execute(final ServerContext context, final 
boolean json, final boole
 
     ZooReader zooReader = context.getZooSession().asReader();
 
-    final String zooRoot = context.getZooKeeperRoot();
-    LOG.trace("zooRoot: {}", zooRoot);
+    LOG.trace("zooRoot: {}", "");
 
     final Map<ServiceStatusReport.ReportKey,StatusSummary> services = new 
TreeMap<>();
 
-    services.put(ServiceStatusReport.ReportKey.MANAGER, 
getManagerStatus(zooReader, zooRoot));
-    services.put(ServiceStatusReport.ReportKey.MONITOR, 
getMonitorStatus(zooReader, zooRoot));
-    services.put(ServiceStatusReport.ReportKey.T_SERVER, 
getTServerStatus(zooReader, zooRoot));
-    services.put(ServiceStatusReport.ReportKey.S_SERVER, 
getScanServerStatus(zooReader, zooRoot));
-    services.put(ServiceStatusReport.ReportKey.COORDINATOR,
-        getCoordinatorStatus(zooReader, zooRoot));
-    services.put(ServiceStatusReport.ReportKey.COMPACTOR, 
getCompactorStatus(zooReader, zooRoot));
-    services.put(ServiceStatusReport.ReportKey.GC, getGcStatus(zooReader, 
zooRoot));
+    services.put(ServiceStatusReport.ReportKey.MANAGER, getStatusSummary(
+        ServiceStatusReport.ReportKey.MANAGER, zooReader, 
Constants.ZMANAGER_LOCK));
+    services.put(ServiceStatusReport.ReportKey.MONITOR, getStatusSummary(
+        ServiceStatusReport.ReportKey.MONITOR, zooReader, 
Constants.ZMONITOR_LOCK));
+    services.put(ServiceStatusReport.ReportKey.T_SERVER, 
getServerHostStatus(zooReader,
+        Constants.ZTSERVERS, ServiceStatusReport.ReportKey.T_SERVER, TSERV));
+    services.put(ServiceStatusReport.ReportKey.S_SERVER, 
getServerHostStatus(zooReader,
+        Constants.ZSSERVERS, ServiceStatusReport.ReportKey.S_SERVER, 
TABLET_SCAN));
+    services.put(ServiceStatusReport.ReportKey.COORDINATOR, getStatusSummary(
+        ServiceStatusReport.ReportKey.COORDINATOR, zooReader, 
Constants.ZCOORDINATOR_LOCK));
+    services.put(ServiceStatusReport.ReportKey.COMPACTOR,
+        getCompactorHosts(zooReader, Constants.ZCOMPACTORS));
+    services.put(ServiceStatusReport.ReportKey.GC,
+        getStatusSummary(ServiceStatusReport.ReportKey.GC, zooReader, 
Constants.ZGC_LOCK));

Review Comment:
   Fixed. Added a mapping of ReportKeys to ZKPath Constants to 
`ServiceStatusReport` to be able to get the path that matches the ReportKey 
from within the `ServiceStatusCmd `methods.



##########
server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java:
##########
@@ -210,7 +210,7 @@ protected void getCoordinatorLock(HostAndPort clientAddress)
     LOG.info("trying to get coordinator lock");
 
     final String coordinatorClientAddress = 
ExternalCompactionUtil.getHostPortString(clientAddress);
-    final String lockPath = getContext().getZooKeeperRoot() + 
Constants.ZCOORDINATOR_LOCK;
+    final String lockPath = Constants.ZCOORDINATOR_LOCK;

Review Comment:
   Fixed.



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