Class ReaderInvocationUtil<OutputT,ReaderT extends Source.Reader<OutputT>>
java.lang.Object
org.apache.beam.runners.flink.metrics.ReaderInvocationUtil<OutputT,ReaderT>
Util for invoking
Source.Reader methods that might require a MetricsContainerImpl
to be active. Source.Reader decorator which registers MetricsContainerImpl. It updates
Flink metrics after start and advance.
Updating Flink metrics walks all the metrics of the task, which is expensive compared to
reading a single record. Flink metrics are therefore updated at most once every FLINK_METRICS_UPDATE_INTERVAL_MILLIS, on the first call, and whenever the reader has no more
data. The metrics reported in the pipeline result are collected separately and are not affected.
-
Constructor Summary
ConstructorsConstructorDescriptionReaderInvocationUtil(String stepName, PipelineOptions options, org.apache.beam.runners.flink.metrics.FlinkMetricContainerBase container) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninvokeAdvance(ReaderT reader) booleaninvokeStart(ReaderT reader)
-
Constructor Details
-
ReaderInvocationUtil
public ReaderInvocationUtil(String stepName, PipelineOptions options, org.apache.beam.runners.flink.metrics.FlinkMetricContainerBase container)
-
-
Method Details
-
invokeStart
- Throws:
IOException
-
invokeAdvance
- Throws:
IOException
-