16012f93a6
'bypass' logic case by case Changes Coprocessor ObserverContext 'bypass' semantic. We flip the default so bypass is NOT supported on Observer invocations; only a couple of preXXX methods in RegionObserver allow it: e.g. preGet and prePut but not preFlush, etc. Everywhere else, we throw a DoesNotSupportBypassException if a Coprocessor Observer tries to invoke bypass. Master Observers can no longer stop or change move, split, assign, create table, etc. Ditto on complete, the mechanism that allowed a Coprocessor rule that all subsequent Coprocessors are skipped in an invocation chain; now, complete is only available to bypassable methods (and Coprocessors will get an exception if they try to 'complete' when it is not allowed). See javadoc for whether a Coprocessor Observer method supports 'bypass'. If no mention, 'bypass' is NOT supported. M hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java Added passing of 'bypassable' (and 'completable') and default 'result' argument to the Operation constructors rather than pass the excecution engine as parameters. Makes it so can clean up RegionObserverHost and make the calling clearer regards what is going on. Methods that support 'bypass' must set this flag on the Observer. M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Refactoring in here is minor. A few methods that used support bypass no longer do so removed the check and the need of an if/else meant a left-shift in some code. M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java Ditto M hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java In here label explicitly those methods that are bypassable. Some changes to make sure we call the corresponding execOperation. TestMasterObserver had a bunch of test of bypass method. All removed or disabled. TODO: What to do w/ the Scanner methods. |
||
---|---|---|
.. | ||
src | ||
README.txt | ||
pom.xml |
README.txt
ON PROTOBUFS This maven module has protobuf definition files ('.protos') used by hbase Coprocessor Endpoints that ship with hbase core (including tests). Coprocessor Endpoints are meant to be standalone, independent code not reliant on hbase internals. They define their Service using protobuf. The protobuf version they use can be distinct from that used by HBase internally since HBase started shading its protobuf references. Endpoints have no access to the shaded protobuf hbase uses. They do have access to the content of hbase-protocol -- the .protos found in this module -- but avoid using as much of this as you can as it is liable to change. Generation of java files from protobuf .proto files included here is done as part of the build.