Repository: incubator-reef Updated Branches: refs/heads/master 3e8b862b4 -> 67510311a
[REEF-644] Remove deprecated APIs from reef-common: EvaluatorRequest This removed EvaluatorRequest.descriptor and related methods. JIRA: [REEF-664](https://issues.apache.org/jira/browse/REEF-644) Pull Request: Closes #419 Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/67510311 Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/67510311 Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/67510311 Branch: refs/heads/master Commit: 67510311a55c8c7e8c07e4d7cb63a349f1131325 Parents: 3e8b862 Author: Mariia Mykhailova <[email protected]> Authored: Wed Aug 26 12:14:27 2015 -0700 Committer: Markus Weimer <[email protected]> Committed: Wed Aug 26 15:40:43 2015 -0700 ---------------------------------------------------------------------- .../reef/driver/evaluator/EvaluatorRequest.java | 67 -------------------- 1 file changed, 67 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/67510311/lang/java/reef-common/src/main/java/org/apache/reef/driver/evaluator/EvaluatorRequest.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-common/src/main/java/org/apache/reef/driver/evaluator/EvaluatorRequest.java b/lang/java/reef-common/src/main/java/org/apache/reef/driver/evaluator/EvaluatorRequest.java index e113a7f..a4bc100 100644 --- a/lang/java/reef-common/src/main/java/org/apache/reef/driver/evaluator/EvaluatorRequest.java +++ b/lang/java/reef-common/src/main/java/org/apache/reef/driver/evaluator/EvaluatorRequest.java @@ -21,7 +21,6 @@ package org.apache.reef.driver.evaluator; import org.apache.reef.annotations.Provided; import org.apache.reef.annotations.audience.DriverSide; import org.apache.reef.annotations.audience.Public; -import org.apache.reef.driver.catalog.ResourceCatalog; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -37,32 +36,9 @@ public final class EvaluatorRequest { private final int megaBytes; private final int number; private final int cores; - /** - * @deprecated since 0.12.0, should use instead - * {@link EvaluatorRequest#nodeNames} and - * {@link EvaluatorRequest#rackNames} - */ - @Deprecated - private final ResourceCatalog.Descriptor descriptor; private final List<String> nodeNames; private final List<String> rackNames; - /** - * Deprecated constructor. ResourceCatalog.Descriptor should not be used - * anymore. In order to specify the rack names and node names where evaluators - * should run on, you should use nodeNames and rackNames lists - * - * @deprecated since 0.12.0, use constructor with node - * names and rack names as parameters - */ - @Deprecated - EvaluatorRequest(final int number, - final int megaBytes, - final int cores, - final ResourceCatalog.Descriptor descriptor) { - this(number, megaBytes, cores, new ArrayList<String>(), new ArrayList<String>()); - } - EvaluatorRequest(final int number, final int megaBytes, final int cores, @@ -73,7 +49,6 @@ public final class EvaluatorRequest { this.cores = cores; this.nodeNames = nodeNames; this.rackNames = rackNames; - this.descriptor = null; } /** @@ -110,21 +85,6 @@ public final class EvaluatorRequest { } /** - * Access the {@link org.apache.reef.driver.catalog.NodeDescriptor} used as - * the template for this {@link EvaluatorRequest}. - * - * @return the {@link org.apache.reef.driver.catalog.NodeDescriptor} used as - * the template for this {@link EvaluatorRequest}. - * @deprecated since 0.12.0. Should use instead - * {@link EvaluatorRequest#getNodeNames()} and - * {@link EvaluatorRequest#getRackNames()} - */ - @Deprecated - public ResourceCatalog.Descriptor getDescriptor() { - return this.descriptor; - } - - /** * @return the minimum size of Evaluator requested. */ public int getMegaBytes() { @@ -151,13 +111,6 @@ public final class EvaluatorRequest { public static final class Builder implements org.apache.reef.util.Builder<EvaluatorRequest> { private int n = 1; - /** - * @deprecated since 0.12.0, should use instead - * {@link EvaluatorRequest.Builder#nodeNames} and - * {@link EvaluatorRequest.Builder#rackNames} - */ - @Deprecated - private ResourceCatalog.Descriptor descriptor = null; private int megaBytes = -1; private int cores = 1; //if not set, default to 1 private final List<String> nodeNames = new ArrayList<>(); @@ -174,7 +127,6 @@ public final class EvaluatorRequest { */ private Builder(final EvaluatorRequest request) { setNumber(request.getNumber()); - fromDescriptor(request.getDescriptor()); setMemory(request.getMegaBytes()); setNumberOfCores(request.getNumberOfCores()); for (final String nodeName : request.getNodeNames()) { @@ -247,24 +199,5 @@ public final class EvaluatorRequest { public EvaluatorRequest build() { return new EvaluatorRequest(this.n, this.megaBytes, this.cores, this.nodeNames, this.rackNames); } - - /** - * Pre-fill this {@link EvaluatorRequest} from the given - * {@link org.apache.reef.driver.catalog.NodeDescriptor}. Any value not - * changed in subsequent calls to this Builder will be taken from the given - * descriptor. - * - * @param rd - * the descriptor used to pre-fill this request. - * @deprecated since 0.12.0. Replace with - * {@link EvaluatorRequest.Builder#addRackName} and - * {@link EvaluatorRequest.Builder#addNodeName} - * @return this - */ - @Deprecated - public Builder fromDescriptor(final ResourceCatalog.Descriptor rd) { - this.descriptor = rd; - return this; - } } }
