You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "Maxwell-Guo (via GitHub)" <gi...@apache.org> on 2023/06/13 03:10:07 UTC

[GitHub] [cassandra] Maxwell-Guo commented on a diff in pull request #2375: CASSANDRA-18305 4.0 - Enhance nodetool compactionstats

Maxwell-Guo commented on code in PR #2375:
URL: https://github.com/apache/cassandra/pull/2375#discussion_r1227472243


##########
src/java/org/apache/cassandra/tools/nodetool/CompactionStats.java:
##########
@@ -48,37 +50,73 @@ public class CompactionStats extends NodeToolCmd
     public void execute(NodeProbe probe)
     {
         PrintStream out = probe.output().out;
+        TableBuilder tableBuilder = new TableBuilder();
+        pendingTasksAndConcurrentCompactorsStats(probe, tableBuilder);
+        compactionsCompletedStats(probe, tableBuilder);
+        compactionThroughputStats(probe, tableBuilder);
+        tableBuilder.printTo(out);
         CompactionManagerMBean cm = probe.getCompactionManagerProxy();
+        reportCompactionTable(cm.getCompactions(), probe.getCompactionThroughput(), humanReadable, out, tableBuilder);
+    }
+
+    private void pendingTasksAndConcurrentCompactorsStats(NodeProbe probe, TableBuilder tableBuilder)
+    {
         Map<String, Map<String, Integer>> pendingTaskNumberByTable =
-            (Map<String, Map<String, Integer>>) probe.getCompactionMetric("PendingTasksByTableName");
-        int numTotalPendingTask = 0;
+                (Map<String, Map<String, Integer>>) probe.getCompactionMetric("PendingTasksByTableName");

Review Comment:
   Shouldn't the 4 spaces be removed at the beginning of line 65?



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org