diff options
author | Andrew Or <andrewor14@gmail.com> | 2014-05-05 16:28:07 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-05-05 16:28:07 -0700 |
commit | cf0a8f0204bb8acdaf441b03c924c278fef08e28 (patch) | |
tree | 319660a9003529da27e8abfcdc2ab43c119327e6 /make-distribution.sh | |
parent | a975a19f21e71f448b3fdb2ed4461e28ef439900 (diff) | |
download | spark-cf0a8f0204bb8acdaf441b03c924c278fef08e28.tar.gz spark-cf0a8f0204bb8acdaf441b03c924c278fef08e28.tar.bz2 spark-cf0a8f0204bb8acdaf441b03c924c278fef08e28.zip |
[SPARK-1681] Include datanucleus jars in Spark Hive distribution
This copies the datanucleus jars over from `lib_managed` into `dist/lib`, if any. The `CLASSPATH` must also be updated to reflect this change.
Author: Andrew Or <andrewor14@gmail.com>
Closes #610 from andrewor14/hive-distribution and squashes the following commits:
a4bc96f [Andrew Or] Rename search path in jar error check
fa205e1 [Andrew Or] Merge branch 'master' of github.com:apache/spark into hive-distribution
7855f58 [Andrew Or] Have jar command respect JAVA_HOME + check for jar errors both cases
c16bbfd [Andrew Or] Merge branch 'master' of github.com:apache/spark into hive-distribution
32f6826 [Andrew Or] Leave the double colons
940a1bb [Andrew Or] Add back 2>/dev/null
58357cc [Andrew Or] Include datanucleus jars in Spark distribution built with Hive support
Diffstat (limited to 'make-distribution.sh')
-rwxr-xr-x | make-distribution.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/make-distribution.sh b/make-distribution.sh index 2ab64ff459..ff18d01e7a 100755 --- a/make-distribution.sh +++ b/make-distribution.sh @@ -51,13 +51,13 @@ if [ $? != 0 ]; then exit -1; fi -if [ -z "${JAVA_HOME}" ]; then +if [ -z "$JAVA_HOME" ]; then echo "Error: JAVA_HOME is not set, cannot proceed." exit -1 fi -JAVA_CMD=$JAVA_HOME/bin/java -JAVA_VERSION=$($JAVA_CMD -version 2>&1) +JAVA_CMD="$JAVA_HOME"/bin/java +JAVA_VERSION=$("$JAVA_CMD" -version 2>&1) if ! [[ "$JAVA_VERSION" =~ "1.6" ]]; then echo "Error: JAVA_HOME must point to a JDK 6 installation (see SPARK-1703)." echo "Output from 'java -version' was:" @@ -162,6 +162,10 @@ echo "Spark $VERSION built for Hadoop $SPARK_HADOOP_VERSION" > "$DISTDIR/RELEASE cp $FWDIR/assembly/target/scala*/*assembly*hadoop*.jar "$DISTDIR/lib/" cp $FWDIR/examples/target/scala*/spark-examples*.jar "$DISTDIR/lib/" +if [ "$SPARK_HIVE" == "true" ]; then + cp $FWDIR/lib_managed/jars/datanucleus*.jar "$DISTDIR/lib/" +fi + # Copy other things mkdir "$DISTDIR"/conf cp "$FWDIR"/conf/*.template "$DISTDIR"/conf @@ -170,7 +174,6 @@ cp -r "$FWDIR/bin" "$DISTDIR" cp -r "$FWDIR/python" "$DISTDIR" cp -r "$FWDIR/sbin" "$DISTDIR" - # Download and copy in tachyon, if requested if [ "$SPARK_TACHYON" == "true" ]; then TACHYON_VERSION="0.4.1" |