voonhous opened a new pull request, #19682: URL: https://github.com/apache/hudi/pull/19682
### Describe the issue this Pull Request addresses Closes #19680. The Hive 2.3.10 client jars are compiled against libthrift 0.14.1 (`HiveAuthUtils.getSocketTransport` uses `TConfiguration`), but in hudi-spark dependency mediation picks 0.12.0 from `spark-hive`, which lacks that class. Every `jdbc:hive2://` connect on this classpath dies with `NoClassDefFoundError: org/apache/thrift/TConfiguration` instead of connecting or failing with an SQLException, which breaks `sync_validate`'s record-count modes and surfaced through the test failure in #19679. ### Summary and Changelog - Add a `hive.libthrift.version` property (0.14.1) next to `hive.version` in the root pom, to be kept in lockstep with it. - Pin libthrift directly in hudi-spark so it outranks spark-hive's transitive 0.12.0, excluding libthrift's tomcat/annotation extras so the resolved classpath changes by exactly one thing: libthrift 0.12.0 -> 0.14.1 (verified with `dependency:build-classpath` before/after). - Verified against the resolved test classpath that `DriverManager.getConnection` now behaves as designed: portless URL fails fast with `SQLException: ... Invalid port -1`, a refused host:port fails with `SQLException <- TTransportException <- ConnectException`, and the hostless URL used by the test from #19681 still fails in URL parsing with `JdbcUriParseException`. ### Impact Anyone consuming the hudi-spark artifact gets a working hive-jdbc path again. The default spark bundle is unaffected (hive jars are provided-scope there and libthrift is not in its shade include list). ### Risk Level low. libthrift 0.14.1 keeps the pre-0.14 client API surface (e.g. `TSocket(String, int, int)`) that spark-hive's 0.12.0-era callers use, and hudi-integ-test-bundle already pairs these hive jars with libthrift 0.23.0. Mitigation is a full hudi-spark test suite run, since thrift also serves the embedded HMS paths in tests. ### Documentation Update none ### 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]
