danny0405 opened a new pull request, #19285:
URL: https://github.com/apache/hudi/pull/19285

   ### Describe the issue this Pull Request addresses
   
   `ParquetFileReader.readFooter` is deprecated and scheduled for removal in 
Parquet 2.0. Direct usages remain across Hudi's Hadoop, Spark, and Flink 
integrations, creating forward-compatibility risk with newer Parquet releases.
   
   This PR migrates those usages to the recommended 
`ParquetFileReader.open(InputFile, ParquetReadOptions)` API while preserving 
the existing metadata filters and ensuring readers are closed after footer 
access.
   
   ### Summary and Changelog
   
   Migrates all direct `ParquetFileReader.readFooter` usages to the supported 
reader API without changing footer-reading behavior.
   
   #### Working tree: migrate deprecated Parquet footer reads
   
   - Replace `readFooter` in `ParquetUtils`, `ParquetBinaryCopyChecker`, 
`HoodieAvroParquetReader`, and `ParquetBootstrapMetadataHandler`.
   - Migrate Flink 1.18, 1.19, 1.20, 2.0, and 2.1 vectorized split readers 
while preserving byte-range metadata filtering.
   - Update `ShowInvalidParquetProcedure` and `RepairClusteringPlanProcedure` 
while preserving `SKIP_ROW_GROUPS`.
   - Update affected Hadoop and Spark tests to use `HadoopInputFile` and 
`HadoopReadOptions`.
   - Close all temporary `ParquetFileReader` instances using try-with-resources 
or `finally`.
   - Remove all remaining direct `ParquetFileReader.readFooter` calls.
   
   ### Impact
   
   There are no public API, configuration, storage-format, or user-facing 
behavior changes.
   
   The change affects internal Parquet footer-reading paths across Hadoop, 
Spark, and Flink modules. Existing metadata filters, schemas, row-group 
selection, and error handling are preserved. No material performance impact is 
expected.
   
   ### Risk Level
   
   low
   
   The change touches multiple engine integrations but follows Parquet's 
documented replacement API and preserves each caller's metadata filter.
   
   Validation performed:
   
   - Compiled `hudi-hadoop-common`, `hudi-hadoop-mr`, and `hudi-spark-client`.
   - Compiled Flink 1.18, 1.19, 1.20, 2.0, and 2.1 profiles.
   - Compiled the Spark 3.5 module.
   - Test-compiled the affected Spark 4.0 test module.
   - Passed `TestParquetUtils` — 14 tests.
   - Passed `TestHoodieParquetFileBinaryCopier` — 10 tests.
   - Verified no deprecated `ParquetFileReader.readFooter` calls remain.
   - Verified `git diff --check` passes.
   
   ### Documentation Update
   
   none — this is an internal compatibility migration with no user-facing API, 
configuration, or behavior changes.
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Enough context is provided in the sections above
   - [ ] 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]

Reply via email to