|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.regionserver.compactions.Compactor
@InterfaceAudience.Private public abstract class Compactor
A compactor is a compaction algorithm associated a given policy. Base class also contains reusable parts for implementing compactors (what is common and what isn't is evolving).
| Nested Class Summary | |
|---|---|
static interface |
Compactor.CellSink
TODO: Replace this with CellOutputStream when StoreFile.Writer uses cells. |
protected static class |
Compactor.FileDetails
The sole reason this class exists is that java has no ref/out/pointer parameters. |
| Field Summary | |
|---|---|
protected Compression.Algorithm |
compactionCompression
|
protected org.apache.hadoop.conf.Configuration |
conf
|
protected CompactionProgress |
progress
|
protected Store |
store
|
| Method Summary | |
|---|---|
protected List<StoreFileScanner> |
createFileScanners(Collection<StoreFile> filesToCompact,
long smallestReadPoint,
boolean useDropBehind)
Creates file scanners for compaction. |
protected InternalScanner |
createScanner(Store store,
List<StoreFileScanner> scanners,
long smallestReadPoint,
long earliestPutTs,
byte[] dropDeletesFromRow,
byte[] dropDeletesToRow)
|
protected InternalScanner |
createScanner(Store store,
List<StoreFileScanner> scanners,
ScanType scanType,
long smallestReadPoint,
long earliestPutTs)
|
protected Compactor.FileDetails |
getFileDetails(Collection<StoreFile> filesToCompact,
boolean calculatePutTs)
Extracts some details about the files to compact that are commonly needed by compactors. |
CompactionProgress |
getProgress()
|
protected long |
getSmallestReadPoint()
|
protected boolean |
performCompaction(InternalScanner scanner,
Compactor.CellSink writer,
long smallestReadPoint,
CompactionThroughputController throughputController)
Performs the compaction. |
protected InternalScanner |
postCreateCoprocScanner(CompactionRequest request,
ScanType scanType,
InternalScanner scanner,
User user)
Calls coprocessor, if any, to create scanners - after normal scanner creation. |
protected InternalScanner |
preCreateCoprocScanner(CompactionRequest request,
ScanType scanType,
long earliestPutTs,
List<StoreFileScanner> scanners)
Calls coprocessor, if any, to create compaction scanner - before normal scanner creation. |
protected InternalScanner |
preCreateCoprocScanner(CompactionRequest request,
ScanType scanType,
long earliestPutTs,
List<StoreFileScanner> scanners,
User user)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected CompactionProgress progress
protected org.apache.hadoop.conf.Configuration conf
protected Store store
protected Compression.Algorithm compactionCompression
| Method Detail |
|---|
public CompactionProgress getProgress()
protected Compactor.FileDetails getFileDetails(Collection<StoreFile> filesToCompact,
boolean calculatePutTs)
throws IOException
filesToCompact - Files.calculatePutTs - Whether earliest put TS is needed.
IOException
protected List<StoreFileScanner> createFileScanners(Collection<StoreFile> filesToCompact,
long smallestReadPoint,
boolean useDropBehind)
throws IOException
filesToCompact - Files.
IOExceptionprotected long getSmallestReadPoint()
protected InternalScanner preCreateCoprocScanner(CompactionRequest request,
ScanType scanType,
long earliestPutTs,
List<StoreFileScanner> scanners)
throws IOException
request - Compaction request.scanType - Scan type.earliestPutTs - Earliest put ts.scanners - File scanners for compaction files.
IOException
protected InternalScanner preCreateCoprocScanner(CompactionRequest request,
ScanType scanType,
long earliestPutTs,
List<StoreFileScanner> scanners,
User user)
throws IOException
IOException
protected InternalScanner postCreateCoprocScanner(CompactionRequest request,
ScanType scanType,
InternalScanner scanner,
User user)
throws IOException
request - Compaction request.scanType - Scan type.scanner - The default scanner created for compaction.
IOException
protected boolean performCompaction(InternalScanner scanner,
Compactor.CellSink writer,
long smallestReadPoint,
CompactionThroughputController throughputController)
throws IOException
scanner - Where to read from.writer - Where to write to.smallestReadPoint - Smallest read point.
IOException
protected InternalScanner createScanner(Store store,
List<StoreFileScanner> scanners,
ScanType scanType,
long smallestReadPoint,
long earliestPutTs)
throws IOException
store - storescanners - Store file scanners.scanType - Scan type.smallestReadPoint - Smallest MVCC read point.earliestPutTs - Earliest put across all files.
IOException
protected InternalScanner createScanner(Store store,
List<StoreFileScanner> scanners,
long smallestReadPoint,
long earliestPutTs,
byte[] dropDeletesFromRow,
byte[] dropDeletesToRow)
throws IOException
store - The store.scanners - Store file scanners.smallestReadPoint - Smallest MVCC read point.earliestPutTs - Earliest put across all files.dropDeletesFromRow - Drop deletes starting with this row, inclusive. Can be null.dropDeletesToRow - Drop deletes ending with this row, exclusive. Can be null.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||