public class CommitLogSegmentManagerCDC extends AbstractCommitLogSegmentManager
commitLog
Constructor and Description |
---|
CommitLogSegmentManagerCDC(CommitLog commitLog,
java.lang.String storageDirectory) |
Modifier and Type | Method and Description |
---|---|
void |
addCDCSize(long size)
For use after replay when replayer hard-links / adds tracking of replayed segments
|
CommitLogSegment.Allocation |
allocate(Mutation mutation,
int size)
Reserve space in the current segment for the provided mutation or, if there isn't space available,
create a new segment.
|
CommitLogSegment |
createSegment()
On segment creation, flag whether the segment should accept CDC mutations or not based on the total currently
allocated unflushed CDC segments and the contents of cdc_raw
|
void |
discard(CommitLogSegment segment,
boolean delete)
Indicates that a segment file has been flushed and is no longer needed.
|
void |
shutdown()
Initiates the shutdown process for the management thread.
|
long |
updateCDCTotalSize()
Only use for testing / validation that size tracker is working.
|
awaitManagementTasksCompletion, awaitTermination, getActiveSegments, onDiskSize, stopUnsafe, sync
public CommitLogSegmentManagerCDC(CommitLog commitLog, java.lang.String storageDirectory)
public void discard(CommitLogSegment segment, boolean delete)
AbstractCommitLogSegmentManager
segment
- segment to be discardeddelete
- whether or not the segment is safe to be deleted.public void shutdown()
shutdown
in class AbstractCommitLogSegmentManager
public CommitLogSegment.Allocation allocate(Mutation mutation, int size) throws CDCWriteException
allocate
in class AbstractCommitLogSegmentManager
mutation
- Mutation to allocate in segment managersize
- total size (overhead + serialized) of mutationCDCWriteException
- If segment disallows CDC mutations, we throwpublic CommitLogSegment createSegment()
public void addCDCSize(long size)
public long updateCDCTotalSize()
Copyright © 2009-2021 The Apache Software Foundation