You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2011/04/19 19:13:21 UTC

svn commit: r1095139 [1/2] - in /cassandra/trunk: ./ conf/ contrib/ contrib/pig/src/java/org/apache/cassandra/hadoop/pig/ debian/ doc/cql/ drivers/java/src/org/apache/cassandra/cql/jdbc/ drivers/java/test/org/apache/cassandra/cql/ drivers/java/test/org...

Author: jbellis
Date: Tue Apr 19 17:13:19 2011
New Revision: 1095139

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

Modified:
    cassandra/trunk/   (props changed)
    cassandra/trunk/.rat-excludes
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/NEWS.txt
    cassandra/trunk/build.xml
    cassandra/trunk/conf/cassandra.yaml
    cassandra/trunk/contrib/   (props changed)
    cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
    cassandra/trunk/debian/cassandra.install
    cassandra/trunk/debian/changelog
    cassandra/trunk/doc/cql/CQL.html
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraPreparedStatement.java
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java
    cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/TypedColumn.java
    cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java
    cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/jdbc/PreparedStatementTest.java
    cassandra/trunk/drivers/py/cql/cassandra/constants.py
    cassandra/trunk/drivers/py/cql/cassandra/ttypes.py
    cassandra/trunk/drivers/py/cql/cursor.py
    cassandra/trunk/drivers/txpy/txcql/cassandra/constants.py
    cassandra/trunk/drivers/txpy/txcql/cassandra/ttypes.py
    cassandra/trunk/interface/cassandra.thrift
    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   (contents, props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java   (props changed)
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java
    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/cache/ConcurrentLinkedHashCache.java
    cassandra/trunk/src/java/org/apache/cassandra/cache/ConcurrentLinkedHashCacheProvider.java
    cassandra/trunk/src/java/org/apache/cassandra/cache/FreeableMemory.java
    cassandra/trunk/src/java/org/apache/cassandra/cache/ICache.java
    cassandra/trunk/src/java/org/apache/cassandra/cache/IRowCacheProvider.java
    cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCache.java
    cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java
    cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
    cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java
    cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
    cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java
    cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g
    cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
    cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java
    cassandra/trunk/src/java/org/apache/cassandra/db/MeteredFlusher.java
    cassandra/trunk/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java
    cassandra/trunk/src/java/org/apache/cassandra/io/CompactionType.java
    cassandra/trunk/src/java/org/apache/cassandra/io/ICompactSerializer3.java
    cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
    cassandra/trunk/src/java/org/apache/cassandra/io/util/MemoryInputStream.java
    cassandra/trunk/src/java/org/apache/cassandra/io/util/MemoryOutputStream.java
    cassandra/trunk/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
    cassandra/trunk/src/java/org/apache/cassandra/service/AntiEntropyService.java
    cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java
    cassandra/trunk/src/java/org/apache/cassandra/thrift/ThriftValidation.java
    cassandra/trunk/src/resources/org/apache/cassandra/cli/CliHelp.yaml
    cassandra/trunk/test/long/org/apache/cassandra/db/MeteredFlusherTest.java
    cassandra/trunk/test/system/__init__.py
    cassandra/trunk/test/system/test_cql.py
    cassandra/trunk/test/system/test_thrift_server.py
    cassandra/trunk/test/unit/org/apache/cassandra/cache/CacheProviderTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/client/TestRingCache.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/SystemTableTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/UUIDTypeTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/service/EmbeddedCassandraServiceTest.java
    cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/Session.java
    cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/operations/IndexedRangeSlicer.java
    cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/util/Operation.java

Propchange: cassandra/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 19 17:13:19 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,1091654,1094796
+/cassandra/branches/cassandra-0.7:1026516-1094195,1094604,1094647,1094796,1094809,1094818,1094831
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090935-1094085,1094481,1094797,1094959,1095070
+/cassandra/branches/cassandra-0.8:1090935-1095106
 /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/.rat-excludes
URL: http://svn.apache.org/viewvc/cassandra/trunk/.rat-excludes?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/.rat-excludes (original)
+++ cassandra/trunk/.rat-excludes Tue Apr 19 17:13:19 2011
@@ -2,7 +2,8 @@
 debian/**
 .classpath
 .rat-excludes
-.project
+**/.project
+**/.pydevproject
 CHANGES.txt
 .git/**
 **/*.json

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Tue Apr 19 17:13:19 2011
@@ -1,10 +1,10 @@
-0.8-dev
+0.8.0-beta1
  * remove Avro RPC support (CASSANDRA-926)
  * adds support for columns that act as incr/decr counters 
    (CASSANDRA-1072, 1937, 1944, 1936, 2101, 2093, 2288, 2105, 2384, 2236, 2342,
    2454)
  * CQL (CASSANDRA-1703, 1704, 1705, 1706, 1707, 1708, 1710, 1711, 1940, 
-   2124, 2302, 2277)
+   2124, 2302, 2277, 2493)
  * avoid double RowMutation serialization on write path (CASSANDRA-1800)
  * make NetworkTopologyStrategy the default (CASSANDRA-1960)
  * configurable internode encryption (CASSANDRA-1567, 2152)
@@ -55,6 +55,8 @@
  * Try harder to close files after compaction (CASSANDRA-2431)
  * re-set bootstrapped flag after move finishes (CASSANDRA-2435)
  * use 64KB flush buffer instead of in_memory_compaction_limit (CASSANDRA-2463)
+ * fix duplicate results from CFS.scan (CASSANDRA-2406)
+ * avoid caching token-only decoratedkeys (CASSANDRA-2416)
 
 
 0.7.4

Modified: cassandra/trunk/NEWS.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/NEWS.txt?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/NEWS.txt (original)
+++ cassandra/trunk/NEWS.txt Tue Apr 19 17:13:19 2011
@@ -3,15 +3,29 @@
 
 Upgrading
 ---------
-    Avro record classes used in map/reduce and Hadoop streaming code have
-    moved from org.apache.cassandra.avro to org.apache.cassandra.hadoop.avro,
-    applications using these classes will need to be updated accordingly.
+    - 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.
+    - Avro record classes used in map/reduce and Hadoop streaming code have
+      moved from org.apache.cassandra.avro to org.apache.cassandra.hadoop.avro,
+      applications using these classes will need to be updated accordingly.
+    - The loadbalance command has been removed from nodetool.  For similar
+      behavior, decommission then rebootstrap with empty initial_token.
+    - repair now works on a token range, rather than the entire ring. This
+      means that "run repair against each node" will now repair the ring with
+      no redundant work.
 
-	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.
+Features
+--------
+    - added CQL client API and JDBC/DBAPI2-compliant drivers for Java and
+      Python, respectively (see: drivers/ subdirectory and doc/cql)
+    - added distributed Counters feature; 
+      see http://wiki.apache.org/cassandra/Counters
+    - optional intranode encryption; see comments around 'encryption_options'
+      in cassandra.yaml
+    - compaction multithreading and rate-limiting; see 
+      'compaction_multithreading' and 'compaction_throughput_mb_per_sec' in
+      cassandra.yaml
 
 Other
 -----
@@ -55,7 +69,6 @@ Upgrading
       data files before rebuilding, just in case.
 
 
->>>>>>> .merge-right.r1073884
 0.7.1
 =====
 

Modified: cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/cassandra/trunk/build.xml?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/build.xml (original)
+++ cassandra/trunk/build.xml Tue Apr 19 17:13:19 2011
@@ -55,7 +55,7 @@
     <property name="test.long.src" value="${test.dir}/long"/>
     <property name="test.distributed.src" value="${test.dir}/distributed"/>
     <property name="dist.dir" value="${build.dir}/dist"/>
-    <property name="base.version" value="0.8.0"/>
+    <property name="base.version" value="0.8.0-beta1"/>
     <property name="cql.driver.version" value="1.0.0" />
     <condition property="version" value="${base.version}">
       <isset property="release"/>

Modified: cassandra/trunk/conf/cassandra.yaml
URL: http://svn.apache.org/viewvc/cassandra/trunk/conf/cassandra.yaml?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/conf/cassandra.yaml (original)
+++ cassandra/trunk/conf/cassandra.yaml Tue Apr 19 17:13:19 2011
@@ -252,7 +252,7 @@ in_memory_compaction_limit_in_mb: 64
 # Enables multiple compactions to execute at once. This is highly recommended
 # for preserving read performance in a mixed read/write workload as this
 # avoids sstables from accumulating during long running compactions.
-compaction_multithreading: true
+compaction_multithreading: false
 
 # Throttles compaction to the given total throughput across the entire
 # system. The faster you insert data, the faster you need to compact in

Propchange: cassandra/trunk/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 19 17:13:19 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,1091654,1094481,1094796
+/cassandra/branches/cassandra-0.7/contrib:1026516-1094195,1094481,1094604,1094647,1094796,1094809,1094818,1094831
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090935-1094085,1094481,1094797,1094959,1095070
+/cassandra/branches/cassandra-0.8/contrib:1090935-1095106
 /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

Modified: cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java (original)
+++ cassandra/trunk/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java Tue Apr 19 17:13:19 2011
@@ -56,11 +56,11 @@ import org.apache.thrift.transport.TTran
 import org.apache.thrift.transport.TTransportException;
 
 /**
- * A LoadFunc wrapping ColumnFamilyInputFormat.
+ * A LoadStoreFunc for retrieving data from and storing data to Cassandra
  *
  * A row from a standard CF will be returned as nested tuples: (key, ((name1, val1), (name2, val2))).
  */
-public class CassandraStorage extends LoadFunc implements StoreFuncInterface, LoadPushDown
+public class CassandraStorage extends LoadFunc implements StoreFuncInterface
 {
     // system environment variables that can be set to configure connection info:
     // alternatively, Hadoop JobConf variables can be set using keys from ConfigHelper
@@ -68,7 +68,7 @@ public class CassandraStorage extends Lo
     public final static String PIG_INITIAL_ADDRESS = "PIG_INITIAL_ADDRESS";
     public final static String PIG_PARTITIONER = "PIG_PARTITIONER";
 
-    private static String UDFCONTEXT_SCHEMA_KEY = "cassandra.schema";
+    private static String UDFCONTEXT_SCHEMA_KEY_PREFIX = "cassandra.schema";
 
     private final static ByteBuffer BOUND = ByteBufferUtil.EMPTY_BYTE_BUFFER;
     private static final Log logger = LogFactory.getLog(CassandraStorage.class);
@@ -169,7 +169,7 @@ public class CassandraStorage extends Lo
     {
         UDFContext context = UDFContext.getUDFContext();
         Properties property = context.getUDFProperties(CassandraStorage.class);
-        return cfdefFromString(property.getProperty(UDFCONTEXT_SCHEMA_KEY));
+        return cfdefFromString(property.getProperty(getSchemaContextKey()));
     }
 
     private List<AbstractType> getDefaultMarshallers(CfDef cfDef) throws IOException
@@ -226,7 +226,7 @@ public class CassandraStorage extends Lo
         this.reader = reader;
     }
 
-     private void setLocationFromUri(String location) throws IOException
+    private void setLocationFromUri(String location) throws IOException
     {
         // parse uri into keyspace and columnfamily
         String names[];
@@ -396,7 +396,7 @@ public class CassandraStorage extends Lo
                        if (validators.get(column.name) == null)
                            // Have to special case BytesType to convert DataByteArray into ByteBuffer
                            if (marshallers.get(1) instanceof BytesType)
-                               column.value = ByteBuffer.wrap(((DataByteArray) pair.get(1)).get());
+                               column.value = objToBB(pair.get(1));
                            else
                                column.value = marshallers.get(1).decompose(pair.get(1));
                        else
@@ -428,27 +428,16 @@ public class CassandraStorage extends Lo
     {
     }
 
-    /* LoadPushDown methods */
-
-    public List<OperatorSet> getFeatures() {
-        return Arrays.asList(LoadPushDown.OperatorSet.PROJECTION);
-    }
-
-    public RequiredFieldResponse pushProjection(RequiredFieldList requiredFieldList) throws FrontendException
-    {
-        return new RequiredFieldResponse(true);
-    }
-
-
     /* Methods to get the column family schema from Cassandra */
 
     private void initSchema()
     {
         UDFContext context = UDFContext.getUDFContext();
         Properties property = context.getUDFProperties(CassandraStorage.class);
-        
+
+        String schemaContextKey = getSchemaContextKey();
         // Only get the schema if we haven't already gotten it
-        if (!property.containsKey(UDFCONTEXT_SCHEMA_KEY))
+        if (!property.containsKey(schemaContextKey))
         {
             Cassandra.Client client = null;
             try
@@ -466,7 +455,7 @@ public class CassandraStorage extends Lo
                         break;
                     }
                 }
-                property.setProperty(UDFCONTEXT_SCHEMA_KEY, cfdefToString(cfDef));
+                property.setProperty(schemaContextKey, cfdefToString(cfDef));
             }
             catch (TException e)
             {
@@ -532,4 +521,14 @@ public class CassandraStorage extends Lo
         }
         return cfDef;
     }
+
+    private String getSchemaContextKey()
+    {
+        StringBuilder sb = new StringBuilder(UDFCONTEXT_SCHEMA_KEY_PREFIX);
+        sb.append('.');
+        sb.append(keyspace);
+        sb.append('.');
+        sb.append(column_family);
+        return sb.toString();
+    }
 }

Modified: cassandra/trunk/debian/cassandra.install
URL: http://svn.apache.org/viewvc/cassandra/trunk/debian/cassandra.install?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/debian/cassandra.install (original)
+++ cassandra/trunk/debian/cassandra.install Tue Apr 19 17:13:19 2011
@@ -10,6 +10,5 @@ bin/clustertool usr/bin
 bin/json2sstable usr/bin
 bin/sstable2json usr/bin
 bin/sstablekeys usr/bin
-bin/schematool usr/bin
 lib/*.jar usr/share/cassandra
 lib/licenses usr/share/doc/cassandra

Modified: cassandra/trunk/debian/changelog
URL: http://svn.apache.org/viewvc/cassandra/trunk/debian/changelog?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/debian/changelog (original)
+++ cassandra/trunk/debian/changelog Tue Apr 19 17:13:19 2011
@@ -1,3 +1,9 @@
+cassandra (0.8.0~beta1) unstable; urgency=low
+
+  * New beta release.
+
+ -- Eric Evans <ee...@apache.org>  Mon, 18 Apr 2011 11:41:09 -0500
+
 cassandra (0.7.4) unstable; urgency=low
 
   * New stable point release.

Modified: cassandra/trunk/doc/cql/CQL.html
URL: http://svn.apache.org/viewvc/cassandra/trunk/doc/cql/CQL.html?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/doc/cql/CQL.html (original)
+++ cassandra/trunk/doc/cql/CQL.html Tue Apr 19 17:13:19 2011
@@ -1,3 +1,24 @@
+<!--
+ 
+ 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.
+ 
+-->
+
 <?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h1 id="CassandraQueryLanguageCQLv1.0.0">Cassandra Query Language (CQL) v1.0.0</h1><h2 id="TableofContents">Table of Contents</h2><ol style="list-style: none;"><li><a href="#CassandraQueryLanguageCQLv1.0.0">Cassandra Query Language (CQL) v1.0.0</a><ol style="list-style: none;"><li><a href="#TableofContents">Table of Contents</a></li><li><a href="#USE">USE</a></li><li><a href="#SELECT">SELECT</a><ol style="list-style: none;"><li><a href="#SpecifyingColumns">Specifying Columns</a></li><li><a href="#ColumnFamily">Column Family</a></li><li><a href="#ConsistencyLevel">Consistency Level</a></li><li><a href="#Filteringrows">Filtering rows</a></li><li><a href="#Limits">Limits</a></li></ol></li><li>
 <a href="#UPDATE">UPDATE</a><ol style="list-style: none;"><li><a href="#ColumnFamily2">Column Family</a></li><li><a href="#ConsistencyLevel2">Consistency Level</a></li><li><a href="#SpecifyingColumnsandRow">Specifying Columns and Row</a></li></ol></li><li><a href="#DELETE">DELETE</a><ol style="list-style: none;"><li><a href="#SpecifyingColumns2">Specifying Columns</a></li><li><a href="#ColumnFamily3">Column Family</a></li><li><a href="#ConsistencyLevel3">Consistency Level</a></li><li><a href="#deleterows">Specifying Rows</a></li></ol></li><li><a href="#TRUNCATE">TRUNCATE</a></li><li><a href="#CREATEKEYSPACE">CREATE KEYSPACE</a></li><li><a href="#CREATECOLUMNFAMILY">CREATE COLUMNFAMILY</a><ol style="list-style: none;"><li><a href="#keytypes">Specifying Key Type</a></li><li><a href="#columntypes">Specifying Column Type (optional)</a></li><li><a href="#ColumnFamilyOptionsoptional">Column Family Options (optional)</a></li></ol></li><li><a href="#CREATEINDEX">CREATE INDEX</a></li
 ><li><a href="#DROP">DROP</a></li><li><a href="#CommonIdioms">Common Idioms</a><ol style="list-style: none;"><li><a href="#consistency">Specifying Consistency</a></li><li><a href="#terms">Term specification</a></li></ol></li></ol></li><li><a href="#Versioning">Versioning</a></li><li><a href="#Changes">Changes</a></li></ol><h2 id="USE">USE</h2><p><i>Synopsis:</i></p><pre><code>USE &lt;KEYSPACE&gt;;
 </code></pre><p>A <code>USE</code> statement consists of the <code>USE</code> keyword, followed by a valid keyspace name.  Its purpose is to assign the per-connection, current working keyspace.  All subsequent keyspace-specific actions will be performed in the context of the supplied value.</p><h2 id="SELECT">SELECT</h2><p><i>Synopsis:</i></p><pre><code>SELECT [FIRST N] [REVERSED] &lt;SELECT EXPR&gt; FROM &lt;COLUMN FAMILY&gt; [USING &lt;CONSISTENCY&gt;]
         [WHERE &lt;CLAUSE&gt;] [LIMIT N];
@@ -39,4 +60,4 @@ CREATE COLUMNFAMILY &lt;COLUMN FAMILY&gt
 </code></pre><p><code>DROP</code> statements result in the immediate, irreversible removal of keyspace and column family namespaces.</p><h2 id="CommonIdioms">Common Idioms</h2><h3 id="consistency">Specifying Consistency</h3><pre><code>... USING &lt;CONSISTENCY&gt; ...
 </code></pre><p>Consistency level specifications are made up the keyword <code>USING</code>, followed by a consistency level identifier. Valid consistency levels are as follows:</p><ul><li><code>CONSISTENCY ZERO</code></li><li><code>CONSISTENCY ONE</code> (default)</li><li><code>CONSISTENCY QUORUM</code></li><li><code>CONSISTENCY ALL</code></li><li><code>CONSISTENCY DCQUORUM</code></li><li><code>CONSISTENCY DCQUORUMSYNC</code></li></ul><h3 id="terms">Term specification</h3><p>Terms are used in statements to specify things such as keyspaces, column families, indexes, column names and values, and keyword arguments.  The rules governing term specification are as follows:</p><ul><li>Any single quoted string literal (example: <code>'apple'</code>).</li><li>Unquoted alpha-numeric strings that begin with a letter (example: <code>carrot</code>).</li><li>Unquoted numeric literals (example: <code>100</code>).</li><li>UUID strings in hyphen-delimited hex notation (example: <code>1438fc
 5c-4ff6-11e0-b97f-0026c650d722</code>). </li></ul><p>Terms which do not conform to these rules result in an exception.</p><p>How column name/value terms are interpreted is determined by the configured type.</p><table><tr><th>type</th><th>term</th></tr><tr><td>ascii</td><td>Any string which can be decoded using ASCII charset</td></tr><tr><td>text / varchar</td><td>Any string which can be decoded using UTF8 charset</td></tr><tr><td>uuid</td><td>Standard UUID string format (hyphen-delimited hex notation)</td></tr><tr><td>uuid</td><td>Standard UUID string format (hyphen-delimited hex notation)</td></tr><tr><td>uuid</td><td>The string <code>now</code>, to represent a type-1 (time-based) UUID with a date-time component based on the current time</td></tr><tr><td>uuid</td><td>Numeric value representing milliseconds since epoch</td></tr><tr><td>uuid</td><td>An <a href="http://en.wikipedia.org/wiki/8601">iso8601 timestamp</a></td></tr><tr><td>bigint</td><td>Numeric value capable of fi
 tting in 8 bytes</td></tr><tr><td>varint</td><td>Numeric value of arbitrary size</td></tr><tr><td>bytea</td><td>Hex-encoded strings (converted directly to the corresponding bytes)</td></tr></table><h1 id="Versioning">Versioning</h1><p>Versioning of the CQL language adheres to the <a href="http://semver.org">Semantic Versioning</a> guidelines.  Versions take the form X.Y.Z where X, Y, and Z are integer values representing major, minor, and patch level respectively.  There is no correlation between Cassandra release versions and the CQL language version.</p><table><tr><th>version</th><th>description</th></tr><tr><td>Patch</td><td>The patch version is incremented when bugs are fixed.</td></tr><tr><td>Minor</td><td>Minor version increments occur when new, but backward compatible, functionality is introduced.</td></tr><tr><td>Major</td><td>The major version <em>must</em> be bumped when backward incompatible changes are introduced.  This should rarely (if ever) occur.</td></tr></t
 able><h1 id="Changes">Changes</h1><pre>Tue, 22 Mar 2011 18:10:28 -0700 - Eric Evans &lt;eevans@rackspace.com&gt;
  * Initial version, 1.0.0
-</pre></body></html>
\ No newline at end of file
+</pre></body></html>

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraPreparedStatement.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraPreparedStatement.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraPreparedStatement.java (original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraPreparedStatement.java Tue Apr 19 17:13:19 2011
@@ -1,4 +1,25 @@
 package org.apache.cassandra.cql.jdbc;
+/*
+ * 
+ * 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.
+ * 
+ */
+
 
 import org.apache.cassandra.db.marshal.*;
 

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java (original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/CassandraResultSet.java Tue Apr 19 17:13:19 2011
@@ -75,11 +75,13 @@ class CassandraResultSet implements Resu
     private List<TypedColumn> values = new ArrayList<TypedColumn>();
     
     /** The value map. */
+    // TODO should map <String, TypedColumn> so we can throw appropriate exception if user asks for non-existant column name
     private Map<String, Object> valueMap = new WeakHashMap<String, Object>();
     
     private final RsMetaData meta;
     
     private final AbstractType nameType;
+    private boolean wasNull;
 
     /**
      * Instantiates a new cassandra result set.
@@ -356,7 +358,11 @@ class CassandraResultSet implements Resu
      */
     public byte[] getBytes(int index) throws SQLException
     {
-        return values.get(index-1) != null ? ((ByteBuffer)values.get(index-1).getValue()).array() : null;
+        TypedColumn column = values.get(index - 1);
+        assert column != null;
+        Object value = column.getValue();
+        wasNull = value == null;
+        return value == null ? null : ((ByteBuffer) value).array();
     }
 
     /**
@@ -367,7 +373,9 @@ class CassandraResultSet implements Resu
     public byte[] getBytes(String name) throws SQLException
     {
         String nameAsString = decoder.colNameAsString(keyspace, columnFamily, name);
-        return valueMap.get(nameAsString) != null ? ((ByteBuffer)valueMap.get(nameAsString)).array() : null;
+        Object value = valueMap.get(nameAsString);
+        wasNull = value == null;
+        return value == null ? null : ((ByteBuffer) value).array();
     }
 
     /**
@@ -544,7 +552,11 @@ class CassandraResultSet implements Resu
      */
     public int getInt(int index) throws SQLException
     {
-        return values.get(index-1) != null ? ((BigInteger)values.get(index-1).getValue()).intValue() : null;
+        TypedColumn column = values.get(index - 1);
+        assert column != null;
+        Object value = column.getValue();
+        wasNull = value == null;
+        return value == null ? 0 : ((BigInteger) value).intValue();
     }
 
     /**
@@ -555,7 +567,9 @@ class CassandraResultSet implements Resu
     public int getInt(String name) throws SQLException
     {
         String nameAsString = decoder.colNameAsString(keyspace, columnFamily, name);
-        return valueMap.get(nameAsString) != null ? ((BigInteger)valueMap.get(nameAsString)).intValue() : null;
+        Object value = valueMap.get(nameAsString);
+        wasNull = value == null;
+        return value == null ? 0 : ((BigInteger) value).intValue();
     }
 
     /**
@@ -565,7 +579,12 @@ class CassandraResultSet implements Resu
      */
     public long getLong(int index) throws SQLException
     {
-        return values.get(index-1) != null ? (Long)values.get(index-1).getValue() : null;
+        assert values != null;
+        TypedColumn column = values.get(index - 1);
+        assert column != null;
+        Object value = column.getValue();
+        wasNull = value == null;
+        return value == null ? 0 : (Long) value;
     }
 
     /**
@@ -576,7 +595,9 @@ class CassandraResultSet implements Resu
     public long getLong(String name) throws SQLException
     {
         String nameAsString = decoder.colNameAsString(keyspace, columnFamily, name);
-        return valueMap.get(nameAsString) != null ? (Long)valueMap.get(nameAsString) : null;
+        Object value = valueMap.get(nameAsString);
+        wasNull = value == null;
+        return value == null ? 0 : (Long) value;
     }
 
     /**
@@ -655,7 +676,11 @@ class CassandraResultSet implements Resu
      */
     public Object getObject(int index) throws SQLException
     {
-        return values.get(index-1) == null ? null : values.get(index-1).getValue();
+        TypedColumn column = values.get(index - 1);
+        assert column != null;
+        Object value = column.getValue();
+        wasNull = value == null;
+        return value;
     }
 
     /**
@@ -666,7 +691,9 @@ class CassandraResultSet implements Resu
     public Object getObject(String name) throws SQLException
     {
         String nameAsString = decoder.colNameAsString(keyspace, columnFamily, name);
-        return valueMap.get(nameAsString);
+        Object value = valueMap.get(nameAsString);
+        wasNull = value == null;
+        return value;
     }
 
     /**
@@ -796,7 +823,11 @@ class CassandraResultSet implements Resu
      */
     public String getString(int index) throws SQLException 
     {
-        return values.get(index-1) != null ? ColumnDecoder.colValueAsString(values.get(index-1).getValue()) : null;
+        TypedColumn column = values.get(index - 1);
+        assert column != null;
+        Object value = column.getValue();
+        wasNull = value == null;
+        return value == null ? null : ColumnDecoder.colValueAsString(value);
     }
 
     /**
@@ -807,7 +838,9 @@ class CassandraResultSet implements Resu
     public String getString(String name) throws SQLException
     {
         String nameAsString = this.decoder.colNameAsString(this.keyspace, this.columnFamily, name);
-        return valueMap.get(nameAsString) != null ? ColumnDecoder.colValueAsString(valueMap.get(nameAsString)) : null;
+        Object value = valueMap.get(nameAsString);
+        wasNull = value == null;
+        return value == null ? null : ColumnDecoder.colValueAsString(value);
     }
 
     /**
@@ -1999,7 +2032,7 @@ class CassandraResultSet implements Resu
      */
     public boolean wasNull() throws SQLException
     {
-        throw new UnsupportedOperationException("method not supported");
+        return wasNull;
     }
     
     /**

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java (original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/ColumnDecoder.java Tue Apr 19 17:13:19 2011
@@ -181,7 +181,7 @@ class ColumnDecoder 
         else if (value instanceof byte[])
             return ByteBufferUtil.bytesToHex(ByteBuffer.wrap((byte[])value));
         else
-            return value.toString();
+            return value == null ? null : value.toString();
     }
     
     /** constructs a typed column */

Modified: cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/TypedColumn.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/TypedColumn.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/TypedColumn.java (original)
+++ cassandra/trunk/drivers/java/src/org/apache/cassandra/cql/jdbc/TypedColumn.java Tue Apr 19 17:13:19 2011
@@ -39,11 +39,11 @@ class TypedColumn<N, V>
     public TypedColumn(AbstractType<N> comparator, byte[] name, AbstractType<V> validator, byte[] value)
     {
         ByteBuffer bbName = ByteBuffer.wrap(name);
-        ByteBuffer bbValue = ByteBuffer.wrap(value);
+        ByteBuffer bbValue = value == null ? null : ByteBuffer.wrap(value);
         this.name = comparator.compose(bbName);
-        this.value = validator.compose(bbValue);
+        this.value = value == null ? null : validator.compose(bbValue);
         nameString = comparator.getString(bbName);
-        valueString = validator.getString(bbValue);
+        valueString = value == null ? null : validator.getString(bbValue);
         this.validator = validator;
     }
     

Modified: cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java (original)
+++ cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/JdbcDriverTest.java Tue Apr 19 17:13:19 2011
@@ -398,8 +398,11 @@ public class JdbcDriverTest extends Embe
         {
             executeNoResults(con, statements[3*i]);
             ResultSet rs = executePreparedStatementWithResults(con, statements[3*i+1]);
-            assert !rs.next() : statements[3*i+1];
+            rs.next();
+            rs.getObject(1);
+            assert rs.wasNull();
             rs.close();
+
             rs = executePreparedStatementWithResults(con, statements[3*i+2]);
             assert rs.next() : statements[3*i+2];
         }

Modified: cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/jdbc/PreparedStatementTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/jdbc/PreparedStatementTest.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/jdbc/PreparedStatementTest.java (original)
+++ cassandra/trunk/drivers/java/test/org/apache/cassandra/cql/jdbc/PreparedStatementTest.java Tue Apr 19 17:13:19 2011
@@ -1,4 +1,25 @@
 package org.apache.cassandra.cql.jdbc;
+/*
+ * 
+ * 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.
+ * 
+ */
+
 
 import org.apache.cassandra.cql.EmbeddedServiceBase;
 import org.apache.cassandra.utils.FBUtilities;
@@ -80,7 +101,8 @@ public class PreparedStatementTest exten
             stmt.setBytes(2, FBUtilities.toByteArray(i+100));
             stmt.setBytes(3, key);
             ResultSet rs = stmt.executeQuery();
-            assert !rs.next();
+            rs.next();
+            assert rs.getString(1) == null;  assert rs.getString(2) == null;
             rs.close();
         }
     }
@@ -139,7 +161,8 @@ public class PreparedStatementTest exten
             stmt.setString(2, "2\u6543\u3435\u6554");
             stmt.setBytes(3, key);
             ResultSet rs = stmt.executeQuery();
-            assert !rs.next();
+            rs.next();
+            assert rs.getString(1) == null;  assert rs.getString(2) == null;
             rs.close();
         }
     }
@@ -198,7 +221,8 @@ public class PreparedStatementTest exten
             stmt.setString(2, "2");
             stmt.setBytes(3, key);
             ResultSet rs = stmt.executeQuery();
-            assert !rs.next();
+            rs.next();
+            assert rs.getString(1) == null;  assert rs.getString(2) == null;
             rs.close();
         }
     }
@@ -257,7 +281,9 @@ public class PreparedStatementTest exten
             stmt.setLong(2, 2);
             stmt.setBytes(3, key);
             ResultSet rs = stmt.executeQuery();
-            assert !rs.next();
+            rs.next();
+            rs.getLong(1);
+            assert rs.wasNull();
             rs.close();
         }
     }
@@ -316,7 +342,9 @@ public class PreparedStatementTest exten
             stmt.setInt(2, 2);
             stmt.setBytes(3, key);
             ResultSet rs = stmt.executeQuery();
-            assert !rs.next();
+            rs.next();
+            rs.getInt(1);
+            assert rs.wasNull();
             rs.close();
         }
     }

Modified: cassandra/trunk/drivers/py/cql/cassandra/constants.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/py/cql/cassandra/constants.py?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/py/cql/cassandra/constants.py (original)
+++ cassandra/trunk/drivers/py/cql/cassandra/constants.py Tue Apr 19 17:13:19 2011
@@ -7,4 +7,4 @@
 from thrift.Thrift import *
 from ttypes import *
 
-VERSION = "20.1.0"
+VERSION = "19.10.0"

Modified: cassandra/trunk/drivers/py/cql/cassandra/ttypes.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/py/cql/cassandra/ttypes.py?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/py/cql/cassandra/ttypes.py (original)
+++ cassandra/trunk/drivers/py/cql/cassandra/ttypes.py Tue Apr 19 17:13:19 2011
@@ -246,10 +246,6 @@ class Column:
     def validate(self):
       if self.name is None:
         raise TProtocol.TProtocolException(message='Required field name is unset!')
-      if self.value is None:
-        raise TProtocol.TProtocolException(message='Required field value is unset!')
-      if self.timestamp is None:
-        raise TProtocol.TProtocolException(message='Required field timestamp is unset!')
       return
 
 
@@ -2666,6 +2662,7 @@ class KsDef:
    - name
    - strategy_class
    - strategy_options
+   - replication_factor: deprecated
    - cf_defs
   """
 
@@ -2674,13 +2671,15 @@ class KsDef:
     (1, TType.STRING, 'name', None, None, ), # 1
     (2, TType.STRING, 'strategy_class', None, None, ), # 2
     (3, TType.MAP, 'strategy_options', (TType.STRING,None,TType.STRING,None), None, ), # 3
-    (4, TType.LIST, 'cf_defs', (TType.STRUCT,(CfDef, CfDef.thrift_spec)), None, ), # 4
+    (4, TType.I32, 'replication_factor', None, None, ), # 4
+    (5, TType.LIST, 'cf_defs', (TType.STRUCT,(CfDef, CfDef.thrift_spec)), None, ), # 5
   )
 
-  def __init__(self, name=None, strategy_class=None, strategy_options=None, cf_defs=None,):
+  def __init__(self, name=None, strategy_class=None, strategy_options=None, replication_factor=None, cf_defs=None,):
     self.name = name
     self.strategy_class = strategy_class
     self.strategy_options = strategy_options
+    self.replication_factor = replication_factor
     self.cf_defs = cf_defs
 
   def read(self, iprot):
@@ -2714,6 +2713,11 @@ class KsDef:
         else:
           iprot.skip(ftype)
       elif fid == 4:
+        if ftype == TType.I32:
+          self.replication_factor = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
         if ftype == TType.LIST:
           self.cf_defs = []
           (_etype68, _size65) = iprot.readListBegin()
@@ -2750,8 +2754,12 @@ class KsDef:
         oprot.writeString(viter72)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
+    if self.replication_factor != None:
+      oprot.writeFieldBegin('replication_factor', TType.I32, 4)
+      oprot.writeI32(self.replication_factor)
+      oprot.writeFieldEnd()
     if self.cf_defs != None:
-      oprot.writeFieldBegin('cf_defs', TType.LIST, 4)
+      oprot.writeFieldBegin('cf_defs', TType.LIST, 5)
       oprot.writeListBegin(TType.STRUCT, len(self.cf_defs))
       for iter73 in self.cf_defs:
         iter73.write(oprot)

Modified: cassandra/trunk/drivers/py/cql/cursor.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/py/cql/cursor.py?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/py/cql/cursor.py (original)
+++ cassandra/trunk/drivers/py/cql/cursor.py Tue Apr 19 17:13:19 2011
@@ -22,8 +22,12 @@ import cql
 from cql.marshal import prepare
 from cql.decoders import SchemaDecoder
 from cql.results import ResultSet
-from cql.cassandra.ttypes import (Compression, CqlResultType, InvalidRequestException,
-                                       TApplicationException)
+from cql.cassandra.ttypes import (
+    Compression, 
+    CqlResultType, 
+    InvalidRequestException,
+    TApplicationException,
+    SchemaDisagreementException)
 
 class Cursor:
 

Modified: cassandra/trunk/drivers/txpy/txcql/cassandra/constants.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/txpy/txcql/cassandra/constants.py?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/txpy/txcql/cassandra/constants.py (original)
+++ cassandra/trunk/drivers/txpy/txcql/cassandra/constants.py Tue Apr 19 17:13:19 2011
@@ -7,4 +7,4 @@
 from thrift.Thrift import *
 from ttypes import *
 
-VERSION = "20.1.0"
+VERSION = "19.10.0"

Modified: cassandra/trunk/drivers/txpy/txcql/cassandra/ttypes.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/drivers/txpy/txcql/cassandra/ttypes.py?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/drivers/txpy/txcql/cassandra/ttypes.py (original)
+++ cassandra/trunk/drivers/txpy/txcql/cassandra/ttypes.py Tue Apr 19 17:13:19 2011
@@ -246,10 +246,6 @@ class Column:
     def validate(self):
       if self.name is None:
         raise TProtocol.TProtocolException(message='Required field name is unset!')
-      if self.value is None:
-        raise TProtocol.TProtocolException(message='Required field value is unset!')
-      if self.timestamp is None:
-        raise TProtocol.TProtocolException(message='Required field timestamp is unset!')
       return
 
 
@@ -2666,6 +2662,7 @@ class KsDef:
    - name
    - strategy_class
    - strategy_options
+   - replication_factor: deprecated
    - cf_defs
   """
 
@@ -2674,13 +2671,15 @@ class KsDef:
     (1, TType.STRING, 'name', None, None, ), # 1
     (2, TType.STRING, 'strategy_class', None, None, ), # 2
     (3, TType.MAP, 'strategy_options', (TType.STRING,None,TType.STRING,None), None, ), # 3
-    (4, TType.LIST, 'cf_defs', (TType.STRUCT,(CfDef, CfDef.thrift_spec)), None, ), # 4
+    (4, TType.I32, 'replication_factor', None, None, ), # 4
+    (5, TType.LIST, 'cf_defs', (TType.STRUCT,(CfDef, CfDef.thrift_spec)), None, ), # 5
   )
 
-  def __init__(self, name=None, strategy_class=None, strategy_options=None, cf_defs=None,):
+  def __init__(self, name=None, strategy_class=None, strategy_options=None, replication_factor=None, cf_defs=None,):
     self.name = name
     self.strategy_class = strategy_class
     self.strategy_options = strategy_options
+    self.replication_factor = replication_factor
     self.cf_defs = cf_defs
 
   def read(self, iprot):
@@ -2714,6 +2713,11 @@ class KsDef:
         else:
           iprot.skip(ftype)
       elif fid == 4:
+        if ftype == TType.I32:
+          self.replication_factor = iprot.readI32();
+        else:
+          iprot.skip(ftype)
+      elif fid == 5:
         if ftype == TType.LIST:
           self.cf_defs = []
           (_etype68, _size65) = iprot.readListBegin()
@@ -2750,8 +2754,12 @@ class KsDef:
         oprot.writeString(viter72)
       oprot.writeMapEnd()
       oprot.writeFieldEnd()
+    if self.replication_factor != None:
+      oprot.writeFieldBegin('replication_factor', TType.I32, 4)
+      oprot.writeI32(self.replication_factor)
+      oprot.writeFieldEnd()
     if self.cf_defs != None:
-      oprot.writeFieldBegin('cf_defs', TType.LIST, 4)
+      oprot.writeFieldBegin('cf_defs', TType.LIST, 5)
       oprot.writeListBegin(TType.STRUCT, len(self.cf_defs))
       for iter73 in self.cf_defs:
         iter73.write(oprot)

Modified: cassandra/trunk/interface/cassandra.thrift
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.thrift?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.thrift (original)
+++ cassandra/trunk/interface/cassandra.thrift Tue Apr 19 17:13:19 2011
@@ -46,7 +46,7 @@ namespace rb CassandraThrift
 #           for every edit that doesn't result in a change to major/minor.
 #
 # See the Semantic Versioning Specification (SemVer) http://semver.org.
-const string VERSION = "20.1.0"
+const string VERSION = "19.10.0"
 
 
 #
@@ -61,8 +61,8 @@ const string VERSION = "20.1.0"
  */
 struct Column {
    1: required binary name,
-   2: required binary value,
-   3: required i64 timestamp,
+   2: optional binary value,
+   3: optional i64 timestamp,
    4: optional i32 ttl,
 }
 
@@ -402,7 +402,11 @@ struct KsDef {
     1: required string name,
     2: required string strategy_class,
     3: optional map<string,string> strategy_options,
-    4: required list<CfDef> cf_defs,
+
+    /** @deprecated */
+    4: optional i32 replication_factor, 
+
+    5: required list<CfDef> cf_defs,
 }
 
 /** CQL query compression */

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 19 17:13:19 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,1091654,1094481,1094796
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1094195,1094481,1094604,1094647,1094796,1094809,1094818,1094831
 /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-1094085,1094481,1094797,1094959,1095070
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090935-1095106
 /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

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java Tue Apr 19 17:13:19 2011
@@ -139,9 +139,9 @@ public class Column implements org.apach
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
     tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
-    tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
-    tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
     tmpMap.put(_Fields.TTL, new org.apache.thrift.meta_data.FieldMetaData("ttl", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
@@ -153,15 +153,10 @@ public class Column implements org.apach
   }
 
   public Column(
-    ByteBuffer name,
-    ByteBuffer value,
-    long timestamp)
+    ByteBuffer name)
   {
     this();
     this.name = name;
-    this.value = value;
-    this.timestamp = timestamp;
-    setTimestampIsSet(true);
   }
 
   /**
@@ -415,8 +410,8 @@ public class Column implements org.apach
         return false;
     }
 
-    boolean this_present_timestamp = true;
-    boolean that_present_timestamp = true;
+    boolean this_present_timestamp = true && this.isSetTimestamp();
+    boolean that_present_timestamp = true && that.isSetTimestamp();
     if (this_present_timestamp || that_present_timestamp) {
       if (!(this_present_timestamp && that_present_timestamp))
         return false;
@@ -450,7 +445,7 @@ public class Column implements org.apach
     if (present_value)
       builder.append(value);
 
-    boolean present_timestamp = true;
+    boolean present_timestamp = true && (isSetTimestamp());
     builder.append(present_timestamp);
     if (present_timestamp)
       builder.append(timestamp);
@@ -566,9 +561,6 @@ public class Column implements org.apach
     iprot.readStructEnd();
 
     // check for required fields of primitive type, which can't be checked in the validate method
-    if (!isSetTimestamp()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamp' was not found in serialized data! Struct: " + toString());
-    }
     validate();
   }
 
@@ -582,13 +574,17 @@ public class Column implements org.apach
       oprot.writeFieldEnd();
     }
     if (this.value != null) {
-      oprot.writeFieldBegin(VALUE_FIELD_DESC);
-      oprot.writeBinary(this.value);
+      if (isSetValue()) {
+        oprot.writeFieldBegin(VALUE_FIELD_DESC);
+        oprot.writeBinary(this.value);
+        oprot.writeFieldEnd();
+      }
+    }
+    if (isSetTimestamp()) {
+      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
+      oprot.writeI64(this.timestamp);
       oprot.writeFieldEnd();
     }
-    oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
-    oprot.writeI64(this.timestamp);
-    oprot.writeFieldEnd();
     if (isSetTtl()) {
       oprot.writeFieldBegin(TTL_FIELD_DESC);
       oprot.writeI32(this.ttl);
@@ -610,18 +606,22 @@ public class Column implements org.apach
       org.apache.thrift.TBaseHelper.toString(this.name, sb);
     }
     first = false;
-    if (!first) sb.append(", ");
-    sb.append("value:");
-    if (this.value == null) {
-      sb.append("null");
-    } else {
-      org.apache.thrift.TBaseHelper.toString(this.value, sb);
+    if (isSetValue()) {
+      if (!first) sb.append(", ");
+      sb.append("value:");
+      if (this.value == null) {
+        sb.append("null");
+      } else {
+        org.apache.thrift.TBaseHelper.toString(this.value, sb);
+      }
+      first = false;
+    }
+    if (isSetTimestamp()) {
+      if (!first) sb.append(", ");
+      sb.append("timestamp:");
+      sb.append(this.timestamp);
+      first = false;
     }
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("timestamp:");
-    sb.append(this.timestamp);
-    first = false;
     if (isSetTtl()) {
       if (!first) sb.append(", ");
       sb.append("ttl:");
@@ -637,10 +637,6 @@ public class Column implements org.apach
     if (name == null) {
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
     }
-    if (value == null) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString());
-    }
-    // alas, we cannot check 'timestamp' because it's a primitive and you chose the non-beans generator.
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 19 17:13:19 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,1091654,1094481,1094796
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1026516-1094195,1094481,1094604,1094647,1094796,1094809,1094818,1094831
 /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-1094085,1094481,1094797,1094959,1095070
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java:1090935-1095106
 /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

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java Tue Apr 19 17:13:19 2011
@@ -44,6 +44,6 @@ import org.slf4j.LoggerFactory;
 
 public class Constants {
 
-  public static final String VERSION = "20.1.0";
+  public static final String VERSION = "19.10.0";
 
 }

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 19 17:13:19 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,1091654,1094481,1094796
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1026516-1094195,1094481,1094604,1094647,1094796,1094809,1094818,1094831
 /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-1094085,1094481,1094797,1094959,1095070
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java:1090935-1095106
 /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

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java Tue Apr 19 17:13:19 2011
@@ -48,11 +48,16 @@ public class KsDef implements org.apache
   private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField STRATEGY_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("strategy_class", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField STRATEGY_OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("strategy_options", org.apache.thrift.protocol.TType.MAP, (short)3);
-  private static final org.apache.thrift.protocol.TField CF_DEFS_FIELD_DESC = new org.apache.thrift.protocol.TField("cf_defs", org.apache.thrift.protocol.TType.LIST, (short)4);
+  private static final org.apache.thrift.protocol.TField REPLICATION_FACTOR_FIELD_DESC = new org.apache.thrift.protocol.TField("replication_factor", org.apache.thrift.protocol.TType.I32, (short)4);
+  private static final org.apache.thrift.protocol.TField CF_DEFS_FIELD_DESC = new org.apache.thrift.protocol.TField("cf_defs", org.apache.thrift.protocol.TType.LIST, (short)5);
 
   public String name;
   public String strategy_class;
   public Map<String,String> strategy_options;
+  /**
+   * @deprecated
+   */
+  public int replication_factor;
   public List<CfDef> cf_defs;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -60,7 +65,11 @@ public class KsDef implements org.apache
     NAME((short)1, "name"),
     STRATEGY_CLASS((short)2, "strategy_class"),
     STRATEGY_OPTIONS((short)3, "strategy_options"),
-    CF_DEFS((short)4, "cf_defs");
+    /**
+     * @deprecated
+     */
+    REPLICATION_FACTOR((short)4, "replication_factor"),
+    CF_DEFS((short)5, "cf_defs");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -81,7 +90,9 @@ public class KsDef implements org.apache
           return STRATEGY_CLASS;
         case 3: // STRATEGY_OPTIONS
           return STRATEGY_OPTIONS;
-        case 4: // CF_DEFS
+        case 4: // REPLICATION_FACTOR
+          return REPLICATION_FACTOR;
+        case 5: // CF_DEFS
           return CF_DEFS;
         default:
           return null;
@@ -123,6 +134,8 @@ public class KsDef implements org.apache
   }
 
   // isset id assignments
+  private static final int __REPLICATION_FACTOR_ISSET_ID = 0;
+  private BitSet __isset_bit_vector = new BitSet(1);
 
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
@@ -135,6 +148,8 @@ public class KsDef implements org.apache
         new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+    tmpMap.put(_Fields.REPLICATION_FACTOR, new org.apache.thrift.meta_data.FieldMetaData("replication_factor", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     tmpMap.put(_Fields.CF_DEFS, new org.apache.thrift.meta_data.FieldMetaData("cf_defs", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CfDef.class))));
@@ -160,6 +175,8 @@ public class KsDef implements org.apache
    * Performs a deep copy on <i>other</i>.
    */
   public KsDef(KsDef other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
     if (other.isSetName()) {
       this.name = other.name;
     }
@@ -181,6 +198,7 @@ public class KsDef implements org.apache
       }
       this.strategy_options = __this__strategy_options;
     }
+    this.replication_factor = other.replication_factor;
     if (other.isSetCf_defs()) {
       List<CfDef> __this__cf_defs = new ArrayList<CfDef>();
       for (CfDef other_element : other.cf_defs) {
@@ -199,6 +217,8 @@ public class KsDef implements org.apache
     this.name = null;
     this.strategy_class = null;
     this.strategy_options = null;
+    setReplication_factorIsSet(false);
+    this.replication_factor = 0;
     this.cf_defs = null;
   }
 
@@ -285,6 +305,35 @@ public class KsDef implements org.apache
     }
   }
 
+  /**
+   * @deprecated
+   */
+  public int getReplication_factor() {
+    return this.replication_factor;
+  }
+
+  /**
+   * @deprecated
+   */
+  public KsDef setReplication_factor(int replication_factor) {
+    this.replication_factor = replication_factor;
+    setReplication_factorIsSet(true);
+    return this;
+  }
+
+  public void unsetReplication_factor() {
+    __isset_bit_vector.clear(__REPLICATION_FACTOR_ISSET_ID);
+  }
+
+  /** Returns true if field replication_factor is set (has been assigned a value) and false otherwise */
+  public boolean isSetReplication_factor() {
+    return __isset_bit_vector.get(__REPLICATION_FACTOR_ISSET_ID);
+  }
+
+  public void setReplication_factorIsSet(boolean value) {
+    __isset_bit_vector.set(__REPLICATION_FACTOR_ISSET_ID, value);
+  }
+
   public int getCf_defsSize() {
     return (this.cf_defs == null) ? 0 : this.cf_defs.size();
   }
@@ -350,6 +399,14 @@ public class KsDef implements org.apache
       }
       break;
 
+    case REPLICATION_FACTOR:
+      if (value == null) {
+        unsetReplication_factor();
+      } else {
+        setReplication_factor((Integer)value);
+      }
+      break;
+
     case CF_DEFS:
       if (value == null) {
         unsetCf_defs();
@@ -372,6 +429,9 @@ public class KsDef implements org.apache
     case STRATEGY_OPTIONS:
       return getStrategy_options();
 
+    case REPLICATION_FACTOR:
+      return new Integer(getReplication_factor());
+
     case CF_DEFS:
       return getCf_defs();
 
@@ -392,6 +452,8 @@ public class KsDef implements org.apache
       return isSetStrategy_class();
     case STRATEGY_OPTIONS:
       return isSetStrategy_options();
+    case REPLICATION_FACTOR:
+      return isSetReplication_factor();
     case CF_DEFS:
       return isSetCf_defs();
     }
@@ -438,6 +500,15 @@ public class KsDef implements org.apache
         return false;
     }
 
+    boolean this_present_replication_factor = true && this.isSetReplication_factor();
+    boolean that_present_replication_factor = true && that.isSetReplication_factor();
+    if (this_present_replication_factor || that_present_replication_factor) {
+      if (!(this_present_replication_factor && that_present_replication_factor))
+        return false;
+      if (this.replication_factor != that.replication_factor)
+        return false;
+    }
+
     boolean this_present_cf_defs = true && this.isSetCf_defs();
     boolean that_present_cf_defs = true && that.isSetCf_defs();
     if (this_present_cf_defs || that_present_cf_defs) {
@@ -469,6 +540,11 @@ public class KsDef implements org.apache
     if (present_strategy_options)
       builder.append(strategy_options);
 
+    boolean present_replication_factor = true && (isSetReplication_factor());
+    builder.append(present_replication_factor);
+    if (present_replication_factor)
+      builder.append(replication_factor);
+
     boolean present_cf_defs = true && (isSetCf_defs());
     builder.append(present_cf_defs);
     if (present_cf_defs)
@@ -515,6 +591,16 @@ public class KsDef implements org.apache
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetReplication_factor()).compareTo(typedOther.isSetReplication_factor());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetReplication_factor()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replication_factor, typedOther.replication_factor);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     lastComparison = Boolean.valueOf(isSetCf_defs()).compareTo(typedOther.isSetCf_defs());
     if (lastComparison != 0) {
       return lastComparison;
@@ -575,7 +661,15 @@ public class KsDef implements org.apache
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
-        case 4: // CF_DEFS
+        case 4: // REPLICATION_FACTOR
+          if (field.type == org.apache.thrift.protocol.TType.I32) {
+            this.replication_factor = iprot.readI32();
+            setReplication_factorIsSet(true);
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 5: // CF_DEFS
           if (field.type == org.apache.thrift.protocol.TType.LIST) {
             {
               org.apache.thrift.protocol.TList _list37 = iprot.readListBegin();
@@ -633,6 +727,11 @@ public class KsDef implements org.apache
         oprot.writeFieldEnd();
       }
     }
+    if (isSetReplication_factor()) {
+      oprot.writeFieldBegin(REPLICATION_FACTOR_FIELD_DESC);
+      oprot.writeI32(this.replication_factor);
+      oprot.writeFieldEnd();
+    }
     if (this.cf_defs != null) {
       oprot.writeFieldBegin(CF_DEFS_FIELD_DESC);
       {
@@ -679,6 +778,12 @@ public class KsDef implements org.apache
       }
       first = false;
     }
+    if (isSetReplication_factor()) {
+      if (!first) sb.append(", ");
+      sb.append("replication_factor:");
+      sb.append(this.replication_factor);
+      first = false;
+    }
     if (!first) sb.append(", ");
     sb.append("cf_defs:");
     if (this.cf_defs == null) {
@@ -714,6 +819,8 @@ public class KsDef implements org.apache
 
   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
     try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bit_vector = new BitSet(1);
       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
     } catch (org.apache.thrift.TException te) {
       throw new java.io.IOException(te);

Propchange: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 19 17:13:19 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,1091654,1094481,1094796
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1026516-1094195,1094481,1094604,1094647,1094796,1094809,1094818,1094831
 /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-1094085,1094481,1094797,1094959,1095070
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java:1090935-1095106
 /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 Tue Apr 19 17:13:19 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,1091654,1094481,1094796
+/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1026516-1094195,1094481,1094604,1094647,1094796,1094809,1094818,1094831
 /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-1094085,1094481,1094797,1094959,1095070
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java:1090935-1095106
 /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/cache/ConcurrentLinkedHashCache.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cache/ConcurrentLinkedHashCache.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cache/ConcurrentLinkedHashCache.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cache/ConcurrentLinkedHashCache.java Tue Apr 19 17:13:19 2011
@@ -1,4 +1,25 @@
 package org.apache.cassandra.cache;
+/*
+ * 
+ * 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.
+ * 
+ */
+
 
 import java.util.Collection;
 import java.util.Map;

Modified: cassandra/trunk/src/java/org/apache/cassandra/cache/ConcurrentLinkedHashCacheProvider.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cache/ConcurrentLinkedHashCacheProvider.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cache/ConcurrentLinkedHashCacheProvider.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cache/ConcurrentLinkedHashCacheProvider.java Tue Apr 19 17:13:19 2011
@@ -1,4 +1,25 @@
 package org.apache.cassandra.cache;
+/*
+ * 
+ * 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.
+ * 
+ */
+
 
 import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap;
 import org.apache.cassandra.db.ColumnFamily;

Modified: cassandra/trunk/src/java/org/apache/cassandra/cache/FreeableMemory.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cache/FreeableMemory.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cache/FreeableMemory.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cache/FreeableMemory.java Tue Apr 19 17:13:19 2011
@@ -1,4 +1,25 @@
 package org.apache.cassandra.cache;
+/*
+ * 
+ * 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.
+ * 
+ */
+
 
 import java.io.IOException;
 

Modified: cassandra/trunk/src/java/org/apache/cassandra/cache/ICache.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cache/ICache.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cache/ICache.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cache/ICache.java Tue Apr 19 17:13:19 2011
@@ -1,4 +1,25 @@
 package org.apache.cassandra.cache;
+/*
+ * 
+ * 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.
+ * 
+ */
+
 
 import java.util.Set;
 

Modified: cassandra/trunk/src/java/org/apache/cassandra/cache/IRowCacheProvider.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cache/IRowCacheProvider.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cache/IRowCacheProvider.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cache/IRowCacheProvider.java Tue Apr 19 17:13:19 2011
@@ -1,4 +1,25 @@
 package org.apache.cassandra.cache;
+/*
+ * 
+ * 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.
+ * 
+ */
+
 
 import org.apache.cassandra.db.ColumnFamily;
 import org.apache.cassandra.db.DecoratedKey;

Modified: cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCache.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCache.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCache.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCache.java Tue Apr 19 17:13:19 2011
@@ -1,4 +1,25 @@
 package org.apache.cassandra.cache;
+/*
+ * 
+ * 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.
+ * 
+ */
+
 
 import java.io.DataOutputStream;
 import java.io.IOError;

Modified: cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java Tue Apr 19 17:13:19 2011
@@ -1,4 +1,25 @@
 package org.apache.cassandra.cache;
+/*
+ * 
+ * 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.
+ * 
+ */
+
 
 import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.db.ColumnFamily;

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=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java Tue Apr 19 17:13:19 2011
@@ -802,7 +802,7 @@ public class CliClient
         if(superColumnName != null)
             parent.setSuper_column(superColumnName);
 
-        Column columnToInsert = new Column(columnName, columnValueInBytes, FBUtilities.timestampMicros());
+        Column columnToInsert = new Column(columnName).setValue(columnValueInBytes).setTimestamp(FBUtilities.timestampMicros());
         
         // children count = 3 mean that we have ttl in arguments
         if (statement.getChildCount() == 3)

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java Tue Apr 19 17:13:19 2011
@@ -254,7 +254,9 @@ public final class CFMetaData
                       .gcGraceSeconds(0)
                       .memSize(memtableThroughPutInMB)
                       .memOps(sizeMemtableOperations(memtableThroughPutInMB))
-                      .mergeShardsChance(0.0);
+                      .mergeShardsChance(0.0)
+                      .rowCacheSavePeriod(0)
+                      .keyCacheSavePeriod(0);
     }
 
     public static CFMetaData newIndexMetadata(CFMetaData parent, ColumnDefinition info, AbstractType columnComparator)

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java Tue Apr 19 17:13:19 2011
@@ -86,7 +86,7 @@ public class DatabaseDescriptor
     private static RequestSchedulerOptions requestSchedulerOptions;
 
     public static final UUID INITIAL_VERSION = new UUID(4096, 0); // has type nibble set to 1, everything else to zero.
-    private static UUID defsVersion = INITIAL_VERSION;
+    private static volatile UUID defsVersion = INITIAL_VERSION;
 
     /**
      * Inspect the classpath to find storage configuration file

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java?rev=1095139&r1=1095138&r2=1095139&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/KSMetaData.java Tue Apr 19 17:13:19 2011
@@ -29,6 +29,8 @@ import org.apache.avro.util.Utf8;
 import org.apache.cassandra.io.SerDeUtils;
 import org.apache.cassandra.locator.AbstractReplicationStrategy;
 import org.apache.cassandra.locator.NetworkTopologyStrategy;
+import org.apache.cassandra.thrift.KsDef;
+
 import org.apache.commons.lang.StringUtils;
 
 public final class KSMetaData
@@ -48,7 +50,22 @@ public final class KSMetaData
             cfmap.put(cfm.cfName, cfm);
         this.cfMetaData = Collections.unmodifiableMap(cfmap);
     }
-    
+
+    public static Map<String, String> backwardsCompatibleOptions(KsDef ks_def)
+    {
+        Map<String, String> options;
+        if (ks_def.isSetReplication_factor())
+        {
+            options = new HashMap<String, String>(ks_def.strategy_options == null ? Collections.<String, String>emptyMap() : ks_def.strategy_options);
+            options.put("replication_factor", String.valueOf(ks_def.replication_factor));
+        }
+        else
+        {
+            options = ks_def.strategy_options;
+        }
+        return options;
+    }
+
     public int hashCode()
     {
         return name.hashCode();