Skip to content

Commit

Permalink
[opt](fs)add local file support (#45632)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

Problem Summary:

Added support for local files to facilitate debugging of some local
files in the data lake.
  • Loading branch information
wuwenchi authored and Your Name committed Dec 20, 2024
1 parent d8aac1c commit cf23aa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import com.google.common.collect.Maps;
import org.apache.hadoop.fs.CosFileSystem;
import org.apache.hadoop.fs.CosNConfigKeys;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.aliyun.oss.AliyunOSSFileSystem;
import org.apache.hadoop.fs.obs.OBSConstants;
import org.apache.hadoop.fs.obs.OBSFileSystem;
Expand Down Expand Up @@ -193,6 +194,8 @@ private static Map<String, String> convertToOBSProperties(Map<String, String> pr
public static String getHadoopFSImplByScheme(String fsScheme) {
if (fsScheme.equalsIgnoreCase("obs")) {
return OBSFileSystem.class.getName();
} else if (fsScheme.equalsIgnoreCase("file")) {
return LocalFileSystem.class.getName();
} else if (fsScheme.equalsIgnoreCase("oss")) {
return AliyunOSSFileSystem.class.getName();
} else if (fsScheme.equalsIgnoreCase("cosn") || fsScheme.equalsIgnoreCase("lakefs")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public static RemoteFileSystem getRemoteFileSystem(FileSystemType type, Map<Stri
return new AzureFileSystem(properties);
}
return new S3FileSystem(properties);
case FILE:
case DFS:
return new DFSFileSystem(properties);
case OFS:
Expand Down

0 comments on commit cf23aa5

Please sign in to comment.