Class MutableIOMetrics
- java.lang.Object
-
- org.apache.flink.runtime.executiongraph.IOMetrics
-
- org.apache.flink.runtime.rest.handler.util.MutableIOMetrics
-
- All Implemented Interfaces:
Serializable
public class MutableIOMetrics extends IOMetrics
This class is a mutable version of theIOMetricsclass that allows adding up IO-related metrics.For finished jobs these metrics are stored in the
ExecutionGraphas anotherIOMetrics. For running jobs these metrics are retrieved using theMetricFetcher.This class provides a common interface to handle both cases, reducing complexity in various handlers (like the
JobVertexDetailsHandler).- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.executiongraph.IOMetrics
accumulateBackPressuredTime, accumulateBusyTime, accumulateIdleTime, numBytesIn, numBytesOut, numRecordsIn, numRecordsOut, resultPartitionBytes
-
-
Constructor Summary
Constructors Constructor Description MutableIOMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIOMetrics(AccessExecution attempt, MetricFetcher fetcher, String jobID, String taskID)Adds the IO metrics for the given attempt to this object.booleanisNumBytesInComplete()booleanisNumBytesOutComplete()booleanisNumRecordsInComplete()booleanisNumRecordsOutComplete()-
Methods inherited from class org.apache.flink.runtime.executiongraph.IOMetrics
getAccumulateBackPressuredTime, getAccumulateBusyTime, getAccumulateIdleTime, getNumBytesIn, getNumBytesOut, getNumRecordsIn, getNumRecordsOut, getResultPartitionBytes
-
-
-
-
Method Detail
-
isNumBytesInComplete
public boolean isNumBytesInComplete()
-
isNumBytesOutComplete
public boolean isNumBytesOutComplete()
-
isNumRecordsInComplete
public boolean isNumRecordsInComplete()
-
isNumRecordsOutComplete
public boolean isNumRecordsOutComplete()
-
addIOMetrics
public void addIOMetrics(AccessExecution attempt, @Nullable MetricFetcher fetcher, String jobID, String taskID)
Adds the IO metrics for the given attempt to this object. If theAccessExecutionis in a terminal state the containedIOMetricsobject is added. Otherwise the givenMetricFetcheris used to retrieve the required metrics.- Parameters:
attempt- Attempt whose IO metrics should be addedfetcher- MetricFetcher to retrieve metrics for running jobsjobID- JobID to which the attempt belongstaskID- TaskID to which the attempt belongs
-
-