Interface RpcObserver
Coprocessors implement this interface to observe and mediate RPC events in Master and RS
instances.
For all functions, exception handling is done as follows:
Since most implementations will be interested in only a subset of hooks, this class uses 'default' functions to avoid having to add unnecessary overrides. When the functions are non-empty, it's simply to satisfy the compiler by returning value of expected (non-void) type. It is done in a way that these default definitions act as no-op. So our suggestion to implementation would be to not call these 'default' methods from overrides.
Exception Handling
For all functions, exception handling is done as follows:
- Exceptions of type
IOException
are reported back to client. - For any other kind of exception:
- Be aware that this coprocessor doesn't support abortion. If the configuration
CoprocessorHost.ABORT_ON_ERROR_KEY
is set to true, the event will be logged, but the RPC server won't be aborted. - Otherwise, coprocessor is removed from the server.
- Be aware that this coprocessor doesn't support abortion. If the configuration
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
postAuthorizeConnection
(ObserverContext<RpcCoprocessorEnvironment> ctx, String userName, X509Certificate[] clientCertificateChain) Called after successfully authorizing connectiondefault void
preAuthorizeConnection
(ObserverContext<RpcCoprocessorEnvironment> ctx, org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader connectionHeader, InetAddress remoteAddr) Called before authorizing connection
-
Method Details
-
preAuthorizeConnection
default void preAuthorizeConnection(ObserverContext<RpcCoprocessorEnvironment> ctx, org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.ConnectionHeader connectionHeader, InetAddress remoteAddr) throws IOException Called before authorizing connection- Parameters:
ctx
- the coprocessor instance's environment- Throws:
IOException
-
postAuthorizeConnection
default void postAuthorizeConnection(ObserverContext<RpcCoprocessorEnvironment> ctx, String userName, X509Certificate[] clientCertificateChain) throws IOException Called after successfully authorizing connection- Parameters:
ctx
- the coprocessor instance's environmentuserName
- the user nameclientCertificateChain
- list of peer certificates from SSL connection- Throws:
IOException
-