jerryshao commented on code in PR #5020:
URL: https://github.com/apache/gravitino/pull/5020#discussion_r1800389410


##########
catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java:
##########
@@ -742,4 +742,44 @@ private boolean checkSingleFile(Fileset fileset) {
           fileset.name());
     }
   }
+
+  FileSystem getFileSystem(Path path, Map<String, String> config) throws 
IOException {
+    String defaultFilesystemProvider =
+        (String)
+            propertiesMetadata
+                .catalogPropertiesMetadata()
+                .getOrDefault(config, 
HadoopCatalogPropertiesMetadata.DEFAULT_FS);
+
+    Map<String, String> newConfig = Maps.newHashMap(config);
+    if (path == null) {
+      if (defaultFilesystemProvider != null) {
+        return getFileSystemByScheme(defaultFilesystemProvider, newConfig);
+      } else {
+        LOG.warn("The path and default filesystem provider are both null, 
using local file system");
+        return getFileSystemByScheme(LOCAL_FILE_SCHEMA, newConfig);

Review Comment:
   scheme or schema?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to