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 Modifier and Type Field Description (package private) CompactionEntryLog
compactionLog
-
Constructor Summary
Constructors Constructor Description UpdateIndexPhase(CompactionEntryLog compactionLog)
UpdateIndexPhase(CompactionEntryLog compactionLog, boolean isInRecovery)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
abort()
(package private) boolean
complete()
(package private) void
start()
-
Methods inherited from class org.apache.bookkeeper.bookie.TransactionalEntryLogCompactor.CompactionPhase
run
-
-
-
-
Field Detail
-
compactionLog
final CompactionEntryLog compactionLog
-
-
Constructor Detail
-
UpdateIndexPhase
public UpdateIndexPhase(CompactionEntryLog compactionLog)
-
UpdateIndexPhase
public UpdateIndexPhase(CompactionEntryLog compactionLog, boolean isInRecovery)
-
-
Method Detail
-
start
void start() throws java.io.IOException
- Specified by:
start
in classTransactionalEntryLogCompactor.CompactionPhase
- Throws:
java.io.IOException
-
complete
boolean complete()
- Specified by:
complete
in classTransactionalEntryLogCompactor.CompactionPhase
-
abort
void abort()
- Specified by:
abort
in classTransactionalEntryLogCompactor.CompactionPhase
-
-