|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.regionserver.compactions.CompactionContext
@InterfaceAudience.Private public abstract class CompactionContext
This class holds all "physical" details necessary to run a compaction, and abstracts away the details specific to a particular compaction. It also has compaction request with all the logical details. Hence, this class is basically the compaction.
| Field Summary | |
|---|---|
protected CompactionRequest |
request
|
| Constructor Summary | |
|---|---|
CompactionContext()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected CompactionRequest request
| Constructor Detail |
|---|
public CompactionContext()
| Method Detail |
|---|
public abstract List<StoreFile> preSelect(List<StoreFile> filesCompacting)
filesCompacting - files currently compacting
public 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||