Repository: incubator-slider Updated Branches: refs/heads/develop 8ee057a05 -> 47f7b067d
SLIDER-1025 Outstanding container request is not removed from open list even it is already been allocated (Weiwei Yan) Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/47f7b067 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/47f7b067 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/47f7b067 Branch: refs/heads/develop Commit: 47f7b067d0f2f71b3c15513d1aaeefb40ab8aad2 Parents: 8ee057a Author: Steve Loughran <ste...@apache.org> Authored: Fri Dec 18 11:52:46 2015 +0000 Committer: Steve Loughran <ste...@apache.org> Committed: Fri Dec 18 11:52:46 2015 +0000 ---------------------------------------------------------------------- .../apache/slider/server/appmaster/state/OutstandingRequest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/47f7b067/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java ---------------------------------------------------------------------- diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java index 3a75f27..52fccfd 100644 --- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java +++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java @@ -24,6 +24,7 @@ import org.apache.hadoop.yarn.api.records.Priority; import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.client.api.AMRMClient; import org.apache.hadoop.yarn.client.api.InvalidContainerRequestException; +import org.apache.hadoop.yarn.util.resource.Resources; import org.apache.slider.common.tools.SliderUtils; import org.apache.slider.server.appmaster.operations.CancelSingleRequest; import org.slf4j.Logger; @@ -337,7 +338,7 @@ public final class OutstandingRequest extends RoleHostnamePair { * @return */ public synchronized boolean resourceRequirementsMatch(Resource resource) { - return issuedRequest != null && issuedRequest.getCapability().equals(resource); + return issuedRequest != null && Resources.fitsIn(issuedRequest.getCapability(), resource); } @Override