[
https://issues.apache.org/jira/browse/HBASE-18770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16219413#comment-16219413
]
stack commented on HBASE-18770:
-------------------------------
After Andrew comment up on RB made me think, and indeed we can do bypass simply
and the same pattern for all methods; i.e. return true if you want to bypass,
false otherwise.
List of methods that return bypass or not from (RegionObserver):
{code}
default boolean preGetOp(ObserverContext<RegionCoprocessorEnvironment> c,
Get get,
List<Cell> bypassResult) throws IOException
default boolean preExists(ObserverContext<RegionCoprocessorEnvironment> c,
Get get,
MutableBoolean bypassResult) throws IOException
default boolean prePut(ObserverContext<RegionCoprocessorEnvironment> c, Put
put, WALEdit edit,
Durability durability) throws IOException
default boolean preDelete(ObserverContext<RegionCoprocessorEnvironment> c,
Delete delete,
WALEdit edit, Durability durability) throws IOException
@Deprecated
default boolean
prePrepareTimeStampForDeleteVersion(ObserverContext<RegionCoprocessorEnvironment>
c,
Mutation mutation, Cell cell, byte[] byteNow, Get get) throws IOException
default boolean
preCheckAndPutAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row, byte[] family, byte[] qualifier, CompareOperator op,
ByteArrayComparable comparator, Put put, MutableBoolean bypassResult)
throws IOException
default Optional<Boolean>
preCheckAndDeleteAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
byte[] row, byte[] family, byte[] qualifier, CompareOperator op,
ByteArrayComparable comparator, Delete delete, MutableBoolean
bypassResult) throws IOException
default boolean
preAppendAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
Append append, Result bypassResult) throws IOException
default boolean
preIncrementAfterRowLock(ObserverContext<RegionCoprocessorEnvironment> c,
Increment increment, Result bypassResult) throws IOException
{code}
... and I was going to try and fix...
default boolean preScannerNext(ObserverContext<RegionCoprocessorEnvironment>
c, InternalScanner s,
List<Result> result, int limit, boolean hasNext) throws IOException
default boolean
postScannerFilterRow(ObserverContext<RegionCoprocessorEnvironment> c,
InternalScanner s, Cell curRowCell, boolean hasMore) throws IOException
These seem to be doing bypass but doesn't say so in javadoc, only in
client-code when it calls.
> Remove bypass method in ObserverContext and implement the 'bypass' logic case
> by case
> -------------------------------------------------------------------------------------
>
> Key: HBASE-18770
> URL: https://issues.apache.org/jira/browse/HBASE-18770
> Project: HBase
> Issue Type: Sub-task
> Components: Coprocessors
> Reporter: Duo Zhang
> Assignee: stack
> Fix For: 2.0.0-alpha-4
>
> Attachments: HBASE-18770.master.001.patch
>
>
> http://search-hadoop.com/m/HBase/YGbbXd0RDCIHSC1
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)