Search in sources :

Example 21 with VertexInfo

use of org.apache.tez.history.parser.datamodel.VertexInfo in project tez by apache.

the class TestHistoryParser method isVertexEqual.

private void isVertexEqual(List<VertexInfo> vertexList1, List<VertexInfo> vertexList2) {
    assertTrue("Vertices sizes should be the same", vertexList1.size() == vertexList2.size());
    Iterator<VertexInfo> it1 = vertexList1.iterator();
    Iterator<VertexInfo> it2 = vertexList2.iterator();
    while (it1.hasNext()) {
        assertTrue(it2.hasNext());
        VertexInfo info1 = it1.next();
        VertexInfo info2 = it2.next();
        isVertexEqual(info1, info2);
    }
}
Also used : VertexInfo(org.apache.tez.history.parser.datamodel.VertexInfo)

Example 22 with VertexInfo

use of org.apache.tez.history.parser.datamodel.VertexInfo in project tez by apache.

the class TestHistoryParser method verifyDagInfo.

private void verifyDagInfo(DagInfo dagInfo, boolean ats) {
    if (ats) {
        VersionInfo versionInfo = dagInfo.getVersionInfo();
        // should be present post 0.5.4
        assertTrue(versionInfo != null);
        assertTrue(versionInfo.getVersion() != null);
        assertTrue(versionInfo.getRevision() != null);
        assertTrue(versionInfo.getBuildTime() != null);
    }
    assertTrue(dagInfo.getUserName() != null);
    assertTrue(!dagInfo.getUserName().isEmpty());
    assertTrue(dagInfo.getStartTime() > 0);
    assertTrue(dagInfo.getFinishTimeInterval() > 0);
    assertTrue(dagInfo.getStartTimeInterval() == 0);
    assertTrue(dagInfo.getStartTime() > 0);
    if (dagInfo.getStatus().equalsIgnoreCase(DAGState.SUCCEEDED.toString())) {
        assertTrue(dagInfo.getFinishTime() >= dagInfo.getStartTime());
    }
    assertTrue(dagInfo.getFinishTimeInterval() > dagInfo.getStartTimeInterval());
    assertTrue(dagInfo.getStartTime() > dagInfo.getSubmitTime());
    assertTrue(dagInfo.getTimeTaken() > 0);
    assertNotNull(dagInfo.getCallerContext());
    assertEquals("TezExamples", dagInfo.getCallerContext().getContext());
    assertEquals("Tez WordCount Example Job", dagInfo.getCallerContext().getBlob());
    assertNotNull(dagInfo.getCallerContext().getCallerId());
    assertEquals("TezApplication", dagInfo.getCallerContext().getCallerType());
    // Verify all vertices
    for (VertexInfo vertexInfo : dagInfo.getVertices()) {
        verifyVertex(vertexInfo, vertexInfo.getFailedTasksCount() > 0);
    }
    VertexInfo fastestVertex = dagInfo.getFastestVertex();
    assertTrue(fastestVertex != null);
    if (dagInfo.getStatus().equals(DAGState.SUCCEEDED)) {
        assertTrue(dagInfo.getSlowestVertex() != null);
    }
}
Also used : VersionInfo(org.apache.tez.history.parser.datamodel.VersionInfo) VertexInfo(org.apache.tez.history.parser.datamodel.VertexInfo)

Aggregations

VertexInfo (org.apache.tez.history.parser.datamodel.VertexInfo)22 TaskAttemptInfo (org.apache.tez.history.parser.datamodel.TaskAttemptInfo)15 TaskInfo (org.apache.tez.history.parser.datamodel.TaskInfo)6 Map (java.util.Map)5 TezCounter (org.apache.tez.common.counters.TezCounter)4 EdgeInfo (org.apache.tez.history.parser.datamodel.EdgeInfo)3 Container (org.apache.tez.history.parser.datamodel.Container)2 DataDependencyEvent (org.apache.tez.history.parser.datamodel.TaskAttemptInfo.DataDependencyEvent)2 HashMap (java.util.HashMap)1 Scanner (java.util.Scanner)1 DAGCounter (org.apache.tez.common.counters.DAGCounter)1 TaskCounter (org.apache.tez.common.counters.TaskCounter)1 TezException (org.apache.tez.dag.api.TezException)1 TezDAGID (org.apache.tez.dag.records.TezDAGID)1 TezTaskAttemptID (org.apache.tez.dag.records.TezTaskAttemptID)1 TezTaskID (org.apache.tez.dag.records.TezTaskID)1 TezVertexID (org.apache.tez.dag.records.TezVertexID)1 Graph (org.apache.tez.dag.utils.Graph)1 WordCount (org.apache.tez.examples.WordCount)1 AdditionalInputOutputDetails (org.apache.tez.history.parser.datamodel.AdditionalInputOutputDetails)1