private final class HStore.StoreFlusherImpl extends Object implements StoreFlushContext
Modifier and Type | Field and Description |
---|---|
private long |
cacheFlushCount |
private long |
cacheFlushSeqNum |
private long |
cacheFlushSize |
private List<org.apache.hadoop.fs.Path> |
committedFiles |
private long |
outputFileSize |
private MemStoreSnapshot |
snapshot |
private List<org.apache.hadoop.fs.Path> |
tempFiles |
private FlushLifeCycleTracker |
tracker |
Modifier | Constructor and Description |
---|---|
private |
StoreFlusherImpl(long cacheFlushSeqNum,
FlushLifeCycleTracker tracker) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Abort the snapshot preparation.
|
boolean |
commit(MonitoredTask status)
Commit the flush - add the store file to the store and clear the
memstore snapshot.
|
void |
flushCache(MonitoredTask status)
Flush the cache (create the new store file)
A length operation which doesn't require locking out any function
of the store.
|
List<org.apache.hadoop.fs.Path> |
getCommittedFiles()
Returns the newly committed files from the flush.
|
long |
getOutputFileSize() |
MemStoreSize |
prepare()
This is not thread safe.
|
void |
replayFlush(List<String> fileNames,
boolean dropMemstoreSnapshot)
Similar to commit, but called in secondary region replicas for replaying the
flush cache from primary region.
|
private final FlushLifeCycleTracker tracker
private final long cacheFlushSeqNum
private MemStoreSnapshot snapshot
private List<org.apache.hadoop.fs.Path> committedFiles
private long cacheFlushCount
private long cacheFlushSize
private long outputFileSize
private StoreFlusherImpl(long cacheFlushSeqNum, FlushLifeCycleTracker tracker)
public MemStoreSize prepare()
prepare
in interface StoreFlushContext
public void flushCache(MonitoredTask status) throws IOException
StoreFlushContext
flushCache
in interface StoreFlushContext
IOException
- in case the flush failspublic boolean commit(MonitoredTask status) throws IOException
StoreFlushContext
commit
in interface StoreFlushContext
IOException
public long getOutputFileSize()
getOutputFileSize
in interface StoreFlushContext
public List<org.apache.hadoop.fs.Path> getCommittedFiles()
StoreFlushContext
getCommittedFiles
in interface StoreFlushContext
public void replayFlush(List<String> fileNames, boolean dropMemstoreSnapshot) throws IOException
replayFlush
in interface StoreFlushContext
fileNames
- names of the flushed filesdropMemstoreSnapshot
- whether to drop the prepared memstore snapshotIOException
public void abort() throws IOException
abort
in interface StoreFlushContext
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.