Package org.apache.bookkeeper.bookie
Class TransactionalEntryLogCompactor.UpdateIndexPhase
java.lang.Object
org.apache.bookkeeper.bookie.TransactionalEntryLogCompactor.CompactionPhase
org.apache.bookkeeper.bookie.TransactionalEntryLogCompactor.UpdateIndexPhase
- Enclosing class:
- TransactionalEntryLogCompactor
class TransactionalEntryLogCompactor.UpdateIndexPhase
extends TransactionalEntryLogCompactor.CompactionPhase
Assume we're compacting log 1 to log 3.
This phase is to update the entry locations and flush the index.
When the phase start, there should be a compacted file like "3.log.1.compacted",
where 3 is the new compaction logId and 1 is the old entry logId.
After the index the flushed successfully, a hardlink "3.log" file should be created,
and 3.log.1.compacted file should be deleted to indicate the phase is succeed.
This phase can also used to recover partially flushed index when we pass isInRecovery=true
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUpdateIndexPhase(CompactionEntryLog compactionLog) UpdateIndexPhase(CompactionEntryLog compactionLog, boolean isInRecovery) -
Method Summary
Methods inherited from class org.apache.bookkeeper.bookie.TransactionalEntryLogCompactor.CompactionPhase
run
-
Field Details
-
compactionLog
-
-
Constructor Details
-
UpdateIndexPhase
-
UpdateIndexPhase
-
-
Method Details
-
start
- Specified by:
startin classTransactionalEntryLogCompactor.CompactionPhase- Throws:
IOException
-
complete
boolean complete()- Specified by:
completein classTransactionalEntryLogCompactor.CompactionPhase
-
abort
void abort()- Specified by:
abortin classTransactionalEntryLogCompactor.CompactionPhase
-