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);
}
}
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);
}
}
Aggregations