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

   ### Describe the issue this Pull Request addresses
   
   The `flink-bundle-shade-hive*` profiles bundle `hive-exec` but the resulting 
bundle fails at runtime as soon as `HiveSyncTool` talks to HMS. This PR fixes 
the shade config in `packaging/hudi-flink-bundle/pom.xml`:
   - Bundle the ANTLR runtime (`antlr-runtime`, `ST4`, `antlr4-runtime`) that 
`hive-exec` needs for DDL parsing but does not embed.
   - Relocate the transitive deps `hive-exec` embeds un-relocated (Guava, 
protobuf, Commons Lang, Thrift, ORC, JSON, Airlift, parquet-format, codehaus 
Jackson, fb303, snappy, opencsv, JavaEWAH, Javolution, Jodd, DataNucleus) so 
they don't shadow the versions Hudi/Flink rely on, while keeping 
`org.apache.parquet.format.converter.**` un-relocated (used with the 
un-relocated `ParquetFileReader`).
   - Strip `hive-exec`'s stale Avro 1.7.7 so the relocated Avro namespace is 
populated only by the modern Avro.
   
   These only affect the bundle when a `flink-bundle-shade-hive*` profile is 
active. See https://github.com/apache/hudi/issues/19319 for the full per-error 
root-cause analysis.
   
   ### Summary and Changelog
   
   Built `hudi-flink1.18-bundle` with `-Pflink-bundle-shade-hive2` and verified 
the shaded jar: ANTLR runtime present, embedded deps relocated 
under`org.apache.hudi.*`, `parquet.format.converter` left in place, and no 
stale Avro
   (modern `LogicalType` present).
   
   ### Impact
   
   Increase hudi-flink-bundle size
   
   ### Risk Level
   
   Low. Have done Uber internal verifications to make sure things work.
   
   ### Documentation Update
   
   N/A
   
   ### 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]

Reply via email to