muttcg opened a new issue, #6603: URL: https://github.com/apache/paimon/issues/6603
### Search before asking - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. ### Motivation I'd like to utilize commit.callbacks and call a user callback after all system commit callbacks are called. For example, after creating Iceberg metadata, call the user callback. ### Solution he current implementation of commit.callbacks is used by IcebergCommitCallback and some other internal Paimon callbacks, but at the same time, the order is as follows: 1) Add all user callbacks 2) Add Paimon callbacks ```java private List<CommitCallback> createCommitCallbacks(String commitUser, FileStoreTable table) { List<CommitCallback> callbacks = new ArrayList<>(); callbacks.addAll(CallbackUtils.loadCommitCallbacks(options, table)); ... add AddPartitionCommitCallback ... add TagPreviewCommitCallback ... add IcebergCommitCallback return callbacks; } ``` Change it to: 1) Add Paimon callbacks 2) Add all user callbacks ```java private List<CommitCallback> createCommitCallbacks(String commitUser, FileStoreTable table) { List<CommitCallback> callbacks = new ArrayList<>(); ... add AddPartitionCommitCallback ... add TagPreviewCommitCallback ... add IcebergCommitCallback callbacks.addAll(CallbackUtils.loadCommitCallbacks(options, table)); return callbacks; } ``` ### Anything else? _No response_ ### Are you willing to submit a PR? - [x] I'm willing to submit a PR! -- 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]
