@InterfaceAudience.Private public class ZooKeeperScanPolicyObserver extends Object implements RegionCoprocessor, RegionObserver
RegionObserver state. See
 RegionCoprocessorEnvironment.getSharedData().
 This would be useful for an incremental backup tool, which would indicate the last time of a successful backup via ZK and instruct HBase that to safely delete the data which has already been backup.
| Modifier and Type | Class and Description | 
|---|---|
| private static class  | ZooKeeperScanPolicyObserver.ZKDataHolderInternal watcher that keep "data" up to date asynchronously. | 
Coprocessor.StateRegionObserver.MutationType| Modifier and Type | Field and Description | 
|---|---|
| private org.apache.curator.framework.recipes.cache.NodeCache | cache | 
| static String | NODE | 
| static String | ZK_ENSEMBLE_KEY | 
| static int | ZK_SESSION_TIMEOUT_DEFAULT | 
| static String | ZK_SESSION_TIMEOUT_KEY | 
| private static String | ZKKEY | 
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| Constructor and Description | 
|---|
| ZooKeeperScanPolicyObserver() | 
| Modifier and Type | Method and Description | 
|---|---|
| private OptionalLong | getExpireBefore() | 
| Optional<RegionObserver> | getRegionObserver() | 
| void | preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
                     Store store,
                     ScanType scanType,
                     ScanOptions options,
                     CompactionLifeCycleTracker tracker,
                     CompactionRequest request)Called before we open store scanner for compaction. | 
| void | preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
                   Store store,
                   ScanOptions options,
                   FlushLifeCycleTracker tracker)Called before we open store scanner for flush. | 
| private void | resetTTL(ScanOptions options) | 
| void | start(CoprocessorEnvironment env)Called by the  CoprocessorEnvironmentduring it's own startup to initialize the
 coprocessor. | 
| void | stop(CoprocessorEnvironment env)Called by the  CoprocessorEnvironmentduring it's own shutdown to stop the
 coprocessor. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBulkLoadObserver, getEndpointObservergetServicespostAppend, postAppendBeforeWAL, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndDelete, postCheckAndMutate, postCheckAndPut, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, postCompact, postCompactSelection, postDelete, postExists, postFlush, postFlush, postGetOp, postIncrement, postIncrementBeforeWAL, postInstantiateDeleteTracker, postMemStoreCompaction, postMutationBeforeWAL, postOpen, postPut, postReplayWALs, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndDeleteAfterRowLock, preCheckAndMutate, preCheckAndMutateAfterRowLock, preCheckAndPut, preCheckAndPut, preCheckAndPutAfterRowLock, preCheckAndPutAfterRowLock, preClose, preCommitStoreFile, preCompact, preCompactSelection, preDelete, preExists, preFlush, preFlush, preGetOp, preIncrement, preIncrementAfterRowLock, preMemStoreCompaction, preMemStoreCompactionCompact, preMemStoreCompactionCompactScannerOpen, preOpen, prePrepareTimeStampForDeleteVersion, prePut, preReplayWALs, preScannerClose, preScannerNext, preScannerOpen, preStoreFileReaderOpen, preStoreScannerOpen, preWALAppend, preWALRestorepublic static final String ZK_ENSEMBLE_KEY
public static final String ZK_SESSION_TIMEOUT_KEY
public static final int ZK_SESSION_TIMEOUT_DEFAULT
public static final String NODE
private static final String ZKKEY
private org.apache.curator.framework.recipes.cache.NodeCache cache
public ZooKeeperScanPolicyObserver()
public Optional<RegionObserver> getRegionObserver()
getRegionObserver in interface RegionCoprocessorpublic void start(CoprocessorEnvironment env) throws IOException
CoprocessorCoprocessorEnvironment during it's own startup to initialize the
 coprocessor.start in interface CoprocessorIOExceptionpublic void stop(CoprocessorEnvironment env) throws IOException
CoprocessorCoprocessorEnvironment during it's own shutdown to stop the
 coprocessor.stop in interface CoprocessorIOExceptionprivate OptionalLong getExpireBefore()
private void resetTTL(ScanOptions options)
public void preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, ScanOptions options, FlushLifeCycleTracker tracker) throws IOException
RegionObserveroptions to change max
 versions and TTL for the scanner being opened.preFlushScannerOpen in interface RegionObserverc - the environment provided by the region serverstore - the store where flush is being requestedoptions - used to change max versions and TTL for the scanner being openedIOExceptionpublic void preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, ScanType scanType, ScanOptions options, CompactionLifeCycleTracker tracker, CompactionRequest request) throws IOException
RegionObserveroptions to change max
 versions and TTL for the scanner being opened.preCompactScannerOpen in interface RegionObserverc - the environment provided by the region serverstore - the store being compactedscanType - type of Scanoptions - used to change max versions and TTL for the scanner being openedtracker - tracker used to track the life cycle of a compactionrequest - the requested compactionIOExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.