Skip to content

Commit

Permalink
[Fix](multi-catalog) Fix hadoop viewfs issues. (#24505)
Browse files Browse the repository at this point in the history
cherry pick #24507
  • Loading branch information
kaka11chen authored Sep 18, 2023
1 parent 38493a9 commit 8bed448
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ public static String checkPath(String path, StorageBackend.StorageType type) thr
throw new AnalysisException("Invalid export path. please use valid 's3://' path.");
}
} else if (type == StorageBackend.StorageType.HDFS) {
if (schema == null || !schema.equalsIgnoreCase("hdfs")) {
throw new AnalysisException("Invalid export path. please use valid 'HDFS://' path.");
if (schema == null || (!schema.equalsIgnoreCase("hdfs") && !schema.equalsIgnoreCase("viewfs"))) {
throw new AnalysisException("Invalid export path. please use valid 'HDFS://' or 'viewfs://' path.");
}
} else if (type == StorageBackend.StorageType.LOCAL) {
if (schema != null && !schema.equalsIgnoreCase("file")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ private FileCacheValue loadFiles(FileCacheKey key) {
if (uri.getScheme() != null) {
String scheme = uri.getScheme();
updateJobConf("fs." + scheme + ".impl.disable.cache", "true");
if (!scheme.equals("hdfs")) {
if (!scheme.equals("hdfs") && !scheme.equals("viewfs")) {
updateJobConf("fs." + scheme + ".impl", PropertyConverter.getHadoopFSImplByScheme(scheme));
}
}
Expand Down

0 comments on commit 8bed448

Please sign in to comment.