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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/compact/CompactionCommitSink.java:
##########
@@ -69,9 +62,7 @@ public CompactionCommitSink(Configuration conf) {
   @Override
   public void open(Configuration parameters) throws Exception {
     super.open(parameters);
-    HoodieFlinkWriteClient writeClient = 
FlinkWriteClients.createWriteClient(conf, getRuntimeContext());
-    this.compactCommitHandler = Lazy.lazily(() -> new 
CompactCommitHandler(conf, writeClient));
-    this.mdtCompactCommitHandler = Lazy.lazily(() -> new 
MetadataCompactCommitHandler(conf, 
StreamerUtil.createMetadataWriteClient(writeClient)));
+    this.compactCommitHandler = CompositeCompactCommitHandler.create(conf, 
getRuntimeContext());

Review Comment:
   wondering if we could have a factory class named `CompactionCommitHandlers` 
to create handle based on configuration: either single or composition handler 
when necesssary.



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