hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject hadoop git commit: YARN-3369. Missing NullPointer check in AppSchedulingInfo causes RM to die. (Brahma Reddy Battula via wangda)
Date Fri, 20 Mar 2015 17:43:00 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 7990e1d80 -> 8e142d27c


YARN-3369. Missing NullPointer check in AppSchedulingInfo causes RM to die. (Brahma Reddy
Battula via wangda)

(cherry picked from commit 6bc7710ec7f2592c4c87dd940fbe5827ef81fe72)


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

Branch: refs/heads/branch-2
Commit: 8e142d27cbddfa1a1c83c5f8752bd14ac0a13612
Parents: 7990e1d
Author: Wangda Tan <wangda@apache.org>
Authored: Fri Mar 20 10:42:05 2015 -0700
Committer: Wangda Tan <wangda@apache.org>
Committed: Fri Mar 20 10:42:51 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                           |  3 +++
 .../resourcemanager/scheduler/AppSchedulingInfo.java      | 10 ++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e142d27/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index ffd1fb7..1693c6c 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -757,6 +757,9 @@ Release 2.7.0 - UNRELEASED
     YARN-3379. Fixed missing data in localityTable and ResourceRequests table
     in RM WebUI. (Xuan Gong via jianhe)
 
+    YARN-3369. Missing NullPointer check in AppSchedulingInfo causes RM to die.
+    (Brahma Reddy Battula via wangda)
+
 Release 2.6.0 - 2014-11-18
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e142d27/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AppSchedulingInfo.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/AppSchedulingInfo.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AppSchedulingInfo.java
index 97dc231..1324c7d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AppSchedulingInfo.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AppSchedulingInfo.java
@@ -239,7 +239,7 @@ public class AppSchedulingInfo {
 
   public synchronized Resource getResource(Priority priority) {
     ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
-    return request.getCapability();
+    return (request == null) ? null : request.getCapability();
   }
 
   public synchronized boolean isBlacklisted(String resourceName) {
@@ -382,9 +382,11 @@ public class AppSchedulingInfo {
     boolean deactivate = true;
     for (Priority priority : getPriorities()) {
       ResourceRequest request = getResourceRequest(priority, ResourceRequest.ANY);
-      if (request.getNumContainers() > 0) {
-        deactivate = false;
-        break;
+      if (request != null) {
+        if (request.getNumContainers() > 0) {
+          deactivate = false;
+          break;
+        }
       }
     }
     if (deactivate) {


Mime
View raw message