hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject [1/4] hadoop git commit: YARN-2340. Fixed NPE when queue is stopped during RM restart. Contributed by Rohith Sharmaks (cherry picked from commit 0d89859b51157078cc504ac81dc8aa75ce6b1782)
Date Mon, 31 Aug 2015 04:02:48 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.6.1 6dfdcf094 -> 3f8da2a9e


YARN-2340. Fixed NPE when queue is stopped during RM restart. Contributed by Rohith Sharmaks
(cherry picked from commit 0d89859b51157078cc504ac81dc8aa75ce6b1782)

(cherry picked from commit 8b398a66ca3728f47363fc8b2fcf7e556e6bbf5a)
(cherry picked from commit 37f1789f419fa741c2fbae9855549d405e856bff)


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

Branch: refs/heads/branch-2.6.1
Commit: 8cdcb792a1e2574391123b78afc4e76acd22b467
Parents: 6dfdcf0
Author: Jian He <jianhe@apache.org>
Authored: Mon Dec 22 21:53:22 2014 -0800
Committer: Vinod Kumar Vavilapalli <vinodkv@apache.org>
Committed: Sun Aug 30 20:40:09 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                        |  3 +++
 .../scheduler/capacity/CapacityScheduler.java          | 13 ++++++++-----
 .../resourcemanager/TestWorkPreservingRMRestart.java   |  2 ++
 3 files changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8cdcb792/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 02c9bc4..5dcd643 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -54,6 +54,9 @@ Release 2.6.1 - UNRELEASED
     YARN-2952. Fixed incorrect version check in StateStore. (Rohith Sharmaks
     via jianhe)
 
+    YARN-2340. Fixed NPE when queue is stopped during RM restart.
+    (Rohith Sharmaks via jianhe)
+
 Release 2.6.0 - 2014-11-18
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8cdcb792/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.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/capacity/CapacityScheduler.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
index c383e43..df3baf1 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
@@ -702,11 +702,14 @@ public class CapacityScheduler extends
     try {
       queue.submitApplication(applicationId, user, queueName);
     } catch (AccessControlException ace) {
-      LOG.info("Failed to submit application " + applicationId + " to queue "
-          + queueName + " from user " + user, ace);
-      this.rmContext.getDispatcher().getEventHandler()
-          .handle(new RMAppRejectedEvent(applicationId, ace.toString()));
-      return;
+      // Ignore the exception for recovered app as the app was previously accepted
+      if (!isAppRecovering) {
+        LOG.info("Failed to submit application " + applicationId + " to queue "
+            + queueName + " from user " + user, ace);
+        this.rmContext.getDispatcher().getEventHandler()
+            .handle(new RMAppRejectedEvent(applicationId, ace.toString()));
+        return;
+      }
     }
     // update the metrics
     queue.getMetrics().submitApp(user);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8cdcb792/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
index 73bbd81..8d0c7a7 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestWorkPreservingRMRestart.java
@@ -417,6 +417,8 @@ public class TestWorkPreservingRMRestart {
     rm1.clearQueueMetrics(app1_2);
     rm1.clearQueueMetrics(app2);
 
+    csConf.set("yarn.scheduler.capacity.root.Default.QueueB.state", "STOPPED");
+
     // Re-start RM
     rm2 = new MockRM(csConf, memStore);
     rm2.start();


Mime
View raw message