You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@nemo.apache.org by GitBox <gi...@apache.org> on 2019/03/18 07:36:00 UTC

[GitHub] [incubator-nemo] johnyangk commented on a change in pull request #201: [NEMO-358] Cloning a vertex should also inherit the vertex ID

johnyangk commented on a change in pull request #201: [NEMO-358] Cloning a vertex should also inherit the vertex ID
URL: https://github.com/apache/incubator-nemo/pull/201#discussion_r266319648
 
 

 ##########
 File path: common/src/main/java/org/apache/nemo/common/ir/IdManager.java
 ##########
 @@ -34,13 +40,42 @@ private IdManager() {
   private static AtomicInteger edgeId = new AtomicInteger(1);
   private static volatile boolean isDriver = false;
 
+  // Vertex ID Map to be used upon cloning in loop vertices.
+  private static final Map<Vertex, Queue<String>> VERTEX_ID_MAP = new HashMap<>();
 
 Review comment:
   Move the changes in this file (IdManager.java) to LoopExtractionPass? saveVertexId() seems to be used only there.
   
   If saveVertexId() (and thus copying vertex IDs when cloning) is meant to be generally used across all IRVertex subclasses, then I think the method should be invoked in the constructor of the IRVertex class so that all its subclasses inherit the behavior.
   
   IRVertex class hierarchy:
   
   ![Screen Shot 2019-03-18 at 4 27 57 PM](https://user-images.githubusercontent.com/4114572/54513449-d2169f80-499a-11e9-9d37-14733ea7e22c.png)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services