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


##########
server/base/src/main/java/org/apache/accumulo/server/util/serviceStatus/ServiceStatusReport.java:
##########
@@ -69,46 +73,79 @@ public Map<ReportKey,StatusSummary> getSummaries() {
   }
 
   public String toJson() {
-    return gson.toJson(this, ServiceStatusReport.class);
+    // return gson.toJson(this, ServiceStatusReport.class);
+
+    Map<ReportKey,StatusSummary> noHostSummaries = 
summaries.entrySet().stream().collect(Collectors
+        .toMap(Map.Entry::getKey, e -> e.getValue().withoutHosts(), (a, b) -> 
b, TreeMap::new));
+    ServiceStatusReport noHostReport = new 
ServiceStatusReport(noHostSummaries, false);
+    return gson.toJson(noHostReport, ServiceStatusReport.class);
   }
 
   public static ServiceStatusReport fromJson(final String json) {
     return gson.fromJson(json, ServiceStatusReport.class);
   }
 
+  public String toCsv() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("Service, Resource Group, Host Count, Hosts, Error Count\n");

Review Comment:
   Remove the extra spaces in the header row
   ```suggestion
       sb.append("Service,Resource Group,Host Count,Hosts,Error Count\n");
   ```



-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to