Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuqi1129 committed Oct 14, 2024
1 parent da49e60 commit b621d89
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -753,10 +753,10 @@ FileSystem getFileSystem(Path path, Map<String, String> config) throws IOExcepti
Map<String, String> newConfig = Maps.newHashMap(config);
if (path == null) {
if (defaultFilesystemProvider != null) {
return getByFileSystemByScheme(defaultFilesystemProvider, newConfig);
return getFileSystemByScheme(defaultFilesystemProvider, newConfig);
} else {
LOG.warn("The path and default filesystem provider are both null, using local file system");
return getByFileSystemByScheme(LOCAL_FILE_SCHEMA, newConfig);
return getFileSystemByScheme(LOCAL_FILE_SCHEMA, newConfig);
}
}

Expand All @@ -766,14 +766,14 @@ FileSystem getFileSystem(Path path, Map<String, String> config) throws IOExcepti
"Can't get schema from path: {} and default filesystem provider are both null, using"
+ " local file system",
path);
return getByFileSystemByScheme(LOCAL_FILE_SCHEMA, newConfig);
return getFileSystemByScheme(LOCAL_FILE_SCHEMA, newConfig);
} else {
newConfig.put(DEFAULT_FS, path.toUri().toString());
return getByFileSystemByScheme(path.toUri().getScheme(), newConfig);
return getFileSystemByScheme(path.toUri().getScheme(), newConfig);
}
}

private FileSystem getByFileSystemByScheme(String scheme, Map<String, String> config)
private FileSystem getFileSystemByScheme(String scheme, Map<String, String> config)
throws IOException {
FileSystemProvider provider = fileSystemProvidersMap.get(scheme);
if (provider == null) {
Expand Down

0 comments on commit b621d89

Please sign in to comment.