@InterfaceAudience.Private public class DefaultCompactor extends Compactor<StoreFile.Writer>
compact(CompactionRequest, CompactionThroughputController, User)Compactor.CellSink, Compactor.CellSinkFactory<S>, Compactor.FileDetails, Compactor.InternalScannerFactorycompactionCompression, compactionKVMax, conf, defaultScannerFactory, keepSeqIdPeriod, progress, store| Constructor and Description |
|---|
DefaultCompactor(Configuration conf,
Store store) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
abortWriter(StoreFile.Writer writer) |
protected List<Path> |
commitWriter(StoreFile.Writer writer,
Compactor.FileDetails fd,
CompactionRequest request) |
List<Path> |
compact(CompactionRequest request,
CompactionThroughputController throughputController,
User user)
Do a minor/major compaction on an explicit set of storefiles from a Store.
|
List<Path> |
compactForTesting(Collection<StoreFile> filesToCompact,
boolean isMajor)
Compact a list of files for testing.
|
protected StoreFile.Writer |
createTmpWriter(Compactor.FileDetails fd,
long smallestReadPoint)
Creates a writer for a new file in a temporary directory.
|
appendMetadataAndCloseWriter, compact, createFileScanners, createScanner, createScanner, createTmpWriter, getFileDetails, getProgress, getSmallestReadPoint, performCompaction, postCreateCoprocScanner, preCreateCoprocScanner, preCreateCoprocScannerpublic DefaultCompactor(Configuration conf,
Store store)
public List<Path> compact(CompactionRequest request, CompactionThroughputController throughputController, User user) throws IOException
IOExceptionprotected StoreFile.Writer createTmpWriter(Compactor.FileDetails fd, long smallestReadPoint) throws IOException
fd - The file details.smallestReadPoint - The smallest mvcc readPoint across all the scanners in this region.IOExceptionpublic List<Path> compactForTesting(Collection<StoreFile> filesToCompact, boolean isMajor) throws IOException
CompactionRequest to pass to
compact(CompactionRequest, CompactionThroughputController, User);filesToCompact - the files to compact. These are used as the compactionSelection for
the generated CompactionRequest.isMajor - true to major compact (prune all deletes, max versions, etc)IOExceptionprotected List<Path> commitWriter(StoreFile.Writer writer, Compactor.FileDetails fd, CompactionRequest request) throws IOException
commitWriter in class Compactor<StoreFile.Writer>IOExceptionprotected void abortWriter(StoreFile.Writer writer) throws IOException
abortWriter in class Compactor<StoreFile.Writer>IOException