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 b0064957a7f..0db5af74acc 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 @@ -1869,8 +1869,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());