Search in sources :

Example 36 with StoreScanner

use of org.apache.hadoop.hbase.regionserver.StoreScanner in project cdap by caskdata.

the class MessageTableRegionObserver method preFlushScannerOpen.

@Override
public InternalScanner preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, KeyValueScanner memstoreScanner, InternalScanner s) throws IOException {
    LOG.info("preFlush, filter using MessageDataFilter");
    TransactionVisibilityState txVisibilityState = txStateCache.getLatestState();
    Scan scan = new Scan();
    scan.setFilter(new MessageDataFilter(c.getEnvironment(), System.currentTimeMillis(), prefixLength, topicMetadataCache, txVisibilityState));
    return new LoggingInternalScanner("MessageDataFilter", "preFlush", new StoreScanner(store, store.getScanInfo(), scan, Collections.singletonList(memstoreScanner), ScanType.COMPACT_DROP_DELETES, store.getSmallestReadPoint(), HConstants.OLDEST_TIMESTAMP), txVisibilityState);
}
Also used : TransactionVisibilityState(org.apache.tephra.persist.TransactionVisibilityState) Scan(org.apache.hadoop.hbase.client.Scan) StoreScanner(org.apache.hadoop.hbase.regionserver.StoreScanner)

Aggregations

StoreScanner (org.apache.hadoop.hbase.regionserver.StoreScanner)36 Scan (org.apache.hadoop.hbase.client.Scan)33 TransactionVisibilityState (org.apache.tephra.persist.TransactionVisibilityState)14 ArrayList (java.util.ArrayList)3 ScanInfo (org.apache.hadoop.hbase.regionserver.ScanInfo)3 IOException (java.io.IOException)2 Path (org.apache.hadoop.fs.Path)2 Cell (org.apache.hadoop.hbase.Cell)2 ScannerContext (org.apache.hadoop.hbase.regionserver.ScannerContext)2 StoreFileWriter (org.apache.hadoop.hbase.regionserver.StoreFileWriter)2 Date (java.util.Date)1 List (java.util.List)1 WriterFactory (org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter.WriterFactory)1 StoreFile (org.apache.hadoop.hbase.regionserver.StoreFile)1