use of org.apache.hadoop.hbase.protobuf.generated.ClientProtos.CleanupBulkLoadRequest in project hbase by apache.
the class SecureBulkLoadEndpointClient method cleanupBulkLoad.
public void cleanupBulkLoad(final String bulkToken) throws IOException {
try {
CoprocessorRpcChannel channel = table.coprocessorService(HConstants.EMPTY_START_ROW);
SecureBulkLoadProtos.SecureBulkLoadService instance = ProtobufUtil.newServiceStub(SecureBulkLoadProtos.SecureBulkLoadService.class, channel);
ServerRpcController controller = new ServerRpcController();
CoprocessorRpcUtils.BlockingRpcCallback<CleanupBulkLoadResponse> rpcCallback = new CoprocessorRpcUtils.BlockingRpcCallback<>();
CleanupBulkLoadRequest request = CleanupBulkLoadRequest.newBuilder().setBulkToken(bulkToken).build();
instance.cleanupBulkLoad(controller, request, rpcCallback);
if (controller.failedOnException()) {
throw controller.getFailedOn();
}
} catch (Throwable throwable) {
throw new IOException(throwable);
}
}
Aggregations