if (conf != null) {
taskCount = conf.getInt(MULTI_ATTEMPT_DAG_VERTEX_NUM_TASKS, MULTI_ATTEMPT_DAG_VERTEX_NUM_TASKS_DEFAULT);
payload = TezUtils.createUserPayloadFromConf(conf);
}
DAG dag = DAG.create(name);
Vertex v1 = Vertex.create("v1", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
Vertex v2 = Vertex.create("v2", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
Vertex v3 = Vertex.create("v3", TestProcessor.getProcDesc(payload), taskCount, defaultResource);
// Make each vertex manager fail on appropriate attempt
v1.setVertexManagerPlugin(VertexManagerPluginDescriptor.create(
FailOnAttemptVertexManagerPlugin.class.getName())
.setUserPayload(UserPayload.create(ByteBuffer.wrap(new String("1").getBytes()))));
v2.setVertexManagerPlugin(VertexManagerPluginDescriptor.create(
FailOnAttemptVertexManagerPlugin.class.getName())
.setUserPayload(UserPayload.create(ByteBuffer.wrap(new String("2").getBytes()))));
v3.setVertexManagerPlugin(VertexManagerPluginDescriptor.create(
FailOnAttemptVertexManagerPlugin.class.getName())
.setUserPayload(UserPayload.create(ByteBuffer.wrap(new String("3").getBytes()))));
dag.addVertex(v1).addVertex(v2).addVertex(v3);
dag.addEdge(Edge.create(v1, v2,
EdgeProperty.create(DataMovementType.SCATTER_GATHER,