@InterfaceAudience.Private public class DefaultStoreFlusher extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.conf.Configuration |
conf |
protected HStore |
store |
Constructor and Description |
---|
DefaultStoreFlusher(org.apache.hadoop.conf.Configuration conf,
HStore store) |
Modifier and Type | Method and Description |
---|---|
protected InternalScanner |
createScanner(List<KeyValueScanner> snapshotScanners,
long smallestReadPoint,
FlushLifeCycleTracker tracker)
Creates the scanner for flushing snapshot.
|
protected void |
finalizeWriter(StoreFileWriter writer,
long cacheFlushSeqNum,
MonitoredTask status) |
List<org.apache.hadoop.fs.Path> |
flushSnapshot(MemStoreSnapshot snapshot,
long cacheFlushId,
MonitoredTask status,
ThroughputController throughputController,
FlushLifeCycleTracker tracker)
Turns a snapshot of memstore into a set of store files.
|
protected void |
performFlush(InternalScanner scanner,
CellSink sink,
long smallestReadPoint,
ThroughputController throughputController)
Performs memstore flush, writing data from scanner into sink.
|
protected org.apache.hadoop.conf.Configuration conf
protected HStore store
public DefaultStoreFlusher(org.apache.hadoop.conf.Configuration conf, HStore store)
public List<org.apache.hadoop.fs.Path> flushSnapshot(MemStoreSnapshot snapshot, long cacheFlushId, MonitoredTask status, ThroughputController throughputController, FlushLifeCycleTracker tracker) throws IOException
snapshot
- Memstore snapshot.cacheFlushId
- Log cache flush sequence number.status
- Task that represents the flush operation and may be updated with status.throughputController
- A controller to avoid flush too fastIOException
protected void finalizeWriter(StoreFileWriter writer, long cacheFlushSeqNum, MonitoredTask status) throws IOException
IOException
protected final InternalScanner createScanner(List<KeyValueScanner> snapshotScanners, long smallestReadPoint, FlushLifeCycleTracker tracker) throws IOException
snapshotScanners
- smallestReadPoint
- IOException
protected void performFlush(InternalScanner scanner, CellSink sink, long smallestReadPoint, ThroughputController throughputController) throws IOException
scanner
- Scanner to get data from.sink
- Sink to write data to. Could be StoreFile.Writer.smallestReadPoint
- Smallest read point used for the flush.throughputController
- A controller to avoid flush too fastIOException
Copyright © 2007–2019 Cloudera. All rights reserved.