sanha commented on a change in pull request #112: [NEMO-179] Delayed Task Cloning URL: https://github.com/apache/incubator-nemo/pull/112#discussion_r211807022
########## File path: common/src/main/java/edu/snu/nemo/common/ir/vertex/executionproperty/ClonedSchedulingProperty.java ########## @@ -17,30 +17,94 @@ import edu.snu.nemo.common.ir.executionproperty.VertexExecutionProperty; +import java.io.Serializable; + /** * Specifies cloned execution of a vertex. * * A major limitations of the current implementation: * *ALL* of the clones are always scheduled immediately */ -public final class ClonedSchedulingProperty extends VertexExecutionProperty<Integer> { +public final class ClonedSchedulingProperty extends VertexExecutionProperty<ClonedSchedulingProperty.CloneConf> { /** * Constructor. * @param value value of the execution property. */ - private ClonedSchedulingProperty(final Integer value) { + private ClonedSchedulingProperty(final CloneConf value) { super(value); } /** * Static method exposing the constructor. - * @param value value of the new execution property. + * @param conf value of the new execution property. * @return the newly created execution property. */ - public static ClonedSchedulingProperty of(final Integer value) { - if (value <= 0) { - throw new IllegalStateException(String.valueOf(value)); + public static ClonedSchedulingProperty of(final CloneConf conf) { + return new ClonedSchedulingProperty(conf); + } + + /** + * Configurations for cloning. + */ + public static final class CloneConf implements Serializable { + // Always clone, upfront. + private boolean upFrontCloning; Review comment: final ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services