garyli1019 commented on a change in pull request #4679:
URL: https://github.com/apache/hudi/pull/4679#discussion_r793299943
##########
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:
IMO we need to move the buffering logic into hoodie common client, then
other engine could reuse it(a streaming API later). Kafka connect sink is also
looking for a streaming way to write. Is there any advantage of putting the
buffering logic into the write function that I am not aware of?
--
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]