use of org.apache.tez.dag.api.records.DAGProtos.ProgressProto in project tez by apache.
the class TestDAGClient method setUpData.
private void setUpData() {
// DAG
ProgressProto dagProgressProto = ProgressProto.newBuilder().setFailedTaskCount(1).setKilledTaskCount(1).setRunningTaskCount(2).setSucceededTaskCount(2).setTotalTaskCount(6).build();
TezCountersProto dagCountersProto = TezCountersProto.newBuilder().addCounterGroups(TezCounterGroupProto.newBuilder().setName("DAGGroup").addCounters(TezCounterProto.newBuilder().setDisplayName("dag_counter_1").setValue(99))).build();
dagStatusProtoWithoutCounters = DAGStatusProto.newBuilder().addDiagnostics("Diagnostics_0").setState(DAGStatusStateProto.DAG_RUNNING).setDAGProgress(dagProgressProto).addVertexProgress(StringProgressPairProto.newBuilder().setKey("v1").setProgress(ProgressProto.newBuilder().setFailedTaskCount(0).setSucceededTaskCount(0).setKilledTaskCount(0))).addVertexProgress(StringProgressPairProto.newBuilder().setKey("v2").setProgress(ProgressProto.newBuilder().setFailedTaskCount(1).setSucceededTaskCount(1).setKilledTaskCount(1))).build();
dagStatusProtoWithCounters = DAGStatusProto.newBuilder(dagStatusProtoWithoutCounters).setDagCounters(dagCountersProto).build();
// Vertex
ProgressProto vertexProgressProto = ProgressProto.newBuilder().setFailedTaskCount(1).setKilledTaskCount(0).setRunningTaskCount(0).setSucceededTaskCount(1).build();
TezCountersProto vertexCountersProto = TezCountersProto.newBuilder().addCounterGroups(TezCounterGroupProto.newBuilder().addCounters(TezCounterProto.newBuilder().setDisplayName("vertex_counter_1").setValue(99))).build();
vertexStatusProtoWithoutCounters = VertexStatusProto.newBuilder().addDiagnostics("V_Diagnostics_0").setProgress(vertexProgressProto).setState(// make sure the waitForCompletion be able to finish
VertexStatusStateProto.VERTEX_SUCCEEDED).build();
vertexStatusProtoWithCounters = VertexStatusProto.newBuilder(vertexStatusProtoWithoutCounters).setVertexCounters(vertexCountersProto).build();
}
Aggregations