Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
ContainerMetrics should support always-flush mode.
It will be good to set ContainerMetrics as always-flush mode if yarn.nodemanager.container-metrics.period-ms is configured as 0.
Currently both 0 and -1 mean flush on completion.
Also the current default value for yarn.nodemanager.container-metrics.period-ms is -1 and the default value for yarn.nodemanager.container-metrics.enable is true. So the empty content is shown for the active container metrics in jmx until it is finished.
The default value for yarn.nodemanager.container-metrics.period-ms should not be -1.
flushOnPeriod is always false if flushPeriodMs is -1,
the content will only be shown when the container is finished.
if (finished || flushOnPeriod) {
registry.snapshot(collector.addRecord(registry.info()), all);
}