steveloughran commented on a change in pull request #666: HADOOP-16221 add
option to fail operation on metadata write failure
URL: https://github.com/apache/hadoop/pull/666#discussion_r270537317
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/WriteOperationHelper.java
##########
@@ -247,22 +248,21 @@ private CompleteMultipartUploadResult
finalizeMultipartUpload(
throw new IOException(
"No upload parts in multipart upload to " + destKey);
}
- return invoker.retry("Completing multipart commit", destKey,
+ CompleteMultipartUploadResult uploadResult = invoker.retry("Completing
multipart commit", destKey,
true,
retrying,
() -> {
// a copy of the list is required, so that the AWS SDK doesn't
// attempt to sort an unmodifiable list.
- CompleteMultipartUploadResult result =
- owner.getAmazonS3Client().completeMultipartUpload(
- new CompleteMultipartUploadRequest(bucket,
- destKey,
- uploadId,
- new ArrayList<>(partETags)));
- owner.finishedWrite(destKey, length);
- return result;
+ return owner.getAmazonS3Client().completeMultipartUpload(
+ new CompleteMultipartUploadRequest(bucket,
+ destKey,
+ uploadId,
+ new ArrayList<>(partETags)));
}
);
+ owner.finishedWrite(destKey, length);
+ return uploadResult;
Review comment:
this is good
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]