Search in sources :

Example 1 with SecureBulkLoadManager

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);
}
Also used : SecureBulkLoadManager(org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager) IOException(java.io.IOException)

Example 2 with SecureBulkLoadManager

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);
}
Also used : SecureBulkLoadManager(org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager) IOException(java.io.IOException)

Example 3 with SecureBulkLoadManager

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());
}
Also used : SecureBulkLoadManager(org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager) BulkLoadHFileRequest(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.BulkLoadHFileRequest) List(java.util.List) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)3 SecureBulkLoadManager (org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager)3 List (java.util.List)1 BulkLoadHFileRequest (org.apache.hadoop.hbase.protobuf.generated.ClientProtos.BulkLoadHFileRequest)1