public class ZooKeeperScanPolicyObserver extends BaseRegionObserver
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 to not delete data that was
inserted since (based on wall clock time).
This implements org.apache.zookeeper.Watcher directly instead of using
ZooKeeperWatcher, because RegionObservers come and go and currently
listeners registered with ZooKeeperWatcher cannot be removed.RegionObserver.MutationTypeCoprocessor.State| Modifier and Type | Field and Description |
|---|---|
static String |
node |
static String |
zkkey |
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| Constructor and Description |
|---|
ZooKeeperScanPolicyObserver() |
| Modifier and Type | Method and Description |
|---|---|
protected ScanInfo |
getScanInfo(Store store,
RegionCoprocessorEnvironment e) |
InternalScanner |
preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
List<? extends KeyValueScanner> scanners,
ScanType scanType,
long earliestPutTs,
InternalScanner s) |
InternalScanner |
preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
KeyValueScanner memstoreScanner,
InternalScanner s) |
KeyValueScanner |
preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c,
Store store,
Scan scan,
NavigableSet<byte[]> targetCols,
KeyValueScanner s) |
void |
start(CoprocessorEnvironment e) |
void |
stop(CoprocessorEnvironment e) |
postAppend, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCloseRegionOperation, postCompact, postCompact, postCompactSelection, postCompactSelection, postCompleteSplit, postDelete, postExists, postFlush, postFlush, postGet, postGetClosestRowBefore, postGetOp, postIncrement, postIncrementColumnValue, postInstantiateDeleteTracker, postLogReplay, postMutationBeforeWAL, postOpen, postPut, postRollBackSplit, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postSplit, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndPut, preCheckAndPutAfterRowLock, preClose, preCompact, preCompact, preCompactScannerOpen, preCompactSelection, preCompactSelection, preDelete, preExists, preFlush, preFlush, preGet, preGetClosestRowBefore, preGetOp, preIncrement, preIncrementAfterRowLock, preIncrementColumnValue, preOpen, prePrepareTimeStampForDeleteVersion, prePut, preRollBackSplit, preScannerClose, preScannerNext, preScannerOpen, preSplit, preSplit, preSplitAfterPONR, preSplitBeforePONR, preStoreFileReaderOpen, preWALRestorepublic static final String node
public static final String zkkey
public void start(CoprocessorEnvironment e) throws IOException
start in interface Coprocessorstart in class BaseRegionObserverIOExceptionpublic void stop(CoprocessorEnvironment e) throws IOException
stop in interface Coprocessorstop in class BaseRegionObserverIOExceptionprotected ScanInfo getScanInfo(Store store, RegionCoprocessorEnvironment e)
public InternalScanner preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, KeyValueScanner memstoreScanner, InternalScanner s) throws IOException
preFlushScannerOpen in interface RegionObserverpreFlushScannerOpen in class BaseRegionObserverIOExceptionpublic InternalScanner preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, List<? extends KeyValueScanner> scanners, ScanType scanType, long earliestPutTs, InternalScanner s) throws IOException
preCompactScannerOpen in interface RegionObserverpreCompactScannerOpen in class BaseRegionObserverIOExceptionpublic KeyValueScanner preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store store, Scan scan, NavigableSet<byte[]> targetCols, KeyValueScanner s) throws IOException
preStoreScannerOpen in interface RegionObserverpreStoreScannerOpen in class BaseRegionObserverIOExceptionCopyright © 2014 The Apache Software Foundation. All Rights Reserved.