YARN-2195. Clean a piece of code in ResourceRequest. Contributed by Wei Yan.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1605083 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Devarajulu K 2014-06-24 13:57:31 +00:00
parent ff41321e2f
commit cb2b34b01c
2 changed files with 3 additions and 7 deletions

View File

@ -173,6 +173,8 @@ Release 2.5.0 - UNRELEASED
YARN-2191. Added a new test to ensure NM will clean up completed applications
in the case of RM restart. (Wangda Tan via jianhe)
YARN-2195. Clean a piece of code in ResourceRequest. (Wei Yan via devaraj)
OPTIMIZATIONS
BUG FIXES

View File

@ -296,13 +296,7 @@ public abstract class ResourceRequest implements Comparable<ResourceRequest> {
int capabilityComparison =
this.getCapability().compareTo(other.getCapability());
if (capabilityComparison == 0) {
int numContainersComparison =
this.getNumContainers() - other.getNumContainers();
if (numContainersComparison == 0) {
return 0;
} else {
return numContainersComparison;
}
return this.getNumContainers() - other.getNumContainers();
} else {
return capabilityComparison;
}