From f225b5514f7604da4bda45ed313048935c057ca5 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Fri, 15 Apr 2016 17:43:38 +0100 Subject: [PATCH] HADOOP-13026 Should not wrap IOExceptions into a AuthenticationException in KerberosAuthenticator. Xuan Gong via stevel --- .../authentication/client/KerberosAuthenticator.java | 6 +++++- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 e107810790e..013af48cd23 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 @@ -329,7 +329,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); } diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 21addcc3639..79d241bd4fb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -320,6 +320,9 @@ Release 2.7.4 - UNRELEASED HDFS-6291. FSImage may be left unclosed in BootstrapStandby#doRun() (Sanghyun Yun via vinayakumarb) + HADOOP-13026 Should not wrap IOExceptions into a AuthenticationException in + KerberosAuthenticator. Xuan Gong via stevel + Release 2.7.3 - 2016-08-25 INCOMPATIBLE CHANGES