cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r986940 - in /cassandra/trunk: conf/cassandra-env.sh debian/cassandra.default debian/cassandra.install debian/init
Date Wed, 18 Aug 2010 21:09:59 GMT
Author: eevans
Date: Wed Aug 18 21:09:59 2010
New Revision: 986940

URL: http://svn.apache.org/viewvc?rev=986940&view=rev
Log:
use conf/cassandra-env.sh in place of defaults

Patch by eevans; reviewed by Brandon Williams for CASSANDRA-1407

Removed:
    cassandra/trunk/debian/cassandra.default
Modified:
    cassandra/trunk/conf/cassandra-env.sh
    cassandra/trunk/debian/cassandra.install
    cassandra/trunk/debian/init

Modified: cassandra/trunk/conf/cassandra-env.sh
URL: http://svn.apache.org/viewvc/cassandra/trunk/conf/cassandra-env.sh?rev=986940&r1=986939&r2=986940&view=diff
==============================================================================
--- cassandra/trunk/conf/cassandra-env.sh (original)
+++ cassandra/trunk/conf/cassandra-env.sh Wed Aug 18 21:09:59 2010
@@ -19,6 +19,10 @@
 # certainly want to adjust this for your environment.
 MAX_HEAP_SIZE="1G" 
 
+# Specifies the default port over which Cassandra will be available for
+# JMX connections.
+JMX_PORT="8080"
+
 
 # Here we create the arguments that will get passed to the jvm when
 # starting cassandra.
@@ -47,7 +51,6 @@ JVM_OPTS="$JVM_OPTS -XX:SurvivorRatio=8"
 JVM_OPTS="$JVM_OPTS -XX:MaxTenuringThreshold=1" 
 JVM_OPTS="$JVM_OPTS -XX:+HeapDumpOnOutOfMemoryError" 
 
-# JMX options
-JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=8080" 
+JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT" 
 JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false" 
 JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false" 

Modified: cassandra/trunk/debian/cassandra.install
URL: http://svn.apache.org/viewvc/cassandra/trunk/debian/cassandra.install?rev=986940&r1=986939&r2=986940&view=diff
==============================================================================
--- cassandra/trunk/debian/cassandra.install (original)
+++ cassandra/trunk/debian/cassandra.install Wed Aug 18 21:09:59 2010
@@ -1,5 +1,6 @@
 conf/log4j-server.properties etc/cassandra
 conf/cassandra.yaml etc/cassandra
+conf/cassandra-env.sh etc/cassandra
 debian/cassandra.in.sh usr/share/cassandra
 bin/cassandra usr/sbin
 bin/cassandra-cli usr/bin

Modified: cassandra/trunk/debian/init
URL: http://svn.apache.org/viewvc/cassandra/trunk/debian/init?rev=986940&r1=986939&r2=986940&view=diff
==============================================================================
--- cassandra/trunk/debian/init (original)
+++ cassandra/trunk/debian/init Wed Aug 18 21:09:59 2010
@@ -18,19 +18,25 @@ PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
 CONFDIR=/etc/cassandra
 JSVC=/usr/bin/jsvc
-JVM_MAX_MEM="1G"
-JVM_START_MEM="128M"
-JMX_PORT="8080"
 
 # The first existing directory is used for JAVA_HOME if needed.
 JVM_SEARCH_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun"
 
 [ -e /usr/share/cassandra/apache-cassandra.jar ] || exit 0
 [ -e /etc/cassandra/cassandra.yaml ] || exit 0
+[ -e /etc/cassandra/cassandra-env.sh ] || exit 0
+
+# Read Cassandra environment file.
+. /etc/cassandra/cassandra-env.sh
 
 # Read configuration variable file if it is present
 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
 
+if [ -z "$JVM_OPTS" ]; then
+    echo "Initialization failed; \$JVM_OPTS not set!" >&2
+    exit 3
+fi
+
 # If JAVA_HOME has not been set, try to determine it.
 if [ -z "$JAVA_HOME" ]; then
     # If java is in PATH, use a JAVA_HOME that corresponds to that. This is
@@ -111,13 +117,8 @@ do_start()
         -errfile "&1" \
         -outfile /var/log/$NAME/output.log \
         -cp `classpath` \
-        -Xmx$JVM_MAX_MEM \
-        -Xms$JVM_START_MEM \
         -Dlog4j.configuration=log4j-server.properties \
-        -Dcom.sun.management.jmxremote.port=$JMX_PORT \
-        -Dcom.sun.management.jmxremote.ssl=false \
-        -Dcom.sun.management.jmxremote.authenticate=false \
-        $JVM_EXTRA_OPTS \
+        $JVM_OPTS \
         org.apache.cassandra.thrift.CassandraDaemon
 
     if ! is_running; then return 2; fi



Mime
View raw message