DomGarguilo commented on code in PR #6429:
URL: https://github.com/apache/accumulo/pull/6429#discussion_r3431076886


##########
server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java:
##########
@@ -1639,6 +1641,15 @@ public TableData 
getServerProcessView(TableDataFactory.TableName table) {
     return null;
   }
 
+  public MetricResponse getServerMetricResponse(ServerId.Type type, String 
resourceGroup,
+      String serverAddress) {
+    return allMetrics.asMap().entrySet().stream().filter(e -> 
e.getKey().getType() == type)
+        .filter(e -> resourceGroup == null || resourceGroup.isBlank()
+            || e.getKey().getResourceGroup().canonical().equals(resourceGroup))
+        .filter(e -> 
e.getKey().toHostPortString().equals(serverAddress)).map(Entry::getValue)
+        .findFirst().orElse(null);

Review Comment:
   Looked into it and I don't think we can as things stand right now. Not all 
callers pass a RG param and ServerId requires one. I think it would be an 
improvement to make that required and make things more strict. Looking into 
that change now.



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