abstractdog commented on a change in pull request #60:
URL: https://github.com/apache/tez/pull/60#discussion_r820282011
##########
File path: tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java
##########
@@ -3758,6 +3780,31 @@ public VertexState transition(VertexImpl vertex,
VertexEvent event) {
}
}
+ private static class VertexDeleteTransition implements
+ SingleArcTransition<VertexImpl, VertexEvent> {
+
+ @Override
+ public void transition(VertexImpl vertex, VertexEvent event) {
+ vertex.incompleteChildrenVertices--;
+ // check if all the child vertices are completed
+ if (vertex.incompleteChildrenVertices == 0) {
+ LOG.info("Vertex shuffle data deletion for vertex name: " +
+ vertex.getName() + " with vertex id: " + vertex.getVertexId());
+ // Get nodes of all the task attempts in vertex
+ Set<NodeId> nodes = Sets.newHashSet();
+ Map<TezTaskID, Task> tasksMap = vertex.getTasks();
+ tasksMap.keySet().forEach(taskId -> {
+ Map<TezTaskAttemptID, TaskAttempt> taskAttemptMap =
tasksMap.get(taskId).getAttempts();
+ taskAttemptMap.keySet().forEach(attemptId -> {
+ nodes.add(taskAttemptMap.get(attemptId).getNodeId());
+ });
+ });
+ vertex.appContext.getAppMaster().vertexComplete(
+ vertex.vertexId, nodes);
+ }
Review comment:
maybe a DEBUG level message would make sense in else branch, notifying
about the current value of vertex.incompleteChildrenVertices
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]