fix(tests): reach TFramedTransport at the package libthrift 0.14 moved it to - #19830
Conversation
…d it to HiveTestService imports TFramedTransport from the pre-0.14 package while overriding TServerTransport.accept(), which is final below 0.14, so no single libthrift satisfies it. The build only gets away with it because the full hive-exec bundles a 0.14-era transport package; consumers of the tests jar that take hive-exec with the core classifier resolve TServerTransport from libthrift and fail verification. The libthrift test dependency moves to hive.libthrift.version, which already models the thrift the Hive client is built against, leaving thrift.version to the metaserver.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19830 +/- ##
============================================
- Coverage 78.31% 78.31% -0.01%
+ Complexity 33894 33890 -4
============================================
Files 2542 2542
Lines 141775 141775
Branches 17197 17197
============================================
- Hits 111031 111027 -4
- Misses 23032 23038 +6
+ Partials 7712 7710 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
hudi-agent
left a comment
There was a problem hiding this comment.
Thanks for working on this! The PR fixes a TFramedTransport import (moved to the layered package in libthrift 0.14) and aligns the test-scope libthrift version in hudi-hive-sync and hudi-utilities with the Hive client's ${hive.libthrift.version} (0.14.1) so HiveTestService compiles consistently. The change is test-scope only, is consistent across the default and spark4 (0.16.0) profiles, and leaves the metaserver's own ${thrift.version} (0.13.0) dependency untouched. No issues flagged from this automated pass — a Hudi committer or PMC member can take it from here for a final review.
cc @yihua
Describe the issue this Pull Request addresses
Closes #19829
Summary and Changelog
HiveTestServiceimportsTFramedTransportfrom the package libthrift moved it out of in 0.14, while itsTServerSocketKeepAliveoverridesTServerTransport.accept(), which isfinalbelow 0.14. No single libthrift version satisfies both, and no method is overridable across both generations.Points the import at
org.apache.thrift.transport.layered.TFramedTransport, and moves thelibthrifttest dependency inhudi-hive-syncandhudi-utilitiesfrom${thrift.version}(0.13.0, which the metaserver needs) to the existing${hive.libthrift.version}(0.14.1), which already models the thrift the Hive client is compiled against.Impact
No production code changes;
libthriftstays test scope so no bundle changes.hudi-hive-syncandhudi-utilitiescarry the fullhive-exec, which already resolves a 0.14-era transport package, so behaviour there is unchanged (CI ranTestHiveSyncToolandTestHoodieDeltaStreamer, both startHiveTestService).The in-repo consumer this fixes is
hudi-integ-test: its main classHiveServiceProviderinstantiatesHiveTestServiceon a classpath withhive-exec:coreand libthrift 0.14.1 as the only thrift provider, so on master the class cannot link there at all (no old-pathTFramedTransportexists anywhere on that classpath). This is masked today only becauseTestHoodieTestSuiteJobis@Disabled(HUDI-3668) andTestExpressionIndex's hive-sync branch is guarded to Java 8.hudi-spark's test classpath is in the same situation.Risk Level
low
ChainedTTransportFactory.getTransportalready declares theTTransportExceptionthat 0.14 adds toTTransportFactory.getTransport, so no call site changes.hudi-hive-syncandhudi-utilitiesbothtest-compilecleanly on JDK 11.Documentation Update
none
Contributor's checklist