You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/02/10 15:14:04 UTC

[GitHub] [hudi] caidezhi commented on a change in pull request #2560: [HUDI-1606]fix HoodieJavaWriteClientExample

caidezhi commented on a change in pull request #2560:
URL: https://github.com/apache/hudi/pull/2560#discussion_r573811921



##########
File path: hudi-examples/src/main/java/org/apache/hudi/examples/java/HoodieJavaWriteClientExample.java
##########
@@ -93,7 +94,8 @@ public static void main(String[] args) throws Exception {
     List<HoodieRecord<HoodieAvroPayload>> recordsSoFar = new ArrayList<>(records);
     List<HoodieRecord<HoodieAvroPayload>> writeRecords =
         recordsSoFar.stream().map(r -> new HoodieRecord<HoodieAvroPayload>(r)).collect(Collectors.toList());
-    client.upsert(writeRecords, newCommitTime);
+    List<WriteStatus> insertStatus = client.upsert(writeRecords, newCommitTime);
+    client.commit(newCommitTime,insertStatus);

Review comment:
       @leesf many thanks for your review. You suggestion make more sense and i have change the code accordingly.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org