Author: eevans
Date: Tue May 11 21:49:36 2010
New Revision: 943310

URL: http://svn.apache.org/viewvc?rev=943310&view=rev
Log:
updated genavro schema

Patch eevans

Modified:
    cassandra/trunk/interface/cassandra.genavro

Modified: cassandra/trunk/interface/cassandra.genavro
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.genavro?rev=943310&r1=943309&r2=943310&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.genavro (original)
+++ cassandra/trunk/interface/cassandra.genavro Tue May 11 21:49:36 2010
@@ -4,6 +4,10 @@
 @namespace("org.apache.cassandra.avro")
 
 protocol Cassandra {
+    enum AccessLevel {
+        NONE, READONLY, READWRITE, FALL
+    }
+
     record ColumnPath {
         string column_family;
         union { bytes, null } super_column;
@@ -19,6 +23,7 @@ protocol Cassandra {
         bytes name;
         bytes value;
         long timestamp;
+        union { int, null } ttl;
     }
 
     record SuperColumn {
@@ -34,15 +39,13 @@ protocol Cassandra {
     record SliceRange {
         bytes start;
         bytes finish;
-        /* FIXME: reversed needs to default to false */
         boolean reversed;
-        /* FIXME: count needs to default to 100 */
         int count;
         array<bytes> bitmasks;
     }
 
     record SlicePredicate {
-        array<bytes> column_names;
+        union { array<bytes>, null } column_names;
         union { SliceRange, null } slice_range;
     }
 
@@ -57,6 +60,25 @@ protocol Cassandra {
         union { Deletion, null } deletion;
     }
 
+    record CfDef {
+        string keyspace;
+        string name;
+        union { string, null } column_type;
+        union { string, null } comparator_type;
+        union { string, null } subcomparator_type;
+        union { string, null } comment;
+        union { double, null } row_cache_size;
+        union { boolean, null } preload_row_cache;
+        union { double, null } key_cache_size;
+    }
+
+    record KsDef {
+        string name;
+        string strategy_class;
+        int replication_factor;
+        array<CfDef> cf_defs;
+    } 
+
     enum ConsistencyLevel {
         ZERO, ONE, QUORUM, DCQUORUM, DCQUORUMSYNC, ALL
     }
@@ -77,18 +99,15 @@ protocol Cassandra {
         union { string, null } why;
     }
 
-    ColumnOrSuperColumn get(string keyspace,
-                            string key,
+    ColumnOrSuperColumn get(bytes key,
                             ColumnPath column_path,
                             ConsistencyLevel consistency_level)
     throws InvalidRequestException, NotFoundException, UnavailableException,
            TimedOutException;
 
-    void insert(string keyspace,
-                string key,
-                ColumnPath column_path,
-                bytes value,
-                long timestamp,
+    void insert(bytes key,
+                ColumnParent column_parent,
+                Column column,
                 ConsistencyLevel consistency_level)
     throws InvalidRequestException, UnavailableException, TimedOutException;
 
@@ -104,4 +123,8 @@ protocol Cassandra {
     throws InvalidRequestException, UnavailableException, TimedOutException;
 
     string get_api_version();
+
+    void system_add_keyspace(KsDef ks_def) throws InvalidRequestException;
+
+    void set_keyspace(string keyspace) throws InvalidRequestException;
 }


Reply via email to