@InterfaceAudience.Private public class ConstraintProcessor extends Object implements RegionCoprocessor, RegionObserver
Constraints on a given table.
This is an ease of use mechanism - all the functionality here could be implemented on any given system by a coprocessor.
Coprocessor.StateRegionObserver.MutationType| Modifier and Type | Field and Description |
|---|---|
private ClassLoader |
classloader |
private List<? extends Constraint> |
constraints |
private static org.slf4j.Logger |
LOG |
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| Constructor and Description |
|---|
ConstraintProcessor()
Create the constraint processor.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<RegionObserver> |
getRegionObserver() |
void |
prePut(ObserverContext<RegionCoprocessorEnvironment> e,
Put put,
WALEdit edit,
Durability durability)
Called before the client stores a value.
|
void |
start(CoprocessorEnvironment environment)
Called by the
CoprocessorEnvironment during it's own startup to initialize the
coprocessor. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBulkLoadObserver, getEndpointObservergetServices, stoppostAppend, postAppend, postAppendBeforeWAL, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndDelete, postCheckAndMutate, postCheckAndPut, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, postCompact, postCompactSelection, postDelete, postDelete, postExists, postFlush, postFlush, postGetOp, postIncrement, postIncrement, postIncrementBeforeWAL, postInstantiateDeleteTracker, postMemStoreCompaction, postMutationBeforeWAL, postOpen, postPut, postPut, postReplayWALs, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, preAppend, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndDeleteAfterRowLock, preCheckAndMutate, preCheckAndMutateAfterRowLock, preCheckAndPut, preCheckAndPut, preCheckAndPutAfterRowLock, preCheckAndPutAfterRowLock, preClose, preCommitStoreFile, preCompact, preCompactScannerOpen, preCompactSelection, preDelete, preDelete, preExists, preFlush, preFlush, preFlushScannerOpen, preGetOp, preIncrement, preIncrement, preIncrementAfterRowLock, preMemStoreCompaction, preMemStoreCompactionCompact, preMemStoreCompactionCompactScannerOpen, preOpen, prePrepareTimeStampForDeleteVersion, prePut, preReplayWALs, preScannerClose, preScannerNext, preScannerOpen, preStoreFileReaderOpen, preStoreScannerOpen, preWALAppend, preWALRestoreprivate static final org.slf4j.Logger LOG
private final ClassLoader classloader
private List<? extends Constraint> constraints
public ConstraintProcessor()
Stores the current classloader.
public Optional<RegionObserver> getRegionObserver()
getRegionObserver in interface RegionCoprocessorpublic void start(CoprocessorEnvironment environment)
CoprocessorCoprocessorEnvironment during it's own startup to initialize the
coprocessor.start in interface Coprocessorpublic void prePut(ObserverContext<RegionCoprocessorEnvironment> e, Put put, WALEdit edit, Durability durability) throws IOException
RegionObserverCall CoprocessorEnvironment#bypass to skip default actions. If 'bypass' is set, we skip out on calling any subsequent chained coprocessors.
Note: Do not retain references to any Cells in 'put' beyond the life of this invocation. If need a Cell reference for later use, copy the cell and use that.
prePut in interface RegionObservere - the environment provided by the region serverput - The Put objectedit - The WALEdit object that will be written to the waldurability - Persistence guarantee for this PutIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.