Class ConstraintProcessor
java.lang.Object
org.apache.hadoop.hbase.constraint.ConstraintProcessor
- All Implemented Interfaces:
Coprocessor
,RegionCoprocessor
,RegionObserver
@Private
public class ConstraintProcessor
extends Object
implements RegionCoprocessor, RegionObserver
Processes multiple
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.coprocessor.RegionObserver
RegionObserver.MutationType
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ClassLoader
private List<? extends Constraint>
private static final org.slf4j.Logger
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
prePut
(ObserverContext<? extends RegionCoprocessorEnvironment> e, Put put, WALEdit edit, Durability durability) Called before the client stores a value.void
start
(CoprocessorEnvironment environment) Called by theCoprocessorEnvironment
during it's own startup to initialize the coprocessor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.Coprocessor
getServices, stop
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionCoprocessor
getBulkLoadObserver, getEndpointObserver
Methods inherited from interface org.apache.hadoop.hbase.coprocessor.RegionObserver
postAppend, 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, 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
-
Field Details
-
LOG
-
classloader
-
constraints
-
-
Constructor Details
-
ConstraintProcessor
public ConstraintProcessor()Create the constraint processor.Stores the current classloader.
-
-
Method Details
-
getRegionObserver
- Specified by:
getRegionObserver
in interfaceRegionCoprocessor
-
start
Description copied from interface:Coprocessor
Called by theCoprocessorEnvironment
during it's own startup to initialize the coprocessor.- Specified by:
start
in interfaceCoprocessor
-
prePut
public void prePut(ObserverContext<? extends RegionCoprocessorEnvironment> e, Put put, WALEdit edit, Durability durability) throws IOException Description copied from interface:RegionObserver
Called before the client stores a value.Call 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.
- Specified by:
prePut
in interfaceRegionObserver
- Parameters:
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 Put- Throws:
IOException
-