danny0405 commented on a change in pull request #4679:
URL: https://github.com/apache/hudi/pull/4679#discussion_r793224400



##########
File path: 
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java
##########
@@ -96,6 +101,34 @@
   public HoodieFlinkWriteClient(HoodieEngineContext context, HoodieWriteConfig 
writeConfig) {
     super(context, writeConfig);
     this.bucketToHandles = new HashMap<>();
+    this.bucketToAppendHandles = new HashMap<>();
+  }
+
+  public void init(HoodieFlinkTable<T> table) {
+    table.validateUpsertSchema();
+    setOperationType(WriteOperationType.UPSERT);
+  }
+
+  public Boolean buffer(HoodieRecord<T> record, String instantTime, 
HoodieFlinkTable<T> table) {
+    final HoodieRecordLocation loc = record.getCurrentLocation();
+    final String fileID = loc.getFileId();
+    final String partitionPath = record.getPartitionPath();

Review comment:
       Can we find a way to move the buffering logic into the write function ?




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