hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject [16/50] [abbrv] hadoop git commit: YARN-4250. NPE in AppSchedulingInfo#isRequestLabelChanged. (Brahma Reddy Battula via rohithsharmaks)
Date Sat, 17 Oct 2015 03:43:17 GMT
YARN-4250. NPE in AppSchedulingInfo#isRequestLabelChanged. (Brahma Reddy Battula via rohithsharmaks)


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

Branch: refs/heads/HDFS-7966
Commit: d6c8bad86964dbad3cc810914f786c7c4722227a
Parents: da1ee07
Author: rohithsharmaks <rohithsharmaks@apache.org>
Authored: Wed Oct 14 16:11:34 2015 +0530
Committer: rohithsharmaks <rohithsharmaks@apache.org>
Committed: Wed Oct 14 16:11:34 2015 +0530

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                           |  2 ++
 .../resourcemanager/scheduler/AppSchedulingInfo.java      | 10 +++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d6c8bad8/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 55eac24..de5fbe3 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -940,6 +940,8 @@ Release 2.8.0 - UNRELEASED
     YARN-4255. container-executor does not clean up docker operation command files.
     (Sidharta Seethana via vvasudev)
 
+    YARN-4250. NPE in AppSchedulingInfo#isRequestLabelChanged. (Brahma Reddy Battula via
rohithsharmaks)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d6c8bad8/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 f990c9d..3156086 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
@@ -417,7 +417,15 @@ public class AppSchedulingInfo {
       ResourceRequest requestTwo) {
     String requestOneLabelExp = requestOne.getNodeLabelExpression();
     String requestTwoLabelExp = requestTwo.getNodeLabelExpression();
-    return (!(requestOneLabelExp.equals(requestTwoLabelExp)));
+    // First request label expression can be null and second request
+    // is not null then we have to consider it as changed.
+    if ((null == requestOneLabelExp) && (null != requestTwoLabelExp)) {
+      return true;
+    }
+    // If the label is not matching between both request when
+    // requestOneLabelExp is not null.
+    return ((null != requestOneLabelExp) && !(requestOneLabelExp
+        .equals(requestTwoLabelExp)));
   }
 
   /**


Mime
View raw message