Interface BulkLoadObserver
- All Known Implementing Classes:
AccessController
Coprocessors implement this interface to observe and mediate bulk load operations.
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:
- If the configuration
CoprocessorHost.ABORT_ON_ERROR_KEY
is set to true, then the server aborts. - Otherwise, coprocessor is removed from the server and
DoNotRetryIOException
is returned to the client.
- If the configuration
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Called as part of SecureBulkLoadEndpoint.cleanupBulkLoad() RPC call.default void
Called as part of SecureBulkLoadEndpoint.prepareBulkLoad() RPC call.
-
Method Details
-
prePrepareBulkLoad
default void prePrepareBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException Called as part of SecureBulkLoadEndpoint.prepareBulkLoad() RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect. If you need to get the region or table name, get it from thectx
as follows:code>ctx.getEnvironment().getRegion()
. Use getRegionInfo to fetch the encodedName and use getTableDescriptor() to get the tableName.- Parameters:
ctx
- the environment to interact with the framework and master- Throws:
IOException
-
preCleanupBulkLoad
default void preCleanupBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException Called as part of SecureBulkLoadEndpoint.cleanupBulkLoad() RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect. If you need to get the region or table name, get it from thectx
as follows:code>ctx.getEnvironment().getRegion()
. Use getRegionInfo to fetch the encodedName and use getTableDescriptor() to get the tableName.- Parameters:
ctx
- the environment to interact with the framework and master- Throws:
IOException
-