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-3006. Improve the error message when attempting manual failover with auto-failover enabled. (Akira AJISAKA via wangda)
Date Fri, 01 May 2015 23:47:27 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.7 472fd563e -> 3389bac42


YARN-3006. Improve the error message when attempting manual failover with auto-failover enabled.
(Akira AJISAKA via wangda)

(cherry picked from commit 7d46a806e71de6692cd230e64e7de18a8252019d)
(cherry picked from commit 4151e5729a1ed74ac94035d66876b2dcc52eaaaf)

Conflicts:
	hadoop-yarn-project/CHANGES.txt


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

Branch: refs/heads/branch-2.7
Commit: 3389bac42a17f74d939d24b414a4e1220cff5b9b
Parents: 472fd56
Author: Wangda Tan <wangda@apache.org>
Authored: Fri May 1 16:40:44 2015 -0700
Committer: Wangda Tan <wangda@apache.org>
Committed: Fri May 1 16:47:06 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/ha/HAAdmin.java          | 8 +++++++-
 hadoop-yarn-project/CHANGES.txt                              | 3 +++
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3389bac4/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java
index 9c28eb9..aa19ee2 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/HAAdmin.java
@@ -279,7 +279,13 @@ public abstract class HAAdmin extends Configured implements Tool {
             "supported with auto-failover enabled.");
         return -1;
       }
-      return gracefulFailoverThroughZKFCs(toNode);
+      try {
+        return gracefulFailoverThroughZKFCs(toNode);
+      } catch (UnsupportedOperationException e){
+        errOut.println("Failover command is not supported with " +
+            "auto-failover enabled: " + e.getLocalizedMessage());
+        return -1;
+      }
     }
     
     FailoverController fc = new FailoverController(getConf(),

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3389bac4/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index ea8b600..61c1d16 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -13,6 +13,9 @@ Release 2.7.1 - UNRELEASED
 
   OPTIMIZATIONS
 
+    YARN-3006. Improve the error message when attempting manual failover with 
+    auto-failover enabled. (Akira AJISAKA via wangda)
+
   BUG FIXES
 
     YARN-3487. CapacityScheduler scheduler lock obtained unnecessarily when 


Mime
View raw message