@InterfaceAudience.Private public class DefaultMobCompactor extends DefaultCompactor
|Constructor and Description|
|Modifier and Type||Method and Description|
Creates a writer for a new file in a temporary directory.
Performs compaction on a column family with the mob flag enabled.
appendMetadataAndCloseWriter, createFileScanners, createScanner, getFileDetails, getProgress, getSmallestReadPoint, postCreateCoprocScanner, preCreateCoprocScanner, preCreateCoprocScanner, resetSeqId
public DefaultMobCompactor(org.apache.hadoop.conf.Configuration conf, Store store)
protected StoreFile.Writer createTmpWriter(Compactor.FileDetails fd, boolean shouldDropBehind) throws IOException
protected InternalScanner createScanner(Store store, List<StoreFileScanner> scanners, ScanType scanType, long smallestReadPoint, long earliestPutTs) throws IOException
protected boolean performCompaction(Compactor.FileDetails fd, InternalScanner scanner, Compactor.CellSink writer, long smallestReadPoint, boolean cleanSeqId, CompactionThroughputController throughputController, boolean major) throws IOException
MobCompactionStoreScanneris 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.
fd- File details
scanner- 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 <= smallestReadPoint
major- Is a major compaction.
Copyright © 2007–2018 Cloudera. All rights reserved.