@InterfaceAudience.Private public interface MemStore
Modifier and Type | Method and Description |
---|---|
void |
add(Cell cell,
MemStoreSizing memstoreSizing)
Write an update
|
void |
add(Iterable<Cell> cells,
MemStoreSizing memstoreSizing)
Write the updates
|
void |
clearSnapshot(long id)
Clears the current snapshot of the Memstore.
|
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) |
MemStoreSize |
getSnapshotSize()
Return the size of the snapshot(s) if any
|
boolean |
isSloppy() |
long |
preFlushSeqIDEstimation()
This method is called before the flush is executed.
|
MemStoreSize |
size() |
MemStoreSnapshot |
snapshot()
Creates a snapshot of the current memstore.
|
default void |
startReplayingFromWAL()
This message intends to inform the MemStore that next coming updates
are going to be part of the replaying edits from WAL
|
default void |
stopReplayingFromWAL()
This message intends to inform the MemStore that the replaying edits from WAL
are done
|
long |
timeOfOldestEdit() |
void |
upsert(Iterable<Cell> cells,
long readpoint,
MemStoreSizing memstoreSizing)
Update or insert the specified cells.
|
MemStoreSnapshot snapshot()
clearSnapshot(long)
.MemStoreSnapshot
void clearSnapshot(long id) throws UnexpectedStateException
id
- UnexpectedStateException
snapshot()
MemStoreSize getFlushableSize()
MemStoreSize getSnapshotSize()
void add(Cell cell, MemStoreSizing memstoreSizing)
cell
- memstoreSizing
- The delta in memstore size will be passed back via this.
This will include both data size and heap overhead delta.void add(Iterable<Cell> cells, MemStoreSizing memstoreSizing)
cells
- memstoreSizing
- The delta in memstore size will be passed back via this.
This will include both data size and heap overhead delta.long timeOfOldestEdit()
void upsert(Iterable<Cell> cells, long readpoint, MemStoreSizing memstoreSizing)
For each Cell, insert into MemStore. This will atomically upsert the value for that row/family/qualifier. If a Cell did already exist, it will then be removed.
Currently the memstoreTS is kept at 0 so as each insert happens, it will be immediately visible. May want to change this so it is atomic across all KeyValues.
This is called under row lock, so Get operations will still see updates atomically. Scans will only see each KeyValue update as atomic.
cells
- readpoint
- readpoint below which we can safely remove duplicate Cells.memstoreSizing
- The delta in memstore size will be passed back via this.
This will include both data size and heap overhead delta.List<KeyValueScanner> getScanners(long readPt) throws IOException
IOException
MemStoreSize size()
long preFlushSeqIDEstimation()
HConstants.NO_SEQNUM
.boolean isSloppy()
default void startReplayingFromWAL()
default void stopReplayingFromWAL()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.