use of org.apache.tephra.persist.TransactionVisibilityState 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);
}
use of org.apache.tephra.persist.TransactionVisibilityState in project cdap by caskdata.
the class HBaseQueueRegionObserver method preCompact.
@Override
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, Store store, InternalScanner scanner, ScanType type, CompactionRequest request) throws IOException {
if (!e.getEnvironment().getRegion().isAvailable()) {
return scanner;
}
LOG.info("preCompact, creates EvictionInternalScanner");
TransactionVisibilityState txVisibilityState = txStateCache.getLatestState();
reloadPruneState(e.getEnvironment());
if (compactionState != null) {
// Record tx state before the compaction
compactionState.record(request, txVisibilityState);
}
return new EvictionInternalScanner("compaction", e.getEnvironment(), scanner, txVisibilityState);
}
use of org.apache.tephra.persist.TransactionVisibilityState 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);
}
use of org.apache.tephra.persist.TransactionVisibilityState in project cdap by caskdata.
the class HBaseQueueRegionObserver method preCompact.
@Override
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, Store store, InternalScanner scanner, ScanType type, CompactionRequest request) throws IOException {
if (!e.getEnvironment().getRegion().isAvailable()) {
return scanner;
}
LOG.info("preCompact, creates EvictionInternalScanner");
TransactionVisibilityState txVisibilityState = txStateCache.getLatestState();
reloadPruneState(e.getEnvironment());
if (compactionState != null) {
// Record tx state before the compaction
compactionState.record(request, txVisibilityState);
}
return new EvictionInternalScanner("compaction", e.getEnvironment(), scanner, txVisibilityState);
}
use of org.apache.tephra.persist.TransactionVisibilityState in project cdap by caskdata.
the class HBaseQueueRegionObserver method preCompact.
@Override
public InternalScanner preCompact(ObserverContext<RegionCoprocessorEnvironment> e, Store store, InternalScanner scanner, ScanType type, CompactionRequest request) throws IOException {
if (!e.getEnvironment().getRegion().isAvailable()) {
return scanner;
}
LOG.info("preCompact, creates EvictionInternalScanner");
TransactionVisibilityState txVisibilityState = txStateCache.getLatestState();
reloadPruneState(e.getEnvironment());
if (compactionState != null) {
// Record tx state before the compaction
compactionState.record(request, txVisibilityState);
}
return new EvictionInternalScanner("compaction", e.getEnvironment(), scanner, txVisibilityState);
}
Aggregations