johnyangk closed pull request #55: [NEMO-127] Modify 
DefaultInterTaskDataStorePass not to overwrite property
URL: https://github.com/apache/incubator-nemo/pull/55
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/compiler/optimizer/src/main/java/edu/snu/nemo/compiler/optimizer/pass/compiletime/annotating/DefaultInterTaskDataStorePass.java
 
b/compiler/optimizer/src/main/java/edu/snu/nemo/compiler/optimizer/pass/compiletime/annotating/DefaultInterTaskDataStorePass.java
index 98bca9a6..3e849d85 100644
--- 
a/compiler/optimizer/src/main/java/edu/snu/nemo/compiler/optimizer/pass/compiletime/annotating/DefaultInterTaskDataStorePass.java
+++ 
b/compiler/optimizer/src/main/java/edu/snu/nemo/compiler/optimizer/pass/compiletime/annotating/DefaultInterTaskDataStorePass.java
@@ -21,7 +21,6 @@
 import edu.snu.nemo.common.ir.vertex.IRVertex;
 
 import java.util.Collections;
-import java.util.List;
 
 /**
  * Edge data store pass to process inter-stage memory store edges.
@@ -37,11 +36,10 @@ public DefaultInterTaskDataStorePass() {
   @Override
   public DAG<IRVertex, IREdge> apply(final DAG<IRVertex, IREdge> dag) {
     dag.getVertices().forEach(vertex -> {
-      final List<IREdge> inEdges = dag.getIncomingEdgesOf(vertex);
-      if (!inEdges.isEmpty()) {
-        inEdges.forEach(edge -> edge.setProperty(
-            
InterTaskDataStoreProperty.of(InterTaskDataStoreProperty.Value.LocalFileStore)));
-      }
+      dag.getIncomingEdgesOf(vertex).stream()
+          .filter(edge -> 
!edge.getExecutionProperties().containsKey(InterTaskDataStoreProperty.class))
+          .forEach(edge -> edge.setProperty(
+              
InterTaskDataStoreProperty.of(InterTaskDataStoreProperty.Value.LocalFileStore)));
     });
     return dag;
   }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to