hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-15181 Addendum fixes findbugs warning (Clara Xiong)
Date Wed, 02 Mar 2016 02:21:48 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 404e9145c -> 231a5807b


HBASE-15181 Addendum fixes findbugs warning (Clara Xiong)


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

Branch: refs/heads/branch-1
Commit: 231a5807b4277020124ede1a9b44932e1048dfb6
Parents: 404e914
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Mar 1 18:21:37 2016 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Mar 1 18:21:37 2016 -0800

----------------------------------------------------------------------
 .../compactions/DateTieredCompactionPolicy.java             | 9 ++++++++-
 .../hadoop/hbase/regionserver/TestCompactionPolicy.java     | 4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/231a5807/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.java
index 16b534c..9f65e6e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.java
@@ -135,6 +135,13 @@ public class DateTieredCompactionPolicy extends RatioBasedCompactionPolicy
{
         partitionFilesToBuckets(candidatesInWindow, comConf.getBaseWindowMillis(),
           comConf.getWindowsPerTier(), now);
     LOG.debug("Compaction buckets are: " + buckets);
+    if (buckets.size() >= storeConfigInfo.getBlockingFileCount()) {
+      LOG.warn("Number of compaction buckets:" +  buckets.size()
+        + ", exceeds blocking file count setting: "
+        + storeConfigInfo.getBlockingFileCount()
+        + ", either increase hbase.hstore.blockingStoreFiles or "
+        + "reduce the number of tiered compaction windows");
+    }
 
     return newestBucket(buckets, comConf.getIncomingWindowMin(), now,
       comConf.getBaseWindowMillis(), mayUseOffPeak);
@@ -234,7 +241,7 @@ public class DateTieredCompactionPolicy extends RatioBasedCompactionPolicy
{
       public boolean apply(StoreFile storeFile) {
         // Known findbugs issue to guava. SuppressWarning or Nonnull annotation don't work.
         if (storeFile == null) {
-          throw new NullPointerException();
+          return false;
         }
         return storeFile.getMaximumTimestamp() >= cutoff;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/231a5807/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionPolicy.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionPolicy.java
index f5f0926..24b3667 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionPolicy.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionPolicy.java
@@ -50,13 +50,13 @@ import org.junit.experimental.categories.Category;
 
 @Category(SmallTests.class)
 public class TestCompactionPolicy {
-  private final static Log LOG = LogFactory.getLog(TestDefaultCompactSelection.class);
+  private final static Log LOG = LogFactory.getLog(TestCompactionPolicy.class);
   protected final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
 
   protected Configuration conf;
   protected HStore store;
   private static final String DIR = TEST_UTIL.getDataTestDir(
-    TestDefaultCompactSelection.class.getSimpleName()).toString();
+    TestCompactionPolicy.class.getSimpleName()).toString();
   protected static Path TEST_FILE;
   protected static final int minFiles = 3;
   protected static final int maxFiles = 5;


Mime
View raw message