This is an automated email from the ASF dual-hosted git repository. pvary pushed a commit to branch branch-2 in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/branch-2 by this push: new 31a1194 HIVE-21508: ClassCastException when initializing HiveMetaStoreClient on JDK10 or newer (Ana Jalba, via Peter Vary) 31a1194 is described below commit 31a1194561b17d43947052b18d6a688f753e519f Author: Peter Vary <pv...@cloudera.com> AuthorDate: Thu Sep 12 11:57:34 2019 +0200 HIVE-21508: ClassCastException when initializing HiveMetaStoreClient on JDK10 or newer (Ana Jalba, via Peter Vary) --- .../java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index 6dc198f..ddf900b 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -204,9 +204,9 @@ public class HiveMetaStoreClient implements IMetaStoreClient { } // make metastore URIS random if (HiveConf.getVar(conf, ConfVars.METASTORESELECTION).equalsIgnoreCase("RANDOM")) { - List uriList = Arrays.asList(metastoreUris); + List<URI> uriList = Arrays.asList(metastoreUris); Collections.shuffle(uriList); - metastoreUris = (URI[]) uriList.toArray(); + metastoreUris = uriList.toArray(new URI[uriList.size()]); } } catch (IllegalArgumentException e) { throw (e);