[
https://issues.apache.org/jira/browse/CASSANDRA-19022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17852450#comment-17852450
]
Ling Mao commented on CASSANDRA-19022:
--------------------------------------
1. The implementation below is not right.
{code:java}
return BITS_TOTAL_CAPACITY.getLong(null);{code}
Look at the new fixed one:
{code:java}
private static long getFieldValue(Field field, boolean isAtomicLong){code}
2. _*nodetool gcstats*_ aimed to keep the backward compatibility
3. Add a new unit test for *_GcStatsTest_* against GcStats, and the
corresponding docs can be auto-generated
4. The preview:
{code:java}
➜ bin ./nodetool gcstats
Interval (ms) Max GC Elapsed (ms)Total GC Elapsed (ms)Stdev GC Elapsed (ms)
GC Reclaimed (MB) CollectionsTotal Direct Memory Bytes
87658 0 0 NaN
0 0 50670976
➜ bin ./nodetool gcstats -H
Interval (ms) 39248.0
Max GC Elapsed (ms) 0.0
Total GC Elapsed (ms) 0.0
Stdev GC Elapsed (ms) 0.0
GC Reclaimed (MB) 0.0
Collections 0.0
Total Direct Memory Bytes 50670976
Max Direct Memory Bytes 4294967296
Reserved Direct Memory Bytes 50670978{code}
> Nodetool gcstats correctly displays Direct Memory usage and supports printing
> in table format
> ---------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-19022
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19022
> Project: Cassandra
> Issue Type: Bug
> Components: Tool/nodetool
> Reporter: Brad Schoening
> Assignee: Ling Mao
> Priority: Normal
> Fix For: 5.x
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> If {{io.netty.maxDirectMemory}} is not specified, Netty defaults the limit to
> the max heap size. Thus, direct memory in use can be significant.
> However, trying this on two different platform and the result returned in
> gcstats is always -1:
> {noformat}
> Interval (ms) Max GC Elapsed (ms)Total GC Elapsed (ms)Stdev GC Elapsed (ms)
> GC Reclaimed (MB) Collections Direct Memory Bytes
> 2792770717 274 665186 54
> 41276288089024 6120 -1{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]