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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSink.java:
##########
@@ -106,17 +106,26 @@ public SinkRuntimeProvider getSinkRuntimeProvider(Context 
context) {
       // bootstrap
       final DataStream<HoodieRecord> hoodieRecordDataStream =
           Pipelines.bootstrap(conf, rowType, dataStream, context.isBounded(), 
overwrite);
+
       // write pipeline
       pipeline = Pipelines.hoodieStreamWrite(conf, hoodieRecordDataStream);
-      // compaction
+
+      // insert cluster mode
+      if (OptionsResolver.isInsertClusterMode(conf)) {
+        return Pipelines.clean(conf, pipeline);
+      }
+
+      // upsert mode
       if (OptionsResolver.needsAsyncCompaction(conf)) {
         // use synchronous compaction for bounded source.
         if (context.isBounded()) {
           conf.setBoolean(FlinkOptions.COMPACTION_ASYNC_ENABLED, false);
         }
         return Pipelines.compact(conf, pipeline);
-      } else {
+      } else if (OptionsResolver.isLazyFailedWritesCleanPolicy(conf)) {
         return Pipelines.clean(conf, pipeline);
+      } else {
+        return Pipelines.dummySink(pipeline);

Review Comment:
   Sorry, I didn't get why you remove the clean operators then?



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