diff options
author | Josh Rosen <joshrosen@databricks.com> | 2016-04-20 22:50:27 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-04-20 22:50:27 -0700 |
commit | cfe472a34ea8bbf2f7a04acbf0c6ab6c48d732ff (patch) | |
tree | 30d3b825de57b532db6e37a44da1ccd94af13003 /sql/hive/pom.xml | |
parent | 8045814114d41dc17130ebc71f9e48d28ca959ca (diff) | |
download | spark-cfe472a34ea8bbf2f7a04acbf0c6ab6c48d732ff.tar.gz spark-cfe472a34ea8bbf2f7a04acbf0c6ab6c48d732ff.tar.bz2 spark-cfe472a34ea8bbf2f7a04acbf0c6ab6c48d732ff.zip |
[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 <joshrosen@databricks.com>
Closes #12551 from JoshRosen/remove-hive-cli-dep-from-hive-subproject.
Diffstat (limited to 'sql/hive/pom.xml')
-rw-r--r-- | sql/hive/pom.xml | 25 |
1 files changed, 21 insertions, 4 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 @@ <version>${protobuf.version}</version> </dependency> --> - <dependency> - <groupId>${hive.group}</groupId> - <artifactId>hive-cli</artifactId> - </dependency> <!-- <dependency> <groupId>${hive.group}</groupId> @@ -225,6 +221,27 @@ <argLine>-da -Xmx3g -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m</argLine> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>enforce-versions</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <bannedDependencies> + <excludes combine.children="append"> + <exclude>*:hive-cli</exclude> + </excludes> + </bannedDependencies> + </rules> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> </project> |