@InterfaceAudience.Private public class DefaultMobCompactor extends DefaultCompactor
Compactor.CellSink, Compactor.FileDetailscompactionCompression, compactionKVMax, conf, keepSeqIdPeriod, progress, store| Constructor and Description |
|---|
DefaultMobCompactor(org.apache.hadoop.conf.Configuration conf,
Store store) |
| Modifier and Type | Method and Description |
|---|---|
protected InternalScanner |
createScanner(Store store,
List<StoreFileScanner> scanners,
ScanType scanType,
long smallestReadPoint,
long earliestPutTs) |
protected StoreFile.Writer |
createTmpWriter(Compactor.FileDetails fd,
boolean shouldDropBehind)
Creates a writer for a new file in a temporary directory.
|
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.
|
compact, compactForTestingappendMetadataAndCloseWriter, createFileScanners, createScanner, getFileDetails, getProgress, getSmallestReadPoint, postCreateCoprocScanner, preCreateCoprocScanner, preCreateCoprocScanner, resetSeqIdpublic DefaultMobCompactor(org.apache.hadoop.conf.Configuration conf,
Store store)
protected StoreFile.Writer createTmpWriter(Compactor.FileDetails fd, boolean shouldDropBehind) throws IOException
createTmpWriter in class DefaultCompactorfd - The file details.shouldDropBehind - Should the writer drop behind.IOExceptionprotected InternalScanner createScanner(Store store, List<StoreFileScanner> scanners, ScanType scanType, long smallestReadPoint, long earliestPutTs) throws IOException
createScanner in class Compactorstore - storescanners - Store file scanners.scanType - Scan type.smallestReadPoint - Smallest MVCC read point.earliestPutTs - Earliest put across all files.IOExceptionprotected 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 Compactorfd - 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 <= smallestReadPointmajor - Is a major compaction.IOExceptionCopyright © 2007–2016 Cloudera. All rights reserved.