Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2902#discussion_r90175096
--- Diff:
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/TaskManagersHandler.java
---
@@ -124,13 +124,21 @@ public String handleJsonRequest(Map<String, String>
pathParams, Map<String, Stri
gen.writeNumberField("totalUsed", heapUsed + nonHeapUsed);
gen.writeNumberField("totalMax", heapTotal + nonHeapTotal);
-
gen.writeStringField("directCount",
metrics.getMetric("Status.JVM.Memory.Direct.Count", "0"));
-
gen.writeStringField("directUsed",
metrics.getMetric("Status.JVM.Memory.Direct.MemoryUsed", "0"));
-
gen.writeStringField("directMax",
metrics.getMetric("Status.JVM.Memory.Direct.TotalCapacity", "0"));
+ long directCount =
Long.valueOf(metrics.getMetric("Status.JVM.Memory.direct.Count", "0"));
+ long directUsed =
Long.valueOf(metrics.getMetric("Status.JVM.Memory.direct.MemoryUsed", "0"));
+ long directMax =
Long.valueOf(metrics.getMetric("Status.JVM.Memory.direct.TotalCapacity", "0"));
-
gen.writeStringField("mappedCount",
metrics.getMetric("Status.JVM.Memory.Mapped.Count", "0"));
-
gen.writeStringField("mappedUsed",
metrics.getMetric("Status.JVM.Memory.Mapped.MemoryUsed", "0"));
-
gen.writeStringField("mappedMax",
metrics.getMetric("Status.JVM.Memory.Mapped.TotalCapacity", "0"));
+
gen.writeNumberField("directCount", directCount);
+
gen.writeNumberField("directUsed", directUsed);
+
gen.writeNumberField("directMax", directMax);
+
+ long mappedCount =
Long.valueOf(metrics.getMetric("Status.JVM.Memory.mapped.Count", "0"));
+ long mappedUsed =
Long.valueOf(metrics.getMetric("Status.JVM.Memory.mapped.MemoryUsed", "0"));
+ long mappedMax =
Long.valueOf(metrics.getMetric("Status.JVM.Memory.mapped.TotalCapacity", "0"));
+
+
gen.writeNumberField("mappedCount", mappedCount);
+
gen.writeNumberField("mappedUsed", mappedUsed);
+
gen.writeNumberField("mappedMax", mappedMax);
gen.writeStringField("memorySegmentsAvailable",
metrics.getMetric("Status.Network.AvailableMemorySegments", "0"));
--- End diff --
If you change the above to write longs these can be changed as well, along
with with the GC metrics.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---