Merge branch 'cassandra-2.2' into cassandra-3.0

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

Branch: refs/heads/cassandra-3.0
Commit: 04a75a6344433c89531f1e5435566e8bf8d45286
Parents: 4245932 96c53e0
Author: Josh McKenzie <josh.mcken...@datastax.com>
Authored: Wed Apr 6 18:44:48 2016 -0400
Committer: Josh McKenzie <josh.mcken...@datastax.com>
Committed: Wed Apr 6 18:45:09 2016 -0400

----------------------------------------------------------------------
 conf/cassandra-env.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/04a75a63/conf/cassandra-env.ps1
----------------------------------------------------------------------
diff --cc conf/cassandra-env.ps1
index 5eefb04,321a9ca..a322a4d
--- a/conf/cassandra-env.ps1
+++ b/conf/cassandra-env.ps1
@@@ -332,57 -331,6 +332,57 @@@ Function SetCassandraEnvironmen
      CalculateHeapSizes
  
      ParseJVMInfo
 +
 +    #GC log path has to be defined here since it needs to find CASSANDRA_HOME
-     $env:JVM_OPTS="$env:JVM_OPTS -Xloggc:$env:CASSANDRA_HOME/logs/gc.log"
++    $env:JVM_OPTS="$env:JVM_OPTS -Xloggc:""$env:CASSANDRA_HOME/logs/gc.log"""
 +
 +    # Read user-defined JVM options from jvm.options file
 +    $content = Get-Content "$env:CASSANDRA_CONF\jvm.options"
 +    for ($i = 0; $i -lt $content.Count; $i++)
 +    {
 +        $line = $content[$i]
 +        if ($line.StartsWith("-"))
 +        {
 +            $env:JVM_OPTS = "$env:JVM_OPTS $line"
 +        }
 +    }
 +
 +    $defined_xmn = $env:JVM_OPTS -like '*Xmn*'
 +    $defined_xmx = $env:JVM_OPTS -like '*Xmx*'
 +    $defined_xms = $env:JVM_OPTS -like '*Xms*'
 +    $using_cms = $env:JVM_OPTS -like '*UseConcMarkSweepGC*'
 +
 +    # We only set -Xms and -Xmx if they were not defined on jvm.options file
 +    # If defined, both Xmx and Xms should be defined together.
 +    if (($defined_xmx -eq $false) -and ($defined_xms -eq $false))
 +    {
 +        $env:JVM_OPTS="$env:JVM_OPTS -Xms$env:MAX_HEAP_SIZE"
 +        $env:JVM_OPTS="$env:JVM_OPTS -Xmx$env:MAX_HEAP_SIZE"
 +    }
 +    elseif (($defined_xmx -eq $false) -or ($defined_xms -eq $false))
 +    {
 +        echo "Please set or unset -Xmx and -Xms flags in pairs on jvm.options 
file."
 +        exit
 +    }
 +
 +    # We only set -Xmn flag if it was not defined in jvm.options file
 +    # and if the CMS GC is being used
 +    # If defined, both Xmn and Xmx should be defined together.
 +    if (($defined_xmn -eq $true) -and ($defined_xmx -eq $false))
 +    {
 +        echo "Please set or unset -Xmx and -Xmn flags in pairs on jvm.options 
file."
 +        exit
 +    }
 +    elseif (($defined_xmn -eq $false) -and ($using_cms -eq $true))
 +    {
 +        $env:JVM_OPTS="$env:JVM_OPTS -Xmn$env:HEAP_NEWSIZE"
 +    }
 +
 +    if (($env:JVM_ARCH -eq "64-Bit") -and ($using_cms -eq $true))
 +    {
 +        $env:JVM_OPTS="$env:JVM_OPTS -XX:+UseCondCardMark"
 +    }
 +
      # Add sigar env - see Cassandra-7838
      $env:JVM_OPTS = "$env:JVM_OPTS 
-Djava.library.path=""$env:CASSANDRA_HOME\lib\sigar-bin"""
  

Reply via email to