HADOOP-18905. Negative timeout in ZKFailovercontroller due to overflow. (#6092). Contributed by ConfX.
Reviewed-by: Inigo Goiri <inigoiri@apache.org> Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
parent
b9c9c42b29
commit
7c6af6a5f6
@ -660,6 +660,7 @@ public Void run() throws Exception {
|
|||||||
private void doGracefulFailover()
|
private void doGracefulFailover()
|
||||||
throws ServiceFailedException, IOException, InterruptedException {
|
throws ServiceFailedException, IOException, InterruptedException {
|
||||||
int timeout = FailoverController.getGracefulFenceTimeout(conf) * 2;
|
int timeout = FailoverController.getGracefulFenceTimeout(conf) * 2;
|
||||||
|
Preconditions.checkArgument(timeout >= 0, "timeout should be non-negative.");
|
||||||
|
|
||||||
// Phase 1: pre-flight checks
|
// Phase 1: pre-flight checks
|
||||||
checkEligibleForFailover();
|
checkEligibleForFailover();
|
||||||
|
Loading…
Reference in New Issue
Block a user