Github user greghogan commented on a diff in the pull request:
https://github.com/apache/flink/pull/2902#discussion_r90272935
--- 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"));
--- End diff --
Some of the numeric metrics were passed as long and some as string. I would
expect someone consuming the JSON to prefer numeric values.
---
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.
---