hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject [3/4] hbase git commit: HBASE-13497 Remove MVCC stamps from HFile when that is safe.
Date Thu, 30 Apr 2015 23:56:13 GMT
HBASE-13497 Remove MVCC stamps from HFile when that is safe.


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

Branch: refs/heads/branch-1.1
Commit: 6b0fbd8115127ff772dc1d4c71fd1c754bdf9010
Parents: ccc34d5
Author: Lars Hofhansl <larsh@apache.org>
Authored: Thu Apr 30 16:47:55 2015 -0700
Committer: Lars Hofhansl <larsh@apache.org>
Committed: Thu Apr 30 16:50:15 2015 -0700

----------------------------------------------------------------------
 .../hbase/regionserver/compactions/DefaultCompactor.java       | 6 ++++--
 .../hadoop/hbase/regionserver/compactions/StripeCompactor.java | 4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6b0fbd81/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DefaultCompactor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DefaultCompactor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DefaultCompactor.java
index 5d712c1..bc8dd01 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DefaultCompactor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/DefaultCompactor.java
@@ -98,9 +98,11 @@ public class DefaultCompactor extends Compactor {
           smallestReadPoint = Math.min(fd.minSeqIdToKeep, smallestReadPoint);
           cleanSeqId = true;
         }
-        
+
+        // When all MVCC readpoints are 0, don't write them.
+        // See HBASE-8166, HBASE-12600, and HBASE-13389.
         writer = store.createWriterInTmp(fd.maxKeyCount, this.compactionCompression, true,
-            true, fd.maxTagsLength > 0);
+          fd.maxMVCCReadpoint > 0, fd.maxTagsLength > 0);
         boolean finished =
             performCompaction(scanner, writer, smallestReadPoint, cleanSeqId, throughputController);
         if (!finished) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/6b0fbd81/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/StripeCompactor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/StripeCompactor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/StripeCompactor.java
index b957e16..10e3cf0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/StripeCompactor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/StripeCompactor.java
@@ -117,12 +117,14 @@ public class StripeCompactor extends Compactor {
         cleanSeqId = true;
       }
 
+      final boolean needMvcc = fd.maxMVCCReadpoint > 0;
+
       final Compression.Algorithm compression = store.getFamily().getCompactionCompression();
       StripeMultiFileWriter.WriterFactory factory = new StripeMultiFileWriter.WriterFactory()
{
         @Override
         public Writer createWriter() throws IOException {
           return store.createWriterInTmp(
-              fd.maxKeyCount, compression, true, true, fd.maxTagsLength > 0);
+              fd.maxKeyCount, compression, true, needMvcc, fd.maxTagsLength > 0);
         }
       };
 


Mime
View raw message