You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by mb...@apache.org on 2015/10/22 19:01:17 UTC
[2/4] hbase git commit: HBASE-14667 HBaseFsck constructors have
diverged
HBASE-14667 HBaseFsck constructors have diverged
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/0f5191dd
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0f5191dd
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0f5191dd
Branch: refs/heads/branch-1
Commit: 0f5191dd9a856de595511df765519c41e4cfd925
Parents: a11d983
Author: Matteo Bertozzi <ma...@cloudera.com>
Authored: Thu Oct 22 09:28:33 2015 -0700
Committer: Matteo Bertozzi <ma...@cloudera.com>
Committed: Thu Oct 22 09:39:02 2015 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/util/HBaseFsck.java | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/0f5191dd/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
index 125128d..2955e9f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
@@ -323,23 +323,12 @@ public class HBaseFsck extends Configured implements Closeable {
*/
public HBaseFsck(Configuration conf) throws MasterNotRunningException,
ZooKeeperConnectionException, IOException, ClassNotFoundException {
- super(conf);
- // make a copy, just to be sure we're not overriding someone else's config
- setConf(HBaseConfiguration.create(getConf()));
- // disable blockcache for tool invocation, see HBASE-10500
- getConf().setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, 0);
- // Disable usage of meta replicas in hbck
- getConf().setBoolean(HConstants.USE_META_REPLICAS, false);
- errors = getErrorReporter(conf);
+ this(conf, createThreadPool(conf));
+ }
+ private static ExecutorService createThreadPool(Configuration conf) {
int numThreads = conf.getInt("hbasefsck.numthreads", MAX_NUM_THREADS);
- executor = new ScheduledThreadPoolExecutor(numThreads, Threads.newDaemonThreadFactory("hbasefsck"));
- lockFileRetryCounterFactory = new RetryCounterFactory(
- getConf().getInt("hbase.hbck.lockfile.attempts", DEFAULT_MAX_LOCK_FILE_ATTEMPTS),
- getConf().getInt(
- "hbase.hbck.lockfile.attempt.sleep.interval", DEFAULT_LOCK_FILE_ATTEMPT_SLEEP_INTERVAL),
- getConf().getInt(
- "hbase.hbck.lockfile.attempt.maxsleeptime", DEFAULT_LOCK_FILE_ATTEMPT_MAX_SLEEP_TIME));
+ return new ScheduledThreadPoolExecutor(numThreads, Threads.newDaemonThreadFactory("hbasefsck"));
}
/**