HBASE-13497 Remove MVCC stamps from HFile when that is safe.

This commit is contained in:
Lars Hofhansl 2015-04-30 16:47:55 -07:00
parent 81e793e582
commit aabf6ea2f6
2 changed files with 7 additions and 3 deletions

View File

@ -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) {

View File

@ -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);
}
};