You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2014/10/15 00:09:57 UTC

git commit: [SPARK-3869] ./bin/spark-class miss Java version with _JAVA_OPTIONS set

Repository: spark
Updated Branches:
  refs/heads/master 56096dbaa -> 7b4f39f64


[SPARK-3869] ./bin/spark-class miss Java version with _JAVA_OPTIONS set

When _JAVA_OPTIONS environment variable is set, a command "java -version" outputs a message like "Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8".
./bin/spark-class knows java version from the first line of "java -version" output, so it mistakes java version with _JAVA_OPTIONS set.

Author: cocoatomo <co...@gmail.com>

Closes #2725 from cocoatomo/issues/3869-mistake-java-version and squashes the following commits:

f894ebd [cocoatomo] [SPARK-3869] ./bin/spark-class miss Java version with _JAVA_OPTIONS set


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

Branch: refs/heads/master
Commit: 7b4f39f647da1f7b1b57e38827a8639243c661cb
Parents: 56096db
Author: cocoatomo <co...@gmail.com>
Authored: Tue Oct 14 15:09:51 2014 -0700
Committer: Andrew Or <an...@gmail.com>
Committed: Tue Oct 14 15:09:51 2014 -0700

----------------------------------------------------------------------
 bin/spark-class | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/7b4f39f6/bin/spark-class
----------------------------------------------------------------------
diff --git a/bin/spark-class b/bin/spark-class
index e8201c1..91d858b 100755
--- a/bin/spark-class
+++ b/bin/spark-class
@@ -105,7 +105,7 @@ else
     exit 1
   fi
 fi
-JAVA_VERSION=$("$RUNNER" -version 2>&1 | sed 's/.* version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
+JAVA_VERSION=$("$RUNNER" -version 2>&1 | grep 'version' | sed 's/.* version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
 
 # Set JAVA_OPTS to be able to load native libraries and to set heap size
 if [ "$JAVA_VERSION" -ge 18 ]; then


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