shangxinli opened a new pull request, #19080: URL: https://github.com/apache/hudi/pull/19080
### Change Logs The existing `TestHFileCompatibility#testHbaseReaderSucceedsWhenKeyValueVersionIsSetTo1` covers the single-data-block happy path with 5 records, which does not stress the load-on-open data structures (data-block index, meta-block index) that `HFileWriterImpl`'s trailer points at. This PR adds a parameterized cross-version compat test that writes 5,000 records across 5 key/value shapes representative of the Metadata Table (MDT) partitions (`FILES`, `COLUMN_STATS`, `RECORD_INDEX`, `SECONDARY_INDEX`, `BLOOM_FILTERS`), reopens each file with HBase 2.4.x `HFile.createReader`, and asserts: - the trailer parses (no `CorruptHFileException`), - `getEntries()` matches the count written, - a full forward scan returns every key in order. A future trailer-layout drift in `HFileWriterImpl` (field reorder, missed field, width change) would fail at least one assertion across these shapes, before the change reaches MDT files in production and breaks readers still running an older Hudi release. ### Impact Test-only. No production code changes. Added test runs in `hudi-io` module, ~2 seconds. ### Risk level **none** — test-only. ### Documentation Update N/A. ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Change Logs and Impact were stated clearly - [ ] Adequate tests were added if applicable *(this PR **is** the test)* - [x] 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]
