cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1091784 - in /cassandra/trunk: ./ conf/ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ lib/ lib/licenses/ src/java/org/apache/cassandra/cli/ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/db/columniterator...
Date Wed, 13 Apr 2011 13:59:40 GMT
Author: jbellis
Date: Wed Apr 13 13:59:39 2011
New Revision: 1091784

URL: http://svn.apache.org/viewvc?rev=1091784&view=rev
Log:
merge from 0.8

Added:
    cassandra/trunk/lib/jamm-0.2.1.jar
      - copied unchanged from r1091507, cassandra/branches/cassandra-0.8/lib/jamm-0.2.1.jar
    cassandra/trunk/lib/licenses/jamm-0.2.1.txt
      - copied unchanged from r1091507, cassandra/branches/cassandra-0.8/lib/licenses/jamm-0.2.1.txt
Removed:
    cassandra/trunk/lib/jamm-0.2.jar
Modified:
    cassandra/trunk/   (props changed)
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/NEWS.txt
    cassandra/trunk/build.xml
    cassandra/trunk/conf/cassandra-env.sh
    cassandra/trunk/contrib/   (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java 
 (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java   (props
changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
  (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
  (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
  (props changed)
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
    cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java
    cassandra/trunk/src/java/org/apache/cassandra/db/RowIteratorFactory.java
    cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java
    cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java
    cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java
    cassandra/trunk/src/java/org/apache/cassandra/tools/NodeCmd.java
    cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java
    cassandra/trunk/test/distributed/org/apache/cassandra/CountersTest.java
    cassandra/trunk/test/distributed/org/apache/cassandra/MovementTest.java
    cassandra/trunk/test/distributed/org/apache/cassandra/MutationTest.java
    cassandra/trunk/test/distributed/org/apache/cassandra/TestBase.java
    cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/Session.java

Propchange: cassandra/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 13 13:59:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
 /cassandra/branches/cassandra-0.7:1026516-1091087,1091503,1091542
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090935-1091111,1091113,1091148,1091508,1091544
+/cassandra/branches/cassandra-0.8:1090935-1091782
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3:774578-796573
 /incubator/cassandra/branches/cassandra-0.4:810145-834239,834349-834350

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Wed Apr 13 13:59:39 2011
@@ -18,9 +18,11 @@
  * purge tombstones from row cache (CASSANDRA-2305)
  * push replication_factor into strategy_options (CASSANDRA-1263)
  * give snapshots the same name on each node (CASSANDRA-1791)
+ * remove "nodetool loadbalance" (CASSANDRA-2448)
  * multithreaded compaction (CASSANDRA-2191)
  * compaction throttling (CASSANDRA-2156)
  * add key type information and alias (CASSANDRA-2311, 2396)
+ * cli no longer divides read_repair_chance by 100 (CASSANDRA-2458)
 
 
 0.7.5

Modified: cassandra/trunk/NEWS.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/NEWS.txt?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/NEWS.txt (original)
+++ cassandra/trunk/NEWS.txt Wed Apr 13 13:59:39 2011
@@ -1,5 +1,5 @@
-Whatever
-========
+0.8
+===
 
 Upgrading
 ---------
@@ -10,6 +10,9 @@ Upgrading
 	Upgrading from version 0.7.1 or later can be done with a rolling restart,
 	one node at a time.  You do not need to bring down the whole cluster.
 
+    The loadbalance command has been removed from nodetool.  For similar
+    behavior, decommission then rebootstrap with empty initial_token.
+
 Other
 -----
     In the past, sstable2json would write column names and values as hex

Modified: cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/cassandra/trunk/build.xml?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/build.xml (original)
+++ cassandra/trunk/build.xml Wed Apr 13 13:59:39 2011
@@ -615,7 +615,7 @@
         <jvmarg value="-Dstorage-config=${test.conf}"/>
         <jvmarg value="-Daccess.properties=${test.conf}/access.properties"/>
         <jvmarg value="-Dlog4j.configuration=log4j-junit.properties" />
-        <jvmarg value="-javaagent:${basedir}/lib/jamm-0.2.jar" />
+        <jvmarg value="-javaagent:${basedir}/lib/jamm-0.2.1.jar" />
         <jvmarg value="-ea"/>
         <optjvmargs/>
         <classpath>

Modified: cassandra/trunk/conf/cassandra-env.sh
URL: http://svn.apache.org/viewvc/cassandra/trunk/conf/cassandra-env.sh?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/conf/cassandra-env.sh (original)
+++ cassandra/trunk/conf/cassandra-env.sh Wed Apr 13 13:59:39 2011
@@ -92,7 +92,11 @@ JMX_PORT="7199"
 JVM_OPTS="$JVM_OPTS -ea"
 
 # add the jamm javaagent
-JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.jar"
+java_version=`java -version 2>&1`
+if [[ $java_version != *OpenJDK* ]]
+then
+    JVM_OPTS="$JVM_OPTS -javaagent:$CASSANDRA_HOME/lib/jamm-0.2.1.jar"
+fi
 
 # enable thread priorities, primarily so we can give periodic tasks
 # a lower priority to avoid interfering with client workload

Propchange: cassandra/trunk/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 13 13:59:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
 /cassandra/branches/cassandra-0.7/contrib:1026516-1091087,1091503,1091542
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090935-1091111,1091113,1091148,1091508,1091544
+/cassandra/branches/cassandra-0.8/contrib:1090935-1091782
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/contrib:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/contrib:810145-810987,810994-834239,834349-834350

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 13 13:59:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1091087,1091503,1091542
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090935-1091111,1091113,1091148,1091508,1091544
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090935-1091782
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/Cassandra.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Cassandra.java:810145-834239,834349-834350

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 13 13:59:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1091087,1091503,1091542
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090935-1091111,1091113,1091148,1091508,1091544
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090935-1091782
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/column_t.java:774578-792198
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/Column.java:810145-834239,834349-834350

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 13 13:59:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1091087,1091503,1091542
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090935-1091111,1091113,1091148,1091508,1091544
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090935-1091782
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:810145-834239,834349-834350

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 13 13:59:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1091087,1091503,1091542
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090935-1091111,1091113,1091148,1091508,1091544
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090935-1091782
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:774578-796573
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:810145-834239,834349-834350

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 13 13:59:39 2011
@@ -1,7 +1,7 @@
 /cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:922689-1052356,1052358-1053452,1053454,1053456-1081914,1083000
 /cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1091087,1091503,1091542
 /cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090935-1091111,1091113,1091148,1091508,1091544
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090935-1091782
 /cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1051699-1053689
 /incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:774578-792198
 /incubator/cassandra/branches/cassandra-0.4/interface/gen-java/org/apache/cassandra/service/SuperColumn.java:810145-834239,834349-834350

Modified: cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java Wed Apr 13 13:59:39 2011
@@ -1039,10 +1039,10 @@ public class CliClient extends CliUserHe
                 cfDef.setKey_cache_size(Double.parseDouble(mValue));
                 break;
             case READ_REPAIR_CHANCE:
-                double chance = Double.parseDouble(mValue) / 100;
+                double chance = Double.parseDouble(mValue);
 
-                if (chance > 1)
-                    throw new RuntimeException("Error: read_repair_chance / 100 should not
be greater than 1.");
+                if (chance < 0 || chance > 1)
+                    throw new RuntimeException("Error: read_repair_chance must be between
0 and 1.");
 
                 cfDef.setRead_repair_chance(chance);
                 break;

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Wed Apr 13 13:59:39
2011
@@ -1232,15 +1232,7 @@ public class ColumnFamilyStore implement
         }
 
         IColumnIterator ci = filter.getMemtableColumnIterator(cached, null, getComparator());
-        ColumnFamily cf = null;
-        try
-        {
-            cf = ci.getColumnFamily().cloneMeShallow();
-        }
-        catch (IOException e)
-        {
-            throw new IOError(e);
-        }
+        ColumnFamily cf = ci.getColumnFamily().cloneMeShallow();
         filter.collectCollatedColumns(cf, ci, gcBefore);
         // TODO this is necessary because when we collate supercolumns together, we don't
check
         // their subcolumns for relevance, so we need to do a second prune post facto here.
@@ -1302,10 +1294,6 @@ public class ColumnFamilyStore implement
             // and "there used to be data, but it's gone now" (we should cache the empty
CF so we don't need to rebuild that slower)
             return returnCF;
         }
-        catch (IOException e)
-        {
-            throw new IOError(e);
-        }
         finally
         {
             /* close all cursors */

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java Wed Apr 13 13:59:39 2011
@@ -151,6 +151,14 @@ public class Memtable implements Compara
 
     public void updateLiveRatio()
     {
+        if (!MemoryMeter.isInitialized())
+        {
+            // hack for openjdk.  we log a warning about this in the startup script too.
+            logger.warn("MemoryMeter uninitialized (jamm not specified as java agent); assuming
liveRatio of 10.0.  Usually this means cassandra-env.sh disabled jamm because you are using
a buggy JRE; upgrade to the Sun JRE instead");
+            cfs.liveRatio = 10.0;
+            return;
+        }
+
         Runnable runnable = new Runnable()
         {
             public void run()

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/RowIteratorFactory.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/RowIteratorFactory.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/RowIteratorFactory.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/RowIteratorFactory.java Wed Apr 13 13:59:39
2011
@@ -118,14 +118,7 @@ public class RowIteratorFactory
             {
                 this.colIters.add(current);
                 this.key = current.getKey();
-                try
-                {
-                    this.returnCF.delete(current.getColumnFamily());
-                }
-                catch (IOException e)
-                {
-                    throw new IOError(e);
-                }
+                this.returnCF.delete(current.getColumnFamily());
             }
 
             @Override

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java Wed
Apr 13 13:59:39 2011
@@ -31,14 +31,9 @@ import org.apache.cassandra.db.IColumn;
 public interface IColumnIterator extends Iterator<IColumn>
 {
     /**
-     * returns the CF of the column being iterated.
-     * Do not modify the returned CF; clone first.
-     * This is guaranteed to be non-null and that the returned CF have the correct metadata
-     * (markedForDeleteAt and localDeletionTime). The full CF is however only guaranteed
to 
-     * be available after a call to next() or hasNext().
-     * @throws IOException 
+     * @return An empty CF holding metadata for the row being iterated.
      */
-    public abstract ColumnFamily getColumnFamily() throws IOException;
+    public abstract ColumnFamily getColumnFamily();
 
     /**
      * @return the current row key

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java
Wed Apr 13 13:59:39 2011
@@ -98,7 +98,7 @@ public class SSTableSliceIterator implem
         return key;
     }
 
-    public ColumnFamily getColumnFamily() throws IOException
+    public ColumnFamily getColumnFamily()
     {
         return reader == null ? null : reader.getColumnFamily();
     }

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java
Wed Apr 13 13:59:39 2011
@@ -89,7 +89,7 @@ class SimpleSliceReader extends Abstract
         return column;
     }
 
-    public ColumnFamily getColumnFamily() throws IOException
+    public ColumnFamily getColumnFamily()
     {
         return emptyColumnFamily;
     }

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java Wed Apr 13 13:59:39
2011
@@ -815,10 +815,9 @@ public class StorageService implements I
     }
 
     /**
-     * Handle node leaving the ring. This can be either because of decommission or loadbalance
+     * Handle node leaving the ring. This will happen when a node is decommissioned
      *
-     * @param endpoint If reason for leaving is decommission or loadbalance
-     * endpoint is the leaving node.
+     * @param endpoint If reason for leaving is decommission, endpoint is the leaving node.
      * @param pieces STATE_LEFT,token
      */
     private void handleStateLeft(InetAddress endpoint, String[] pieces)
@@ -1800,15 +1799,6 @@ public class StorageService implements I
     }
 
     /**
-     * Generates balanced token and calls load balance operation to move current node to
that token
-     * @throws IOException on any I/O operation error
-     */
-    public void loadBalance() throws IOException
-    {
-        move(BootStrapper.getBalancedToken(tokenMetadata_, StorageLoadBalancer.instance.getLoadInfo()));
-    }
-
-    /**
      * move the node to new token or find a new token to boot to according to load
      *
      * @param newToken new token to boot to, or if null, find balanced token to boot to

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageServiceMBean.java Wed Apr
13 13:59:39 2011
@@ -198,13 +198,6 @@ public interface StorageServiceMBean
     public void move(String newToken) throws IOException, InterruptedException;
 
     /**
-     * Node will call BootStrapper.getBalancedToken then it will calculate ranges to
-     * transfer from other nodes, load the data and move to a new token
-     * @throws IOException on any I/O error.
-     */
-    public void loadBalance() throws IOException;
-
-    /**
      * removeToken removes token (and all data associated with
      * enpoint that had it) from the ring
      */

Modified: cassandra/trunk/src/java/org/apache/cassandra/tools/NodeCmd.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeCmd.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/tools/NodeCmd.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/tools/NodeCmd.java Wed Apr 13 13:59:39 2011
@@ -76,7 +76,7 @@ public class NodeCmd
     public enum NodeCommand
     {
         RING, INFO, CFSTATS, SNAPSHOT, CLEARSNAPSHOT, VERSION, TPSTATS, FLUSH, DRAIN,
-        DECOMMISSION, MOVE, LOADBALANCE, REMOVETOKEN, REPAIR, CLEANUP, COMPACT, SCRUB,
+        DECOMMISSION, MOVE, REMOVETOKEN, REPAIR, CLEANUP, COMPACT, SCRUB,
         SETCACHECAPACITY, GETCOMPACTIONTHRESHOLD, SETCOMPACTIONTHRESHOLD, NETSTATS, CFHISTOGRAMS,
         COMPACTIONSTATS, DISABLEGOSSIP, ENABLEGOSSIP, INVALIDATEKEYCACHE, INVALIDATEROWCACHE,
         DISABLETHRIFT, ENABLETHRIFT, JOIN, SETCOMPACTIONTHROUGHPUT
@@ -100,7 +100,6 @@ public class NodeCmd
         addCmdHelp(header, "tpstats", "Print usage statistics of thread pools");
         addCmdHelp(header, "drain", "Drain the node (stop accepting writes and flush all
column families)");
         addCmdHelp(header, "decommission", "Decommission the node");
-        addCmdHelp(header, "loadbalance", "Loadbalance the node");
         addCmdHelp(header, "compactionstats", "Print statistics on compactions");
         addCmdHelp(header, "disablegossip", "Disable gossip (effectively marking the node
dead)");
         addCmdHelp(header, "enablegossip", "Reenable gossip");
@@ -553,7 +552,6 @@ public class NodeCmd
             case INFO            : nodeCmd.printInfo(System.out); break;
             case CFSTATS         : nodeCmd.printColumnFamilyStats(System.out); break;
             case DECOMMISSION    : probe.decommission(); break;
-            case LOADBALANCE     : probe.loadBalance(); break;
             case TPSTATS         : nodeCmd.printThreadPoolStats(System.out); break;
             case VERSION         : nodeCmd.printReleaseVersion(System.out); break;
             case COMPACTIONSTATS : nodeCmd.printCompactionStats(System.out); break;

Modified: cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java Wed Apr 13 13:59:39
2011
@@ -354,11 +354,6 @@ public class NodeProbe
         ssProxy.decommission();
     }
 
-    public void loadBalance() throws IOException
-    {
-        ssProxy.loadBalance();
-    }
-
     public void move(String newToken) throws IOException, InterruptedException
     {
         ssProxy.move(newToken);

Modified: cassandra/trunk/test/distributed/org/apache/cassandra/CountersTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/distributed/org/apache/cassandra/CountersTest.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/test/distributed/org/apache/cassandra/CountersTest.java (original)
+++ cassandra/trunk/test/distributed/org/apache/cassandra/CountersTest.java Wed Apr 13 13:59:39
2011
@@ -72,7 +72,7 @@ public class CountersTest extends TestBa
         {
             ByteBuffer bname = ByteBuffer.wrap(name.getBytes());
             ColumnPath cpath = new ColumnPath(cf).setColumn(bname);
-            CounterColumn col = client.get_counter(key, cpath, cl).column;
+            CounterColumn col = client.get(key, cpath, cl).counter_column;
             assertEquals(bname, col.name);
             assertEquals(value.longValue(), col.value);
         }

Modified: cassandra/trunk/test/distributed/org/apache/cassandra/MovementTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/distributed/org/apache/cassandra/MovementTest.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/test/distributed/org/apache/cassandra/MovementTest.java (original)
+++ cassandra/trunk/test/distributed/org/apache/cassandra/MovementTest.java Wed Apr 13 13:59:39
2011
@@ -29,6 +29,7 @@ import java.util.*;
 
 import org.apache.cassandra.thrift.*;
 import org.apache.cassandra.tools.NodeProbe;
+import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.WrappedRunnable;
 
 import org.apache.cassandra.CassandraServiceController.Failure;

Modified: cassandra/trunk/test/distributed/org/apache/cassandra/MutationTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/distributed/org/apache/cassandra/MutationTest.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/test/distributed/org/apache/cassandra/MutationTest.java (original)
+++ cassandra/trunk/test/distributed/org/apache/cassandra/MutationTest.java Wed Apr 13 13:59:39
2011
@@ -18,6 +18,7 @@
 
 package org.apache.cassandra;
 
+import java.io.IOException;
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
 import java.util.*;
@@ -25,7 +26,11 @@ import java.util.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.client.RingCache;
+import org.apache.cassandra.dht.RandomPartitioner;
+import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.thrift.*;
+import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.WrappedRunnable;
 import org.apache.thrift.TException;
 

Modified: cassandra/trunk/test/distributed/org/apache/cassandra/TestBase.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/distributed/org/apache/cassandra/TestBase.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/test/distributed/org/apache/cassandra/TestBase.java (original)
+++ cassandra/trunk/test/distributed/org/apache/cassandra/TestBase.java Wed Apr 13 13:59:39
2011
@@ -82,13 +82,14 @@ public abstract class TestBase
         {
             List<InetAddress> hosts = controller.getHosts();
             Cassandra.Client client = controller.createClient(hosts.get(0));
-
+            Map<String,String> stratOptions = new HashMap<String,String>();
+            stratOptions.put("replication_factor", "" + rf);
             client.system_add_keyspace(
                 new KsDef(
                     name,
                     "org.apache.cassandra.locator.SimpleStrategy",
-                    rf,
-                    Arrays.asList(cfdef)));
+                    Arrays.asList(cfdef))
+                .setStrategy_options(stratOptions));
 
             // poll, until KS added
             for (InetAddress host : hosts)

Modified: cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/Session.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/Session.java?rev=1091784&r1=1091783&r2=1091784&view=diff
==============================================================================
--- cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/Session.java (original)
+++ cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/Session.java Wed Apr 13 13:59:39
2011
@@ -91,7 +91,6 @@ public class Session
 
     private int progressInterval  = 10;
     private int keysPerCall       = 1000;
-    private int replicationFactor = 1;
     private boolean replicateOnWrite = true;
     private boolean ignoreErrors  = false;
 
@@ -231,7 +230,7 @@ public class Session
                 keysPerCall = Integer.parseInt(cmd.getOptionValue("g"));
 
             if (cmd.hasOption("l"))
-                replicationFactor = Integer.parseInt(cmd.getOptionValue("l"));
+                replicationStrategyOptions.put("replication_factor", String.valueOf(Integer.parseInt(cmd.getOptionValue("l"))));
 
             if (cmd.hasOption("e"))
                 consistencyLevel = ConsistencyLevel.valueOf(cmd.getOptionValue("e").toUpperCase());
@@ -414,7 +413,6 @@ public class Session
 
         keyspace.setName("Keyspace1");
         keyspace.setStrategy_class(replicationStrategy);
-        keyspace.setReplication_factor(replicationFactor);
 
         if (!replicationStrategyOptions.isEmpty())
         {



Mime
View raw message