HBASE-24844 RecoverableZookeeper#close followed by ExecutorService shutdown

* Resolves Exception on standalone (master) shutdown

Closes #2239

Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
WenFeiYi 2020-08-12 16:25:49 +05:30 committed by Viraj Jasani
parent 8646ac139d
commit 066be4a76f
No known key found for this signature in database
GPG Key ID: B3D6C0B41C8ADFD5
1 changed files with 2 additions and 1 deletions

View File

@ -694,11 +694,12 @@ public class ZKWatcher implements Watcher, Abortable, Closeable {
*/
@Override
public void close() {
zkEventProcessor.shutdownNow();
try {
recoverableZooKeeper.close();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} finally {
zkEventProcessor.shutdownNow();
}
}