Search in sources :

Example 6 with ProgressBuilder

use of org.apache.tez.dag.api.client.ProgressBuilder in project tez by apache.

the class VertexImpl method getVertexProgress.

@Override
public ProgressBuilder getVertexProgress() {
    this.readLock.lock();
    try {
        ProgressBuilder progress = new ProgressBuilder();
        progress.setTotalTaskCount(numTasks);
        progress.setSucceededTaskCount(succeededTaskCount);
        if (inTerminalState()) {
            progress.setRunningTaskCount(0);
        } else {
            progress.setRunningTaskCount(getRunningTasks());
        }
        progress.setFailedTaskCount(failedTaskCount);
        progress.setKilledTaskCount(killedTaskCount);
        progress.setFailedTaskAttemptCount(failedTaskAttemptCount.get());
        progress.setKilledTaskAttemptCount(killedTaskAttemptCount.get());
        progress.setRejectedTaskAttemptCount(rejectedTaskAttemptCount.get());
        return progress;
    } finally {
        this.readLock.unlock();
    }
}
Also used : ProgressBuilder(org.apache.tez.dag.api.client.ProgressBuilder)

Aggregations

ProgressBuilder (org.apache.tez.dag.api.client.ProgressBuilder)6 HashMap (java.util.HashMap)3 Map (java.util.Map)3 Vertex (org.apache.tez.dag.app.dag.Vertex)3 LinkedHashMap (java.util.LinkedHashMap)2 TezCounters (org.apache.tez.common.counters.TezCounters)2 VertexLocationHint (org.apache.tez.dag.api.VertexLocationHint)2 VertexEventRecoverVertex (org.apache.tez.dag.app.dag.event.VertexEventRecoverVertex)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 TreeMap (java.util.TreeMap)1 LimitExceededException (org.apache.tez.common.counters.LimitExceededException)1 DAGStatusBuilder (org.apache.tez.dag.api.client.DAGStatusBuilder)1 Matchers.anyString (org.mockito.Matchers.anyString)1