Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASSANDRA-18305 4.0 - Enhance nodetool compactionstats #2375

Closed
wants to merge 3 commits into from

Conversation

mghildiy
Copy link
Contributor

@mghildiy mghildiy commented May 27, 2023

Enhance nodetool compactionstats with existing MBean metrics

Print some more metrics related to compaction:

- Compactions completed, and different meter rates
- Concurrent compactors
- compactions completed                    
- data compacted                
- compactions aborted                    
- compactions reduced


patch by @mghildiy

The Cassandra Jira

for (Entry<String, Integer> tableEntry : ksEntry.getValue().entrySet())
numTotalPendingTask += tableEntry.getValue();
{
toPrint.append("- " + ksName + '.' + tableEntry.getKey() + ": " + tableEntry.getValue());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use String format?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was missed?

Copy link
Contributor Author

@mghildiy mghildiy Jun 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not latest. Tablebuilder is used in latest changes. I pushed those changes few days back. I am not aure why they are not visible. Let me check.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, the other commit is on top of this one, okay, that works.

@smiklosovic smiklosovic changed the title CASSANDRA-18305: Enhance nodetool compactionstats for cassandra 4.0 CASSANDRA-18305 4.0 - Enhance nodetool compactionstats Jun 6, 2023
for (Entry<String, Integer> tableEntry : ksEntry.getValue().entrySet())
numTotalPendingTask += tableEntry.getValue();
{
toPrint.append("- " + ksName + '.' + tableEntry.getKey() + ": " + tableEntry.getValue());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was missed?

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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants