You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jm...@apache.org on 2014/12/16 18:18:10 UTC

cassandra git commit: Remove linux-centric references from windows launch scripts

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 a6c6d0f60 -> d66ae7538


Remove linux-centric references from windows launch scripts

Patch by jmckenzie; reviewed by pthompson for CASSANDRA-8223


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

Branch: refs/heads/cassandra-2.1
Commit: d66ae75387e365eff2e83626fdef09438178c421
Parents: a6c6d0f
Author: Joshua McKenzie <jm...@apache.org>
Authored: Tue Dec 16 11:16:14 2014 -0600
Committer: Joshua McKenzie <jm...@apache.org>
Committed: Tue Dec 16 11:16:14 2014 -0600

----------------------------------------------------------------------
 conf/cassandra-env.ps1 | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d66ae753/conf/cassandra-env.ps1
----------------------------------------------------------------------
diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1
index 5450ac8..9c6b6f4 100644
--- a/conf/cassandra-env.ps1
+++ b/conf/cassandra-env.ps1
@@ -134,14 +134,14 @@ Function CalculateHeapSizes
     }
     if (($env:MAX_HEAP_SIZE -and !$env:HEAP_NEWSIZE) -or (!$env:MAX_HEAP_SIZE -and $env:HEAP_NEWSIZE))
     {
-        echo "please set or unset MAX_HEAP_SIZE and HEAP_NEWSIZE in pairs"
+        echo "Please set or unset MAX_HEAP_SIZE and HEAP_NEWSIZE in pairs.  Aborting startup."
         exit 1
     }
 
     $memObject = Get-WMIObject -class win32_physicalmemory
     if ($memObject -eq $null)
     {
-        echo "WARNING!  Could not determine system memory.  Defaulting to 2G heap, 512M newgen.  Manually override in conf/cassandra-env.ps1 for different heap values."
+        echo "WARNING!  Could not determine system memory.  Defaulting to 2G heap, 512M newgen.  Manually override in conf\cassandra-env.ps1 for different heap values."
         $env:MAX_HEAP_SIZE = "2048M"
         $env:HEAP_NEWSIZE = "512M"
         return
@@ -323,14 +323,13 @@ Function SetCassandraEnvironment
     # enable thread priorities, primarily so we can give periodic tasks
     # a lower priority to avoid interfering with client workload
     $env:JVM_OPTS="$env:JVM_OPTS -XX:+UseThreadPriorities"
-    # allows lowering thread priority without being root.  see
-    # http://tech.stolsvik.com/2010/01/linux-java-thread-priorities-workar
+    # allows lowering thread priority without being root on linux - probably
+    # not necessary on Windows but doesn't harm anything.
+    # see http://tech.stolsvik.com/2010/01/linux-java-thread-priorities-workar
     $env:JVM_OPTS="$env:JVM_OPTS -XX:ThreadPriorityPolicy=42"
 
     # min and max heap sizes should be set to the same value to avoid
-    # stop-the-world GC pauses during resize, and so that we can lock the
-    # heap in memory on startup to prevent any of it from being swapped
-    # out.
+    # stop-the-world GC pauses during resize.
     $env:JVM_OPTS="$env:JVM_OPTS -Xms$env:MAX_HEAP_SIZE"
     $env:JVM_OPTS="$env:JVM_OPTS -Xmx$env:MAX_HEAP_SIZE"
     $env:JVM_OPTS="$env:JVM_OPTS -Xmn$env:HEAP_NEWSIZE"
@@ -369,17 +368,18 @@ Function SetCassandraEnvironment
     # $env:JVM_OPTS="$env:JVM_OPTS -XX:+PrintGCApplicationStoppedTime"
     # $env:JVM_OPTS="$env:JVM_OPTS -XX:+PrintPromotionFailure"
     # $env:JVM_OPTS="$env:JVM_OPTS -XX:PrintFLSStatistics=1"
-    # $env:JVM_OPTS="$env:JVM_OPTS -Xloggc:/var/log/cassandra/gc-`date +%s`.log"
+    # $currentDate = (Get-Date).ToString('yyyy.MM.dd')
+    # $env:JVM_OPTS="$env:JVM_OPTS -Xloggc:$env:CASSANDRA_HOME/logs/gc-$currentDate.log"
 
     # If you are using JDK 6u34 7u2 or later you can enable GC log rotation
     # don't stick the date in the log name if rotation is on.
-    # $env:JVM_OPTS="$env:JVM_OPTS -Xloggc:/var/log/cassandra/gc.log"
+    # $env:JVM_OPTS="$env:JVM_OPTS -Xloggc:$env:CASSANDRA_HOME/logs/gc.log"
     # $env:JVM_OPTS="$env:JVM_OPTS -XX:+UseGCLogFileRotation"
     # $env:JVM_OPTS="$env:JVM_OPTS -XX:NumberOfGCLogFiles=10"
     # $env:JVM_OPTS="$env:JVM_OPTS -XX:GCLogFileSize=10M"
 
     # Configure the following for JEMallocAllocator and if jemalloc is not available in the system
-    # library path (Example: /usr/local/lib/). Usually "make install" will do the right thing.
+    # library path.
     # set LD_LIBRARY_PATH=<JEMALLOC_HOME>/lib/
     # $env:JVM_OPTS="$env:JVM_OPTS -Djava.library.path=<JEMALLOC_HOME>/lib/"
 
@@ -403,10 +403,8 @@ Function SetCassandraEnvironment
     $env:JVM_OPTS="$env:JVM_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT"
     $env:JVM_OPTS="$env:JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false"
     $env:JVM_OPTS="$env:JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
-    #$env:JVM_OPTS="$env:JVM_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/cassandra/jmxremote.password"
+    #$env:JVM_OPTS="$env:JVM_OPTS -Dcom.sun.management.jmxremote.password.file=C:/jmxremote.password"
     $env:JVM_OPTS="$env:JVM_OPTS $JVM_EXTRA_OPTS"
 
     $env:JVM_OPTS = "$env:JVM_OPTS -Dlog4j.configuration=log4j-server.properties"
 }
-
-