hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject hbase git commit: HBASE-15490 Remove duplicated CompactionThroughputControllerFactory in branch-1
Date Mon, 21 Mar 2016 06:08:45 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 65d1ed107 -> 771b0317c


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/771b0317
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/771b0317
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/771b0317

Branch: refs/heads/branch-1.3
Commit: 771b0317cb2937f457488f96c0e78e68e846dc1a
Parents: 65d1ed1
Author: Yu Li <liyu@apache.org>
Authored: Sun Mar 20 16:16:40 2016 +0800
Committer: Yu Li <liyu@apache.org>
Committed: Mon Mar 21 14:08:13 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/771b0317/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/771b0317/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/771b0317/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
    */


Mime
View raw message