diff options
author | Kevin Cox <kevincox@kevincox.ca> | 2015-10-07 09:53:17 -0700 |
---|---|---|
committer | Josh Rosen <joshrosen@databricks.com> | 2015-10-07 09:54:02 -0700 |
commit | 9672602c7ecb8117a1edb04067e2e3e776ee10d2 (patch) | |
tree | beb1cd4dc8011d809f72343332b70a3f3e8e9fbd /build/sbt | |
parent | f57c63d4c30d092a320c72f8c7181f2fa711ec30 (diff) | |
download | spark-9672602c7ecb8117a1edb04067e2e3e776ee10d2.tar.gz spark-9672602c7ecb8117a1edb04067e2e3e776ee10d2.tar.bz2 spark-9672602c7ecb8117a1edb04067e2e3e776ee10d2.zip |
[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 <kevincox@kevincox.ca>
Closes #8994 from kevincox/kevincox-only-add-hive-to-classpath-if-var-is-set.
Diffstat (limited to 'build/sbt')
-rwxr-xr-x | build/sbt | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 () { ( |