public class DefaultStoreFlusher extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.conf.Configuration |
conf |
protected Store |
store |
Constructor and Description |
---|
DefaultStoreFlusher(org.apache.hadoop.conf.Configuration conf,
Store store) |
Modifier and Type | Method and Description |
---|---|
protected InternalScanner |
createStoreScanner(long smallestReadPoint,
KeyValueScanner memstoreScanner)
Creates the default flush scanner based on memstore scanner
|
protected void |
finalizeWriter(StoreFile.Writer writer,
long cacheFlushSeqNum,
MonitoredTask status) |
List<org.apache.hadoop.fs.Path> |
flushSnapshot(SortedSet<KeyValue> snapshot,
long cacheFlushId,
TimeRangeTracker snapshotTimeRangeTracker,
AtomicLong flushedSize,
MonitoredTask status)
Turns a snapshot of memstore into a set of store files.
|
protected long |
performFlush(InternalScanner scanner,
Compactor.CellSink sink,
long smallestReadPoint)
Performs memstore flush, writing data from scanner into sink.
|
protected InternalScanner |
postCreateCoprocScanner(InternalScanner scanner)
Calls coprocessor to create a scanner based on default flush scanner
|
protected InternalScanner |
preCreateCoprocScanner(KeyValueScanner memstoreScanner)
Calls coprocessor to create a flush scanner based on memstore scanner
|
protected org.apache.hadoop.conf.Configuration conf
protected Store store
public DefaultStoreFlusher(org.apache.hadoop.conf.Configuration conf, Store store)
public List<org.apache.hadoop.fs.Path> flushSnapshot(SortedSet<KeyValue> snapshot, long cacheFlushId, TimeRangeTracker snapshotTimeRangeTracker, AtomicLong flushedSize, MonitoredTask status) throws IOException
snapshot
- Memstore snapshot.cacheFlushId
- Log cache flush sequence number.snapshotTimeRangeTracker
- Time range tracker from the memstore
pertaining to the snapshot.flushedSize
- Out parameter for the size of the KVs flushed.status
- Task that represents the flush operation and may be updated with status.IOException
protected void finalizeWriter(StoreFile.Writer writer, long cacheFlushSeqNum, MonitoredTask status) throws IOException
IOException
protected InternalScanner preCreateCoprocScanner(KeyValueScanner memstoreScanner) throws IOException
IOException
protected InternalScanner createStoreScanner(long smallestReadPoint, KeyValueScanner memstoreScanner) throws IOException
IOException
protected InternalScanner postCreateCoprocScanner(InternalScanner scanner) throws IOException
IOException
protected long performFlush(InternalScanner scanner, Compactor.CellSink sink, long smallestReadPoint) 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.IOException
Copyright © 2013 The Apache Software Foundation. All rights reserved.