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 StoreFlushContextpublic void flushCache(MonitoredTask status) throws IOException
StoreFlushContextflushCache in interface StoreFlushContextIOException - in case the flush failspublic boolean commit(MonitoredTask status) throws IOException
StoreFlushContextcommit in interface StoreFlushContextIOExceptionpublic long getOutputFileSize()
getOutputFileSize in interface StoreFlushContextpublic List<org.apache.hadoop.fs.Path> getCommittedFiles()
StoreFlushContextgetCommittedFiles in interface StoreFlushContextpublic void replayFlush(List<String> fileNames, boolean dropMemstoreSnapshot) throws IOException
replayFlush in interface StoreFlushContextfileNames - names of the flushed filesdropMemstoreSnapshot - whether to drop the prepared memstore snapshotIOExceptionpublic void abort() throws IOException
abort in interface StoreFlushContextIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.