HDFS-16852. Skip KeyProviderCache shutdown hook registration if already shutting down (#5160)
Signed-off-by: Erik Krogen <xkrogen@apache.org>
This commit is contained in:
parent
c5b42d59d2
commit
f7bdf6c667
@ -68,8 +68,11 @@ public void onRemoval(
|
||||
})
|
||||
.build();
|
||||
|
||||
ShutdownHookManager.get().addShutdownHook(new KeyProviderCacheFinalizer(),
|
||||
SHUTDOWN_HOOK_PRIORITY);
|
||||
// Register the shutdown hook when not in shutdown
|
||||
if (!ShutdownHookManager.get().isShutdownInProgress()) {
|
||||
ShutdownHookManager.get().addShutdownHook(
|
||||
new KeyProviderCacheFinalizer(), SHUTDOWN_HOOK_PRIORITY);
|
||||
}
|
||||
}
|
||||
|
||||
public KeyProvider get(final Configuration conf,
|
||||
|
Loading…
Reference in New Issue
Block a user