Class DirectCompactionEntryLog
java.lang.Object
org.apache.bookkeeper.bookie.storage.directentrylogger.DirectCompactionEntryLog
- All Implemented Interfaces:
CompactionEntryLog
DirectCompactionEntryLog.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Abort the compaction log.static FilecompactedFile(File directory, int newLogId, int compactedLogId) static FilecompactingFile(File directory, int logId) voidClean up any temporary resources that were used by the compaction process.longGet the log ID of the entrylog to which compacted entries are being written.longGet the log ID of the entrylog which is being compacted.voidMake the log written by the compaction process available for reads.(package private) static CompactionEntryLognewLog(int srcLogId, int dstLogId, File ledgerDir, long maxFileSize, ExecutorService writeExecutor, BufferPool writeBuffers, NativeIO nativeIO, io.netty.buffer.ByteBufAllocator allocator, Slogger slog) (package private) static CompactionEntryLogrecoverLog(int srcLogId, int dstLogId, File ledgerDir, int readBufferSize, int maxSaneEntrySize, NativeIO nativeIO, io.netty.buffer.ByteBufAllocator allocator, OpStatsLogger readBlockStats, Slogger slog) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.bookkeeper.bookie.storage.CompactionEntryLog
addEntry, flush, markCompacted, scan
-
Field Details
-
srcLogId
protected final int srcLogId -
dstLogId
protected final int dstLogId -
slog
-
compactingFile
-
compactedFile
-
completeFile
-
-
Method Details
-
newLog
static CompactionEntryLog newLog(int srcLogId, int dstLogId, File ledgerDir, long maxFileSize, ExecutorService writeExecutor, BufferPool writeBuffers, NativeIO nativeIO, io.netty.buffer.ByteBufAllocator allocator, Slogger slog) throws IOException - Throws:
IOException
-
recoverLog
static CompactionEntryLog recoverLog(int srcLogId, int dstLogId, File ledgerDir, int readBufferSize, int maxSaneEntrySize, NativeIO nativeIO, io.netty.buffer.ByteBufAllocator allocator, OpStatsLogger readBlockStats, Slogger slog) -
abort
public void abort()Description copied from interface:CompactionEntryLogAbort the compaction log. This should delete any resources held by this log.- Specified by:
abortin interfaceCompactionEntryLog
-
makeAvailable
Description copied from interface:CompactionEntryLogMake the log written by the compaction process available for reads.- Specified by:
makeAvailablein interfaceCompactionEntryLog- Throws:
IOException
-
finalizeAndCleanup
public void finalizeAndCleanup()Description copied from interface:CompactionEntryLogClean up any temporary resources that were used by the compaction process.- Specified by:
finalizeAndCleanupin interfaceCompactionEntryLog
-
getDstLogId
public long getDstLogId()Description copied from interface:CompactionEntryLogGet the log ID of the entrylog to which compacted entries are being written.- Specified by:
getDstLogIdin interfaceCompactionEntryLog
-
getSrcLogId
public long getSrcLogId()Description copied from interface:CompactionEntryLogGet the log ID of the entrylog which is being compacted.- Specified by:
getSrcLogIdin interfaceCompactionEntryLog
-
compactingFile
-
compactedFile
-