You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2016/11/01 19:49:35 UTC
[11/50] [abbrv] hbase git commit: HBASE-15109 HM/RS failed to start
when "fs.hdfs.impl.disable.cache" is set to true (Pankaj Kumar)
HBASE-15109 HM/RS failed to start when "fs.hdfs.impl.disable.cache" is set to true (Pankaj Kumar)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/bf038271
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/bf038271
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/bf038271
Branch: refs/heads/branch-1
Commit: bf0382719698de6368dea3064c322a20c126fcf4
Parents: 6db4ef8
Author: tedyu <yu...@gmail.com>
Authored: Wed Oct 12 07:35:50 2016 -0700
Committer: tedyu <yu...@gmail.com>
Committed: Wed Oct 12 07:35:50 2016 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/regionserver/ShutdownHook.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/bf038271/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java
index b5f37e8..83e4ea8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java
@@ -199,10 +199,11 @@ public class ShutdownHook {
throw new RuntimeException("Client finalizer is null, can't suppress!");
}
synchronized (fsShutdownHooks) {
- if (!fsShutdownHooks.containsKey(hdfsClientFinalizer) &&
- !ShutdownHookManager.deleteShutdownHook(hdfsClientFinalizer)) {
- throw new RuntimeException("Failed suppression of fs shutdown hook: " +
- hdfsClientFinalizer);
+ boolean isFSCacheDisabled = fs.getConf().getBoolean("fs.hdfs.impl.disable.cache", false);
+ if (!isFSCacheDisabled && !fsShutdownHooks.containsKey(hdfsClientFinalizer)
+ && !ShutdownHookManager.deleteShutdownHook(hdfsClientFinalizer)) {
+ throw new RuntimeException(
+ "Failed suppression of fs shutdown hook: " + hdfsClientFinalizer);
}
Integer refs = fsShutdownHooks.get(hdfsClientFinalizer);
fsShutdownHooks.put(hdfsClientFinalizer, refs == null ? 1 : refs + 1);