@InterfaceAudience.Private public class DefaultMemStore extends AbstractMemStore
Cells. When asked to flush, current memstore is moved
to snapshot and is cleared. We continue to serve edits out of new memstore
and backing snapshot until flusher reports in that the flush succeeded. At
this point we let the snapshot go.
The MemStore functions should not be called in parallel. Callers should hold
write and read locks. This is done in HStore.
| 限定符和类型 | 字段和说明 |
|---|---|
static long |
DEEP_OVERHEAD |
static long |
FIXED_OVERHEAD |
active, regionServices, snapshot, snapshotId| 构造器和说明 |
|---|
DefaultMemStore()
Default constructor.
|
DefaultMemStore(org.apache.hadoop.conf.Configuration conf,
CellComparator c)
Constructor.
|
DefaultMemStore(org.apache.hadoop.conf.Configuration conf,
CellComparator c,
RegionServicesForStores regionServices)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
checkActiveSize()
Check whether anything need to be done based on the current active set size
Nothing need to be done for the DefaultMemStore
|
MemStoreSize |
getFlushableSize()
Flush will first clear out the data in snapshot if any (It will take a second flush
invocation to clear the current Cell set).
|
List<KeyValueScanner> |
getScanners(long readPt) |
protected List<Segment> |
getSegments() |
protected long |
heapSize() |
boolean |
isSloppy() |
protected long |
keySize() |
static void |
main(String[] args)
Code to help figure if our approximation of object heap sizes is close
enough.
|
long |
preFlushSeqIDEstimation()
This method is called before the flush is executed.
|
MemStoreSize |
size() |
MemStoreSnapshot |
snapshot()
Creates a snapshot of the current memstore.
|
void |
updateLowestUnflushedSequenceIdInWAL(boolean onlyIfMoreRecent)
Updates the wal with the lowest sequence id (oldest entry) that is still in memory
|
add, add, addToScanners, addToScanners, clearSnapshot, dump, getComparator, getConfiguration, getLowest, getNextRow, getSnapshotSize, resetActive, timeOfOldestEdit, toString, upsertclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitstartReplayingFromWAL, stopReplayingFromWALpublic static final long DEEP_OVERHEAD
public static final long FIXED_OVERHEAD
public DefaultMemStore()
public DefaultMemStore(org.apache.hadoop.conf.Configuration conf,
CellComparator c)
c - Comparatorpublic DefaultMemStore(org.apache.hadoop.conf.Configuration conf,
CellComparator c,
RegionServicesForStores regionServices)
c - Comparatorpublic MemStoreSnapshot snapshot()
AbstractMemStore.clearSnapshot(long)MemStoreSnapshotpublic MemStoreSize getFlushableSize()
MemStoreprotected long keySize()
keySize 在类中 AbstractMemStoreprotected long heapSize()
heapSize 在类中 AbstractMemStorepublic List<KeyValueScanner> getScanners(long readPt) throws IOException
IOExceptionprotected List<Segment> getSegments() throws IOException
getSegments 在类中 AbstractMemStoreIOExceptionpublic void updateLowestUnflushedSequenceIdInWAL(boolean onlyIfMoreRecent)
AbstractMemStoreupdateLowestUnflushedSequenceIdInWAL 在类中 AbstractMemStoreonlyIfMoreRecent - a flag that marks whether to update the sequence id no matter what or
only if it is greater than the previous sequence idpublic MemStoreSize size()
protected void checkActiveSize()
checkActiveSize 在类中 AbstractMemStorepublic long preFlushSeqIDEstimation()
MemStoreHConstants.NO_SEQNUM.public boolean isSloppy()
public static void main(String[] args)
args - main argsCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.