Github user mattf commented on a diff in the pull request:
https://github.com/apache/spark/pull/2301#discussion_r17219036
--- Diff: bin/spark-class ---
@@ -105,7 +105,7 @@ else
exit 1
fi
fi
-JAVA_VERSION=$($RUNNER -version 2>&1 | sed 's/java version
"\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
+JAVA_VERSION=$($RUNNER -version 2>&1 | sed 's/java\|openjdk version
"\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
--- End diff --
nice catch. i had tried parens, but they don't work. it'll have to be a .*
````
$ java -version
openjdk version "1.8.0_11"
OpenJDK Runtime Environment (build 1.8.0_11-b12)
OpenJDK 64-Bit Server VM (build 25.11-b02, mixed mode)
$ echo 'openjdk version "1.8.0_11"' | sed 's/java\|openjdk version
"\(.*\)\.\(.*\)\..*"/\1\2/; 1q'
18
$ echo 'java version "1.8.0_11"' | sed 's/java\|openjdk version
"\(.*\)\.\(.*\)\..*"/\1\2/; 1q'
version "1.8.0_11"
$ echo 'java version "1.8.0_11"' | sed 's/(java\|openjdk) version
"\(.*\)\.\(.*\)\..*"/\1\2/; 1q'
java version "1.8.0_11"
$ echo 'openjdk version "1.8.0_11"' | sed 's/(java\|openjdk) version
"\(.*\)\.\(.*\)\..*"/\1\2/; 1q'
openjdk version "1.8.0_11"
$ echo 'java version "1.8.0_11"' | sed 's/.* version
"\(.*\)\.\(.*\)\..*"/\1\2/; 1q'
18
$ echo 'openjdk version "1.8.0_11"' | sed 's/.* version
"\(.*\)\.\(.*\)\..*"/\1\2/; 1q'
18
````
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]