Search in sources :

Example 1 with MultipartUploadListPartsRequest

use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.MultipartUploadListPartsRequest in project ozone by apache.

the class OzoneManagerProtocolClientSideTranslatorPB method listParts.

@Override
public OmMultipartUploadListParts listParts(String volumeName, String bucketName, String keyName, String uploadID, int partNumberMarker, int maxParts) throws IOException {
    MultipartUploadListPartsRequest.Builder multipartUploadListPartsRequest = MultipartUploadListPartsRequest.newBuilder();
    multipartUploadListPartsRequest.setVolume(volumeName).setBucket(bucketName).setKey(keyName).setUploadID(uploadID).setPartNumbermarker(partNumberMarker).setMaxParts(maxParts);
    OMRequest omRequest = createOMRequest(Type.ListMultiPartUploadParts).setListMultipartUploadPartsRequest(multipartUploadListPartsRequest.build()).build();
    MultipartUploadListPartsResponse response = handleError(submitRequest(omRequest)).getListMultipartUploadPartsResponse();
    OmMultipartUploadListParts omMultipartUploadListParts = new OmMultipartUploadListParts(ReplicationConfig.fromProtoTypeAndFactor(response.getType(), response.getFactor()), response.getNextPartNumberMarker(), response.getIsTruncated());
    omMultipartUploadListParts.addProtoPartList(response.getPartsListList());
    return omMultipartUploadListParts;
}
Also used : OMRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest) MultipartUploadListPartsRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.MultipartUploadListPartsRequest) OmMultipartUploadListParts(org.apache.hadoop.ozone.om.helpers.OmMultipartUploadListParts) MultipartUploadListPartsResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.MultipartUploadListPartsResponse)

Aggregations

OmMultipartUploadListParts (org.apache.hadoop.ozone.om.helpers.OmMultipartUploadListParts)1 MultipartUploadListPartsRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.MultipartUploadListPartsRequest)1 MultipartUploadListPartsResponse (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.MultipartUploadListPartsResponse)1 OMRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest)1