Author: jbellis
Date: Fri Oct 22 17:54:44 2010
New Revision: 1026429

URL: http://svn.apache.org/viewvc?rev=1026429&view=rev
Log:
remove preload_row_cache option
patch by jbellis; reviewed by brandonwilliams for CASSANDRA-1647

Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/conf/cassandra.yaml
    cassandra/trunk/interface/cassandra.genavro
    cassandra/trunk/interface/cassandra.thrift
    
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java
    
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Constants.java
    cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.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/RawColumnFamily.java
    cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
    cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java
    cassandra/trunk/test/system/__init__.py
    cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java

Modified: cassandra/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Fri Oct 22 17:54:44 2010
@@ -17,7 +17,7 @@ dev
    (CASSANDRA-1566)
  * allow keyspace creation with RF > N (CASSANDRA-1428)
  * improve cli error handling (CASSANDRA-1580)
- * add cache save/load ability (CASSANDRA-1417, 1606)
+ * add cache save/load ability (CASSANDRA-1417, 1606, 1647)
  * add StorageService.getDrainProgress (CASSANDRA-1588)
  * Disallow bootstrap to an in-use token (CASSANDRA-1561)
  * Allow dynamic secondary index creation and destruction (CASSANDRA-1532)

Modified: cassandra/trunk/conf/cassandra.yaml
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/conf/cassandra.yaml?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/conf/cassandra.yaml (original)
+++ cassandra/trunk/conf/cassandra.yaml Fri Oct 22 17:54:44 2010
@@ -333,8 +333,6 @@ index_interval: 128
 #     - read_repair_chance: specifies the probability with which read
 #        repairs should be invoked on non-quorum reads.  must be between 0
 #        and 1. defaults to 1.0 (always read repair).
-#     - preload_row_cache: If true, will populate row cache on startup.
-#        Defaults to false.
 #     - gc_grace_seconds: specifies the time to wait before garbage
 #        collecting tombstones (deletion markers). defaults to 864000 (10
 #        days). See http://wiki.apache.org/cassandra/DistributedDeletes
@@ -400,7 +398,6 @@ keyspaces:
         - name: Super2
           column_type: Super
           compare_subcolumns_with: UTF8Type
-          preload_row_cache: true
           rows_cached: 10000
           keys_cached: 50
           comment: 'A column family with supercolumns, whose column and 
subcolumn names are UTF8 strings'

Modified: cassandra/trunk/interface/cassandra.genavro
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.genavro?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.genavro (original)
+++ cassandra/trunk/interface/cassandra.genavro Fri Oct 22 17:54:44 2010
@@ -144,7 +144,6 @@ protocol Cassandra {
         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;
         union { double, null } read_repair_chance;
         union { int, null } gc_grace_seconds;

Modified: cassandra/trunk/interface/cassandra.thrift
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.thrift?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.thrift (original)
+++ cassandra/trunk/interface/cassandra.thrift Fri Oct 22 17:54:44 2010
@@ -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 = "19.2.0"
+const string VERSION = "19.3.0"
 
 
 #
@@ -333,7 +333,6 @@ struct CfDef {
     6: optional string subcomparator_type,
     8: optional string comment,
     9: optional double row_cache_size=0,
-    10: optional bool preload_row_cache=0,
     11: optional double key_cache_size=200000,
     12: optional double read_repair_chance=1.0,
     13: optional list<ColumnDef> column_metadata,

Modified: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java
 (original)
+++ 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java
 Fri Oct 22 17:54:44 2010
@@ -58,7 +58,6 @@ public class CfDef implements TBase<CfDe
   private static final TField SUBCOMPARATOR_TYPE_FIELD_DESC = new 
TField("subcomparator_type", TType.STRING, (short)6);
   private static final TField COMMENT_FIELD_DESC = new TField("comment", 
TType.STRING, (short)8);
   private static final TField ROW_CACHE_SIZE_FIELD_DESC = new 
TField("row_cache_size", TType.DOUBLE, (short)9);
-  private static final TField PRELOAD_ROW_CACHE_FIELD_DESC = new 
TField("preload_row_cache", TType.BOOL, (short)10);
   private static final TField KEY_CACHE_SIZE_FIELD_DESC = new 
TField("key_cache_size", TType.DOUBLE, (short)11);
   private static final TField READ_REPAIR_CHANCE_FIELD_DESC = new 
TField("read_repair_chance", TType.DOUBLE, (short)12);
   private static final TField COLUMN_METADATA_FIELD_DESC = new 
TField("column_metadata", TType.LIST, (short)13);
@@ -80,7 +79,6 @@ public class CfDef implements TBase<CfDe
   public String subcomparator_type;
   public String comment;
   public double row_cache_size;
-  public boolean preload_row_cache;
   public double key_cache_size;
   public double read_repair_chance;
   public List<ColumnDef> column_metadata;
@@ -104,7 +102,6 @@ public class CfDef implements TBase<CfDe
     SUBCOMPARATOR_TYPE((short)6, "subcomparator_type"),
     COMMENT((short)8, "comment"),
     ROW_CACHE_SIZE((short)9, "row_cache_size"),
-    PRELOAD_ROW_CACHE((short)10, "preload_row_cache"),
     KEY_CACHE_SIZE((short)11, "key_cache_size"),
     READ_REPAIR_CHANCE((short)12, "read_repair_chance"),
     COLUMN_METADATA((short)13, "column_metadata"),
@@ -146,8 +143,6 @@ public class CfDef implements TBase<CfDe
           return COMMENT;
         case 9: // ROW_CACHE_SIZE
           return ROW_CACHE_SIZE;
-        case 10: // PRELOAD_ROW_CACHE
-          return PRELOAD_ROW_CACHE;
         case 11: // KEY_CACHE_SIZE
           return KEY_CACHE_SIZE;
         case 12: // READ_REPAIR_CHANCE
@@ -215,19 +210,18 @@ public class CfDef implements TBase<CfDe
 
   // isset id assignments
   private static final int __ROW_CACHE_SIZE_ISSET_ID = 0;
-  private static final int __PRELOAD_ROW_CACHE_ISSET_ID = 1;
-  private static final int __KEY_CACHE_SIZE_ISSET_ID = 2;
-  private static final int __READ_REPAIR_CHANCE_ISSET_ID = 3;
-  private static final int __GC_GRACE_SECONDS_ISSET_ID = 4;
-  private static final int __ID_ISSET_ID = 5;
-  private static final int __MIN_COMPACTION_THRESHOLD_ISSET_ID = 6;
-  private static final int __MAX_COMPACTION_THRESHOLD_ISSET_ID = 7;
-  private static final int __ROW_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID = 8;
-  private static final int __KEY_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID = 9;
-  private static final int __MEMTABLE_FLUSH_AFTER_MINS_ISSET_ID = 10;
-  private static final int __MEMTABLE_THROUGHPUT_IN_MB_ISSET_ID = 11;
-  private static final int __MEMTABLE_OPERATIONS_IN_MILLIONS_ISSET_ID = 12;
-  private BitSet __isset_bit_vector = new BitSet(13);
+  private static final int __KEY_CACHE_SIZE_ISSET_ID = 1;
+  private static final int __READ_REPAIR_CHANCE_ISSET_ID = 2;
+  private static final int __GC_GRACE_SECONDS_ISSET_ID = 3;
+  private static final int __ID_ISSET_ID = 4;
+  private static final int __MIN_COMPACTION_THRESHOLD_ISSET_ID = 5;
+  private static final int __MAX_COMPACTION_THRESHOLD_ISSET_ID = 6;
+  private static final int __ROW_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID = 7;
+  private static final int __KEY_CACHE_SAVE_PERIOD_IN_SECONDS_ISSET_ID = 8;
+  private static final int __MEMTABLE_FLUSH_AFTER_MINS_ISSET_ID = 9;
+  private static final int __MEMTABLE_THROUGHPUT_IN_MB_ISSET_ID = 10;
+  private static final int __MEMTABLE_OPERATIONS_IN_MILLIONS_ISSET_ID = 11;
+  private BitSet __isset_bit_vector = new BitSet(12);
 
   public static final Map<_Fields, FieldMetaData> metaDataMap;
   static {
@@ -246,8 +240,6 @@ public class CfDef implements TBase<CfDe
         new FieldValueMetaData(TType.STRING)));
     tmpMap.put(_Fields.ROW_CACHE_SIZE, new FieldMetaData("row_cache_size", 
TFieldRequirementType.OPTIONAL, 
         new FieldValueMetaData(TType.DOUBLE)));
-    tmpMap.put(_Fields.PRELOAD_ROW_CACHE, new 
FieldMetaData("preload_row_cache", TFieldRequirementType.OPTIONAL, 
-        new FieldValueMetaData(TType.BOOL)));
     tmpMap.put(_Fields.KEY_CACHE_SIZE, new FieldMetaData("key_cache_size", 
TFieldRequirementType.OPTIONAL, 
         new FieldValueMetaData(TType.DOUBLE)));
     tmpMap.put(_Fields.READ_REPAIR_CHANCE, new 
FieldMetaData("read_repair_chance", TFieldRequirementType.OPTIONAL, 
@@ -286,8 +278,6 @@ public class CfDef implements TBase<CfDe
 
     this.row_cache_size = (double)0;
 
-    this.preload_row_cache = false;
-
     this.key_cache_size = (double)200000;
 
     this.read_repair_chance = 1;
@@ -328,7 +318,6 @@ public class CfDef implements TBase<CfDe
       this.comment = other.comment;
     }
     this.row_cache_size = other.row_cache_size;
-    this.preload_row_cache = other.preload_row_cache;
     this.key_cache_size = other.key_cache_size;
     this.read_repair_chance = other.read_repair_chance;
     if (other.isSetColumn_metadata()) {
@@ -368,8 +357,6 @@ public class CfDef implements TBase<CfDe
     this.comment = null;
     this.row_cache_size = (double)0;
 
-    this.preload_row_cache = false;
-
     this.key_cache_size = (double)200000;
 
     this.read_repair_chance = 1;
@@ -563,29 +550,6 @@ public class CfDef implements TBase<CfDe
     __isset_bit_vector.set(__ROW_CACHE_SIZE_ISSET_ID, value);
   }
 
-  public boolean isPreload_row_cache() {
-    return this.preload_row_cache;
-  }
-
-  public CfDef setPreload_row_cache(boolean preload_row_cache) {
-    this.preload_row_cache = preload_row_cache;
-    setPreload_row_cacheIsSet(true);
-    return this;
-  }
-
-  public void unsetPreload_row_cache() {
-    __isset_bit_vector.clear(__PRELOAD_ROW_CACHE_ISSET_ID);
-  }
-
-  /** Returns true if field preload_row_cache is set (has been asigned a 
value) and false otherwise */
-  public boolean isSetPreload_row_cache() {
-    return __isset_bit_vector.get(__PRELOAD_ROW_CACHE_ISSET_ID);
-  }
-
-  public void setPreload_row_cacheIsSet(boolean value) {
-    __isset_bit_vector.set(__PRELOAD_ROW_CACHE_ISSET_ID, value);
-  }
-
   public double getKey_cache_size() {
     return this.key_cache_size;
   }
@@ -960,14 +924,6 @@ public class CfDef implements TBase<CfDe
       }
       break;
 
-    case PRELOAD_ROW_CACHE:
-      if (value == null) {
-        unsetPreload_row_cache();
-      } else {
-        setPreload_row_cache((Boolean)value);
-      }
-      break;
-
     case KEY_CACHE_SIZE:
       if (value == null) {
         unsetKey_cache_size();
@@ -1098,9 +1054,6 @@ public class CfDef implements TBase<CfDe
     case ROW_CACHE_SIZE:
       return new Double(getRow_cache_size());
 
-    case PRELOAD_ROW_CACHE:
-      return new Boolean(isPreload_row_cache());
-
     case KEY_CACHE_SIZE:
       return new Double(getKey_cache_size());
 
@@ -1165,8 +1118,6 @@ public class CfDef implements TBase<CfDe
       return isSetComment();
     case ROW_CACHE_SIZE:
       return isSetRow_cache_size();
-    case PRELOAD_ROW_CACHE:
-      return isSetPreload_row_cache();
     case KEY_CACHE_SIZE:
       return isSetKey_cache_size();
     case READ_REPAIR_CHANCE:
@@ -1273,15 +1224,6 @@ public class CfDef implements TBase<CfDe
         return false;
     }
 
-    boolean this_present_preload_row_cache = true && 
this.isSetPreload_row_cache();
-    boolean that_present_preload_row_cache = true && 
that.isSetPreload_row_cache();
-    if (this_present_preload_row_cache || that_present_preload_row_cache) {
-      if (!(this_present_preload_row_cache && that_present_preload_row_cache))
-        return false;
-      if (this.preload_row_cache != that.preload_row_cache)
-        return false;
-    }
-
     boolean this_present_key_cache_size = true && this.isSetKey_cache_size();
     boolean that_present_key_cache_size = true && that.isSetKey_cache_size();
     if (this_present_key_cache_size || that_present_key_cache_size) {
@@ -1441,11 +1383,6 @@ public class CfDef implements TBase<CfDe
     if (present_row_cache_size)
       builder.append(row_cache_size);
 
-    boolean present_preload_row_cache = true && (isSetPreload_row_cache());
-    builder.append(present_preload_row_cache);
-    if (present_preload_row_cache)
-      builder.append(preload_row_cache);
-
     boolean present_key_cache_size = true && (isSetKey_cache_size());
     builder.append(present_key_cache_size);
     if (present_key_cache_size)
@@ -1592,16 +1529,6 @@ public class CfDef implements TBase<CfDe
         return lastComparison;
       }
     }
-    lastComparison = 
Boolean.valueOf(isSetPreload_row_cache()).compareTo(typedOther.isSetPreload_row_cache());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetPreload_row_cache()) {
-      lastComparison = TBaseHelper.compareTo(this.preload_row_cache, 
typedOther.preload_row_cache);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
     lastComparison = 
Boolean.valueOf(isSetKey_cache_size()).compareTo(typedOther.isSetKey_cache_size());
     if (lastComparison != 0) {
       return lastComparison;
@@ -1799,14 +1726,6 @@ public class CfDef implements TBase<CfDe
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
-        case 10: // PRELOAD_ROW_CACHE
-          if (field.type == TType.BOOL) {
-            this.preload_row_cache = iprot.readBool();
-            setPreload_row_cacheIsSet(true);
-          } else { 
-            TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
         case 11: // KEY_CACHE_SIZE
           if (field.type == TType.DOUBLE) {
             this.key_cache_size = iprot.readDouble();
@@ -1978,11 +1897,6 @@ public class CfDef implements TBase<CfDe
       oprot.writeDouble(this.row_cache_size);
       oprot.writeFieldEnd();
     }
-    if (isSetPreload_row_cache()) {
-      oprot.writeFieldBegin(PRELOAD_ROW_CACHE_FIELD_DESC);
-      oprot.writeBool(this.preload_row_cache);
-      oprot.writeFieldEnd();
-    }
     if (isSetKey_cache_size()) {
       oprot.writeFieldBegin(KEY_CACHE_SIZE_FIELD_DESC);
       oprot.writeDouble(this.key_cache_size);
@@ -2129,12 +2043,6 @@ public class CfDef implements TBase<CfDe
       sb.append(this.row_cache_size);
       first = false;
     }
-    if (isSetPreload_row_cache()) {
-      if (!first) sb.append(", ");
-      sb.append("preload_row_cache:");
-      sb.append(this.preload_row_cache);
-      first = false;
-    }
     if (isSetKey_cache_size()) {
       if (!first) sb.append(", ");
       sb.append("key_cache_size:");

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=1026429&r1=1026428&r2=1026429&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
 Fri Oct 22 17:54:44 2010
@@ -44,6 +44,6 @@ import org.slf4j.LoggerFactory;
 
 public class Constants {
 
-  public static final String VERSION = "19.2.0";
+  public static final String VERSION = "19.3.0";
 
 }

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=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java Fri 
Oct 22 17:54:44 2010
@@ -832,7 +832,6 @@ public class CassandraServer implements 
                               subCompare.length() == 0 ? null : 
DatabaseDescriptor.getComparator(subCompare),
                               cf_def.comment == null ? "" : 
cf_def.comment.toString(),
                               cf_def.row_cache_size == null ? 
CFMetaData.DEFAULT_ROW_CACHE_SIZE : cf_def.row_cache_size,
-                              cf_def.preload_row_cache == null ? 
CFMetaData.DEFAULT_PRELOAD_ROW_CACHE : cf_def.preload_row_cache,
                               cf_def.key_cache_size == null ? 
CFMetaData.DEFAULT_KEY_CACHE_SIZE : cf_def.key_cache_size,
                               cf_def.read_repair_chance == null ? 
CFMetaData.DEFAULT_READ_REPAIR_CHANCE : cf_def.read_repair_chance,
                               cf_def.gc_grace_seconds != null ? 
cf_def.gc_grace_seconds : CFMetaData.DEFAULT_GC_GRACE_SECONDS,

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=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java Fri 
Oct 22 17:54:44 2010
@@ -56,7 +56,6 @@ public final class CFMetaData
     public final static double DEFAULT_READ_REPAIR_CHANCE = 1.0;
     public final static int DEFAULT_ROW_CACHE_SAVE_PERIOD_IN_SECONDS = 0;
     public final static int DEFAULT_KEY_CACHE_SAVE_PERIOD_IN_SECONDS = 3600;
-    public final static boolean DEFAULT_PRELOAD_ROW_CACHE = false;
     public final static int DEFAULT_GC_GRACE_SECONDS = 864000;
     public final static int DEFAULT_MIN_COMPACTION_THRESHOLD = 4;
     public final static int DEFAULT_MAX_COMPACTION_THRESHOLD = 32;
@@ -85,7 +84,6 @@ public final class CFMetaData
                               subComparator,
                               comment,
                               0,
-                              false,
                               0.01,
                               0,
                               0,
@@ -137,7 +135,6 @@ public final class CFMetaData
     public final double rowCacheSize;                 // default 0
     public final double keyCacheSize;                 // default 0.01
     public final double readRepairChance;             // default 1.0 (always), 
chance [0.0,1.0] of read repair
-    public final boolean preloadRowCache;             // default false
     public final int gcGraceSeconds;                  // default 864000 (ten 
days)
     public final AbstractType defaultValidator;       // default none, use 
comparator types
     public final Integer minCompactionThreshold;      // default 4
@@ -158,7 +155,6 @@ public final class CFMetaData
                        AbstractType subcolumnComparator,
                        String comment,
                        double rowCacheSize,
-                       boolean preloadRowCache,
                        double keyCacheSize,
                        double readRepairChance,
                        int gcGraceSeconds,
@@ -186,7 +182,6 @@ public final class CFMetaData
                                    : subcolumnComparator;
         this.comment = comment == null ? "" : comment;
         this.rowCacheSize = rowCacheSize;
-        this.preloadRowCache = preloadRowCache;
         this.keyCacheSize = keyCacheSize;
         this.readRepairChance = readRepairChance;
         this.gcGraceSeconds = gcGraceSeconds;
@@ -225,7 +220,6 @@ public final class CFMetaData
                       AbstractType subcolumnComparator,
                       String comment,
                       double rowCacheSize,
-                      boolean preloadRowCache,
                       double keyCacheSize,
                       double readRepairChance,
                       int gcGraceSeconds,
@@ -247,7 +241,6 @@ public final class CFMetaData
              subcolumnComparator,
              comment,
              rowCacheSize,
-             preloadRowCache,
              keyCacheSize,
              readRepairChance,
              gcGraceSeconds,
@@ -272,7 +265,6 @@ public final class CFMetaData
                               null,
                               "",
                               0,
-                              false,
                               0,
                               0,
                               DEFAULT_GC_GRACE_SECONDS,
@@ -297,7 +289,6 @@ public final class CFMetaData
                               cfm.subcolumnComparator,
                               cfm.comment,
                               cfm.rowCacheSize,
-                              cfm.preloadRowCache,
                               cfm.keyCacheSize,
                               cfm.readRepairChance,
                               cfm.gcGraceSeconds,
@@ -323,7 +314,6 @@ public final class CFMetaData
                               cfm.subcolumnComparator,
                               cfm.comment,
                               cfm.rowCacheSize,
-                              cfm.preloadRowCache,
                               cfm.keyCacheSize,
                               cfm.readRepairChance,
                               cfm.gcGraceSeconds,
@@ -358,7 +348,6 @@ public final class CFMetaData
         cf.comment = new Utf8(comment);
         cf.row_cache_size = rowCacheSize;
         cf.key_cache_size = keyCacheSize;
-        cf.preload_row_cache = preloadRowCache;
         cf.read_repair_chance = readRepairChance;
         cf.gc_grace_seconds = gcGraceSeconds;
         cf.default_validation_class = new 
Utf8(defaultValidator.getClass().getName());
@@ -417,7 +406,6 @@ public final class CFMetaData
                               subcolumnComparator,
                               cf.comment.toString(),
                               cf.row_cache_size,
-                              cf.preload_row_cache,
                               cf.key_cache_size,
                               cf.read_repair_chance,
                               cf.gc_grace_seconds,
@@ -540,8 +528,7 @@ public final class CFMetaData
                               subcolumnComparator, 
                               cf_def.comment == null ? "" : 
cf_def.comment.toString(), 
                               cf_def.row_cache_size, 
-                              cf_def.preload_row_cache, 
-                              cf_def.key_cache_size, 
+                              cf_def.key_cache_size,
                               cf_def.read_repair_chance, 
                               cf_def.gc_grace_seconds, 
                               
DatabaseDescriptor.getComparator(cf_def.default_validation_class == null ? null 
: cf_def.default_validation_class.toString()),
@@ -603,8 +590,7 @@ public final class CFMetaData
                               subcolumnComparator, 
                               cf_def.comment, 
                               cf_def.row_cache_size, 
-                              cf_def.preload_row_cache, 
-                              cf_def.key_cache_size, 
+                              cf_def.key_cache_size,
                               cf_def.read_repair_chance, 
                               cf_def.gc_grace_seconds, 
                               
DatabaseDescriptor.getComparator(cf_def.default_validation_class == null ? null 
: cf_def.default_validation_class),
@@ -633,7 +619,6 @@ public final class CFMetaData
         }
         def.setComment(cfm.comment == null ? "" : cfm.comment);
         def.setRow_cache_size(cfm.rowCacheSize);
-        def.setPreload_row_cache(cfm.preloadRowCache);
         def.setKey_cache_size(cfm.keyCacheSize);
         def.setRead_repair_chance(cfm.readRepairChance);
         def.setGc_grace_seconds(cfm.gcGraceSeconds);
@@ -675,7 +660,6 @@ public final class CFMetaData
         }
         def.comment = cfm.comment == null ? "" : cfm.comment;
         def.row_cache_size = cfm.rowCacheSize;
-        def.preload_row_cache = cfm.preloadRowCache;
         def.key_cache_size = cfm.keyCacheSize;
         def.read_repair_chance = cfm.readRepairChance;
         def.gc_grace_seconds = cfm.gcGraceSeconds;
@@ -801,7 +785,6 @@ public final class CFMetaData
             .append("rowCacheSize", rowCacheSize)
             .append("keyCacheSize", keyCacheSize)
             .append("readRepairChance", readRepairChance)
-            .append("preloadRowCache", preloadRowCache)
             .append("gcGraceSeconds", gcGraceSeconds)
             .append("defaultValidator", defaultValidator)
             .append("minCompactionThreshold", minCompactionThreshold)

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=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- 
cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
(original)
+++ 
cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
Fri Oct 22 17:54:44 2010
@@ -590,7 +590,6 @@ public class    DatabaseDescriptor
                                              subcolumnComparator, 
                                              cf.comment, 
                                              cf.rows_cached,
-                                             cf.preload_row_cache, 
                                              cf.keys_cached, 
                                              cf.read_repair_chance,
                                              cf.gc_grace_seconds,

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/config/RawColumnFamily.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/RawColumnFamily.java?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/RawColumnFamily.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/RawColumnFamily.java 
Fri Oct 22 17:54:44 2010
@@ -36,7 +36,6 @@ public class RawColumnFamily
     public double rows_cached = CFMetaData.DEFAULT_ROW_CACHE_SIZE; 
     public double keys_cached = CFMetaData.DEFAULT_KEY_CACHE_SIZE; 
     public double read_repair_chance = CFMetaData.DEFAULT_READ_REPAIR_CHANCE;
-    public boolean preload_row_cache = CFMetaData.DEFAULT_PRELOAD_ROW_CACHE;
     public int gc_grace_seconds = CFMetaData.DEFAULT_GC_GRACE_SECONDS;
     public String default_validation_class;
     public int min_compaction_threshold = 
CFMetaData.DEFAULT_MIN_COMPACTION_THRESHOLD;

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Fri 
Oct 22 17:54:44 2010
@@ -1550,40 +1550,6 @@ public class ColumnFamilyStore implement
         }
     }
 
-    public void loadRowCache()
-    {
-        if (metadata.preloadRowCache)
-        {
-            logger.debug(String.format("Loading cache for 
keyspace/columnfamily %s/%s", table, columnFamily));
-            int ROWS = 4096;
-            Token min = partitioner.getMinimumToken();
-            Token start = min;
-            long i = 0;
-            while (i < ssTables.getRowCache().getCapacity())
-            {
-                List<Row> result;
-                try
-                {
-                    result = getRangeSlice(null, new Bounds(start, min), ROWS, 
new IdentityQueryFilter());
-                }
-                catch (Exception e)
-                {
-                    throw new RuntimeException(e);
-                }
-
-                for (Row row : result)
-                    ssTables.getRowCache().put(row.key, row.cf);
-                i += result.size();
-                if (result.size() < ROWS)
-                    break;
-
-                start = partitioner.getToken(result.get(ROWS - 1).key.key);
-            }
-            logger.info(String.format("Loaded %s rows into the %s cache", i, 
columnFamily));
-        }
-    }
-
-
     public boolean hasUnreclaimedSpace()
     {
         return ssTables.getLiveSize() < ssTables.getTotalSize();

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java 
Fri Oct 22 17:54:44 2010
@@ -493,9 +493,6 @@ public class StorageService implements I
             setMode("Normal", false);
         } 
         
-        for (ColumnFamilyStore cfs: ColumnFamilyStore.all())
-               cfs.loadRowCache();
-        
         assert tokenMetadata_.sortedTokens().size() > 0;
     }
 
@@ -2022,7 +2019,6 @@ public class StorageService implements I
                 rcf.column_type = cfm.cfType;
                 rcf.comment = cfm.comment;
                 rcf.keys_cached = cfm.keyCacheSize;
-                rcf.preload_row_cache = cfm.preloadRowCache;
                 rcf.read_repair_chance = cfm.readRepairChance;
                 rcf.gc_grace_seconds = cfm.gcGraceSeconds;
                 rcf.rows_cached = cfm.rowCacheSize;

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java 
Fri Oct 22 17:54:44 2010
@@ -896,7 +896,6 @@ public class CassandraServer implements 
                               cf_def.subcomparator_type == null ? null : 
DatabaseDescriptor.getComparator(cf_def.subcomparator_type),
                               cf_def.comment,
                               cf_def.row_cache_size,
-                              cf_def.preload_row_cache,
                               cf_def.key_cache_size,
                               cf_def.read_repair_chance,
                               cf_def.isSetGc_grace_seconds() ? 
cf_def.gc_grace_seconds : CFMetaData.DEFAULT_GC_GRACE_SECONDS,

Modified: cassandra/trunk/test/system/__init__.py
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/test/system/__init__.py?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/test/system/__init__.py (original)
+++ cassandra/trunk/test/system/__init__.py Fri Oct 22 17:54:44 2010
@@ -213,7 +213,6 @@ class AvroTester(BaseTester):
             'subcomparator_type': 'LongType',
             'comment': '',
             'row_cache_size': 1000,
-            'preload_row_cache': False,
             'key_cache_size': 0
         })
         

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java?rev=1026429&r1=1026428&r2=1026429&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java Fri Oct 22 
17:54:44 2010
@@ -534,7 +534,6 @@ public class DefsTest extends CleanupHel
         cf_def.setSubcomparator_type(null);
         cf_def.setGc_grace_seconds(cf.gcGraceSeconds);
         cf_def.setKey_cache_size(cf.keyCacheSize);
-        cf_def.setPreload_row_cache(cf.preloadRowCache);
         cf_def.setRead_repair_chance(cf.readRepairChance);
         cf_def.setRow_cache_size(43.3);
         cf_def.setColumn_metadata(new ArrayList<ColumnDef>());
@@ -568,11 +567,6 @@ public class DefsTest extends CleanupHel
         new UpdateColumnFamily(cf, updateCfm).apply();
         cf = updateCfm;
         
-        cf_def.setPreload_row_cache(!cf_def.preload_row_cache);
-        updateCfm = cf.apply(cf_def);
-        new UpdateColumnFamily(cf, updateCfm).apply();
-        cf = updateCfm;
-        
         cf_def.setDefault_validation_class("UTF8Type");
         updateCfm = cf.apply(cf_def);
         new UpdateColumnFamily(cf, updateCfm).apply();
@@ -596,7 +590,6 @@ public class DefsTest extends CleanupHel
         assert DatabaseDescriptor.getCFMetaData(cf.tableName, 
cf.cfName).keyCacheSize == cf_def.key_cache_size;
         assert DatabaseDescriptor.getCFMetaData(cf.tableName, 
cf.cfName).readRepairChance == cf_def.read_repair_chance;
         assert DatabaseDescriptor.getCFMetaData(cf.tableName, 
cf.cfName).gcGraceSeconds == cf_def.gc_grace_seconds;
-        assert DatabaseDescriptor.getCFMetaData(cf.tableName, 
cf.cfName).preloadRowCache == cf_def.preload_row_cache;
         assert DatabaseDescriptor.getCFMetaData(cf.tableName, 
cf.cfName).defaultValidator == UTF8Type.instance;
         
         // make sure some invalid operations fail.
@@ -691,7 +684,6 @@ public class DefsTest extends CleanupHel
                               null,
                               comment,
                               0,
-                              false,
                               1.0,
                               0,
                               CFMetaData.DEFAULT_GC_GRACE_SECONDS,


Reply via email to