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

(cherry picked from commit 7d46a806e7)
This commit is contained in:
Wangda Tan 2015-05-01 16:40:44 -07:00
parent 8e3fdd0a40
commit 4151e5729a
2 changed files with 10 additions and 1 deletions

View File

@ -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(),

View File

@ -141,6 +141,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