From 7eb47c50c394f0aefdfd4ac9170ce51e2e4be549 Mon Sep 17 00:00:00 2001 From: Sylvain Lebresne Date: Mon, 14 Jan 2013 18:32:05 +0100 Subject: [PATCH 1/3] Update version for 1.1.9 release --- build.xml | 2 +- debian/changelog | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index e39aeb6cd7..1ca323d6d5 100644 --- a/build.xml +++ b/build.xml @@ -25,7 +25,7 @@ - + diff --git a/debian/changelog b/debian/changelog index 6d0a859336..445e3bf127 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cassandra (1.1.9) unstable; urgency=low + + * New release + + -- Sylvain Lebresne Mon, 14 Jan 2013 18:22:16 +0100 + cassandra (1.1.8) unstable; urgency=low * New release From 4faed779d1cacedf524cb47711071a5a6ada8809 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 15 Jan 2013 06:32:08 -0600 Subject: [PATCH 2/3] Detect memory for heap sizing on OSX. Patch by Cathy Daw, reviewed by brandonwilliams for CASSANDRA-5157 --- conf/cassandra-env.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh index 95760ddf9a..e38371f204 100644 --- a/conf/cassandra-env.sh +++ b/conf/cassandra-env.sh @@ -30,6 +30,11 @@ calculate_heap_sizes() system_memory_in_mb=`prtconf | awk '/Memory size:/ {print $3}'` system_cpu_cores=`psrinfo | wc -l` ;; + Darwin) + system_memory_in_bytes=`sysctl hw.memsize | awk '{print $2}'` + system_memory_in_mb=`expr $system_memory_in_bytes / 1024 / 1024` + system_cpu_cores=`sysctl hw.ncpu | awk '{print $2}'` + ;; *) # assume reasonable defaults for e.g. a modern desktop or # cheap server From 233ea266c841f100345c30666c32bd2be29cd43b Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 15 Jan 2013 11:20:48 -0600 Subject: [PATCH 3/3] remove gms cruft --- .../org/apache/cassandra/gms/PureRandom.java | 81 ------------------- 1 file changed, 81 deletions(-) delete mode 100644 src/java/org/apache/cassandra/gms/PureRandom.java diff --git a/src/java/org/apache/cassandra/gms/PureRandom.java b/src/java/org/apache/cassandra/gms/PureRandom.java deleted file mode 100644 index 1bbc632614..0000000000 --- a/src/java/org/apache/cassandra/gms/PureRandom.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.cassandra.gms; - -import java.util.BitSet; -import java.util.Random; - - -/** - * Implementation of a PureRandomNumber generator. Use this class cautiously. Not - * for general purpose use. Currently this is used by the Gossiper to choose a random - * endpoint to Gossip to. - */ - -class PureRandom extends Random -{ - private BitSet bs_ = new BitSet(); - private int lastUb_; - - PureRandom() - { - super(); - } - - public int nextInt(int ub) - { - if (ub <= 0) - throw new IllegalArgumentException("ub must be positive"); - - if ( lastUb_ != ub ) - { - bs_.clear(); - lastUb_ = ub; - } - else if(bs_.cardinality() == ub) - { - bs_.clear(); - } - - int value = super.nextInt(ub); - while ( bs_.get(value) ) - { - value = super.nextInt(ub); - } - bs_.set(value); - return value; - } - - public static void main(String[] args) throws Throwable - { - Random pr = new PureRandom(); - int ubs[] = new int[] { 2, 3, 1, 10, 5, 0}; - - for (int ub : ubs) - { - System.out.println("UB: " + String.valueOf(ub)); - for (int j = 0; j < 10; j++) - { - int junk = pr.nextInt(ub); - // Do something with junk so JVM doesn't optimize away - System.out.println(junk); - } - } - } -}