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 9c28eb9ed42..aa19ee295f5 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(), diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index ea8b600636c..61c1d160ff2 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