Skip to content

Commit

Permalink
branch-3.0: [opt](fs)add local file support #45632 (#45686)
Browse files Browse the repository at this point in the history
Cherry-picked from #45632

Co-authored-by: wuwenchi <[email protected]>
  • Loading branch information
github-actions[bot] and wuwenchi authored Dec 20, 2024
1 parent 648e5dd commit 0137c8e
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 0137c8e

Please sign in to comment.