@InterfaceAudience.Private public interface MemStore extends HeapSize
Modifier and Type | Method and Description |
---|---|
long |
add(Cell cell)
Write an update
|
long |
add(Iterable<Cell> cells)
Write the updates
|
void |
clearSnapshot(long id)
Clears the current snapshot of the Memstore.
|
long |
delete(Cell deleteCell)
Write a delete
|
long |
getFlushableSize()
On flush, how much memory we will clear.
|
void |
getRowKeyAtOrBefore(org.apache.hadoop.hbase.regionserver.GetClosestRowBeforeTracker state)
Find the key that matches row exactly, or the one that immediately precedes it.
|
List<KeyValueScanner> |
getScanners(long readPt) |
long |
getSnapshotSize()
Return the size of the snapshot(s) if any
|
void |
rollback(Cell cell)
Remove n key from the memstore.
|
long |
size() |
MemStoreSnapshot |
snapshot()
Creates a snapshot of the current memstore.
|
long |
timeOfOldestEdit() |
long |
updateColumnValue(byte[] row,
byte[] family,
byte[] qualifier,
long newValue,
long now)
Given the specs of a column, update it, first by inserting a new record,
then removing the old one.
|
long |
upsert(Iterable<Cell> cells,
long readpoint,
List<Cell> removedCells)
Update or insert the specified cells.
|
MemStoreSnapshot snapshot()
clearSnapshot(long)
.MemStoreSnapshot
void clearSnapshot(long id) throws UnexpectedStateException
id
- UnexpectedStateException
snapshot()
long getFlushableSize()
long getSnapshotSize()
long add(Cell cell)
cell
- long add(Iterable<Cell> cells)
cells
- long timeOfOldestEdit()
void rollback(Cell cell)
cell
- long delete(Cell deleteCell)
deleteCell
- void getRowKeyAtOrBefore(org.apache.hadoop.hbase.regionserver.GetClosestRowBeforeTracker state)
state
- column/delete tracking statelong updateColumnValue(byte[] row, byte[] family, byte[] qualifier, long newValue, long now)
row
- family
- qualifier
- newValue
- now
- long upsert(Iterable<Cell> cells, long readpoint, List<Cell> removedCells)
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.removedCells
- collect the removed cells. It can be null.List<KeyValueScanner> getScanners(long readPt)
long size()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.