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 |
FlinkMetricContainer.FlinkDistributionGauge
Flink
Gauge for DistributionResult . |
static class |
FlinkMetricContainer.FlinkGauge
Flink
Gauge for GaugeResult . |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCUMULATOR_NAME |
Constructor and Description |
---|
FlinkMetricContainer(org.apache.flink.api.common.functions.RuntimeContext runtimeContext) |
Modifier and Type | Method and Description |
---|---|
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
public FlinkMetricContainer(org.apache.flink.api.common.functions.RuntimeContext runtimeContext)
public org.apache.beam.runners.core.metrics.MetricsContainerImpl getMetricsContainer(java.lang.String stepName)
public void registerMetricsForPipelineResult()
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.