Skip to content
Snippets Groups Projects
Commit 9672602c authored by Kevin Cox's avatar Kevin Cox Committed by Josh Rosen
Browse files

[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.
parent f57c63d4
No related branches found
No related tags found
No related merge requests found
...@@ -20,10 +20,12 @@ ...@@ -20,10 +20,12 @@
# When creating new tests for Spark SQL Hive, the HADOOP_CLASSPATH must contain the hive jars so # 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 # that we can run Hive to generate the golden answer. This is not required for normal development
# or testing. # or testing.
for i in "$HIVE_HOME"/lib/* if [ -n "$HIVE_HOME" ]; then
do HADOOP_CLASSPATH="$HADOOP_CLASSPATH:$i" for i in "$HIVE_HOME"/lib/*
done do HADOOP_CLASSPATH="$HADOOP_CLASSPATH:$i"
export HADOOP_CLASSPATH done
export HADOOP_CLASSPATH
fi
realpath () { realpath () {
( (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment