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 theIOMetrics
class that allows adding up IO-related metrics.For finished jobs these metrics are stored in the
ExecutionGraph
as 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 void
addIOMetrics(AccessExecution attempt, MetricFetcher fetcher, String jobID, String taskID)
Adds the IO metrics for the given attempt to this object.boolean
isNumBytesInComplete()
boolean
isNumBytesOutComplete()
boolean
isNumRecordsInComplete()
boolean
isNumRecordsOutComplete()
-
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 theAccessExecution
is in a terminal state the containedIOMetrics
object is added. Otherwise the givenMetricFetcher
is 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
-
-