@InterfaceAudience.Private public abstract class CompactionContext extends Object
| Modifier and Type | Field and Description |
|---|---|
protected CompactionRequest |
request |
| Constructor and Description |
|---|
CompactionContext() |
| Modifier and Type | Method and Description |
|---|---|
abstract List<org.apache.hadoop.fs.Path> |
compact()
Runs the compaction based on current selection.
|
void |
forceSelect(CompactionRequest request)
Forces external selection to be applied for this compaction.
|
CompactionRequest |
getRequest() |
boolean |
hasSelection() |
abstract List<StoreFile> |
preSelect(List<StoreFile> filesCompacting)
Called before coprocessor preCompactSelection and should filter the candidates
for coprocessor; i.e.
|
abstract boolean |
select(List<StoreFile> filesCompacting,
boolean isUserCompaction,
boolean mayUseOffPeak,
boolean forceMajor)
Called to select files for compaction.
|
protected CompactionRequest request
public abstract List<StoreFile> preSelect(List<StoreFile> filesCompacting)
filesCompacting - files currently compactingpublic abstract boolean select(List<StoreFile> filesCompacting, boolean isUserCompaction, boolean mayUseOffPeak, boolean forceMajor) throws IOException
filesCompacting - Files currently being compacted by other compactions.isUserCompaction - Whether this is a user compaction.mayUseOffPeak - Whether the underlying policy may assume it's off-peak hours.forceMajor - Whether to force major compaction.IOExceptionpublic void forceSelect(CompactionRequest request)
request - The pre-cooked request with selection and other settings.public abstract List<org.apache.hadoop.fs.Path> compact() throws IOException
IOExceptionpublic CompactionRequest getRequest()
public boolean hasSelection()
Copyright © 2014 The Apache Software Foundation. All rights reserved.