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:
parent
ff41321e2f
commit
cb2b34b01c
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue