LvJiancheng commented on code in PR #4341:
URL: https://github.com/apache/incubator-inlong/pull/4341#discussion_r881255798
##########
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:
done
--
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]