danny0405 opened a new pull request, #19579: URL: https://github.com/apache/hudi/pull/19579
### Describe the issue this Pull Request addresses `Pipelines.hoodieStreamWrite` currently combines bucket-engine selection, data-write construction, and optional index-write construction in one nested method. This makes the pipeline topology harder to follow and duplicates the final bucket-write stage across simple and consistent-hashing bucket engines. ### Summary and Changelog This change makes the Flink streaming write pipeline construction easier to follow without changing its topology or behavior. - Extract the bucket-index pipeline into `bucketStreamWrite`. - Share the final bucket-write operator construction between simple and consistent-hashing bucket engines. - Extract optional record-index pipeline construction into `addIndexWrite`. - Replace nested return branches in bootstrap and bucket assignment selection with guard clauses. - Document the extracted pipeline stages with topology diagrams. - Add transformation-graph coverage for the consistent-hashing bucket write path. No code was copied from another project. ### Impact No public API, user-facing behavior, configuration, storage format, or performance behavior changes. Operator names, UIDs, partitioning, parallelism, type information, and managed-memory declarations remain unchanged. ### Risk Level low. The change refactors pipeline construction while preserving the generated Flink operator graph. Focused graph tests cover normal writes, simple bucket writes, consistent-hashing bucket writes, record-level index routing, bulk inserts, and table-service pipelines. ### Documentation Update none. This is an internal refactor with Javadocs added for the extracted methods. ### Testing - `mvn -pl hudi-flink-datasource/hudi-flink -am -Drat.skip=true -DskipITs -Dtest=org.apache.hudi.sink.utils.TestPipelines -Dsurefire.failIfNoSpecifiedTests=false test` (10 tests passed) - `mvn -pl hudi-flink-datasource/hudi-flink -Drat.skip=true -DskipTests checkstyle:check` - `git diff --check` ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
