[
https://issues.apache.org/jira/browse/CASSANDRA-19671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17852729#comment-17852729
]
Stefan Miklosovic edited comment on CASSANDRA-19671 at 6/6/24 11:06 AM:
------------------------------------------------------------------------
[~arkn98]
this
{code}
if (!this.isTestTableStatsHolder())
this.initializeKeyspaces(probe, ignore, tableNames);
{code}
looks into
{code}
protected boolean isTestTableStatsHolder() {
return false;
}
{code}
in TableStatsHolder.
However, TableStatsPrinterTest uses "TestTableStatsHolder" (at the bottom of
the class) where "isTestTableStatsHolder" is overriden and it returns true.
Hence, to call initializeKeyspaces, you need "isTestTableStatsHolder" to return
false (so it is evaluated as true and initializeKeyspaces is called). You
probably achieve that by creating similar class to TestTableStatsHolder where
"isTestTableStatsHolder" returns false and you use that one in a test instead
of TestTableStatsHolder.
was (Author: smiklosovic):
[~arkn98]
this
{code}
if (!this.isTestTableStatsHolder())
this.initializeKeyspaces(probe, ignore, tableNames);
{code}
looks into
{code}
protected boolean isTestTableStatsHolder() {
return false;
}
{code}
in TableStatsHolder.
However, TableStatsPrinterTest uses "TestTableStatsHolder" (at the bottom of
the class) where "isTestTableStatsHolder" is overriden and it returns true.
Hence, to call initializeKeyspaces, you need "isTestTableStatsHolder" to return
false (so if is evaluated as true and initializeKeyspaces is called). You
probably achieve that by creating similar class to TestTableStatsHolder where
"isTestTableStatsHolder" returns false and you use that one in a test instead
of TestTableStatsHolder.
> Nodetool tabestats: add keyspace space used and table r/w ratio
> ---------------------------------------------------------------
>
> Key: CASSANDRA-19671
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19671
> Project: Cassandra
> Issue Type: Improvement
> Components: Tool/nodetool
> Reporter: Brad Schoening
> Assignee: Arun Ganesh
> Priority: Low
> Attachments: plaintext-humanreadable.txt, plaintext.txt
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Nodetool tabestats reports the space used live and total per table, but not
> for the entire keyspace. This would be useful information.
> Also, in the table level stats, it would be useful to have the read/write
> ratio. This metric is important in choosing compaction strategies such as
> LCS.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]