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:44 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk dbbfc58c3 -> c684f2b00


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


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

Branch: refs/heads/trunk
Commit: c684f2b007a4808dafbe1c1d3ce01758e281d329
Parents: dbbfc58
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:33:57 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/c684f2b0/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 7327192..7f26f8e 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -227,6 +227,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/c684f2b0/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