yuqi1129 commented on code in PR #4939:
URL: https://github.com/apache/gravitino/pull/4939#discussion_r1792771182


##########
catalogs/catalog-lakehouse-paimon/src/main/java/org/apache/gravitino/catalog/lakehouse/paimon/utils/CatalogUtils.java:
##########
@@ -120,4 +121,37 @@ private static void checkPaimonConfig(PaimonConfig 
paimonConfig) {
           StringUtils.isNotBlank(uri), "Paimon Catalog uri can not be null or 
empty.");
     }
   }
+
+  public static void checkWarehouseConfig(
+      PaimonConfig paimonConfig, Map<String, String> resultConf) {
+    String warehouse = paimonConfig.get(CATALOG_WAREHOUSE);
+    Preconditions.checkArgument(
+        StringUtils.isNotBlank(warehouse), "Paimon Catalog warehouse can not 
be null or empty.");
+
+    FileSystemType fileSystemType = FileSystemType.fromStoragePath(warehouse);
+    switch (fileSystemType) {
+      case S3:
+        checkS3FileSystemConfig(resultConf);
+        break;
+      case HDFS:
+      case LOCAL_FILE:
+        break;
+      default:
+        throw new IllegalArgumentException("Unsupported file system type: " + 
fileSystemType);
+    }
+  }
+
+  @SuppressWarnings("unused")
+  private static void checkS3FileSystemConfig(Map<String, String> resultConf) {
+    //    S3StorageConfig s3FileSystemConfig = new S3StorageConfig(resultConf);

Review Comment:
   removed.



-- 
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