hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject [31/50] [abbrv] hadoop git commit: HADOOP-13026 Should not wrap IOExceptions into a AuthenticationException in KerberosAuthenticator. Xuan Gong via stevel
Date Sat, 16 Apr 2016 00:08:11 GMT
HADOOP-13026 Should not wrap IOExceptions into a AuthenticationException in KerberosAuthenticator.
Xuan Gong via stevel


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4feed9b2
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4feed9b2
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4feed9b2

Branch: refs/heads/YARN-3368
Commit: 4feed9b2dbff7bc52871cde7e1ff31b862e4fe9a
Parents: 6e6b6dd
Author: Steve Loughran <stevel@apache.org>
Authored: Fri Apr 15 17:43:38 2016 +0100
Committer: Steve Loughran <stevel@apache.org>
Committed: Fri Apr 15 17:44:12 2016 +0100

----------------------------------------------------------------------
 .../security/authentication/client/KerberosAuthenticator.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4feed9b2/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/KerberosAuthenticator.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/KerberosAuthenticator.java
b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/KerberosAuthenticator.java
index 0f046ae..a69ee46 100644
--- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/KerberosAuthenticator.java
+++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/KerberosAuthenticator.java
@@ -327,7 +327,11 @@ public class KerberosAuthenticator implements Authenticator {
         }
       });
     } catch (PrivilegedActionException ex) {
-      throw new AuthenticationException(ex.getException());
+      if (ex.getException() instanceof IOException) {
+        throw (IOException) ex.getException();
+      } else {
+        throw new AuthenticationException(ex.getException());
+      }
     } catch (LoginException ex) {
       throw new AuthenticationException(ex);
     }


Mime
View raw message