use of org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager in project hbase by apache.
the class SecureBulkLoadEndpoint method cleanupBulkLoad.
@Override
public void cleanupBulkLoad(RpcController controller, CleanupBulkLoadRequest request, RpcCallback<CleanupBulkLoadResponse> done) {
try {
SecureBulkLoadManager secureBulkLoadManager = this.env.getRegionServerServices().getSecureBulkLoadManager();
secureBulkLoadManager.cleanupBulkLoad(this.env.getRegion(), convert(request));
done.run(CleanupBulkLoadResponse.newBuilder().build());
} catch (IOException e) {
CoprocessorRpcUtils.setControllerException(controller, e);
}
done.run(null);
}
use of org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager in project hbase by apache.
the class SecureBulkLoadEndpoint method prepareBulkLoad.
@Override
public void prepareBulkLoad(RpcController controller, PrepareBulkLoadRequest request, RpcCallback<PrepareBulkLoadResponse> done) {
try {
SecureBulkLoadManager secureBulkLoadManager = this.env.getRegionServerServices().getSecureBulkLoadManager();
String bulkToken = secureBulkLoadManager.prepareBulkLoad(this.env.getRegion(), convert(request));
done.run(PrepareBulkLoadResponse.newBuilder().setBulkToken(bulkToken).build());
} catch (IOException e) {
CoprocessorRpcUtils.setControllerException(controller, e);
}
done.run(null);
}
use of org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager in project hbase by apache.
the class SecureBulkLoadEndpoint method secureBulkLoadHFiles.
@Override
public void secureBulkLoadHFiles(RpcController controller, SecureBulkLoadHFilesRequest request, RpcCallback<SecureBulkLoadHFilesResponse> done) {
boolean loaded = false;
Map<byte[], List<Path>> map = null;
try {
SecureBulkLoadManager secureBulkLoadManager = this.env.getRegionServerServices().getSecureBulkLoadManager();
BulkLoadHFileRequest bulkLoadHFileRequest = ConvertSecureBulkLoadHFilesRequest(request);
map = secureBulkLoadManager.secureBulkLoadHFiles(this.env.getRegion(), convert(bulkLoadHFileRequest));
loaded = map != null && !map.isEmpty();
} catch (IOException e) {
CoprocessorRpcUtils.setControllerException(controller, e);
}
done.run(SecureBulkLoadHFilesResponse.newBuilder().setLoaded(loaded).build());
}
Aggregations