cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/6] git commit: fix startup when WMI memory query fails patch by Josh McKenzie; reviewed by Ala' Alkhaldi for CASSANDRA-7505
Date Tue, 08 Jul 2014 20:57:45 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 04944f0ca -> f72d0247a
  refs/heads/cassandra-2.1.0 0bc98414c -> c29e48d7a
  refs/heads/trunk 111f0c0f9 -> 004fb6432


fix startup when WMI memory query fails
patch by Josh McKenzie; reviewed by Ala' Alkhaldi for CASSANDRA-7505


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

Branch: refs/heads/cassandra-2.1
Commit: c29e48d7ac008d82b65279ffdd3b523f88685442
Parents: 0bc9841
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Jul 8 15:58:30 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Jul 8 15:58:30 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt            | 4 ++++
 conf/cassandra-env.ps1 | 8 ++++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c29e48d7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 641326e..180b044 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.1.0-final
+ * (Windows) fix startup when WMI memory query fails (CASSANDRA-7505)
+
+
 2.1.0-rc3
  * Consider expiry when reconciling otherwise equal cells (CASSANDRA-7403)
  * Introduce CQL support for stress tool (CASSANDRA-6146)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c29e48d7/conf/cassandra-env.ps1
----------------------------------------------------------------------
diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1
index 87a5cfe..b8a806f 100644
--- a/conf/cassandra-env.ps1
+++ b/conf/cassandra-env.ps1
@@ -66,6 +66,14 @@ Function CalculateHeapSizes
     }
 
     $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."
+        $env:MAX_HEAP_SIZE = "2048M"
+        $env:HEAP_NEWSIZE = "512M"
+        return
+    }
+
     $memory = ($memObject | Measure-Object Capacity -Sum).sum
     $memoryMB = [Math]::Truncate($memory / (1024*1024))
 


Mime
View raw message