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
IOExceptionare reported back to client. - For any other kind of exception:
- If the configuration
CoprocessorHost.ABORT_ON_ERROR_KEYis set to true, then the server aborts. - Otherwise, coprocessor is removed from the server and
DoNotRetryIOExceptionis returned to the client.
- If the configuration
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled as part of SecureBulkLoadEndpoint.cleanupBulkLoad() RPC call.default voidCalled 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 thectxas 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 thectxas 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
-