Author: eevans
Date: Tue Jul 14 17:18:04 2009
New Revision: 793978
URL: http://svn.apache.org/viewvc?rev=793978&view=rev
Log:
shiny new windows bat file for daemon startup
Patch by Michael Greene; reviewed by eevans for CASSANDRA-146
Added:
incubator/cassandra/trunk/bin/cassandra.bat
Added: incubator/cassandra/trunk/bin/cassandra.bat
URL:
http://svn.apache.org/viewvc/incubator/cassandra/trunk/bin/cassandra.bat?rev=793978&view=auto
==============================================================================
--- incubator/cassandra/trunk/bin/cassandra.bat (added)
+++ incubator/cassandra/trunk/bin/cassandra.bat Tue Jul 14 17:18:04 2009
@@ -0,0 +1,75 @@
+...@rem
+...@rem Licensed to the Apache Software Foundation (ASF) under one or more
+...@rem contributor license agreements. See the NOTICE file distributed with
+...@rem this work for additional information regarding copyright ownership.
+...@rem The ASF licenses this file to You under the Apache License, Version
2.0
+...@rem (the "License"); you may not use this file except in compliance with
+...@rem the License. You may obtain a copy of the License at
+...@rem
+...@rem http://www.apache.org/licenses/LICENSE-2.0
+...@rem
+...@rem Unless required by applicable law or agreed to in writing, software
+...@rem distributed under the License is distributed on an "AS IS" BASIS,
+...@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
+...@rem See the License for the specific language governing permissions and
+...@rem limitations under the License.
+
+...@echo off
+
+SETLOCAL
+
+if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%CD%
+if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
+if NOT DEFINED CASSANDRA_MAIN set
CASSANDRA_MAIN=org.apache.cassandra.service.CassandraDaemon
+if NOT DEFINED JAVA_HOME goto err
+
+REM ***** JAVA options *****
+
+set JAVA_OPTS=^
+ -ea^
+ -Xdebug^
+ -Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n^
+ -Xms128m^
+ -Xmx1G^
+ -XX:SurvivorRatio=8^
+ -XX:+AggressiveOpts^
+ -XX:+UseParNewGC^
+ -XX:+UseConcMarkSweepGC^
+ -XX:CMSInitiatingOccupancyFraction=1^
+ -XX:+CMSParallelRemarkEnabled^
+ -XX:+HeapDumpOnOutOfMemoryError^
+ -Dcom.sun.management.jmxremote.port=8080^
+ -Dcom.sun.management.jmxremote.ssl=false^
+ -Dcom.sun.management.jmxremote.authenticate=false
+
+REM ***** CLASSPATH library setting *****
+
+REM Shorten lib path for old platforms
+subst P: %CASSANDRA_HOME%\lib
+P:
+set CLASSPATH=P:\
+
+for %%i in (*.jar) do call :append %%i
+goto okClasspath
+
+:append
+set CLASSPATH=%CLASSPATH%;P:\%*
+goto :eof
+
+:okClasspath
+set
CASSANDRA_CLASSPATH=%CASSANDRA_HOME%;%CASSANDRA_CONF%;%CLASSPATH%;%CASSANDRA_HOME%\build\classes
+set CASSANDRA_PARAMS=-Dcassandra -Dstorage-config=%CASSANDRA_CONF%
+goto runDaemon
+
+:runDaemon
+echo Starting Cassandra Server
+"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp
"%CASSANDRA_CLASSPATH%" "%CASSANDRA_MAIN%"
+goto finally
+
+:err
+echo JAVA_HOME environment variable must be set!
+pause
+
+:finally
+
+ENDLOCAL