hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yjzhan...@apache.org
Subject hadoop git commit: HDFS-13100. Handle IllegalArgumentException when GETSERVERDEFAULTS is not implemented in webhdfs. Contributed by Aaron T. Myers and Yongjun Zhang. (cherry picked from commit 4e9a59ce16e81b4bd6fae443a997ef24d588a6e8)
Date Sat, 03 Feb 2018 08:58:56 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.9 024127e47 -> 1ed6ae7b1


HDFS-13100. Handle IllegalArgumentException when GETSERVERDEFAULTS is not implemented in webhdfs.
Contributed by Aaron T. Myers and Yongjun Zhang.
(cherry picked from commit 4e9a59ce16e81b4bd6fae443a997ef24d588a6e8)


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

Branch: refs/heads/branch-2.9
Commit: 1ed6ae7b1245cbf9c5acb953b482c88678d4f14b
Parents: 024127e
Author: Yongjun Zhang <yzhang@cloudera.com>
Authored: Fri Feb 2 22:58:44 2018 -0800
Committer: Yongjun Zhang <yzhang@cloudera.com>
Committed: Fri Feb 2 23:45:28 2018 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java    | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1ed6ae7b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
index 897cdd9..283ba1b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java
@@ -1910,8 +1910,17 @@ public class WebHdfsFileSystem extends FileSystem
     try {
       keyProviderUri = getServerDefaults().getKeyProviderUri();
     } catch (UnsupportedOperationException e) {
-      // This means server doesn't supports GETSERVERDEFAULTS call.
+      // This means server doesn't support GETSERVERDEFAULTS call.
       // Do nothing, let keyProviderUri = null.
+    } catch (RemoteException e) {
+      if (e.getClassName() != null &&
+          e.getClassName().equals("java.lang.IllegalArgumentException")) {
+        // See HDFS-13100.
+        // This means server doesn't support GETSERVERDEFAULTS call.
+        // Do nothing, let keyProviderUri = null.
+      } else {
+        throw e;
+      }
     }
     return HdfsKMSUtil.getKeyProviderUri(ugi, getUri(), keyProviderUri,
         getConf());


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


Mime
View raw message