HADOOP-15826. @Retries annotation of putObject() call & uses wrong.

Contributed by Steve Loughran and Ewan Higgs.
This commit is contained in:
Steve Loughran 2018-10-16 20:02:54 +01:00
parent f90c64e624
commit d59ca43bff
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
2 changed files with 6 additions and 3 deletions

View File

@ -2449,11 +2449,14 @@ UploadResult executePut(PutObjectRequest putObjectRequest,
* Wait for an upload to complete. * Wait for an upload to complete.
* If the waiting for completion is interrupted, the upload will be * If the waiting for completion is interrupted, the upload will be
* aborted before an {@code InterruptedIOException} is thrown. * aborted before an {@code InterruptedIOException} is thrown.
* @param upload upload to wait for * If the upload (or its result collection) failed, this is where
* the failure is raised as an AWS exception
* @param key destination key * @param key destination key
* @param uploadInfo upload to wait for
* @return the upload result * @return the upload result
* @throws InterruptedIOException if the blocking was interrupted. * @throws InterruptedIOException if the blocking was interrupted.
*/ */
@Retries.OnceRaw
UploadResult waitForUploadCompletion(String key, UploadInfo uploadInfo) UploadResult waitForUploadCompletion(String key, UploadInfo uploadInfo)
throws InterruptedIOException { throws InterruptedIOException {
Upload upload = uploadInfo.getUpload(); Upload upload = uploadInfo.getUpload();

View File

@ -436,7 +436,7 @@ public PutObjectResult putObject(PutObjectRequest putObjectRequest)
* @return the result of the operation * @return the result of the operation
* @throws IOException on problems * @throws IOException on problems
*/ */
@Retries.OnceTranslated @Retries.RetryTranslated
public UploadResult uploadObject(PutObjectRequest putObjectRequest) public UploadResult uploadObject(PutObjectRequest putObjectRequest)
throws IOException { throws IOException {
// no retry; rely on xfer manager logic // no retry; rely on xfer manager logic
@ -451,7 +451,7 @@ public UploadResult uploadObject(PutObjectRequest putObjectRequest)
* @throws IOException on problems * @throws IOException on problems
* @param destKey destination key * @param destKey destination key
*/ */
@Retries.RetryTranslated @Retries.OnceTranslated
public void revertCommit(String destKey) throws IOException { public void revertCommit(String destKey) throws IOException {
once("revert commit", destKey, once("revert commit", destKey,
() -> { () -> {