Skip to content

[HUDI-7668] Add and rename APIs in StorageConfiguration#11102

Merged
yihua merged 2 commits intoapache:masterfrom
yihua:HUDI-7668-storage-conf-apis-new
Apr 26, 2024
Merged

[HUDI-7668] Add and rename APIs in StorageConfiguration#11102
yihua merged 2 commits intoapache:masterfrom
yihua:HUDI-7668-storage-conf-apis-new

Conversation

@yihua
Copy link
Contributor

@yihua yihua commented Apr 26, 2024

Change Logs

This PR makes the following changes:

  • Adds StorageConfiguration#newInstance to create a new StorageConfiguration instance with a new copy of the configuration.
  • Adds StorageConfiguration#setIfUnset to set a property key with a value in the configuration, if the property key does not already exist.
  • Renames StorageConfiguration#get to StorageConfiguration#unwrap for readability.
  • Renames StorageConfiguration#newCopy to StorageConfiguration#unwrapCopy for readability.

Impact

New APIs to facilitate integration of StorageConfiguration.

Risk level

none

Documentation Update

none

Contributor's checklist

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

@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Apr 26, 2024
Copy link
Contributor

@jonvex jonvex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like "newCopy()" should return a copy of the storageconfiguration not a copy of the underlying configuration.

maybe "getCopy()" would make more sense, because then it would match the wording with "get()"

@yihua
Copy link
Contributor Author

yihua commented Apr 26, 2024

I feel like "newCopy()" should return a copy of the storageconfiguration not a copy of the underlying configuration.

maybe "getCopy()" would make more sense, because then it would match the wording with "get()"

As discussed offline, rename #getCopy to #unwrapCopy for better readability.

@yihua yihua changed the title [HUDI-7668] Add APIs in StorageConfiguration [HUDI-7668] Add and rename APIs in StorageConfiguration Apr 26, 2024
@hudi-bot
Copy link
Collaborator

CI report:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S PR with lines of changes in (10, 100]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants