yihua opened a new pull request, #9108:
URL: https://github.com/apache/hudi/pull/9108
### Change Logs
This PR adds the interface for Hudi client init callback to run custom logic
at the time of initialization of a Hudi client:
```
@PublicAPIClass(maturity = ApiMaturityLevel.EVOLVING)
public interface HoodieClientInitCallback {
/**
* A callback method in which the user can implement custom logic.
* This method is called when a {@link BaseHoodieClient} is initialized.
*
* @param hoodieClient {@link BaseHoodieClient} instance.
*/
@PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
void call(BaseHoodieClient hoodieClient);
}
```
At the time of instantiation of the write or table service client, a user
may want to do additional processing, such as sending metrics, logsm
notification, or adding more properties to the write config. The
implementation of client init callback interface allows such logic to be
plugged into Hudi.
A new config, `hoodie.client.init.callback.classes`, is added for plugging
in the callback implementation. The class list is comma-separated.
New tests are added and the behavior is expected.
### Impact
Adds new functionality of client init callback to run custom logic at the
time of initialization of a Hudi client.
### Risk level
none
### Documentation Update
Will update the Hudi docs.
### Contributor's checklist
- [ ] Read through [contributor's
guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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]