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-15634 TestDateTieredCompactionPolicy#negativeForMajor is flaky (Duo Zhang and Ted Yu)
Date Tue, 26 Apr 2016 16:24:46 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 9f222d59e -> 2562043e2


HBASE-15634 TestDateTieredCompactionPolicy#negativeForMajor is flaky (Duo Zhang and Ted Yu)


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

Branch: refs/heads/branch-1
Commit: 2562043e23f64cced60a858e98dbb607bcc44400
Parents: 9f222d5
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Apr 26 09:24:38 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Apr 26 09:24:38 2016 -0700

----------------------------------------------------------------------
 .../regionserver/compactions/DateTieredCompactionPolicy.java  | 7 +++++++
 .../hbase/regionserver/TestDateTieredCompactionPolicy.java    | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2562043e/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 3dfabed..037bc80 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
@@ -112,6 +112,9 @@ public class DateTieredCompactionPolicy extends SortedCompactionPolicy
{
     throws IOException {
     long mcTime = getNextMajorCompactTime(filesToCompact);
     if (filesToCompact == null || mcTime == 0) {
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("filesToCompact: " + filesToCompact + " mcTime: " + mcTime);
+      }
       return false;
     }
 
@@ -119,6 +122,10 @@ public class DateTieredCompactionPolicy extends SortedCompactionPolicy
{
     long lowTimestamp = StoreUtils.getLowestTimestamp(filesToCompact);
     long now = EnvironmentEdgeManager.currentTime();
     if (lowTimestamp <= 0L || lowTimestamp >= (now - mcTime)) {
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("lowTimestamp: " + lowTimestamp + " lowTimestamp: " + lowTimestamp + "
now: " +
+            now + " mcTime: " + mcTime); 
+      }
       return false;
     }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/2562043e/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDateTieredCompactionPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDateTieredCompactionPolicy.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDateTieredCompactionPolicy.java
index e99eacb..eb52a84 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDateTieredCompactionPolicy.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestDateTieredCompactionPolicy.java
@@ -50,7 +50,7 @@ public class TestDateTieredCompactionPolicy extends AbstractTestDateTieredCompac
     this.conf.setFloat(CompactionConfiguration.HBASE_HSTORE_COMPACTION_RATIO_KEY, 1.2F);
 
     conf.setInt(HStore.BLOCKING_STOREFILES_KEY, 20);
-    conf.setLong(HConstants.MAJOR_COMPACTION_PERIOD, 10);
+    conf.setLong(HConstants.MAJOR_COMPACTION_PERIOD, 5);
   }
 
   /**


Mime
View raw message