cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r955827 - in /cassandra/trunk: interface/cassandra.genavro src/java/org/apache/cassandra/avro/CassandraServer.java
Date Fri, 18 Jun 2010 03:41:25 GMT
Author: eevans
Date: Fri Jun 18 03:41:25 2010
New Revision: 955827

URL: http://svn.apache.org/viewvc?rev=955827&view=rev
Log:
bring avro up to date w/ CfDef.read_repair_chance

And, use CFMetaData defaults in place of those in CassandraServer.

Patch by eevans

Modified:
    cassandra/trunk/interface/cassandra.genavro
    cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java

Modified: cassandra/trunk/interface/cassandra.genavro
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.genavro?rev=955827&r1=955826&r2=955827&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.genavro (original)
+++ cassandra/trunk/interface/cassandra.genavro Fri Jun 18 03:41:25 2010
@@ -94,6 +94,7 @@ protocol Cassandra {
         union { double, null } row_cache_size;
         union { boolean, null } preload_row_cache;
         union { double, null } key_cache_size;
+        union { double, null } read_repair_chance;
     }
 
     record KsDef {

Modified: cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java?rev=955827&r1=955826&r2=955827&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java Fri Jun 18 03:41:25
2010
@@ -70,10 +70,6 @@ public class CassandraServer implements 
     private final static String D_CF_CFCLOCKTYPE = "Timestamp";
     private final static String D_CF_COMPTYPE = "BytesType";
     private final static String D_CF_SUBCOMPTYPE = "";
-    private final static String D_CF_COMMENT = "";
-    private final static double D_CF_ROWCACHE = 0;
-    private final static boolean D_CF_PRELOAD_ROWCACHE = false;
-    private final static double D_CF_KEYCACHE = 200000;
     
     private ThreadLocal<AccessLevel> loginDone = new ThreadLocal<AccessLevel>()
     {
@@ -596,11 +592,11 @@ public class CassandraServer implements 
                         DatabaseDescriptor.getComparator(compare),
                         subCompare.length() == 0 ? null : DatabaseDescriptor.getComparator(subCompare),
                         reconciler,
-                        cfDef.comment == null ? D_CF_COMMENT : cfDef.comment.toString(),

-                        cfDef.row_cache_size == null ? D_CF_ROWCACHE : cfDef.row_cache_size,
-                        cfDef.preload_row_cache == null ? D_CF_PRELOAD_ROWCACHE : cfDef.preload_row_cache,
-                        cfDef.key_cache_size == null ? D_CF_KEYCACHE : cfDef.key_cache_size,
-                        CFMetaData.DEFAULT_READ_REPAIR_CHANCE);
+                        cfDef.comment == null ? "" : cfDef.comment.toString(), 
+                        cfDef.row_cache_size == null ? CFMetaData.DEFAULT_ROW_CACHE_SIZE
: cfDef.row_cache_size,
+                        cfDef.preload_row_cache == null ? CFMetaData.DEFAULT_PRELOAD_ROW_CACHE
: cfDef.preload_row_cache,
+                        cfDef.key_cache_size == null ? CFMetaData.DEFAULT_KEY_CACHE_SIZE
: cfDef.key_cache_size,
+                        cfDef.read_repair_chance == null ? CFMetaData.DEFAULT_READ_REPAIR_CHANCE
: cfDef.read_repair_chance);
                 cfDefs.add(cfmeta);
             }
             



Mime
View raw message