public class FlinkMetricContainer
extends java.lang.Object
MetricsContainerImpl
and forwarding Beam metrics to Flink
accumulators and metrics.
Using accumulators can be turned off because it is memory and network intensive. The accumulator results are only meaningful in batch applications or testing streaming applications which have a defined end. They are not essential during execution because metrics will also be reported using the configured metrics reporter.
Modifier and Type | Class and Description |
---|---|
static class |
org.apache.beam.runners.flink.metrics.FlinkMetricContainerBase.FlinkDistributionGauge
Flink
Gauge for DistributionResult . |
static class |
org.apache.beam.runners.flink.metrics.FlinkMetricContainerBase.FlinkGauge
Flink
Gauge for GaugeResult . |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCUMULATOR_NAME |
protected org.apache.beam.runners.core.metrics.MetricsContainerStepMap |
metricsContainers |
Constructor and Description |
---|
FlinkMetricContainer(org.apache.flink.api.common.functions.RuntimeContext runtimeContext) |
Modifier and Type | Method and Description |
---|---|
org.apache.flink.metrics.MetricGroup |
getMetricGroup() |
org.apache.beam.runners.core.metrics.MetricsContainerImpl |
getMetricsContainer(java.lang.String stepName) |
void |
registerMetricsForPipelineResult()
This should be called at the end of the Flink job and sets up an accumulator to push the
metrics to the PipelineResult.
|
void |
updateMetrics(java.lang.String stepName,
java.util.List<org.apache.beam.model.pipeline.v1.MetricsApi.MonitoringInfo> monitoringInfos)
Update this container with metrics from the passed
MetricsApi.MonitoringInfo s, and send
updates along to Flink's internal metrics framework. |
public static final java.lang.String ACCUMULATOR_NAME
protected final org.apache.beam.runners.core.metrics.MetricsContainerStepMap metricsContainers
public FlinkMetricContainer(org.apache.flink.api.common.functions.RuntimeContext runtimeContext)
public void registerMetricsForPipelineResult()
public org.apache.flink.metrics.MetricGroup getMetricGroup()
public org.apache.beam.runners.core.metrics.MetricsContainerImpl getMetricsContainer(java.lang.String stepName)
public void updateMetrics(java.lang.String stepName, java.util.List<org.apache.beam.model.pipeline.v1.MetricsApi.MonitoringInfo> monitoringInfos)
MetricsApi.MonitoringInfo
s, and send
updates along to Flink's internal metrics framework.