wonook commented on a change in pull request #109: [NEMO-89] Clean up
IRVertex#getClone()
URL: https://github.com/apache/incubator-nemo/pull/109#discussion_r211096493
##########
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:
I have a feeling that this simply refers to the execution properties of
`that`, instead of creating a new instance of an `ExecutionPropertyMap`. This
was the main reason why we haven't used the `clone()` method at the first place.
----------------------------------------------------------------
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