ddanielr commented on code in PR #6155:
URL: https://github.com/apache/accumulo/pull/6155#discussion_r2855664349


##########
server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java:
##########
@@ -670,25 +679,26 @@ private Map<HostAndPort,CompactionStats> 
fetchCompactions() {
     return Collections.unmodifiableMap(allCompactions);
   }
 
-  private ExternalCompactionInfo fetchCompactorsInfo() {
+  private ExternalCompactorSnapshot fetchCompactorsInfo() {
     Set<ServerId> compactors =
         getContext().instanceOperations().getServers(ServerId.Type.COMPACTOR);
     log.debug("Found compactors: {}", compactors);
-    ExternalCompactionInfo ecInfo = new ExternalCompactionInfo();
-    ecInfo.setFetchedTimeMillis(System.currentTimeMillis());
-    ecInfo.setCompactors(compactors);
-    ecInfo.setCoordinatorHost(coordinatorHost);
-    return ecInfo;
+    return new ExternalCompactorSnapshot(coordinatorHost, compactors, 
System.currentTimeMillis());

Review Comment:
   A couple of these methods attempt to validate that  `coordinatorHost` is not 
an empty optional. 
   This might be outside the scope of this change, but should a snapshot be 
created if the coordinator doesn't exist? 
   
   
   
   



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