You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2016/03/20 09:18:21 UTC
hbase git commit: HBASE-15490 Remove duplicated
CompactionThroughputControllerFactory in branch-1
Repository: hbase
Updated Branches:
refs/heads/branch-1 050c13e83 -> 17815ded7
HBASE-15490 Remove duplicated CompactionThroughputControllerFactory in branch-1
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/17815ded
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/17815ded
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/17815ded
Branch: refs/heads/branch-1
Commit: 17815ded74d3789b7474969cd105e8bd31e8bbaa
Parents: 050c13e
Author: Yu Li <li...@apache.org>
Authored: Sun Mar 20 16:16:40 2016 +0800
Committer: Yu Li <li...@apache.org>
Committed: Sun Mar 20 16:16:40 2016 +0800
----------------------------------------------------------------------
.../hadoop/hbase/regionserver/HRegion.java | 2 +-
.../CompactionThroughputControllerFactory.java | 63 --------------------
.../CompactionThroughputControllerFactory.java | 4 +-
3 files changed, 3 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/17815ded/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 0690baa..7e3f45c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -147,7 +147,7 @@ import org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl.Write
import org.apache.hadoop.hbase.regionserver.ScannerContext.LimitScope;
import org.apache.hadoop.hbase.regionserver.ScannerContext.NextState;
import org.apache.hadoop.hbase.regionserver.compactions.CompactionContext;
-import org.apache.hadoop.hbase.regionserver.compactions.CompactionThroughputControllerFactory;
+import org.apache.hadoop.hbase.regionserver.throttle.CompactionThroughputControllerFactory;
import org.apache.hadoop.hbase.regionserver.throttle.NoLimitThroughputController;
import org.apache.hadoop.hbase.regionserver.throttle.ThroughputController;
import org.apache.hadoop.hbase.regionserver.wal.HLogKey;
http://git-wip-us.apache.org/repos/asf/hbase/blob/17815ded/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/CompactionThroughputControllerFactory.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/CompactionThroughputControllerFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/CompactionThroughputControllerFactory.java
deleted file mode 100644
index 1663237..0000000
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/CompactionThroughputControllerFactory.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.regionserver.compactions;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseInterfaceAudience;
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.apache.hadoop.hbase.regionserver.RegionServerServices;
-import org.apache.hadoop.hbase.regionserver.throttle.NoLimitThroughputController;
-import org.apache.hadoop.hbase.regionserver.throttle.ThroughputController;
-import org.apache.hadoop.util.ReflectionUtils;
-
-@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
-public class CompactionThroughputControllerFactory {
-
- private static final Log LOG = LogFactory.getLog(CompactionThroughputControllerFactory.class);
-
- public static final String HBASE_THROUGHPUT_CONTROLLER_KEY =
- "hbase.regionserver.throughput.controller";
-
- private static final Class<? extends ThroughputController>
- DEFAULT_THROUGHPUT_CONTROLLER_CLASS = NoLimitThroughputController.class;
-
- public static ThroughputController create(RegionServerServices server,
- Configuration conf) {
- Class<? extends ThroughputController> clazz = getThroughputControllerClass(conf);
- ThroughputController controller = ReflectionUtils.newInstance(clazz, conf);
- controller.setup(server);
- return controller;
- }
-
- public static Class<? extends ThroughputController> getThroughputControllerClass(
- Configuration conf) {
- String className =
- conf.get(HBASE_THROUGHPUT_CONTROLLER_KEY, DEFAULT_THROUGHPUT_CONTROLLER_CLASS.getName());
- try {
- return Class.forName(className).asSubclass(ThroughputController.class);
- } catch (Exception e) {
- LOG.warn(
- "Unable to load configured throughput controller '" + className
- + "', load default throughput controller "
- + DEFAULT_THROUGHPUT_CONTROLLER_CLASS.getName() + " instead", e);
- return DEFAULT_THROUGHPUT_CONTROLLER_CLASS;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/hbase/blob/17815ded/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/CompactionThroughputControllerFactory.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/CompactionThroughputControllerFactory.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/CompactionThroughputControllerFactory.java
index d41dcea..d7e567f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/CompactionThroughputControllerFactory.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/CompactionThroughputControllerFactory.java
@@ -37,7 +37,7 @@ public final class CompactionThroughputControllerFactory {
}
private static final Class<? extends ThroughputController>
- DEFAULT_THROUGHPUT_CONTROLLER_CLASS = PressureAwareCompactionThroughputController.class;
+ DEFAULT_THROUGHPUT_CONTROLLER_CLASS = NoLimitThroughputController.class;
// for backward compatibility and may not be supported in the future
private static final String DEPRECATED_NAME_OF_PRESSURE_AWARE_THROUGHPUT_CONTROLLER_CLASS =
@@ -70,7 +70,7 @@ public final class CompactionThroughputControllerFactory {
}
/**
- * Resolve deprecated class name to keep backward compatibiliy
+ * Resolve deprecated class name to keep backward compatibility
* @param oldName old name of the class
* @return the new name if there is any
*/