Class MutableIOMetrics
java.lang.Object
org.apache.flink.runtime.executiongraph.IOMetrics
org.apache.flink.runtime.rest.handler.util.MutableIOMetrics
- All Implemented Interfaces:
Serializable
This class is a mutable version of the
IOMetrics class that allows adding up IO-related
metrics.
For finished jobs these metrics are stored in the ExecutionGraph as another IOMetrics. For running jobs these metrics are retrieved using the MetricFetcher.
This class provides a common interface to handle both cases, reducing complexity in various
handlers (like the JobVertexDetailsHandler).
- See Also:
-
Field Summary
Fields inherited from class org.apache.flink.runtime.executiongraph.IOMetrics
accumulateBackPressuredTime, accumulateBusyTime, accumulateIdleTime, numBytesIn, numBytesOut, numRecordsIn, numRecordsOut, resultPartitionBytes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIOMetrics(AccessExecution attempt, MetricFetcher fetcher, String jobID, String taskID) Adds the IO metrics for the given attempt to this object.booleanbooleanbooleanbooleanMethods inherited from class org.apache.flink.runtime.executiongraph.IOMetrics
getAccumulateBackPressuredTime, getAccumulateBusyTime, getAccumulateIdleTime, getNumBytesIn, getNumBytesOut, getNumRecordsIn, getNumRecordsOut, getResultPartitionBytes
-
Constructor Details
-
MutableIOMetrics
public MutableIOMetrics()
-
-
Method Details
-
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
-