From cfe472a34ea8bbf2f7a04acbf0c6ab6c48d732ff Mon Sep 17 00:00:00 2001 From: Josh Rosen Date: Wed, 20 Apr 2016 22:50:27 -0700 Subject: [SPARK-14786] Remove hive-cli dependency from hive subproject The `hive` subproject currently depends on `hive-cli` in order to perform a check to see whether a `SessionState` is an instance of `org.apache.hadoop.hive.cli.CliSessionState` (see #9589). The introduction of this `hive-cli` dependency has caused problems for users whose Hive metastore JAR classpaths don't include the `hive-cli` classes (such as in #11495). This patch removes this dependency on `hive-cli` and replaces the `isInstanceOf` check by reflection. I added a Maven Enforcer rule to ban `hive-cli` from the `hive` subproject in order to make sure that this dependency is not accidentally reintroduced. /cc rxin yhuai adrian-wang preecet Author: Josh Rosen Closes #12551 from JoshRosen/remove-hive-cli-dep-from-hive-subproject. --- sql/hive/pom.xml | 25 ++++++++++++++++++---- .../spark/sql/hive/client/HiveClientImpl.scala | 13 +++++++++-- .../sql/hive/client/IsolatedClientLoader.scala | 2 +- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/sql/hive/pom.xml b/sql/hive/pom.xml index 61504becf1..177b6884fa 100644 --- a/sql/hive/pom.xml +++ b/sql/hive/pom.xml @@ -73,10 +73,6 @@ ${protobuf.version} --> - - ${hive.group} - hive-cli -