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 MemStoreSnapshot |
snapshot |
private List<org.apache.hadoop.fs.Path> |
tempFiles |
| Modifier | Constructor and Description |
|---|---|
private |
HStore.StoreFlusherImpl(long cacheFlushSeqNum) |
| 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.
|
void |
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 long cacheFlushSeqNum
private MemStoreSnapshot snapshot
private List<org.apache.hadoop.fs.Path> tempFiles
private List<org.apache.hadoop.fs.Path> committedFiles
private long cacheFlushCount
private long cacheFlushSize
public void 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 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–2019 The Apache Software Foundation. All rights reserved.