abstractdog commented on a change in pull request #60:
URL: https://github.com/apache/tez/pull/60#discussion_r825298202
##########
File path: tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java
##########
@@ -3758,6 +3779,36 @@ public VertexState transition(VertexImpl vertex,
VertexEvent event) {
}
}
+ private static class VertexShuffleDeleteTransition implements
+ SingleArcTransition<VertexImpl, VertexEvent> {
+
+ @Override
+ public void transition(VertexImpl vertex, VertexEvent event) {
+ int incompleteChildrenVertices =
vertex.vShuffleDeletionContext.getIncompleteChildrenVertices();
+ incompleteChildrenVertices = incompleteChildrenVertices - 1;
+
vertex.vShuffleDeletionContext.setIncompleteChildrenVertices(incompleteChildrenVertices);
+ // check if all the child vertices are completed
+ if (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);
+ } else {
+ LOG.debug(String.format("The number of incomplete child vertex are %s
for the vertex %s",
Review comment:
please use logger format here {} {}, String.format is not necessary
--
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]