You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2019/04/04 20:15:17 UTC

[hadoop] branch trunk updated: HADOOP-16197 S3AUtils.translateException to map CredentialInitializationException to AccessDeniedException

This is an automated email from the ASF dual-hosted git repository.

stevel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 215ffc7  HADOOP-16197 S3AUtils.translateException to map CredentialInitializationException to AccessDeniedException
215ffc7 is described below

commit 215ffc792ef4be599e9434ee64f958744d2508f1
Author: Steve Loughran <st...@apache.org>
AuthorDate: Thu Apr 4 21:14:18 2019 +0100

    HADOOP-16197 S3AUtils.translateException to map CredentialInitializationException to AccessDeniedException
    
    Contributed by Steve Loughran.
    
    Change-Id: Ie98ca5210bf0009f297edbcacf1fc6dfe5ea70cd.
---
 .../hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java    | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java
index f323554..8d204d7 100644
--- a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java
+++ b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java
@@ -48,7 +48,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.PathFilter;
 import org.apache.hadoop.fs.RemoteIterator;
 import org.apache.hadoop.fs.s3a.auth.IAMInstanceCredentialsProvider;
-import org.apache.hadoop.fs.s3a.auth.NoAuthWithAWSException;
 import org.apache.hadoop.fs.s3native.S3xLoginHelper;
 import org.apache.hadoop.net.ConnectTimeoutException;
 import org.apache.hadoop.security.ProviderUtils;
@@ -193,7 +192,7 @@ public final class S3AUtils {
         // call considered an sign of connectivity failure
         return (EOFException)new EOFException(message).initCause(exception);
       }
-      if (exception instanceof NoAuthWithAWSException) {
+      if (exception instanceof CredentialInitializationException) {
         // the exception raised by AWSCredentialProvider list if the
         // credentials were not accepted.
         return (AccessDeniedException)new AccessDeniedException(path, null,


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org