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
[ISSUE 2637] Fix jvm_memory_direct_bytes_used metrics when using jdk11+ #3252
Conversation
rerun failure checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a more officially supported way of doing this?
mx bean or something like that.
E.g. I can't tell if this works in JDK 17 or the next one.
...provider/src/main/java/org/apache/bookkeeper/stats/prometheus/PrometheusMetricsProvider.java
Outdated
Show resolved
Hide resolved
e.g. see #3234 : "Starting from JDK17 the reflection is not allowed in the jdk internals modules" |
33e9b35
to
33e3e3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
…1+ (#3252) Fix #2637 #3247 ### Motivation The mertics about `jvm_memory_direct_bytes_used` is acquired by netty's `PlatformDependent#DIRECT_MEMORY_COUNTER`. Which can only acquired the memory used by netty. ### Changes - use `java.nio.Bits#RESERVED_MEMORY` for jvm direct memory metrics. - add tests to ensure `jvm_memory_direct_bytes_max` and `jvm_memory_direct_bytes_used` gets value. (cherry picked from commit cefe9d4)
…1+ (apache#3252) Fix apache#2637 apache#3247 ### Motivation The mertics about `jvm_memory_direct_bytes_used` is acquired by netty's `PlatformDependent#DIRECT_MEMORY_COUNTER`. Which can only acquired the memory used by netty. ### Changes - use `java.nio.Bits#RESERVED_MEMORY` for jvm direct memory metrics. - add tests to ensure `jvm_memory_direct_bytes_max` and `jvm_memory_direct_bytes_used` gets value. (cherry picked from commit cefe9d4)
…1+ (apache#3252) Fix apache#2637 apache#3247 ### Motivation The mertics about `jvm_memory_direct_bytes_used` is acquired by netty's `PlatformDependent#DIRECT_MEMORY_COUNTER`. Which can only acquired the memory used by netty. ### Changes - use `java.nio.Bits#RESERVED_MEMORY` for jvm direct memory metrics. - add tests to ensure `jvm_memory_direct_bytes_max` and `jvm_memory_direct_bytes_used` gets value. (cherry picked from commit cefe9d4)
This may be a breaking change, after this pr. The old user who used jdk8 didn't record the direct memory metrics. |
…1+ (apache#3252) Fix apache#2637 apache#3247 ### Motivation The mertics about `jvm_memory_direct_bytes_used` is acquired by netty's `PlatformDependent#DIRECT_MEMORY_COUNTER`. Which can only acquired the memory used by netty. ### Changes - use `java.nio.Bits#RESERVED_MEMORY` for jvm direct memory metrics. - add tests to ensure `jvm_memory_direct_bytes_max` and `jvm_memory_direct_bytes_used` gets value. (cherry picked from commit cefe9d4) (cherry picked from commit 523ffcf)
Fix #2637 #3247
Motivation
The mertics about
jvm_memory_direct_bytes_used
is acquired by netty'sPlatformDependent#DIRECT_MEMORY_COUNTER
. Which can only acquired the memory used by netty.Changes
java.nio.Bits#RESERVED_MEMORY
for jvm direct memory metrics.jvm_memory_direct_bytes_max
andjvm_memory_direct_bytes_used
gets value.