HBASE-27810. Check if the executor has already been shut down before submitting new job (#5207)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit a6e89bf624)
This commit is contained in:
Andor Molnár 2023-04-28 16:46:22 +02:00 committed by Balazs Meszaros
parent 4800976ae3
commit ea82b9c72f
1 changed files with 3 additions and 1 deletions

View File

@ -604,8 +604,10 @@ public class ZKWatcher implements Watcher, Abortable, Closeable {
LOG.debug(prefix("Received ZooKeeper Event, " + "type=" + event.getType() + ", " + "state=" LOG.debug(prefix("Received ZooKeeper Event, " + "type=" + event.getType() + ", " + "state="
+ event.getState() + ", " + "path=" + event.getPath())); + event.getState() + ", " + "path=" + event.getPath()));
final String spanName = ZKWatcher.class.getSimpleName() + "-" + identifier; final String spanName = ZKWatcher.class.getSimpleName() + "-" + identifier;
if (!zkEventProcessor.isShutdown()) {
zkEventProcessor.execute(TraceUtil.tracedRunnable(() -> processEvent(event), spanName)); zkEventProcessor.execute(TraceUtil.tracedRunnable(() -> processEvent(event), spanName));
} }
}
// Connection management // Connection management