hudi icon indicating copy to clipboard operation
hudi copied to clipboard

[HUDI-4444] Refactor DataSourceInternalWriterHelper

Open wombatu-kun opened this issue 1 year ago • 1 comments

Change Logs

DataSourceInternalWriterHelper constructor is writing files (through writeClient.startCommitWithTime and writeClient.preWrite), which is an anti-pattern.
Moved code that starts transaction (creates files through startCommitWithTime and preWrite) from constructor to separate method startTransaction() and called it from createInflightCommit().

Impact

none

Risk level (write none, low medium or high below)

none

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the ticket number here and follow the instruction to make changes to the website.

Contributor's checklist

  • [ ] Read through contributor's guide
  • [ ] Change Logs and Impact were stated clearly
  • [ ] Adequate tests were added if applicable
  • [ ] CI passed

wombatu-kun avatar Feb 20 '24 10:02 wombatu-kun

CI report:

  • e2c574be3c2f8953e3973610fb0e20fef16f68ba Azure: SUCCESS
Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

hudi-bot avatar Feb 20 '24 13:02 hudi-bot