public class SampleRegionWALObserver extends BaseRegionObserver implements WALObserver
Coprocessor.StateRegionObserver.MutationTypePRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| Constructor and Description |
|---|
SampleRegionWALObserver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isPostWALRestoreCalled() |
boolean |
isPostWALRestoreDeprecatedCalled() |
boolean |
isPostWALWriteCalled() |
boolean |
isPostWALWriteDeprecatedCalled() |
boolean |
isPreWALRestoreCalled() |
boolean |
isPreWALRestoreDeprecatedCalled() |
boolean |
isPreWALWriteCalled() |
boolean |
isPreWALWriteDeprecatedCalled() |
void |
postWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> env,
HRegionInfo info,
WALKey logKey,
WALEdit logEdit)
Triggered after
HRegion when WAL is
Restoreed. |
void |
postWALRestore(ObserverContext<RegionCoprocessorEnvironment> env,
HRegionInfo info,
HLogKey logKey,
WALEdit logEdit)
Called after a
WALEdit
replayed for this region. |
void |
postWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> env,
HRegionInfo info,
WALKey logKey,
WALEdit logEdit)
Called after a
WALEdit
is writen to WAL. |
void |
postWALWrite(ObserverContext<WALCoprocessorEnvironment> env,
HRegionInfo info,
HLogKey logKey,
WALEdit logEdit)
Called after a
WALEdit
is writen to WAL. |
void |
preWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> env,
HRegionInfo info,
WALKey logKey,
WALEdit logEdit)
Triggered before
HRegion when WAL is
Restoreed. |
void |
preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env,
HRegionInfo info,
HLogKey logKey,
WALEdit logEdit)
Called before a
WALEdit
replayed for this region. |
boolean |
preWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> env,
HRegionInfo info,
WALKey logKey,
WALEdit logEdit)
Called before a
WALEdit
is writen to WAL. |
boolean |
preWALWrite(ObserverContext<WALCoprocessorEnvironment> env,
HRegionInfo info,
HLogKey logKey,
WALEdit logEdit)
Called before a
WALEdit
is writen to WAL. |
void |
setTestValues(byte[] tableName,
byte[] row,
byte[] igf,
byte[] igq,
byte[] chf,
byte[] chq,
byte[] addf,
byte[] addq)
Set values: with a table name, a column name which will be ignored, and
a column name which will be added to WAL.
|
postAppend, postBatchMutate, postBatchMutateIndispensably, postBulkLoadHFile, postBulkLoadHFile, postCheckAndDelete, postCheckAndPut, postClose, postCloseRegionOperation, postCommitStoreFile, 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, preAppend, preAppendAfterRowLock, preBatchMutate, preBulkLoadHFile, preCheckAndDelete, preCheckAndDeleteAfterRowLock, preCheckAndPut, preCheckAndPutAfterRowLock, preClose, preCommitStoreFile, preCompact, preCompact, preCompactScannerOpen, preCompactScannerOpen, preCompactSelection, preCompactSelection, preDelete, preExists, preFlush, preFlush, preFlushScannerOpen, preGetClosestRowBefore, preGetOp, preIncrement, preIncrementAfterRowLock, preIncrementColumnValue, preOpen, prePrepareTimeStampForDeleteVersion, prePut, preRollBackSplit, preScannerClose, preScannerNext, preScannerOpen, preSplit, preSplit, preSplitAfterPONR, preSplitBeforePONR, preStoreFileReaderOpen, preStoreScannerOpen, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstart, stoppublic void setTestValues(byte[] tableName,
byte[] row,
byte[] igf,
byte[] igq,
byte[] chf,
byte[] chq,
byte[] addf,
byte[] addq)
public void postWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> env, HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
WALObserverWALEdit
is writen to WAL.postWALWrite in interface WALObserverIOExceptionpublic void postWALWrite(ObserverContext<WALCoprocessorEnvironment> env, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException
WALObserverWALEdit
is writen to WAL.
This method is left in place to maintain binary compatibility with older
WALObservers. If an implementation directly overrides
WALObserver.postWALWrite(ObserverContext, HRegionInfo, WALKey, WALEdit) then this version
won't be called at all, barring problems with the Security Manager. To work correctly
in the presence of a strict Security Manager, or in the case of an implementation that
relies on a parent class to implement preWALWrite, you should implement this method
as a call to the non-deprecated version.
Users of this method will see all edits that can be treated as HLogKey. If there are
edits that can't be treated as HLogKey they won't be offered to coprocessors that rely
on this method. If a coprocessor gets skipped because of this mechanism, a log message
at ERROR will be generated per coprocessor on the logger for CoprocessorHost once per
classloader.postWALWrite in interface WALObserverIOExceptionpublic boolean preWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> env, HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
WALObserverWALEdit
is writen to WAL.preWALWrite in interface WALObserverIOExceptionpublic boolean preWALWrite(ObserverContext<WALCoprocessorEnvironment> env, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException
WALObserverWALEdit
is writen to WAL.
This method is left in place to maintain binary compatibility with older
WALObservers. If an implementation directly overrides
WALObserver.preWALWrite(ObserverContext, HRegionInfo, WALKey, WALEdit) then this version
won't be called at all, barring problems with the Security Manager. To work correctly
in the presence of a strict Security Manager, or in the case of an implementation that
relies on a parent class to implement preWALWrite, you should implement this method
as a call to the non-deprecated version.
Users of this method will see all edits that can be treated as HLogKey. If there are
edits that can't be treated as HLogKey they won't be offered to coprocessors that rely
on this method. If a coprocessor gets skipped because of this mechanism, a log message
at ERROR will be generated per coprocessor on the logger for CoprocessorHost once per
classloader.preWALWrite in interface WALObserverIOExceptionpublic void preWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> env, HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
HRegion when WAL is
Restoreed.preWALRestore in interface RegionObserverpreWALRestore in class BaseRegionObserverIOExceptionpublic void preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException
RegionObserverWALEdit
replayed for this region.
This method is left in place to maintain binary compatibility with older
RegionObservers. If an implementation directly overrides
RegionObserver.preWALRestore(ObserverContext, HRegionInfo, WALKey, WALEdit) then this version
won't be called at all, barring problems with the Security Manager. To work correctly
in the presence of a strict Security Manager, or in the case of an implementation that
relies on a parent class to implement preWALRestore, you should implement this method
as a call to the non-deprecated version.
Users of this method will see all edits that can be treated as HLogKey. If there are
edits that can't be treated as HLogKey they won't be offered to coprocessors that rely
on this method. If a coprocessor gets skipped because of this mechanism, a log message
at ERROR will be generated per coprocessor on the logger for CoprocessorHost once per
classloader.preWALRestore in interface RegionObserverpreWALRestore in class BaseRegionObserverIOExceptionpublic void postWALRestore(ObserverContext<? extends RegionCoprocessorEnvironment> env, HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
HRegion when WAL is
Restoreed.postWALRestore in interface RegionObserverpostWALRestore in class BaseRegionObserverIOExceptionpublic void postWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException
RegionObserverWALEdit
replayed for this region.
This method is left in place to maintain binary compatibility with older
RegionObservers. If an implementation directly overrides
RegionObserver.postWALRestore(ObserverContext, HRegionInfo, WALKey, WALEdit) then this version
won't be called at all, barring problems with the Security Manager. To work correctly
in the presence of a strict Security Manager, or in the case of an implementation that
relies on a parent class to implement preWALRestore, you should implement this method
as a call to the non-deprecated version.
Users of this method will see all edits that can be treated as HLogKey. If there are
edits that can't be treated as HLogKey they won't be offered to coprocessors that rely
on this method. If a coprocessor gets skipped because of this mechanism, a log message
at ERROR will be generated per coprocessor on the logger for CoprocessorHost once per
classloader.postWALRestore in interface RegionObserverpostWALRestore in class BaseRegionObserverIOExceptionpublic boolean isPreWALWriteCalled()
public boolean isPostWALWriteCalled()
public boolean isPreWALRestoreCalled()
public boolean isPostWALRestoreCalled()
public boolean isPreWALWriteDeprecatedCalled()
public boolean isPostWALWriteDeprecatedCalled()
public boolean isPreWALRestoreDeprecatedCalled()
public boolean isPostWALRestoreDeprecatedCalled()