voonhous opened a new issue, #19679:
URL: https://github.com/apache/hudi/issues/19679
**Describe the problem**
`Test Call sync_validate record-count modes fail fast on an unreachable
HiveServer2` in `TestValidateHoodieSyncProcedure` (#19161) fails
deterministically on the default build profile. The test expects
`DriverManager.getConnection("jdbc:hive2://unused", ...)` to fail fast with an
`SQLException` from transport setup (a portless URL keeps port -1). But on the
hudi-spark test classpath the connect dies earlier with `NoClassDefFoundError:
org/apache/thrift/TConfiguration`: the Hive 2.3.10 client jars are compiled
against libthrift 0.14.1 (`HiveAuthUtils.getSocketTransport` does `new
TSocket(new TConfiguration(), ...)`), while dependency mediation resolves
libthrift 0.12.0 via `spark-hive_2.12:3.5.5`, which has no `TConfiguration`.
The `mode => 'complete'` pin still passes, ironically because of the #19635
masking bug it exists to pin: the NPE from the unguarded `finally {
conn.close() }` replaces the `NoClassDefFoundError` just like it would an
`SQLException`. The `mode => 'latestPartitions'` pin asserts an `SQLException`
in the cause chain and fails with `org.apache.spark.SparkException <-
java.lang.NoClassDefFoundError <- java.lang.ClassNotFoundException`. The test
only passes where libthrift >= 0.14 wins resolution (e.g. with the standalone
hive-jdbc jar, the same call fails in ~300ms with `SQLException: Could not open
client transport ... Invalid port -1`).
**Suggested fix**
Point the test at a hostless URL (`jdbc:hive2://:10000`):
`Utils.configureConnParams` rejects it with `JdbcUriParseException` (an
`SQLException` subclass) during URL parsing, before any transport class loads,
so both cause-chain pins hold regardless of which libthrift is on the
classpath. The classpath mismatch itself, which also breaks the record-count
modes at runtime, deserves its own issue and fix.
--
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]