tez-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yingdachen <...@git.apache.org>
Subject [GitHub] tez pull request #33: TEZ-3998: support constructing DAG with concurrent edg...
Date Thu, 08 Nov 2018 23:56:16 GMT
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


---

Mime
View raw message