use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.PartInfo in project ozone by apache.
the class OzoneManagerRequestHandler method listParts.
private MultipartUploadListPartsResponse listParts(MultipartUploadListPartsRequest multipartUploadListPartsRequest) throws IOException {
MultipartUploadListPartsResponse.Builder response = MultipartUploadListPartsResponse.newBuilder();
OmMultipartUploadListParts omMultipartUploadListParts = impl.listParts(multipartUploadListPartsRequest.getVolume(), multipartUploadListPartsRequest.getBucket(), multipartUploadListPartsRequest.getKey(), multipartUploadListPartsRequest.getUploadID(), multipartUploadListPartsRequest.getPartNumbermarker(), multipartUploadListPartsRequest.getMaxParts());
List<OmPartInfo> omPartInfoList = omMultipartUploadListParts.getPartInfoList();
List<PartInfo> partInfoList = new ArrayList<>();
omPartInfoList.forEach(partInfo -> partInfoList.add(partInfo.getProto()));
response.setType(omMultipartUploadListParts.getReplicationConfig().getReplicationType());
response.setFactor(ReplicationConfig.getLegacyFactor(omMultipartUploadListParts.getReplicationConfig()));
response.setNextPartNumberMarker(omMultipartUploadListParts.getNextPartNumberMarker());
response.setIsTruncated(omMultipartUploadListParts.isTruncated());
return response.addAllPartsList(partInfoList).build();
}
Aggregations