Class InternalSourceReaderMetricGroup
- java.lang.Object
-
- org.apache.flink.runtime.metrics.groups.ProxyMetricGroup<MetricGroup>
-
- org.apache.flink.runtime.metrics.groups.InternalSourceReaderMetricGroup
-
- All Implemented Interfaces:
OperatorMetricGroup
,SourceReaderMetricGroup
,MetricGroup
@Internal public class InternalSourceReaderMetricGroup extends ProxyMetricGroup<MetricGroup> implements SourceReaderMetricGroup
SpecialMetricGroup
representing an Operator.
-
-
Field Summary
Fields Modifier and Type Field Description static long
UNDEFINED
-
Fields inherited from class org.apache.flink.runtime.metrics.groups.ProxyMetricGroup
parentMetricGroup
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OperatorIOMetricGroup
getIOMetricGroup()
Counter
getNumRecordsInErrorsCounter()
The total number of record that failed to consume, process, or emit.void
idlingStarted()
static InternalSourceReaderMetricGroup
mock(MetricGroup metricGroup)
void
recordEmitted(long timestamp)
Called when a new record was emitted with the given timestamp.void
setPendingBytesGauge(Gauge<Long> pendingBytesGauge)
Sets an optional gauge for the number of bytes that have not been fetched by the source. e.g.void
setPendingRecordsGauge(Gauge<Long> pendingRecordsGauge)
Sets an optional gauge for the number of records that have not been fetched by the source.void
updateMaxDesiredWatermark(long currentMaxDesiredWatermark)
void
watermarkEmitted(long watermark)
Called when a watermark was emitted.static InternalSourceReaderMetricGroup
wrap(OperatorMetricGroup operatorMetricGroup)
-
Methods inherited from class org.apache.flink.runtime.metrics.groups.ProxyMetricGroup
addGroup, addGroup, addSpan, counter, counter, gauge, getAllVariables, getMetricIdentifier, getMetricIdentifier, getScopeComponents, histogram, meter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.metrics.MetricGroup
addGroup, addGroup, addGroup, addSpan, counter, counter, counter, counter, gauge, gauge, getAllVariables, getMetricIdentifier, getMetricIdentifier, getScopeComponents, histogram, histogram, meter, meter
-
-
-
-
Field Detail
-
UNDEFINED
public static final long UNDEFINED
- See Also:
- Constant Field Values
-
-
Method Detail
-
wrap
public static InternalSourceReaderMetricGroup wrap(OperatorMetricGroup operatorMetricGroup)
-
mock
@VisibleForTesting public static InternalSourceReaderMetricGroup mock(MetricGroup metricGroup)
-
getNumRecordsInErrorsCounter
public Counter getNumRecordsInErrorsCounter()
Description copied from interface:SourceReaderMetricGroup
The total number of record that failed to consume, process, or emit.- Specified by:
getNumRecordsInErrorsCounter
in interfaceSourceReaderMetricGroup
-
setPendingBytesGauge
public void setPendingBytesGauge(Gauge<Long> pendingBytesGauge)
Description copied from interface:SourceReaderMetricGroup
Sets an optional gauge for the number of bytes that have not been fetched by the source. e.g. the remaining bytes in a file after the file descriptor reading position.Note that not every source can report this metric in an plausible and efficient way.
- Specified by:
setPendingBytesGauge
in interfaceSourceReaderMetricGroup
-
setPendingRecordsGauge
public void setPendingRecordsGauge(Gauge<Long> pendingRecordsGauge)
Description copied from interface:SourceReaderMetricGroup
Sets an optional gauge for the number of records that have not been fetched by the source. e.g. the available records after the consumer offset in a Kafka partition.Note that not every source can report this metric in an plausible and efficient way.
- Specified by:
setPendingRecordsGauge
in interfaceSourceReaderMetricGroup
-
getIOMetricGroup
public OperatorIOMetricGroup getIOMetricGroup()
- Specified by:
getIOMetricGroup
in interfaceOperatorMetricGroup
-
recordEmitted
public void recordEmitted(long timestamp)
Called when a new record was emitted with the given timestamp.TimestampAssigner.NO_TIMESTAMP
should be indicated that the record did not have a timestamp.Note this function should be called before the actual record is emitted such that chained processing does not influence the statistics.
-
idlingStarted
public void idlingStarted()
-
watermarkEmitted
public void watermarkEmitted(long watermark)
Called when a watermark was emitted.Note this function should be called before the actual watermark is emitted such that chained processing does not influence the statistics.
-
updateMaxDesiredWatermark
public void updateMaxDesiredWatermark(long currentMaxDesiredWatermark)
-
-