public class MutableIOMetrics extends IOMetrics
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
).
accumulateBackPressuredTime, accumulateBusyTime, accumulateIdleTime, numBytesIn, numBytesOut, numBytesProducedOfPartitions, numRecordsIn, numRecordsOut
Constructor and Description |
---|
MutableIOMetrics() |
Modifier and Type | Method and 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() |
getAccumulateBackPressuredTime, getAccumulateBusyTime, getAccumulateIdleTime, getNumBytesIn, getNumBytesOut, getNumBytesProducedOfPartitions, getNumRecordsIn, getNumRecordsOut
public boolean isNumBytesInComplete()
public boolean isNumBytesOutComplete()
public boolean isNumRecordsInComplete()
public boolean isNumRecordsOutComplete()
public void addIOMetrics(AccessExecution attempt, @Nullable MetricFetcher fetcher, String jobID, String taskID)
AccessExecution
is
in a terminal state the contained IOMetrics
object is added. Otherwise the given
MetricFetcher
is used to retrieve the required metrics.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 belongsCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.