log.See: Description
| Interface | Description |
|---|---|
| CompactionManager |
Manages a single compaction process.
|
| CompactionTask |
Performs compaction on a set of log
Segments. |
| Class | Description |
|---|---|
| Compactor |
Manages compaction of log
Segments in a pool of background
threads. |
| MajorCompactionManager |
Builds tasks for the
Compaction.MAJOR compaction process. |
| MajorCompactionTask |
Removes tombstones from the log and combines
Segments to reclaim disk space. |
| MinorCompactionManager |
Builds tasks for the
Compaction.MINOR compaction process. |
| MinorCompactionTask |
| Enum | Description |
|---|---|
| Compaction |
Log compaction type identifier.
|
| Compaction.Mode |
Constants for specifying entry compaction modes.
|
log.
The log compaction package implements compaction for Copycat logs using
a custom log cleaning algorithm. As entries are written to the log and applied to the server's state machine, the
state machine can arbitrarily mark entries for removal from the log. Periodically, a set of log compaction threads
will compact segments of the log in the background. Log compaction
is performed in two phases: minor and
major. The minor compaction process efficiently
rewrites individual segments to remove standard entries that have been marked for cleaning. The major compaction process
periodically rewrites the entire log to combine segments that have previously been compacted.
Copyright © 2013–2016. All rights reserved.