You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/05/25 03:43:38 UTC

[GitHub] [incubator-inlong] woofyzhao commented on a diff in pull request #4341: [INLONG-4280][Manager] Support iceberg source

woofyzhao commented on code in PR #4341:
URL: https://github.com/apache/incubator-inlong/pull/4341#discussion_r881189638


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sort/util/LoadNodeUtils.java:
##########
@@ -225,6 +231,62 @@ public static HbaseLoadNode createLoadNode(HbaseSinkResponse hbaseSinkResponse)
         );
     }
 
+    /**
+     * Create iceberg load node from response.
+     *
+     * @param icebergSinkResponse icebergSinkResponse
+     * @return icebergLoadNode
+     */
+    public static IcebergLoadNode createLoadNode(IcebergSinkResponse icebergSinkResponse) {
+        String id = icebergSinkResponse.getSinkName();
+        String name = icebergSinkResponse.getSinkName();
+        String tableName = icebergSinkResponse.getTableName();
+        String dbName = icebergSinkResponse.getDbName();
+        String primaryKey = icebergSinkResponse.getPrimaryKey();
+        String uri = icebergSinkResponse.getUri();
+        String warehouse = icebergSinkResponse.getWarehouse();
+        CatalogType catalogTypeName = CatalogType.forName(icebergSinkResponse.getCatalogType());
+        IcebergConstant.CatalogType catalogType;
+        switch (catalogTypeName) {
+            case HIVE:
+                catalogType = IcebergConstant.CatalogType.forName("hive");
+                break;
+            case HADOOP:
+                catalogType = IcebergConstant.CatalogType.forName("hadoop");
+                break;
+            case HYBRIS:
+                catalogType = IcebergConstant.CatalogType.forName("hybris");
+                break;
+            default:
+                throw new IllegalArgumentException(String.format("Unsupported catalogType=%s for kafka source",

Review Comment:
   not kafka



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org