HBASE-13497 Remove MVCC stamps from HFile when that is safe.
This commit is contained in:
parent
ac190e8077
commit
dc28ded74c
|
@ -98,9 +98,11 @@ public class DefaultCompactor extends Compactor {
|
||||||
smallestReadPoint = Math.min(fd.minSeqIdToKeep, smallestReadPoint);
|
smallestReadPoint = Math.min(fd.minSeqIdToKeep, smallestReadPoint);
|
||||||
cleanSeqId = true;
|
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,
|
writer = store.createWriterInTmp(fd.maxKeyCount, this.compactionCompression, true,
|
||||||
true, fd.maxTagsLength > 0);
|
fd.maxMVCCReadpoint > 0, fd.maxTagsLength > 0);
|
||||||
boolean finished =
|
boolean finished =
|
||||||
performCompaction(scanner, writer, smallestReadPoint, cleanSeqId, throughputController);
|
performCompaction(scanner, writer, smallestReadPoint, cleanSeqId, throughputController);
|
||||||
if (!finished) {
|
if (!finished) {
|
||||||
|
|
|
@ -117,12 +117,14 @@ public class StripeCompactor extends Compactor {
|
||||||
cleanSeqId = true;
|
cleanSeqId = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final boolean needMvcc = fd.maxMVCCReadpoint > 0;
|
||||||
|
|
||||||
final Compression.Algorithm compression = store.getFamily().getCompactionCompression();
|
final Compression.Algorithm compression = store.getFamily().getCompactionCompression();
|
||||||
StripeMultiFileWriter.WriterFactory factory = new StripeMultiFileWriter.WriterFactory() {
|
StripeMultiFileWriter.WriterFactory factory = new StripeMultiFileWriter.WriterFactory() {
|
||||||
@Override
|
@Override
|
||||||
public Writer createWriter() throws IOException {
|
public Writer createWriter() throws IOException {
|
||||||
return store.createWriterInTmp(
|
return store.createWriterInTmp(
|
||||||
fd.maxKeyCount, compression, true, true, fd.maxTagsLength > 0);
|
fd.maxKeyCount, compression, true, needMvcc, fd.maxTagsLength > 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue