hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [15/50] [abbrv] hadoop git commit: YARN-8164. Fix a potential NPE in AbstractSchedulerPlanFollower. Contributed by lujie.
Date Wed, 02 May 2018 19:21:50 GMT
YARN-8164. Fix a potential NPE in AbstractSchedulerPlanFollower. Contributed by lujie.

(cherry picked from commit f1461b2487d6c7a0b87e3799a8fdb5ade40ad898)


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

Branch: refs/heads/YARN-8200
Commit: 93fc813329f73a3c1b6a4f26f6262b94de1669b6
Parents: f37f680
Author: Inigo Goiri <inigoiri@apache.org>
Authored: Mon Apr 16 17:32:19 2018 -0700
Committer: Inigo Goiri <inigoiri@apache.org>
Committed: Mon Apr 16 17:32:50 2018 -0700

----------------------------------------------------------------------
 .../reservation/AbstractSchedulerPlanFollower.java              | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/93fc8133/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/AbstractSchedulerPlanFollower.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/reservation/AbstractSchedulerPlanFollower.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/AbstractSchedulerPlanFollower.java
index 9b6a0b0..11811f1 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/AbstractSchedulerPlanFollower.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/AbstractSchedulerPlanFollower.java
@@ -263,7 +263,10 @@ public abstract class AbstractSchedulerPlanFollower implements PlanFollower
{
         if (shouldMove) {
           moveAppsInQueueSync(expiredReservation, defReservationQueue);
         }
-        if (scheduler.getAppsInQueue(expiredReservation).size() > 0) {
+        List<ApplicationAttemptId> appsInQueue = scheduler.
+              getAppsInQueue(expiredReservation);
+        int size = (appsInQueue == null ? 0 : appsInQueue.size());
+        if (size > 0) {
           scheduler.killAllAppsInQueue(expiredReservation);
           LOG.info("Killing applications in queue: {}", expiredReservation);
         } else {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message