Skip to content

Commit

Permalink
TEZ-3624. Split multiple calls on the same line in
Browse files Browse the repository at this point in the history
TaskCommunicatorContextImpl. (sseth)
  • Loading branch information
sidseth committed Feb 16, 2017
1 parent daa8d3d commit 2268c72
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES

ALL CHANGES:

TEZ-3624. Split multiple calls on the same line in TaskCommunicatorContextImpl.
TEZ-3550. Provide access to sessionId/dagId via DagClient.
TEZ-3267. Publish queue name to ATS as part of dag summary.
TEZ-3609. Improve ATSv15 performance for DAG entities read calls.
Expand Down Expand Up @@ -203,6 +204,7 @@ INCOMPATIBLE CHANGES

ALL CHANGES:

TEZ-3624. Split multiple calls on the same line in TaskCommunicatorContextImpl.
TEZ-3550. Provide access to sessionId/dagId via DagClient.
TEZ-3609. Improve ATSv15 performance for DAG entities read calls.
TEZ-3244. Allow overlap of input and output memory when they are not concurrent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ContainerId;
import org.apache.tez.dag.api.UserPayload;
import org.apache.tez.dag.app.dag.Task;
import org.apache.tez.dag.app.rm.container.AMContainer;
import org.apache.tez.runtime.api.TaskFailureType;
import org.apache.tez.serviceplugins.api.DagInfo;
Expand Down Expand Up @@ -144,7 +145,8 @@ public void taskFailed(TezTaskAttemptID taskAttemptId, TaskFailureType taskFailu
public void registerForVertexStateUpdates(String vertexName,
@Nullable Set<VertexState> stateSet) {
Preconditions.checkNotNull(vertexName, "VertexName cannot be null: " + vertexName);
getDag().getStateChangeNotifier().registerForVertexUpdates(vertexName, stateSet,
DAG dag = getDag();
dag.getStateChangeNotifier().registerForVertexUpdates(vertexName, stateSet,
this);
}

Expand All @@ -162,7 +164,8 @@ public DagInfo getCurrentDagInfo() {
@Override
public Iterable<String> getInputVertexNames(String vertexName) {
Preconditions.checkNotNull(vertexName, "VertexName cannot be null: " + vertexName);
Vertex vertex = getDag().getVertex(vertexName);
DAG dag = getDag();
Vertex vertex = dag.getVertex(vertexName);
Set<Vertex> sources = vertex.getInputVertices().keySet();
return Iterables.transform(sources, new Function<Vertex, String>() {
@Override
Expand All @@ -175,27 +178,35 @@ public String apply(Vertex input) {
@Override
public int getVertexTotalTaskCount(String vertexName) {
Preconditions.checkArgument(vertexName != null, "VertexName must be specified");
return getDag().getVertex(vertexName).getTotalTasks();
DAG dag = getDag();
Vertex vertex = dag.getVertex(vertexName);
return vertex.getTotalTasks();
}

@Override
public int getVertexCompletedTaskCount(String vertexName) {
Preconditions.checkArgument(vertexName != null, "VertexName must be specified");
return getDag().getVertex(vertexName).getCompletedTasks();
DAG dag = getDag();
Vertex vertex = dag.getVertex(vertexName);
return vertex.getCompletedTasks();
}

@Override
public int getVertexRunningTaskCount(String vertexName) {
Preconditions.checkArgument(vertexName != null, "VertexName must be specified");
return getDag().getVertex(vertexName).getRunningTasks();
DAG dag = getDag();
Vertex vertex = dag.getVertex(vertexName);
return vertex.getRunningTasks();
}

@Override
public long getFirstAttemptStartTime(String vertexName, int taskIndex) {
Preconditions.checkArgument(vertexName != null, "VertexName must be specified");
Preconditions.checkArgument(taskIndex >=0, "TaskIndex must be > 0");
return getDag().getVertex(vertexName).getTask(
taskIndex).getFirstAttemptStartTime();
DAG dag = getDag();
Vertex vertex = dag.getVertex(vertexName);
Task task = vertex.getTask(taskIndex);
return task.getFirstAttemptStartTime();
}

@Override
Expand Down

0 comments on commit 2268c72

Please sign in to comment.