garyli1019 commented on a change in pull request #3792:
URL: https://github.com/apache/hudi/pull/3792#discussion_r728585655



##########
File path: 
hudi-flink/src/main/java/org/apache/hudi/sink/bootstrap/BootstrapOperator.java
##########
@@ -129,6 +129,13 @@ public void initializeState(StateInitializationContext 
context) throws Exception
         WriteOperationType.fromValue(conf.getString(FlinkOptions.OPERATION)),
         HoodieTableType.valueOf(conf.getString(FlinkOptions.TABLE_TYPE)));
 
+    preLoadIndexRecords();
+  }
+
+  /**
+   * Load the index records before {@link #processElement}.
+   */
+  protected void preLoadIndexRecords() throws Exception {

Review comment:
       not related to this PR?

##########
File path: hudi-flink/src/main/java/org/apache/hudi/util/StreamerUtil.java
##########
@@ -189,6 +190,10 @@ public static HoodieWriteConfig 
getHoodieClientConfig(Configuration conf) {
                 .enable(conf.getBoolean(FlinkOptions.METADATA_ENABLED))
                 
.withMaxNumDeltaCommitsBeforeCompaction(conf.getInteger(FlinkOptions.METADATA_COMPACTION_DELTA_COMMITS))
                 .build())
+            .withPayloadConfig(HoodiePayloadConfig.newBuilder()
+                
.withPayloadOrderingField(conf.getString(FlinkOptions.PRECOMBINE_FIELD))
+                
.withPayloadEventTimeField(conf.getString(FlinkOptions.RECORD_KEY_FIELD))

Review comment:
       Eventtime key is actually different from record key. It should be a 
timestamp format. Should we add another option?




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