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 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 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.