You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nemo.apache.org by GitBox <gi...@apache.org> on 2018/08/19 14:20:55 UTC

[GitHub] arunlakshman commented on a change in pull request #109: [NEMO-89] Clean up IRVertex#getClone()

arunlakshman commented on a change in pull request #109: [NEMO-89] Clean up IRVertex#getClone()
URL: https://github.com/apache/incubator-nemo/pull/109#discussion_r211104600
 
 

 ##########
 File path: common/src/main/java/edu/snu/nemo/common/ir/vertex/IRVertex.java
 ##########
 @@ -41,20 +42,19 @@ public IRVertex() {
   }
 
   /**
-   * @return a clone elemnt of the IRVertex.
+   * Copy Constructor for IRVertex.
+   *
+   * @param that the source object for copying
    */
-  public abstract IRVertex getClone();
-
-  /**
-   * Static function to copy executionProperties from a vertex to the other.
-   * @param thatVertex the edge to copy executionProperties to.
-   */
-  public final void copyExecutionPropertiesTo(final IRVertex thatVertex) {
-    this.getExecutionProperties().forEachProperties(thatVertex::setProperty);
+  public IRVertex(final IRVertex that) {
+    super(that.getId());
+    this.executionProperties = that.executionProperties;
 
 Review comment:
   My bad, I just assigned references while cloning.
   Now, I have changed the code for deep cloning of class level variables. 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services