You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2018/06/08 19:03:50 UTC

asterixdb git commit: [ASTERIXDB-2397][*DB] Fix sample cluster on Java 10

Repository: asterixdb
Updated Branches:
  refs/heads/master e7422b0ee -> 4dad01329


[ASTERIXDB-2397][*DB] Fix sample cluster on Java 10

Change-Id: Ie40107e1f402e977413127783f51dc3a91dad2d2
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2695
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <im...@apache.org>
Tested-by: Michael Blow <mb...@apache.org>


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

Branch: refs/heads/master
Commit: 4dad013297f033e7aaa83fbf72fa11eaada7f927
Parents: e7422b0
Author: Michael Blow <mb...@apache.org>
Authored: Fri Jun 8 14:26:11 2018 -0400
Committer: Michael Blow <mb...@apache.org>
Committed: Fri Jun 8 12:03:26 2018 -0700

----------------------------------------------------------------------
 .../src/main/opt/local/bin/start-sample-cluster.sh      | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/4dad0132/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh b/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh
index 4f3caed..d1699dd 100755
--- a/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh
+++ b/asterixdb/asterix-server/src/main/opt/local/bin/start-sample-cluster.sh
@@ -86,11 +86,15 @@ if [ -z "$JAVACMD" ] ; then
   fi
 fi
 
-"$JAVACMD" -version 2>&1 | grep -q '1\.[89]' || {
-  echo "JAVA_HOME must be at version 1.8 or later:"
-  "$JAVACMD" -version
+export JAVA_VERSION=$(java -version 2>&1 | head -1 | awk '{ print $NF }' | tr -d '"')
+case $JAVA_VERSION in
+  1.8*|1.9*|10*|11*)
+    ;;
+  *)
+  echo JAVA_HOME must be at version 1.8 or later, but is: $JAVA_VERSION
   exit 2
-}
+esac
+
 DIRNAME=$(dirname "$0")
 [ $(echo $DIRNAME | wc -l) -ne 1 ] && {
   echo "Paths with spaces are not supported"