cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/6] git commit: Add sanity check of $JAVA on startup patch by Robert Stupp; reviewed by Michael Shuler for CASSANDRA-7676
Date Thu, 09 Oct 2014 12:26:13 GMT
Add sanity check of $JAVA on startup
patch by Robert Stupp; reviewed by Michael Shuler for CASSANDRA-7676


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

Branch: refs/heads/cassandra-2.1
Commit: fc0bb1520f6b74de834a5bd79440fa78bda913e8
Parents: 87cbcc0
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Oct 9 07:24:19 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Oct 9 07:24:19 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt   | 1 +
 bin/cassandra | 5 +++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc0bb152/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1bef399..7deea86 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.11:
+ * Add sanity check of $JAVA on startup (CASSANDRA-7676)
  * Schedule fat client schema pull on join (CASSANDRA-7993)
  * Don't reset nodes' versions when closing IncomingTcpConnections
    (CASSANDRA-7734)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc0bb152/bin/cassandra
----------------------------------------------------------------------
diff --git a/bin/cassandra b/bin/cassandra
index a950e0b..09fe013 100755
--- a/bin/cassandra
+++ b/bin/cassandra
@@ -98,6 +98,11 @@ else
     JAVA=java
 fi
 
+if [ -z $JAVA ] ; then
+    echo Unable to find java executable. Check JAVA_HOME and PATH environment variables.
> /dev/stderr
+    exit 1;
+fi
+
 # If numactl is available, use it. For Cassandra, the priority is to
 # avoid disk I/O. Even for the purpose of CPU efficiency, we don't
 # really have CPU<->data affinity anyway. Also, empirically test that numactl


Mime
View raw message