-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-1606]align BaseJavaCommitActionExecuto#execute method with BaseSparkCommitActionExecutor #2560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2560 +/- ##
=========================================
Coverage 51.15% 51.15%
- Complexity 3212 3213 +1
=========================================
Files 436 436
Lines 19987 19987
Branches 2057 2057
=========================================
+ Hits 10224 10225 +1
Misses 8922 8922
+ Partials 841 840 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would we just change the BaseJavaCommitActionExecutor#execute method to add updateIndexAndCommitIfNeeded method and align with BaseSparkCommitActionExecutor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leesf many thanks for your review. You suggestion make more sense and i have change the code accordingly.
…SparkCommitActionExecutor
| result.setWriteStatuses(statuses); | ||
| } | ||
|
|
||
| protected void updateIndexAndCommitIfNeeded(List<WriteStatus> writeStatuses, HoodieWriteMetadata<List<WriteStatus>> result) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leesf if it is already covered by other PR, please feel free to close this one. Thanks for your review.
Tips
What is the purpose of the pull request
run HoodieJavaWriteClientExample locally ,the code fail with exception. The root cause is that BaseJavaCommitActionExecutor#execute method does not commit the index when it is needed.
the PR is to fix the issue.
Brief change log
org.apache.hudi.table.action.commit.BaseJavaCommitActionExecutor
Verify this pull request
This pull request is already covered by existing tests: HoodieJavaWriteClientExample.main()
I manually verified the change by running a job locally.
Committer checklist
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green
Necessary doc changes done or have another open PR
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.