Details
Description
There's this block of code in HiveMetaStoreClient:resolveUris (called from the constructor) on master:
private URI metastoreUris[]; ... if (MetastoreConf.getVar(conf, ConfVars.THRIFT_URI_SELECTION).equalsIgnoreCase("RANDOM")) { List uriList = Arrays.asList(metastoreUris); Collections.shuffle(uriList); metastoreUris = (URI[]) uriList.toArray(); }
The cast to URI[] throws a ClassCastException beginning with JDK 10, possibly with JDK 9 as well. Note that THRIFT_URI_SELECTION defaults to RANDOM so this should affect anyone who creates a HiveMetaStoreClient. On master this can be overridden with SEQUENTIAL to avoid the broken case; I'm working against 2.3.4 where there's no such workaround.
Here's a StackOverflow post that explains the issue in more detail. Interestingly, the author described the issue in the context of the HMS; not sure why there was no follow up with a Hive bug report.
Attachments
Attachments
Issue Links
- Blocked
-
KUDU-2641 TestHiveMetastoreIntegration fails with JDK9+
- Resolved
- causes
-
FLINK-28729 flink hive catalog don't support jdk11
- Resolved
-
KUDU-2751 Java tests that start an HMS client fail when run on JDK10+
- Resolved
- is duplicated by
-
HIVE-22190 Class HiveMetaStoreClient fails to instantiate when running on Java 11
- Closed
- is related to
-
SPARK-29245 CCE during creating HiveMetaStoreClient
- Resolved