@InterfaceAudience.Private public class DefaultMobStoreCompactor extends DefaultCompactor
Compactor.CellSink, Compactor.CellSinkFactory<S>, Compactor.FileDetails, Compactor.InternalScannerFactory
compactionCompression, compactionKVMax, conf, defaultScannerFactory, keepSeqIdPeriod, progress, store
Constructor and Description |
---|
DefaultMobStoreCompactor(Configuration conf,
Store store) |
Modifier and Type | Method and Description |
---|---|
List<Path> |
compact(CompactionRequest request,
CompactionThroughputController throughputController,
User user)
Do a minor/major compaction on an explicit set of storefiles from a Store.
|
protected boolean |
performCompaction(Compactor.FileDetails fd,
InternalScanner scanner,
Compactor.CellSink writer,
long smallestReadPoint,
boolean cleanSeqId,
CompactionThroughputController throughputController,
boolean major)
Performs compaction on a column family with the mob flag enabled.
|
abortWriter, commitWriter, compactForTesting, createTmpWriter
appendMetadataAndCloseWriter, compact, createFileScanners, createScanner, createScanner, createTmpWriter, getFileDetails, getProgress, getSmallestReadPoint, postCreateCoprocScanner, preCreateCoprocScanner, preCreateCoprocScanner
public DefaultMobStoreCompactor(Configuration conf, Store store)
public List<Path> compact(CompactionRequest request, CompactionThroughputController throughputController, User user) throws IOException
DefaultCompactor
compact
in class DefaultCompactor
IOException
protected boolean performCompaction(Compactor.FileDetails fd, InternalScanner scanner, Compactor.CellSink writer, long smallestReadPoint, boolean cleanSeqId, CompactionThroughputController throughputController, boolean major) throws IOException
MobCompactionStoreScanner
is used as a scanner
which could output the normal cells and delete markers together when required.
After the major compaction on the normal hfiles, we have a guarantee that we have purged all
deleted or old version mob refs, and the delete markers are written to a del file with the
suffix _del. Because of this, it is safe to use the del file in the mob compaction.
The mob compaction doesn't take place in the normal hfiles, it occurs directly in the
mob files. When the small mob files are merged into bigger ones, the del file is added into
the scanner to filter the deleted cells.performCompaction
in class Compactor<StoreFile.Writer>
fd
- File detailsscanner
- Where to read from.writer
- Where to write to.smallestReadPoint
- Smallest read point.cleanSeqId
- When true, remove seqId(used to be mvcc) value which is <= smallestReadPointthroughputController
- The compaction throughput controller.major
- Is a major compaction.IOException