@InterfaceAudience.Private public class ConstraintProcessor extends BaseRegionObserver
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.
RegionObserver.MutationType
Coprocessor.State
Modifier and Type | Field and Description |
---|---|
private ClassLoader |
classloader |
private List<? extends Constraint> |
constraints |
private static org.apache.commons.logging.Log |
LOG |
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Constructor and Description |
---|
ConstraintProcessor()
Create the constraint processor.
|
Modifier and Type | Method and Description |
---|---|
void |
prePut(ObserverContext<RegionCoprocessorEnvironment> e,
Put put,
WALEdit edit,
Durability durability)
Called before the client stores a value.
|
void |
start(CoprocessorEnvironment environment) |
postAppend, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCloseRegionOperation, postCompact, postCompact, postCompactSelection, postCompactSelection, postCompleteSplit, postDelete, postExists, postFlush, postFlush, postGetClosestRowBefore, postGetOp, postIncrement, postIncrementColumnValue, postInstantiateDeleteTracker, postLogReplay, postMutationBeforeWAL, postOpen, postPut, postRollBackSplit, postScannerClose, postScannerFilterRow, postScannerNext, postScannerOpen, postSplit, postStartRegionOperation, postStoreFileReaderOpen, postWALRestore, postWALRestore, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndPut, preCheckAndPutAfterRowLock, preClose, preCompact, preCompact, preCompactScannerOpen, preCompactScannerOpen, preCompactSelection, preCompactSelection, preDelete, preExists, preFlush, preFlush, preFlushScannerOpen, preGetClosestRowBefore, preGetOp, preIncrement, preIncrementAfterRowLock, preIncrementColumnValue, preOpen, prePrepareTimeStampForDeleteVersion, preRollBackSplit, preScannerClose, preScannerNext, preScannerOpen, preSplit, preSplit, preSplitAfterPONR, preSplitBeforePONR, preStoreFileReaderOpen, preStoreScannerOpen, preWALRestore, preWALRestore, stop
private static final org.apache.commons.logging.Log LOG
private final ClassLoader classloader
private List<? extends Constraint> constraints
public ConstraintProcessor()
Stores the current classloader.
public void start(CoprocessorEnvironment environment)
start
in interface Coprocessor
start
in class BaseRegionObserver
public void prePut(ObserverContext<RegionCoprocessorEnvironment> e, Put put, WALEdit edit, Durability durability) throws IOException
RegionObserver
Call CoprocessorEnvironment#bypass to skip default actions
Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors
prePut
in interface RegionObserver
prePut
in class BaseRegionObserver
e
- the environment provided by the region serverput
- The Put objectedit
- The WALEdit object that will be written to the waldurability
- Persistence guarantee for this PutIOException
- if an error occurred on the coprocessorCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.