huangxiaopingRD opened a new pull request, #8796: URL: https://github.com/apache/hudi/pull/8796
### Background https://github.com/apache/hudi/issues/8544 [HUDI-6129](https://issues.apache.org/jira/browse/HUDI-6129) ### Change Logs Added `maxFilesPerTrigger`, `maxBytesPerTrigger`, `maxRowsPerTrigger` to control the speed of consuming Spark stream source, the corresponding configuration is `hoodie.datasource.streaming.max.files.per.trigger`, `hoodie.datasource.streaming.max.bytes.per.trigger`, `hoodie.datasource .streaming.max.rows.per.trigger`. It is implemented with the `latestOffset` method of the `SupportsAdmissionControl` interface of Spark3, so versions below Spark3 are not supported. The `latestOffset` method is implemented as follows: Get all `HoodieCommitMetadata` from `startOffset` to `latestOffset`, Start traversing from `startOffset` (through commit -> partition -> file, that is,` List[HoodieCommitMetadata]` -> `partitionToWriteStats` -> `HoodieWriteStat` traversal), until one of the three conditions of `maxFilesPerTrigger`, `maxBytesPerTrigger`, `maxRowsPerTrigger` is met, get `maxOffset`, and then return `maxOffset` as the `latestOffset` method return value. ### Impact low ### Risk level (write none, low medium or high below) low ### Documentation Update 【TODO】Documentation needs to be added to describe this feature ### 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]
