You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2017/02/16 18:43:42 UTC

spark git commit: [SPARK-19550][HOTFIX][BUILD] Use JAVA_HOME/bin/java if JAVA_HOME is set in dev/mima

Repository: spark
Updated Branches:
  refs/heads/master 54a30c8a7 -> dcc2d540a


[SPARK-19550][HOTFIX][BUILD] Use JAVA_HOME/bin/java if JAVA_HOME is set in dev/mima

## What changes were proposed in this pull request?

Use JAVA_HOME/bin/java if JAVA_HOME is set in dev/mima script to run MiMa
This follows on https://github.com/apache/spark/pull/16871 -- it's a slightly separate issue, but, is currently causing a build failure.

## How was this patch tested?

Manually tested.

Author: Sean Owen <so...@cloudera.com>

Closes #16957 from srowen/SPARK-19550.2.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/dcc2d540
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/dcc2d540
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/dcc2d540

Branch: refs/heads/master
Commit: dcc2d540a53f0bd04baead43fdee1c170ef2b9f3
Parents: 54a30c8
Author: Sean Owen <so...@cloudera.com>
Authored: Thu Feb 16 18:43:38 2017 +0000
Committer: Sean Owen <so...@cloudera.com>
Committed: Thu Feb 16 18:43:38 2017 +0000

----------------------------------------------------------------------
 dev/mima | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/dcc2d540/dev/mima
----------------------------------------------------------------------
diff --git a/dev/mima b/dev/mima
index eca78ad..85b09db 100755
--- a/dev/mima
+++ b/dev/mima
@@ -30,7 +30,13 @@ OLD_DEPS_CLASSPATH="$(build/sbt -DcopyDependencies=false $SPARK_PROFILES "export
 
 rm -f .generated-mima*
 
-java \
+if [[ -x "$JAVA_HOME/bin/java" ]]; then
+  JAVA_CMD="$JAVA_HOME/bin/java"
+else
+  JAVA_CMD=java
+fi
+
+$JAVA_CMD \
   -Xmx2g \
   -cp "$TOOLS_CLASSPATH:$OLD_DEPS_CLASSPATH" \
   org.apache.spark.tools.GenerateMIMAIgnore


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org