hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-15373 DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS value is wrong in CompactionThroughputControllerFactory
Date Fri, 04 Mar 2016 03:43:43 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 b3c62680b -> d089ac1ec


HBASE-15373 DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS value is wrong in CompactionThroughputControllerFactory


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d089ac1e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d089ac1e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d089ac1e

Branch: refs/heads/branch-1
Commit: d089ac1ec6878c24799c1301ae649029c3a010dd
Parents: b3c6268
Author: stack <stack@apache.org>
Authored: Thu Mar 3 19:42:42 2016 -0800
Committer: stack <stack@apache.org>
Committed: Thu Mar 3 19:43:10 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/regionserver/HStore.java |  9 ++++++---
 .../hadoop/hbase/regionserver/RegionSplitPolicy.java      |  1 +
 .../throttle/CompactionThroughputControllerFactory.java   | 10 ++++------
 3 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d089ac1e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index d56c934..376ccfa 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -549,8 +549,8 @@ public class HStore implements Store {
     }
     if (ioe != null) {
       // close StoreFile readers
-      boolean evictOnClose = 
-          cacheConf != null? cacheConf.shouldEvictOnClose(): true; 
+      boolean evictOnClose =
+          cacheConf != null? cacheConf.shouldEvictOnClose(): true;
       for (StoreFile file : results) {
         try {
           if (file != null) file.closeReader(evictOnClose);
@@ -846,7 +846,7 @@ public class HStore implements Store {
           completionService.submit(new Callable<Void>() {
             @Override
             public Void call() throws IOException {
-              boolean evictOnClose = 
+              boolean evictOnClose =
                   cacheConf != null? cacheConf.shouldEvictOnClose(): true;
               f.closeReader(evictOnClose);
               return null;
@@ -2032,6 +2032,9 @@ public class HStore implements Store {
       assert !this.getRegionInfo().isMetaRegion();
       // Not split-able if we find a reference store file present in the store.
       if (hasReferences()) {
+        if (LOG.isTraceEnabled()) {
+          LOG.trace("Not splittable; has references: " + this);
+        }
         return null;
       }
       return this.storeEngine.getStoreFileManager().getSplitPoint();

http://git-wip-us.apache.org/repos/asf/hbase/blob/d089ac1e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionSplitPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionSplitPolicy.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionSplitPolicy.java
index 2ab2c8d..0e9b4ea 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionSplitPolicy.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionSplitPolicy.java
@@ -80,6 +80,7 @@ public abstract class RegionSplitPolicy extends Configured {
     long largestStoreSize = 0;
     for (Store s : stores) {
       byte[] splitPoint = s.getSplitPoint();
+      // Store also returns null if it has references as way of indicating it is not splittable
       long storeSize = s.getSize();
       if (splitPoint != null && largestStoreSize < storeSize) {
         splitPointFromLargestStore = splitPoint;

http://git-wip-us.apache.org/repos/asf/hbase/blob/d089ac1e/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 4b1bb00..d41dcea 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
@@ -41,11 +41,9 @@ public final class CompactionThroughputControllerFactory {
 
   // for backward compatibility and may not be supported in the future
   private static final String DEPRECATED_NAME_OF_PRESSURE_AWARE_THROUGHPUT_CONTROLLER_CLASS
=
-      "org.apache.hadoop.hbase.regionserver.compactions."
-          + "PressureAwareCompactionThroughputController";
+    "org.apache.hadoop.hbase.regionserver.compactions.PressureAwareCompactionThroughputController";
   private static final String DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS =
-      "org.apache.hadoop.hbase.regionserver.compactions."
-          + "NoLimitThroughputController.java";
+    "org.apache.hadoop.hbase.regionserver.compactions.NoLimitThroughputController";
 
   public static ThroughputController create(RegionServerServices server,
       Configuration conf) {
@@ -77,7 +75,7 @@ public final class CompactionThroughputControllerFactory {
    * @return the new name if there is any
    */
   private static String resolveDeprecatedClassName(String oldName) {
-    String className = oldName;
+    String className = oldName.trim();
     if (className.equals(DEPRECATED_NAME_OF_PRESSURE_AWARE_THROUGHPUT_CONTROLLER_CLASS))
{
       className = PressureAwareCompactionThroughputController.class.getName();
     } else if (className.equals(DEPRECATED_NAME_OF_NO_LIMIT_THROUGHPUT_CONTROLLER_CLASS))
{
@@ -88,4 +86,4 @@ public final class CompactionThroughputControllerFactory {
     }
     return className;
   }
-}
+}
\ No newline at end of file


Mime
View raw message