zentol commented on a change in pull request #13640:
URL: https://github.com/apache/flink/pull/13640#discussion_r505038358
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/util/MetricUtils.java
##########
@@ -214,6 +216,15 @@ static void instantiateNonHeapMemoryMetrics(final
MetricGroup metricGroup) {
instantiateMemoryUsageMetrics(metricGroup, () ->
ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage());
}
+ @VisibleForTesting
+ static void instantiateMetaspaceMemoryMetrics(final MetricGroup
metricGroup) {
+ ManagementFactory.getMemoryPoolMXBeans()
+ .stream()
+ .filter(memoryPoolMXBean ->
"Metaspace".equals(memoryPoolMXBean.getName()))
+ .findFirst()
Review comment:
We should log a debug message if these nothing is found
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]