HBASE-15109 HM/RS failed to start when "fs.hdfs.impl.disable.cache" is set to true (Pankaj Kumar)
This commit is contained in:
parent
6b346ad046
commit
ec87b4bfe2
|
@ -199,10 +199,11 @@ public class ShutdownHook {
|
||||||
throw new RuntimeException("Client finalizer is null, can't suppress!");
|
throw new RuntimeException("Client finalizer is null, can't suppress!");
|
||||||
}
|
}
|
||||||
synchronized (fsShutdownHooks) {
|
synchronized (fsShutdownHooks) {
|
||||||
if (!fsShutdownHooks.containsKey(hdfsClientFinalizer) &&
|
boolean isFSCacheDisabled = fs.getConf().getBoolean("fs.hdfs.impl.disable.cache", false);
|
||||||
!ShutdownHookManager.deleteShutdownHook(hdfsClientFinalizer)) {
|
if (!isFSCacheDisabled && !fsShutdownHooks.containsKey(hdfsClientFinalizer)
|
||||||
throw new RuntimeException("Failed suppression of fs shutdown hook: " +
|
&& !ShutdownHookManager.deleteShutdownHook(hdfsClientFinalizer)) {
|
||||||
hdfsClientFinalizer);
|
throw new RuntimeException(
|
||||||
|
"Failed suppression of fs shutdown hook: " + hdfsClientFinalizer);
|
||||||
}
|
}
|
||||||
Integer refs = fsShutdownHooks.get(hdfsClientFinalizer);
|
Integer refs = fsShutdownHooks.get(hdfsClientFinalizer);
|
||||||
fsShutdownHooks.put(hdfsClientFinalizer, refs == null ? 1 : refs + 1);
|
fsShutdownHooks.put(hdfsClientFinalizer, refs == null ? 1 : refs + 1);
|
||||||
|
|
Loading…
Reference in New Issue