hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jiten...@apache.org
Subject [08/33] hadoop git commit: YARN-3006. Improve the error message when attempting manual failover with auto-failover enabled. (Akira AJISAKA via wangda)
Date Mon, 04 May 2015 23:43:12 GMT
YARN-3006. Improve the error message when attempting manual failover with auto-failover enabled.
(Akira AJISAKA via wangda)


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

Branch: refs/heads/HDFS-7240
Commit: 7d46a806e71de6692cd230e64e7de18a8252019d
Parents: ac7d152
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:40:55 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/7d46a806/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/7d46a806/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index a21df9e..6f38201 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -189,6 +189,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3469. ZKRMStateStore: Avoid setting watches that are not required. 
     (Jun Gong via kasha)
 
+    YARN-3006. Improve the error message when attempting manual failover with 
+    auto-failover enabled. (Akira AJISAKA via wangda)
+
   BUG FIXES
 
     YARN-3197. Confusing log generated by CapacityScheduler. (Varun Saxena 


Mime
View raw message