hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/2] hbase git commit: HBASE-15634 TestDateTieredCompactionPolicy#negativeForMajor is flaky (Duo Zhang and Ted Yu)
Date Wed, 04 May 2016 20:38:16 GMT
HBASE-15634 TestDateTieredCompactionPolicy#negativeForMajor is flaky (Duo Zhang and Ted Yu)

Conflicts:
	hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DateTieredCompactionPolicy.java


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

Branch: refs/heads/0.98
Commit: 20c67123ffc9c598bdffc0916d653e36a7a74e02
Parents: ea6f0aa
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Apr 26 09:24:38 2016 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Wed May 4 11:50:08 2016 -0700

----------------------------------------------------------------------
 .../compactions/DateTieredCompactionPolicy.java | 20 ++++++++------------
 .../TestDateTieredCompactionPolicy.java         |  2 +-
 2 files changed, 9 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/20c67123/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 935cec7..2c1601f 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
@@ -46,16 +46,6 @@ import org.apache.hadoop.hbase.util.ReflectionUtils;
 /**
  * HBASE-15181 This is a simple implementation of date-based tiered compaction similar to
  * Cassandra's for the following benefits:
-<<<<<<< HEAD
- * 1. Improve date-range-based scan by structuring store files in date-based tiered layout.
- * 2. Reduce compaction overhead.
- * 3. Improve TTL efficiency.
- * Perfect fit for the use cases that: 
- * 1. has mostly date-based data write and scan and a focus on the most recent data.
- * Out-of-order writes are handled gracefully. Time range overlapping among store files is
- * tolerated and the performance impact is minimized. Configuration can be set at hbase-site
- * or overridden at per-table or per-column-family level by hbase shell. Design spec is at
-=======
  * <ol>
  * <li>Improve date-range-based scan by structuring store files in date-based tiered
layout.</li>
  * <li>Reduce compaction overhead.</li>
@@ -68,7 +58,6 @@ import org.apache.hadoop.hbase.util.ReflectionUtils;
  * Out-of-order writes are handled gracefully. Time range overlapping among store files is
tolerated
  * and the performance impact is minimized. Configuration can be set at hbase-site or overridden
at
  * per-table or per-column-family level by hbase shell. Design spec is at
->>>>>>> 3f749fd... HBASE-15368 Add pluggable window support
  * https://docs.google.com/document/d/1_AmlNb2N8Us1xICsTeGDLKIqL6T-oHoRLZ323MG_uy8/
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
@@ -121,13 +110,20 @@ public class DateTieredCompactionPolicy extends SortedCompactionPolicy
{
   public boolean shouldPerformMajorCompaction(final Collection<StoreFile> filesToCompact)
throws IOException {
     long mcTime = getNextMajorCompactTime(filesToCompact);
     if (filesToCompact == null || mcTime == 0) {
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("filesToCompact: " + filesToCompact + " mcTime: " + mcTime);
+      }
       return false;
     }
     
     // TODO: Use better method for determining stamp of last major (HBASE-2990)
     long lowTimestamp = StoreUtils.getLowestTimestamp(filesToCompact);
     long now = EnvironmentEdgeManager.currentTimeMillis();
-    if (lowTimestamp <= 0l || lowTimestamp >= (now - mcTime)) {
+    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/20c67123/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 1cdc3c1..5a0b0b1 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
     conf.setFloat(CompactionConfiguration.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