danny0405 commented on code in PR #9651:
URL: https://github.com/apache/hudi/pull/9651#discussion_r1332366133


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bulk/BulkInsertWriteFunction.java:
##########
@@ -113,7 +116,8 @@ public BulkInsertWriteFunction(Configuration config, 
RowType rowType) {
   public void open(Configuration parameters) throws IOException {
     this.taskID = getRuntimeContext().getIndexOfThisSubtask();
     this.writeClient = FlinkWriteClients.createWriteClient(this.config, 
getRuntimeContext());
-    this.ckpMetadata = CkpMetadata.getInstance(config);
+    HoodieTableMetaClient metaClient = 
StreamerUtil.createMetaClient(this.config);
+    this.ckpMetadata = CkpMetadataFactory.getCkpMetadata(metaClient, 
writeClient.getConfig(), config);

Review Comment:
   I think it shoud be feasible if we only maintains the interfafce as 
`getCkpMetadata(HoodieWriteConfig writeConfig, Configuration conf)`, then there 
is no need to create the meta client.



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