hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deva...@apache.org
Subject svn commit: r1605085 - in /hadoop/common/branches/branch-2/hadoop-yarn-project: CHANGES.txt hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java
Date Tue, 24 Jun 2014 13:58:14 GMT
Author: devaraj
Date: Tue Jun 24 13:58:14 2014
New Revision: 1605085

URL: http://svn.apache.org/r1605085
Log:
YARN-2195. Clean a piece of code in ResourceRequest. Contributed by Wei Yan.

Modified:
    hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt?rev=1605085&r1=1605084&r2=1605085&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt Tue Jun 24 13:58:14 2014
@@ -158,6 +158,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 

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java?rev=1605085&r1=1605084&r2=1605085&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceRequest.java
Tue Jun 24 13:58:14 2014
@@ -296,13 +296,7 @@ public abstract class ResourceRequest im
         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;
         }



Mime
View raw message