cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1163228 [3/4] - in /cassandra/trunk: ./ interface/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/avro/ src/java/org/apache/cassandra/cli/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/cql/ src/java/org/ap...
Date Tue, 30 Aug 2011 14:25:54 GMT
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=1163228&r1=1163227&r2=1163228&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 Tue Aug 30 14:25:53 2011
@@ -2351,14 +2351,14 @@ public class CfDef implements org.apache
         case 13: // COLUMN_METADATA
           if (field.type == org.apache.thrift.protocol.TType.LIST) {
             {
-              org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
-              this.column_metadata = new ArrayList<ColumnDef>(_list29.size);
-              for (int _i30 = 0; _i30 < _list29.size; ++_i30)
+              org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
+              this.column_metadata = new ArrayList<ColumnDef>(_list34.size);
+              for (int _i35 = 0; _i35 < _list34.size; ++_i35)
               {
-                ColumnDef _elem31;
-                _elem31 = new ColumnDef();
-                _elem31.read(iprot);
-                this.column_metadata.add(_elem31);
+                ColumnDef _elem36;
+                _elem36 = new ColumnDef();
+                _elem36.read(iprot);
+                this.column_metadata.add(_elem36);
               }
               iprot.readListEnd();
             }
@@ -2484,15 +2484,15 @@ public class CfDef implements org.apache
         case 30: // COMPACTION_STRATEGY_OPTIONS
           if (field.type == org.apache.thrift.protocol.TType.MAP) {
             {
-              org.apache.thrift.protocol.TMap _map32 = iprot.readMapBegin();
-              this.compaction_strategy_options = new HashMap<String,String>(2*_map32.size);
-              for (int _i33 = 0; _i33 < _map32.size; ++_i33)
+              org.apache.thrift.protocol.TMap _map37 = iprot.readMapBegin();
+              this.compaction_strategy_options = new HashMap<String,String>(2*_map37.size);
+              for (int _i38 = 0; _i38 < _map37.size; ++_i38)
               {
-                String _key34;
-                String _val35;
-                _key34 = iprot.readString();
-                _val35 = iprot.readString();
-                this.compaction_strategy_options.put(_key34, _val35);
+                String _key39;
+                String _val40;
+                _key39 = iprot.readString();
+                _val40 = iprot.readString();
+                this.compaction_strategy_options.put(_key39, _val40);
               }
               iprot.readMapEnd();
             }
@@ -2589,9 +2589,9 @@ public class CfDef implements org.apache
         oprot.writeFieldBegin(COLUMN_METADATA_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.column_metadata.size()));
-          for (ColumnDef _iter36 : this.column_metadata)
+          for (ColumnDef _iter41 : this.column_metadata)
           {
-            _iter36.write(oprot);
+            _iter41.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -2688,10 +2688,10 @@ public class CfDef implements org.apache
         oprot.writeFieldBegin(COMPACTION_STRATEGY_OPTIONS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.compaction_strategy_options.size()));
-          for (Map.Entry<String, String> _iter37 : this.compaction_strategy_options.entrySet())
+          for (Map.Entry<String, String> _iter42 : this.compaction_strategy_options.entrySet())
           {
-            oprot.writeString(_iter37.getKey());
-            oprot.writeString(_iter37.getValue());
+            oprot.writeString(_iter42.getKey());
+            oprot.writeString(_iter42.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -2946,23 +2946,5 @@ public class CfDef implements org.apache
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

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=1163228&r1=1163227&r2=1163228&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 Aug 30 14:25:53 2011
@@ -639,23 +639,5 @@ public class Column implements org.apach
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnDef.java Tue Aug 30 14:25:53 2011
@@ -49,6 +49,7 @@ public class ColumnDef implements org.ap
   private static final org.apache.thrift.protocol.TField VALIDATION_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("validation_class", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField INDEX_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("index_type", org.apache.thrift.protocol.TType.I32, (short)3);
   private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField INDEX_OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("index_options", org.apache.thrift.protocol.TType.MAP, (short)5);
 
   public ByteBuffer name;
   public String validation_class;
@@ -58,6 +59,7 @@ public class ColumnDef implements org.ap
    */
   public IndexType index_type;
   public String index_name;
+  public Map<String,String> index_options;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -68,7 +70,8 @@ public class ColumnDef implements org.ap
      * @see IndexType
      */
     INDEX_TYPE((short)3, "index_type"),
-    INDEX_NAME((short)4, "index_name");
+    INDEX_NAME((short)4, "index_name"),
+    INDEX_OPTIONS((short)5, "index_options");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -91,6 +94,8 @@ public class ColumnDef implements org.ap
           return INDEX_TYPE;
         case 4: // INDEX_NAME
           return INDEX_NAME;
+        case 5: // INDEX_OPTIONS
+          return INDEX_OPTIONS;
         default:
           return null;
       }
@@ -143,6 +148,10 @@ public class ColumnDef implements org.ap
         new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, IndexType.class)));
     tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.INDEX_OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("index_options", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        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))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnDef.class, metaDataMap);
   }
@@ -176,6 +185,21 @@ public class ColumnDef implements org.ap
     if (other.isSetIndex_name()) {
       this.index_name = other.index_name;
     }
+    if (other.isSetIndex_options()) {
+      Map<String,String> __this__index_options = new HashMap<String,String>();
+      for (Map.Entry<String, String> other_element : other.index_options.entrySet()) {
+
+        String other_element_key = other_element.getKey();
+        String other_element_value = other_element.getValue();
+
+        String __this__index_options_copy_key = other_element_key;
+
+        String __this__index_options_copy_value = other_element_value;
+
+        __this__index_options.put(__this__index_options_copy_key, __this__index_options_copy_value);
+      }
+      this.index_options = __this__index_options;
+    }
   }
 
   public ColumnDef deepCopy() {
@@ -188,6 +212,7 @@ public class ColumnDef implements org.ap
     this.validation_class = null;
     this.index_type = null;
     this.index_name = null;
+    this.index_options = null;
   }
 
   public byte[] getName() {
@@ -304,6 +329,41 @@ public class ColumnDef implements org.ap
     }
   }
 
+  public int getIndex_optionsSize() {
+    return (this.index_options == null) ? 0 : this.index_options.size();
+  }
+
+  public void putToIndex_options(String key, String val) {
+    if (this.index_options == null) {
+      this.index_options = new HashMap<String,String>();
+    }
+    this.index_options.put(key, val);
+  }
+
+  public Map<String,String> getIndex_options() {
+    return this.index_options;
+  }
+
+  public ColumnDef setIndex_options(Map<String,String> index_options) {
+    this.index_options = index_options;
+    return this;
+  }
+
+  public void unsetIndex_options() {
+    this.index_options = null;
+  }
+
+  /** Returns true if field index_options is set (has been assigned a value) and false otherwise */
+  public boolean isSetIndex_options() {
+    return this.index_options != null;
+  }
+
+  public void setIndex_optionsIsSet(boolean value) {
+    if (!value) {
+      this.index_options = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case NAME:
@@ -338,6 +398,14 @@ public class ColumnDef implements org.ap
       }
       break;
 
+    case INDEX_OPTIONS:
+      if (value == null) {
+        unsetIndex_options();
+      } else {
+        setIndex_options((Map<String,String>)value);
+      }
+      break;
+
     }
   }
 
@@ -355,6 +423,9 @@ public class ColumnDef implements org.ap
     case INDEX_NAME:
       return getIndex_name();
 
+    case INDEX_OPTIONS:
+      return getIndex_options();
+
     }
     throw new IllegalStateException();
   }
@@ -374,6 +445,8 @@ public class ColumnDef implements org.ap
       return isSetIndex_type();
     case INDEX_NAME:
       return isSetIndex_name();
+    case INDEX_OPTIONS:
+      return isSetIndex_options();
     }
     throw new IllegalStateException();
   }
@@ -427,6 +500,15 @@ public class ColumnDef implements org.ap
         return false;
     }
 
+    boolean this_present_index_options = true && this.isSetIndex_options();
+    boolean that_present_index_options = true && that.isSetIndex_options();
+    if (this_present_index_options || that_present_index_options) {
+      if (!(this_present_index_options && that_present_index_options))
+        return false;
+      if (!this.index_options.equals(that.index_options))
+        return false;
+    }
+
     return true;
   }
 
@@ -454,6 +536,11 @@ public class ColumnDef implements org.ap
     if (present_index_name)
       builder.append(index_name);
 
+    boolean present_index_options = true && (isSetIndex_options());
+    builder.append(present_index_options);
+    if (present_index_options)
+      builder.append(index_options);
+
     return builder.toHashCode();
   }
 
@@ -505,6 +592,16 @@ public class ColumnDef implements org.ap
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetIndex_options()).compareTo(typedOther.isSetIndex_options());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetIndex_options()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_options, typedOther.index_options);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -550,6 +647,25 @@ public class ColumnDef implements org.ap
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           }
           break;
+        case 5: // INDEX_OPTIONS
+          if (field.type == org.apache.thrift.protocol.TType.MAP) {
+            {
+              org.apache.thrift.protocol.TMap _map29 = iprot.readMapBegin();
+              this.index_options = new HashMap<String,String>(2*_map29.size);
+              for (int _i30 = 0; _i30 < _map29.size; ++_i30)
+              {
+                String _key31;
+                String _val32;
+                _key31 = iprot.readString();
+                _val32 = iprot.readString();
+                this.index_options.put(_key31, _val32);
+              }
+              iprot.readMapEnd();
+            }
+          } else { 
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
         default:
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
       }
@@ -589,6 +705,21 @@ public class ColumnDef implements org.ap
         oprot.writeFieldEnd();
       }
     }
+    if (this.index_options != null) {
+      if (isSetIndex_options()) {
+        oprot.writeFieldBegin(INDEX_OPTIONS_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.index_options.size()));
+          for (Map.Entry<String, String> _iter33 : this.index_options.entrySet())
+          {
+            oprot.writeString(_iter33.getKey());
+            oprot.writeString(_iter33.getValue());
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+    }
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
@@ -633,6 +764,16 @@ public class ColumnDef implements org.ap
       }
       first = false;
     }
+    if (isSetIndex_options()) {
+      if (!first) sb.append(", ");
+      sb.append("index_options:");
+      if (this.index_options == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.index_options);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
@@ -647,21 +788,5 @@ public class ColumnDef implements org.ap
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnOrSuperColumn.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnOrSuperColumn.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnOrSuperColumn.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnOrSuperColumn.java Tue Aug 30 14:25:53 2011
@@ -632,21 +632,5 @@ public class ColumnOrSuperColumn impleme
     // check for required fields
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnParent.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnParent.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnParent.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnParent.java Tue Aug 30 14:25:53 2011
@@ -444,21 +444,5 @@ public class ColumnParent implements org
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnPath.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnPath.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnPath.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ColumnPath.java Tue Aug 30 14:25:53 2011
@@ -555,21 +555,5 @@ public class ColumnPath implements org.a
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterColumn.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterColumn.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterColumn.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterColumn.java Tue Aug 30 14:25:53 2011
@@ -438,23 +438,5 @@ public class CounterColumn implements or
     // alas, we cannot check 'value' because it's a primitive and you chose the non-beans generator.
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java Tue Aug 30 14:25:53 2011
@@ -477,21 +477,5 @@ public class CounterSuperColumn implemen
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlResult.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlResult.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlResult.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlResult.java Tue Aug 30 14:25:53 2011
@@ -469,14 +469,14 @@ public class CqlResult implements org.ap
         case 2: // ROWS
           if (field.type == org.apache.thrift.protocol.TType.LIST) {
             {
-              org.apache.thrift.protocol.TList _list51 = iprot.readListBegin();
-              this.rows = new ArrayList<CqlRow>(_list51.size);
-              for (int _i52 = 0; _i52 < _list51.size; ++_i52)
+              org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
+              this.rows = new ArrayList<CqlRow>(_list56.size);
+              for (int _i57 = 0; _i57 < _list56.size; ++_i57)
               {
-                CqlRow _elem53;
-                _elem53 = new CqlRow();
-                _elem53.read(iprot);
-                this.rows.add(_elem53);
+                CqlRow _elem58;
+                _elem58 = new CqlRow();
+                _elem58.read(iprot);
+                this.rows.add(_elem58);
               }
               iprot.readListEnd();
             }
@@ -517,9 +517,9 @@ public class CqlResult implements org.ap
         oprot.writeFieldBegin(ROWS_FIELD_DESC);
         {
           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.rows.size()));
-          for (CqlRow _iter54 : this.rows)
+          for (CqlRow _iter59 : this.rows)
           {
-            _iter54.write(oprot);
+            _iter59.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -574,23 +574,5 @@ public class CqlResult implements org.ap
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlRow.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlRow.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlRow.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlRow.java Tue Aug 30 14:25:53 2011
@@ -395,14 +395,14 @@ public class CqlRow implements org.apach
         case 2: // COLUMNS
           if (field.type == org.apache.thrift.protocol.TType.LIST) {
             {
-              org.apache.thrift.protocol.TList _list47 = iprot.readListBegin();
-              this.columns = new ArrayList<Column>(_list47.size);
-              for (int _i48 = 0; _i48 < _list47.size; ++_i48)
+              org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
+              this.columns = new ArrayList<Column>(_list52.size);
+              for (int _i53 = 0; _i53 < _list52.size; ++_i53)
               {
-                Column _elem49;
-                _elem49 = new Column();
-                _elem49.read(iprot);
-                this.columns.add(_elem49);
+                Column _elem54;
+                _elem54 = new Column();
+                _elem54.read(iprot);
+                this.columns.add(_elem54);
               }
               iprot.readListEnd();
             }
@@ -434,9 +434,9 @@ public class CqlRow implements org.apach
       oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
       {
         oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columns.size()));
-        for (Column _iter50 : this.columns)
+        for (Column _iter55 : this.columns)
         {
-          _iter50.write(oprot);
+          _iter55.write(oprot);
         }
         oprot.writeListEnd();
       }
@@ -480,21 +480,5 @@ public class CqlRow implements org.apach
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java Tue Aug 30 14:25:53 2011
@@ -529,23 +529,5 @@ public class Deletion implements org.apa
     // check for required fields
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java Tue Aug 30 14:25:53 2011
@@ -575,23 +575,5 @@ public class IndexClause implements org.
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java Tue Aug 30 14:25:53 2011
@@ -563,21 +563,5 @@ public class IndexExpression implements 
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java Tue Aug 30 14:25:53 2011
@@ -32,7 +32,8 @@ import java.util.HashMap;
 import org.apache.thrift.TEnum;
 
 public enum IndexType implements org.apache.thrift.TEnum {
-  KEYS(0);
+  KEYS(0),
+  CUSTOM(1);
 
   private final int value;
 
@@ -55,6 +56,8 @@ public enum IndexType implements org.apa
     switch (value) {
       case 0:
         return KEYS;
+      case 1:
+        return CUSTOM;
       default:
         return null;
     }

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java Tue Aug 30 14:25:53 2011
@@ -335,21 +335,5 @@ public class InvalidRequestException ext
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java Tue Aug 30 14:25:53 2011
@@ -438,23 +438,5 @@ public class KeyCount implements org.apa
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java Tue Aug 30 14:25:53 2011
@@ -746,23 +746,5 @@ public class KeyRange implements org.apa
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java Tue Aug 30 14:25:53 2011
@@ -484,21 +484,5 @@ public class KeySlice implements org.apa
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

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=1163228&r1=1163227&r2=1163228&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 Aug 30 14:25:53 2011
@@ -718,15 +718,15 @@ public class KsDef implements org.apache
         case 3: // STRATEGY_OPTIONS
           if (field.type == org.apache.thrift.protocol.TType.MAP) {
             {
-              org.apache.thrift.protocol.TMap _map38 = iprot.readMapBegin();
-              this.strategy_options = new HashMap<String,String>(2*_map38.size);
-              for (int _i39 = 0; _i39 < _map38.size; ++_i39)
+              org.apache.thrift.protocol.TMap _map43 = iprot.readMapBegin();
+              this.strategy_options = new HashMap<String,String>(2*_map43.size);
+              for (int _i44 = 0; _i44 < _map43.size; ++_i44)
               {
-                String _key40;
-                String _val41;
-                _key40 = iprot.readString();
-                _val41 = iprot.readString();
-                this.strategy_options.put(_key40, _val41);
+                String _key45;
+                String _val46;
+                _key45 = iprot.readString();
+                _val46 = iprot.readString();
+                this.strategy_options.put(_key45, _val46);
               }
               iprot.readMapEnd();
             }
@@ -745,14 +745,14 @@ public class KsDef implements org.apache
         case 5: // CF_DEFS
           if (field.type == org.apache.thrift.protocol.TType.LIST) {
             {
-              org.apache.thrift.protocol.TList _list42 = iprot.readListBegin();
-              this.cf_defs = new ArrayList<CfDef>(_list42.size);
-              for (int _i43 = 0; _i43 < _list42.size; ++_i43)
+              org.apache.thrift.protocol.TList _list47 = iprot.readListBegin();
+              this.cf_defs = new ArrayList<CfDef>(_list47.size);
+              for (int _i48 = 0; _i48 < _list47.size; ++_i48)
               {
-                CfDef _elem44;
-                _elem44 = new CfDef();
-                _elem44.read(iprot);
-                this.cf_defs.add(_elem44);
+                CfDef _elem49;
+                _elem49 = new CfDef();
+                _elem49.read(iprot);
+                this.cf_defs.add(_elem49);
               }
               iprot.readListEnd();
             }
@@ -798,10 +798,10 @@ public class KsDef implements org.apache
         oprot.writeFieldBegin(STRATEGY_OPTIONS_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.strategy_options.size()));
-          for (Map.Entry<String, String> _iter45 : this.strategy_options.entrySet())
+          for (Map.Entry<String, String> _iter50 : this.strategy_options.entrySet())
           {
-            oprot.writeString(_iter45.getKey());
-            oprot.writeString(_iter45.getValue());
+            oprot.writeString(_iter50.getKey());
+            oprot.writeString(_iter50.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -817,9 +817,9 @@ public class KsDef implements org.apache
       oprot.writeFieldBegin(CF_DEFS_FIELD_DESC);
       {
         oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.cf_defs.size()));
-        for (CfDef _iter46 : this.cf_defs)
+        for (CfDef _iter51 : this.cf_defs)
         {
-          _iter46.write(oprot);
+          _iter51.write(oprot);
         }
         oprot.writeListEnd();
       }
@@ -901,23 +901,5 @@ public class KsDef implements org.apache
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Mutation.java Tue Aug 30 14:25:53 2011
@@ -428,21 +428,5 @@ public class Mutation implements org.apa
     // check for required fields
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java Tue Aug 30 14:25:53 2011
@@ -231,21 +231,5 @@ public class NotFoundException extends E
     // check for required fields
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SchemaDisagreementException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SchemaDisagreementException.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SchemaDisagreementException.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SchemaDisagreementException.java Tue Aug 30 14:25:53 2011
@@ -231,21 +231,5 @@ public class SchemaDisagreementException
     // check for required fields
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SlicePredicate.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SlicePredicate.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SlicePredicate.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SlicePredicate.java Tue Aug 30 14:25:53 2011
@@ -473,21 +473,5 @@ public class SlicePredicate implements o
     // check for required fields
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SliceRange.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SliceRange.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SliceRange.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SliceRange.java Tue Aug 30 14:25:53 2011
@@ -659,23 +659,5 @@ public class SliceRange implements org.a
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java Tue Aug 30 14:25:53 2011
@@ -483,21 +483,5 @@ public class SuperColumn implements org.
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TimedOutException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TimedOutException.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TimedOutException.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TimedOutException.java Tue Aug 30 14:25:53 2011
@@ -231,21 +231,5 @@ public class TimedOutException extends E
     // check for required fields
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java Tue Aug 30 14:25:53 2011
@@ -562,21 +562,5 @@ public class TokenRange implements org.a
     }
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/UnavailableException.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/UnavailableException.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/UnavailableException.java (original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/UnavailableException.java Tue Aug 30 14:25:53 2011
@@ -231,21 +231,5 @@ public class UnavailableException extend
     // check for required fields
   }
 
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      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);
-    }
-  }
-
 }
 

Modified: cassandra/trunk/src/avro/internode.genavro
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/avro/internode.genavro?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/avro/internode.genavro (original)
+++ cassandra/trunk/src/avro/internode.genavro Tue Aug 30 14:25:53 2011
@@ -18,6 +18,9 @@
 
 /**
  * Cassandra internal/internode communication protocol
+ *
+ * NOTE: in order to maintain backwards compatibility you *must*
+ *       only append new fields *and* they must have a default value.
  */
 @namespace("org.apache.cassandra")
 
@@ -25,7 +28,8 @@ protocol InterNode {
     @aliases(["org.apache.cassandra.config.avro.IndexType"])
     @namespace("org.apache.cassandra.db.migration.avro")
     enum IndexType {
-        KEYS
+        KEYS,
+        CUSTOM
     }
 
     @aliases(["org.apache.cassandra.config.avro.ColumnDef"])
@@ -35,6 +39,7 @@ protocol InterNode {
         string validation_class;
         union { IndexType, null } index_type;
         union { string, null } index_name;
+        union { null, map<string> } index_options = null;
     }
 
     @aliases(["org.apache.cassandra.config.avro.CfDef"])

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=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java Tue Aug 30 14:25:53 2011
@@ -1689,8 +1689,17 @@ public class CliClient
         {
             sb.append("," + NEWLINE);
             sb.append(TAB + TAB + "index_name : '" + CliUtils.escapeSQLString(colDef.index_name) + "'," + NEWLINE);
-            sb.append(TAB + TAB + "index_type : " + CliUtils.escapeSQLString(Integer.toString(colDef.index_type.getValue())));
+            sb.append(TAB + TAB + "index_type : " + CliUtils.escapeSQLString(Integer.toString(colDef.index_type.getValue())) + "," + NEWLINE);
 
+            if (colDef.index_options != null)
+            {
+                sb.append(TAB + TAB + "index_options : {"+NEWLINE);        
+                for (Map.Entry<String, String> entry : colDef.index_options.entrySet())
+                {
+                    sb.append(TAB + TAB + TAB + CliUtils.escapeSQLString(entry.getKey()) + ": '" + CliUtils.escapeSQLString(entry.getValue()) + "'," + NEWLINE);
+                }
+                sb.append("}");
+            }
         }
         sb.append("}");
     }
@@ -2187,6 +2196,10 @@ public class CliClient
                 {
                     columnDefinition.setIndex_type(getIndexTypeFromString(metaVal));
                 }
+                else if (metaKey.equals("index_options"))
+                {
+                    columnDefinition.setIndex_options(getStrategyOptionsFromTree(metaPair.getChild(1)));
+                }
                 else if (metaKey.equals("index_name"))
                 {
                     columnDefinition.setIndex_name(metaVal);    

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=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java Tue Aug 30 14:25:53 2011
@@ -788,7 +788,8 @@ public final class CFMetaData
             if (oldDef == null)
                 continue;
             oldDef.setValidator(TypeParser.parse(def.validation_class));
-            oldDef.setIndexType(def.index_type == null ? null : org.apache.cassandra.thrift.IndexType.valueOf(def.index_type.name()));
+            oldDef.setIndexType(def.index_type == null ? null : org.apache.cassandra.thrift.IndexType.valueOf(def.index_type.name()),
+                                ColumnDefinition.getStringMap(def.index_options));
             oldDef.setIndexName(def.index_name == null ? null : def.index_name.toString());
         }
         // add the new ones coming in.
@@ -798,6 +799,7 @@ public final class CFMetaData
             ColumnDefinition cd = new ColumnDefinition(def.name, 
                                                        dValidClass,
                                                        def.index_type == null ? null : org.apache.cassandra.thrift.IndexType.valueOf(def.index_type.toString()), 
+                                                       ColumnDefinition.getStringMap(def.index_options),
                                                        def.index_name == null ? null : def.index_name.toString());
             column_metadata.put(cd.name, cd);
         }
@@ -895,6 +897,7 @@ public final class CFMetaData
             org.apache.cassandra.thrift.ColumnDef tcd = new org.apache.cassandra.thrift.ColumnDef();
             tcd.setIndex_name(cd.getIndexName());
             tcd.setIndex_type(cd.getIndexType());
+            tcd.setIndex_options(cd.getIndexOptions());
             tcd.setName(cd.name);
             tcd.setValidation_class(cd.getValidator().toString());
             column_meta.add(tcd);

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/ColumnDefinition.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/ColumnDefinition.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/ColumnDefinition.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/ColumnDefinition.java Tue Aug 30 14:25:53 2011
@@ -33,17 +33,20 @@ import org.apache.cassandra.utils.ByteBu
 
 public class ColumnDefinition
 {
+    
     public final ByteBuffer name;
     private AbstractType validator;
     private IndexType index_type;
+    private Map<String,String> index_options;
     private String index_name;
-
-    public ColumnDefinition(ByteBuffer name, AbstractType validator, IndexType index_type, String index_name)
+    
+    public ColumnDefinition(ByteBuffer name, AbstractType validator, IndexType index_type, Map<String, String> index_options, String index_name) throws ConfigurationException
     {
         this.name = name;
-        this.index_type = index_type;
         this.index_name = index_name;
         this.validator = validator;
+    
+        this.setIndexType(index_type, index_options);
     }
 
     @Override
@@ -59,6 +62,8 @@ public class ColumnDefinition
             return false;
         if (index_type != that.index_type)
             return false;
+        if (index_options != null ? !index_options.equals(that.index_options) : that.index_options != null)
+            return false;
         if (!name.equals(that.name))
             return false;
         return !(validator != null ? !validator.equals(that.validator) : that.validator != null);
@@ -70,6 +75,7 @@ public class ColumnDefinition
         int result = name != null ? name.hashCode() : 0;
         result = 31 * result + (validator != null ? validator.hashCode() : 0);
         result = 31 * result + (index_type != null ? index_type.hashCode() : 0);
+        result = 31 * result + (index_options != null ? index_options.hashCode() : 0);
         result = 31 * result + (index_name != null ? index_name.hashCode() : 0);
         return result;
     }
@@ -83,6 +89,7 @@ public class ColumnDefinition
                       ? null
                       : org.apache.cassandra.db.migration.avro.IndexType.valueOf(index_type.name());
         cd.index_name = index_name == null ? null : new Utf8(index_name);
+        cd.index_options = getCharSequenceMap(index_options);
         return cd;
     }
 
@@ -93,7 +100,7 @@ public class ColumnDefinition
         try
         {
             AbstractType validatorType = TypeParser.parse(cd.validation_class);
-            return new ColumnDefinition(ByteBufferUtil.clone(cd.name), validatorType, index_type, index_name);
+            return new ColumnDefinition(ByteBufferUtil.clone(cd.name), validatorType, index_type, getStringMap(cd.index_options), index_name);
         }
         catch (ConfigurationException e)
         {
@@ -106,6 +113,7 @@ public class ColumnDefinition
         return new ColumnDefinition(ByteBufferUtil.clone(thriftColumnDef.name),
                                     TypeParser.parse(thriftColumnDef.validation_class),
                                     thriftColumnDef.index_type,
+                                    thriftColumnDef.index_options,
                                     thriftColumnDef.index_name);
     }
 
@@ -142,16 +150,22 @@ public class ColumnDefinition
         index_name = s;
     }
 
+    public void setIndexType(IndexType index_type, Map<String,String> index_options) throws ConfigurationException
+    {
+        this.index_type = index_type;
+        this.index_options = index_options;         
+    }
+
     public IndexType getIndexType()
     {
         return index_type;
     }
-
-    public void setIndexType(IndexType index_type)
+    
+    public Map<String,String> getIndexOptions()
     {
-        this.index_type = index_type;
+        return index_options;
     }
-
+    
     public AbstractType getValidator()
     {
         return validator;
@@ -161,4 +175,31 @@ public class ColumnDefinition
     {
         this.validator = validator;
     }
+    
+    public static Map<String,String> getStringMap(Map<CharSequence, CharSequence> charMap)
+    {
+        if (charMap == null)
+            return null;
+        
+        Map<String,String> stringMap = new HashMap<String, String>();
+            
+        for (Map.Entry<CharSequence, CharSequence> entry : charMap.entrySet())        
+            stringMap.put(entry.getKey().toString(), entry.getValue().toString());
+            
+            
+        return stringMap;
+    }
+    
+    private static Map<CharSequence, CharSequence> getCharSequenceMap(Map<String,String> stringMap)
+    {
+        if (stringMap == null)
+            return null;
+        
+        Map<CharSequence, CharSequence> charMap = new HashMap<CharSequence, CharSequence>();
+        
+        for (Map.Entry<String, String> entry : stringMap.entrySet())
+            charMap.put(new Utf8(entry.getKey()), new Utf8(entry.getValue()));
+        
+        return charMap;
+    }
 }

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/AlterTableStatement.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/AlterTableStatement.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/AlterTableStatement.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/AlterTableStatement.java Tue Aug 30 14:25:53 2011
@@ -70,6 +70,7 @@ public class AlterTableStatement
                 cfDef.column_metadata.add(new ColumnDefinition(columnName,
                                                                TypeParser.parse(validator),
                                                                null,
+                                                               null,
                                                                null).toAvro());
                 break;
 

Modified: cassandra/trunk/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java Tue Aug 30 14:25:53 2011
@@ -234,7 +234,7 @@ public class CreateColumnFamilyStatement
                 ByteBuffer columnName = comparator.fromString(col.getKey().getText());
                 String validatorClassName = comparators.containsKey(col.getValue()) ? comparators.get(col.getValue()) : col.getValue();
                 AbstractType<?> validator = TypeParser.parse(validatorClassName);
-                columnDefs.put(columnName, new ColumnDefinition(columnName, validator, null, null));
+                columnDefs.put(columnName, new ColumnDefinition(columnName, validator, null, null, null));
             }
             catch (ConfigurationException e)
             {

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/index/SecondaryIndex.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/index/SecondaryIndex.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/index/SecondaryIndex.java Tue Aug 30 14:25:53 2011
@@ -28,14 +28,11 @@ import java.util.concurrent.Future;
 import java.util.concurrent.FutureTask;
 
 import org.apache.cassandra.config.ColumnDefinition;
-import org.apache.cassandra.db.ColumnFamilyStore;
-import org.apache.cassandra.db.DecoratedKey;
-import org.apache.cassandra.db.IColumn;
-import org.apache.cassandra.db.SystemTable;
+import org.apache.cassandra.config.ConfigurationException;
+import org.apache.cassandra.db.*;
 import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.db.index.keys.KeysIndex;
 import org.apache.cassandra.io.sstable.ReducingKeyIterator;
-import org.apache.cassandra.thrift.IndexType;
 import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,27 +47,29 @@ public abstract class SecondaryIndex
     
     private static final Logger logger = LoggerFactory.getLogger(SecondaryIndex.class);
     
+    public static final String CUSTOM_INDEX_OPTION_NAME = "class_name";
+
     /**
      * Base CF that has many indexes
      */
-    protected final ColumnFamilyStore baseCfs;
+    protected ColumnFamilyStore baseCfs;
+    
     
     /**
      * The column definition which this index is responsible for
      */
-    protected final ColumnDefinition columnDef;
-
+    protected ColumnDefinition columnDef;
     
-    public SecondaryIndex(ColumnFamilyStore baseCfs, ColumnDefinition columnDef)
-    {
-        this.baseCfs = baseCfs;
-        this.columnDef = columnDef;
-    }
+    /**
+     * Perform any initialization work
+     */
+    public abstract void init();
     
     /**
-     * @return The type of index.
+     * Validates the index_options passed in the ColumnDef
+     * @throws ConfigurationException
      */
-    public abstract IndexType type();
+    public abstract void validateOptions() throws ConfigurationException;
 
     
     /**
@@ -114,8 +113,7 @@ public abstract class SecondaryIndex
      * @param rowKey the row identifier that was completed
      */
     public abstract void commitRow(ByteBuffer rowKey);
-    
-    
+      
     /**
      * Called at query time
      * Creates a implementation specific searcher instance for this index type
@@ -238,6 +236,71 @@ public abstract class SecondaryIndex
        
         new Thread(f, "Creating index: " + columnDef.getIndexName()).start();
         return f;
-    }    
-     
+    }
+    
+    public ColumnFamilyStore getBaseCfs()
+    {
+        return baseCfs;
+    }
+
+    private void setBaseCfs(ColumnFamilyStore baseCfs)
+    {
+        this.baseCfs = baseCfs;
+    }
+
+    public ColumnDefinition getColumnDef()
+    {
+        return columnDef;
+    }
+
+    private void setColumnDef(ColumnDefinition columnDef)
+    {
+        this.columnDef = columnDef;
+    }
+    
+    /**
+     * This is the primary way to create a secondary index instance for a CF column.
+     * It will validate the index_options before initializing.
+     * 
+     * @param baseCfs the source of data for the Index
+     * @param cdef the meta information about this column (index_type, index_options, name, etc...)
+     * @param init specify if this index should be initialized after allocated
+     * @return The secondary index instance for this column
+     * @throws ConfigurationException
+     */
+    public static SecondaryIndex createInstance(ColumnFamilyStore baseCfs, ColumnDefinition cdef, boolean init) throws ConfigurationException
+    {
+        SecondaryIndex index = null;
+        
+        switch (cdef.getIndexType())
+        {
+        case KEYS: 
+            index = new KeysIndex();
+            break;
+        case CUSTOM:           
+            assert cdef.getIndexOptions() != null;
+            String class_name = cdef.getIndexOptions().get(CUSTOM_INDEX_OPTION_NAME);
+            assert class_name != null;
+            try
+            {
+                index = (SecondaryIndex) Class.forName(class_name).newInstance();
+            } 
+            catch (Exception e)
+            {
+                throw new RuntimeException(e);
+            }            
+            break;
+            default:
+                throw new RuntimeException("Unknown index type: " + cdef.getIndexName());
+        };
+        
+        index.setColumnDef(cdef);
+        index.validateOptions();
+        index.setBaseCfs(baseCfs);
+        
+        if (init)
+            index.init();
+        
+        return index;
+    }
 }

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java Tue Aug 30 14:25:53 2011
@@ -18,6 +18,7 @@
 package org.apache.cassandra.db.index;
 
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 import java.nio.ByteBuffer;
 import java.util.*;
 import java.util.concurrent.ConcurrentNavigableMap;
@@ -26,6 +27,7 @@ import java.util.concurrent.ExecutionExc
 import java.util.concurrent.Future;
 
 import org.apache.cassandra.config.ColumnDefinition;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.db.*;
 import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.db.filter.IFilter;
@@ -49,7 +51,7 @@ import org.slf4j.LoggerFactory;
 public class SecondaryIndexManager
 {
     private static final Logger logger = LoggerFactory.getLogger(SecondaryIndexManager.class);
-    
+
     /**
      * Organized the indexes by column name
      */
@@ -156,15 +158,14 @@ public class SecondaryIndexManager
         assert cdef.getIndexType() != null;
         logger.info("Creating new index : {}",cdef);
         
-        SecondaryIndex index = null;
-        switch (cdef.getIndexType())
+        SecondaryIndex index;
+        try
         {
-        case KEYS:
-            index = new KeysIndex(baseCfs, cdef);
-            break;
-        default:
-            throw new RuntimeException("Unknown index type: " + cdef.getIndexName());
-        }
+            index = SecondaryIndex.createInstance(baseCfs, cdef, true);
+        } catch (ConfigurationException e)
+        {
+            throw new RuntimeException(e);
+        }               
 
         // link in indexedColumns. this means that writes will add new data to
         // the index immediately,
@@ -372,7 +373,7 @@ public class SecondaryIndexManager
     {
         List<SecondaryIndexSearcher> indexSearchers = new ArrayList<SecondaryIndexSearcher>();
         
-        Map<IndexType, Set<ByteBuffer>> groupByIndexType = new HashMap<IndexType, Set<ByteBuffer>>();
+        Map<String, Set<ByteBuffer>> groupByIndexType = new HashMap<String, Set<ByteBuffer>>();
  
         
         //Group columns by type
@@ -383,19 +384,19 @@ public class SecondaryIndexManager
             if(index == null)
                 continue;
             
-            Set<ByteBuffer> columns = groupByIndexType.get(index.type());
+            Set<ByteBuffer> columns = groupByIndexType.get(index.getClass().getCanonicalName());
             
             if (columns == null)
             {
                 columns = new HashSet<ByteBuffer>();
-                groupByIndexType.put(index.type(), columns);
+                groupByIndexType.put(index.getClass().getCanonicalName(), columns);
             }
             
             columns.add(ix.column_name);        
         }
         
         //create searcher per type
-        for (Map.Entry<IndexType, Set<ByteBuffer>> entry : groupByIndexType.entrySet())
+        for (Map.Entry<String, Set<ByteBuffer>> entry : groupByIndexType.entrySet())
         {
             indexSearchers.add( getIndexForColumn(entry.getValue().iterator().next()).createSecondaryIndexSearcher(entry.getValue()) );
         }
@@ -426,5 +427,6 @@ public class SecondaryIndexManager
         
         return indexSearchers.get(0).search(clause, range, dataFilter);
     }
+        
     
 }

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java Tue Aug 30 14:25:53 2011
@@ -27,6 +27,7 @@ import java.util.concurrent.ExecutionExc
 
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.ColumnDefinition;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.db.ColumnFamily;
 import org.apache.cassandra.db.ColumnFamilyStore;
@@ -56,18 +57,22 @@ import org.slf4j.LoggerFactory;
 public class KeysIndex extends SecondaryIndex
 {
     private static final Logger logger = LoggerFactory.getLogger(KeysIndex.class);
-    private final ColumnFamilyStore indexedCfs;
+    private ColumnFamilyStore indexedCfs;
     private final ConcurrentSkipListSet<Memtable> fullMemtables;
 
-    public KeysIndex(ColumnFamilyStore baseCfs, ColumnDefinition cdef)
+    public KeysIndex() 
     {
-        super(baseCfs, cdef);
         fullMemtables = new ConcurrentSkipListSet<Memtable>();
-
-        CFMetaData indexedCfMetadata = CFMetaData.newIndexMetadata(baseCfs.metadata, cdef, indexComparator());
+    }
+    
+    public void init()
+    {
+        assert baseCfs != null && columnDef != null;
+        
+        CFMetaData indexedCfMetadata = CFMetaData.newIndexMetadata(baseCfs.metadata, columnDef, indexComparator());
         indexedCfs = ColumnFamilyStore.createColumnFamilyStore(baseCfs.table,
                                                                indexedCfMetadata.cfName,
-                                                               new LocalPartitioner(cdef.getValidator()),
+                                                               new LocalPartitioner(columnDef.getValidator()),
                                                                indexedCfMetadata);
     }
 
@@ -79,11 +84,6 @@ public class KeysIndex extends Secondary
                                         : new LocalByPartionerType(StorageService.getPartitioner());
     }
 
-    public IndexType type()
-    {
-        return IndexType.KEYS;
-    }
-
     @Override
     public void deleteColumn(DecoratedKey<?> valueKey, ByteBuffer rowKey, IColumn column)
     {
@@ -193,4 +193,10 @@ public class KeysIndex extends Secondary
     {
         indexedCfs.renameSSTables(indexedCfs.columnFamily.replace(baseCfs.columnFamily, newCfName));       
     }
+
+    @Override
+    public void validateOptions() throws ConfigurationException
+    {
+        // no options used
+    }
 }

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/GCInspector.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/GCInspector.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/GCInspector.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/GCInspector.java Tue Aug 30 14:25:53 2011
@@ -104,6 +104,10 @@ public class GCInspector
 
             Long previousCount = gccounts.get(gc.getName());
             Long count = gc.getCollectionCount();
+
+            if (count == 0)
+                continue;
+
             if (previousCount == null)
                 previousCount = 0L;
             gccounts.put(gc.getName(), count);

Modified: cassandra/trunk/src/java/org/apache/cassandra/thrift/ThriftValidation.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/thrift/ThriftValidation.java?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/thrift/ThriftValidation.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/thrift/ThriftValidation.java Tue Aug 30 14:25:53 2011
@@ -23,26 +23,21 @@ package org.apache.cassandra.thrift;
 import java.nio.ByteBuffer;
 import java.util.*;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.cassandra.config.*;
 import org.apache.cassandra.db.*;
-import org.apache.cassandra.db.marshal.AbstractType;
-import org.apache.cassandra.db.marshal.AsciiType;
-import org.apache.cassandra.db.marshal.MarshalException;
-import org.apache.cassandra.db.marshal.TypeParser;
+import org.apache.cassandra.db.index.SecondaryIndex;
+import org.apache.cassandra.db.index.SecondaryIndexManager;
+import org.apache.cassandra.db.marshal.*;
 import org.apache.cassandra.db.migration.Migration;
 import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.dht.RandomPartitioner;
 import org.apache.cassandra.dht.Token;
-import org.apache.cassandra.locator.AbstractReplicationStrategy;
-import org.apache.cassandra.locator.IEndpointSnitch;
-import org.apache.cassandra.locator.NetworkTopologyStrategy;
-import org.apache.cassandra.locator.TokenMetadata;
+import org.apache.cassandra.locator.*;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This has a lot of building blocks for CassandraServer to call to make sure it has valid input
@@ -639,6 +634,18 @@ public class ThriftValidation
                         if (!oldCd.getIndexName().equals(c.index_name))
                             throw new InvalidRequestException("Cannot modify index name");
                     }
+                    
+                    if (c.index_type == IndexType.CUSTOM)
+                    {
+                        if (c.index_options == null || !c.index_options.containsKey(SecondaryIndex.CUSTOM_INDEX_OPTION_NAME))
+                            throw new InvalidRequestException("Required index option missing: " + SecondaryIndex.CUSTOM_INDEX_OPTION_NAME);                    
+                    }
+                    
+                    // Create the index type and validate the options
+                    ColumnDefinition cdef = ColumnDefinition.fromThrift(c);
+                   
+                    // This method validates the column metadata but does not intialize the index
+                    SecondaryIndex.createInstance(null, cdef, false);
                 }
             }
             validateMinMaxCompactionThresholds(cf_def);

Modified: cassandra/trunk/src/resources/org/apache/cassandra/cli/CliHelp.yaml
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/resources/org/apache/cassandra/cli/CliHelp.yaml?rev=1163228&r1=1163227&r2=1163228&view=diff
==============================================================================
--- cassandra/trunk/src/resources/org/apache/cassandra/cli/CliHelp.yaml (original)
+++ cassandra/trunk/src/resources/org/apache/cassandra/cli/CliHelp.yaml Tue Aug 30 14:25:53 2011
@@ -378,8 +378,14 @@ commands:
             - index_type: The type of index to be created.
 
               Suported values are:
-                - 0: for a KEYS based index
-
+                - KEYS: a ColumnFamily backed index
+                - CUSTOM: a user supplied index implementaion. You must supply a
+                  'class_name' field in the index_options with the full classname 
+                  of the implementation.
+            
+            - index_options: Optional additional options for index_type.
+              Options have the form {key:value}.
+                   
         - column_type: Type of columns this column family holds, valid values are
           Standard and Super. Default is Standard.
 
@@ -621,7 +627,13 @@ commands:
             - index_type: The type of index to be created.
 
               Suported values are:
-                - 0: for a KEYS based index
+                - KEYS: a ColumnFamily backed index
+                - CUSTOM: a user supplied index implementaion. You must supply a
+                  'class_name' field in the index_options with the full classname 
+                  of the implementation.
+            
+            - index_options: Optional additional options for index_type.
+              Options have the form {key:value}.
 
         - column_type: Type of columns this column family holds, valid values are
           Standard and Super. Default is Standard.



Mime
View raw message