Github user yingdachen commented on a diff in the pull request:
https://github.com/apache/tez/pull/33#discussion_r232102507
--- Diff: tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java ---
@@ -2440,23 +2453,30 @@ public void run() {
}
}
- private void startDAG() throws IOException, TezException {
+ private boolean hasConcurrentEdge(DAGPlan dagPlan) {
+ boolean hasConcurrentEdge = false;
+ for (DAGProtos.EdgePlan edge : dagPlan.getEdgeList()) {
+ if
(DAGProtos.PlanEdgeSchedulingType.CONCURRENT.equals(edge.getSchedulingType())) {
+ return true;
+ }
+ }
+ return hasConcurrentEdge;
+ }
+
+ private DAGPlan readDAGPlanFile() throws IOException, TezException {
FileInputStream dagPBBinaryStream = null;
+ DAGPlan dagPlan = null;
try {
- DAGPlan dagPlan = null;
-
// Read the protobuf DAG
dagPBBinaryStream = new FileInputStream(new File(workingDirectory,
TezConstants.TEZ_PB_PLAN_BINARY_NAME));
dagPlan = DAGPlan.parseFrom(dagPBBinaryStream);
-
- startDAG(dagPlan, null);
--- End diff --
1993 is the line for if (recoveredDAGData != null) , when inside that
branch startDAG would not be called, it would only be called in the
corresponding "else" branch
---