@InterfaceAudience.Private public abstract class AbstractMemStore extends Object implements MemStore
| 限定符和类型 | 字段和说明 |
|---|---|
protected MutableSegment |
active |
static long |
DEEP_OVERHEAD |
static long |
FIXED_OVERHEAD |
protected RegionServicesForStores |
regionServices |
protected ImmutableSegment |
snapshot |
protected long |
snapshotId |
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractMemStore(org.apache.hadoop.conf.Configuration conf,
CellComparator c,
RegionServicesForStores regionServices) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(Cell cell,
MemStoreSizing memstoreSizing)
Write an update
|
void |
add(Iterable<Cell> cells,
MemStoreSizing memstoreSizing)
Write the updates
|
static void |
addToScanners(List<? extends Segment> segments,
long readPt,
List<KeyValueScanner> scanners) |
protected static void |
addToScanners(Segment segment,
long readPt,
List<KeyValueScanner> scanners) |
protected abstract void |
checkActiveSize()
Check whether anything need to be done based on the current active set size
|
void |
clearSnapshot(long id)
The passed snapshot was successfully persisted; it can be let go.
|
protected void |
dump(org.slf4j.Logger log) |
protected CellComparator |
getComparator() |
protected org.apache.hadoop.conf.Configuration |
getConfiguration() |
protected Cell |
getLowest(Cell a,
Cell b) |
protected Cell |
getNextRow(Cell key,
NavigableSet<Cell> set) |
protected abstract List<Segment> |
getSegments() |
MemStoreSize |
getSnapshotSize()
Return the size of the snapshot(s) if any
|
protected abstract long |
heapSize() |
protected abstract long |
keySize() |
protected void |
resetActive() |
long |
timeOfOldestEdit() |
String |
toString() |
abstract void |
updateLowestUnflushedSequenceIdInWAL(boolean onlyIfMoreRecent)
Updates the wal with the lowest sequence id (oldest entry) that is still in memory
|
void |
upsert(Iterable<Cell> cells,
long readpoint,
MemStoreSizing memstoreSizing)
Update or insert the specified cells.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFlushableSize, getScanners, isSloppy, preFlushSeqIDEstimation, size, snapshot, startReplayingFromWAL, stopReplayingFromWALprotected volatile MutableSegment active
protected volatile ImmutableSegment snapshot
protected volatile long snapshotId
protected RegionServicesForStores regionServices
public static final long FIXED_OVERHEAD
public static final long DEEP_OVERHEAD
protected AbstractMemStore(org.apache.hadoop.conf.Configuration conf,
CellComparator c,
RegionServicesForStores regionServices)
public static void addToScanners(List<? extends Segment> segments, long readPt, List<KeyValueScanner> scanners)
protected static void addToScanners(Segment segment, long readPt, List<KeyValueScanner> scanners)
protected void resetActive()
public abstract void updateLowestUnflushedSequenceIdInWAL(boolean onlyIfMoreRecent)
onlyIfMoreRecent - a flag that marks whether to update the sequence id no matter what or
only if it is greater than the previous sequence idpublic void add(Iterable<Cell> cells, MemStoreSizing memstoreSizing)
MemStorepublic void add(Cell cell, MemStoreSizing memstoreSizing)
MemStorepublic void upsert(Iterable<Cell> cells, long readpoint, MemStoreSizing memstoreSizing)
MemStoreFor 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.
public long timeOfOldestEdit()
timeOfOldestEdit 在接口中 MemStorepublic void clearSnapshot(long id)
throws UnexpectedStateException
clearSnapshot 在接口中 MemStoreid - Id of the snapshot to clean out.UnexpectedStateExceptionMemStore.snapshot()public MemStoreSize getSnapshotSize()
MemStoregetSnapshotSize 在接口中 MemStoreprotected org.apache.hadoop.conf.Configuration getConfiguration()
protected void dump(org.slf4j.Logger log)
protected Cell getNextRow(Cell key, NavigableSet<Cell> set)
protected abstract long keySize()
protected abstract long heapSize()
protected CellComparator getComparator()
protected abstract void checkActiveSize()
protected abstract List<Segment> getSegments() throws IOException
IOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.