hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject hadoop git commit: YARN-4729. SchedulerApplicationAttempt#getTotalRequiredResources can throw an NPE. (kasha)
Date Thu, 25 Feb 2016 02:39:35 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 4892f6a0e -> 6a75c5af0


YARN-4729. SchedulerApplicationAttempt#getTotalRequiredResources can throw an NPE. (kasha)

(cherry picked from commit c684f2b007a4808dafbe1c1d3ce01758e281d329)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6a75c5af
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6a75c5af
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6a75c5af

Branch: refs/heads/branch-2
Commit: 6a75c5af09fc1126a5406fec91da75011ca20c06
Parents: 4892f6a
Author: Karthik Kambatla <kasha@cloudera.com>
Authored: Wed Feb 24 18:33:57 2016 -0800
Committer: Karthik Kambatla <kasha@cloudera.com>
Committed: Wed Feb 24 18:34:21 2016 -0800

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                                   | 3 +++
 .../resourcemanager/scheduler/SchedulerApplicationAttempt.java    | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6a75c5af/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 89da408..ce2125b 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -166,6 +166,9 @@ Release 2.9.0 - UNRELEASED
     YARN-4651. Document movetoqueue option in 'YARN Commands'
     (Takashi Ohnishi via rohithsharmaks)
 
+    YARN-4729. SchedulerApplicationAttempt#getTotalRequiredResources can throw 
+    an NPE. (kasha)
+
 Release 2.8.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6a75c5af/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java
index 0cbb88d..2542009 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerApplicationAttempt.java
@@ -244,7 +244,8 @@ public class SchedulerApplicationAttempt implements SchedulableEntity
{
   }
 
   public synchronized int getTotalRequiredResources(Priority priority) {
-    return getResourceRequest(priority, ResourceRequest.ANY).getNumContainers();
+    ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
+    return request == null ? 0 : request.getNumContainers();
   }
 
   public synchronized Resource getResource(Priority priority) {


Mime
View raw message