@InterfaceAudience.Private public class MemStoreCompactor extends Object
Modifier and Type | Field and Description |
---|---|
private CompactingMemStore |
compactingMemStore |
private int |
compactionKVMax |
static long |
DEEP_OVERHEAD |
private AtomicBoolean |
isInterrupted |
private static org.slf4j.Logger |
LOG |
private MemStoreCompactionStrategy |
strategy |
private VersionedSegmentsList |
versionedList |
Constructor and Description |
---|
MemStoreCompactor(CompactingMemStore compactingMemStore,
MemoryCompactionPolicy compactionPolicy) |
Modifier and Type | Method and Description |
---|---|
private ImmutableSegment |
createSubstitution(MemStoreCompactionStrategy.Action action)
----------------------------------------------------------------------
Creation of the ImmutableSegment either by merge or copy-compact of the segments of the
pipeline, based on the Compactor Iterator.
|
private void |
doCompaction()
----------------------------------------------------------------------
The worker thread performs the compaction asynchronously.
|
(package private) void |
initiateCompactionStrategy(MemoryCompactionPolicy compType,
org.apache.hadoop.conf.Configuration configuration,
String cfName) |
private void |
releaseResources()
----------------------------------------------------------------------
Reset the interruption indicator and clear the pointers in order to allow good
garbage collection
|
void |
resetStats() |
boolean |
start()
----------------------------------------------------------------------
The request to dispatch the compaction asynchronous task.
|
void |
stop()
----------------------------------------------------------------------
The request to cancel the compaction asynchronous task
The compaction may still happen if the request was sent too late
Non-blocking request
|
String |
toString() |
public static final long DEEP_OVERHEAD
private static final org.slf4j.Logger LOG
private CompactingMemStore compactingMemStore
private VersionedSegmentsList versionedList
private final AtomicBoolean isInterrupted
private final int compactionKVMax
private MemStoreCompactionStrategy strategy
public MemStoreCompactor(CompactingMemStore compactingMemStore, MemoryCompactionPolicy compactionPolicy) throws IllegalArgumentIOException
IllegalArgumentIOException
public boolean start() throws IOException
IOException
public void stop()
public void resetStats()
private void releaseResources()
private void doCompaction()
private ImmutableSegment createSubstitution(MemStoreCompactionStrategy.Action action) throws IOException
IOException
void initiateCompactionStrategy(MemoryCompactionPolicy compType, org.apache.hadoop.conf.Configuration configuration, String cfName) throws IllegalArgumentIOException
IllegalArgumentIOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.