Repository: spark Updated Branches: refs/heads/branch-1.4 d4a74a28f -> cb4e29fc8
[SPARK-10952] Only add hive to classpath if HIVE_HOME is set. Currently if it isn't set it scans `/lib/*` and adds every dir to the classpath which makes the env too large and every command called afterwords fails. Author: Kevin Cox <[email protected]> Closes #8994 from kevincox/kevincox-only-add-hive-to-classpath-if-var-is-set. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/cb4e29fc Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/cb4e29fc Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/cb4e29fc Branch: refs/heads/branch-1.4 Commit: cb4e29fc8f41afe62fdb3095de96cb6c97207149 Parents: d4a74a2 Author: Kevin Cox <[email protected]> Authored: Wed Oct 7 09:53:17 2015 -0700 Committer: Josh Rosen <[email protected]> Committed: Wed Oct 7 09:55:38 2015 -0700 ---------------------------------------------------------------------- build/sbt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/cb4e29fc/build/sbt ---------------------------------------------------------------------- diff --git a/build/sbt b/build/sbt index cc3203d..7d8d099 100755 --- a/build/sbt +++ b/build/sbt @@ -20,10 +20,12 @@ # When creating new tests for Spark SQL Hive, the HADOOP_CLASSPATH must contain the hive jars so # that we can run Hive to generate the golden answer. This is not required for normal development # or testing. -for i in "$HIVE_HOME"/lib/* -do HADOOP_CLASSPATH="$HADOOP_CLASSPATH:$i" -done -export HADOOP_CLASSPATH +if [ -n "$HIVE_HOME" ]; then + for i in "$HIVE_HOME"/lib/* + do HADOOP_CLASSPATH="$HADOOP_CLASSPATH:$i" + done + export HADOOP_CLASSPATH +fi realpath () { ( --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
