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;
}
Aggregations