cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1051679 [3/6] - in /cassandra/trunk: ./ conf/ interface/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/avro/ src/java/org/apache/cassandra/concurrent/ src/java/org/apache/cassandra/config/ src/java/or...
Date Tue, 21 Dec 2010 22:17:12 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=1051679&r1=1051678&r2=1051679&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 Dec 21 22:17:09 2010
@@ -71,6 +71,7 @@ public class CfDef implements TBase<CfDe
   private static final TField MEMTABLE_FLUSH_AFTER_MINS_FIELD_DESC = new TField("memtable_flush_after_mins", TType.I32, (short)21);
   private static final TField MEMTABLE_THROUGHPUT_IN_MB_FIELD_DESC = new TField("memtable_throughput_in_mb", TType.I32, (short)22);
   private static final TField MEMTABLE_OPERATIONS_IN_MILLIONS_FIELD_DESC = new TField("memtable_operations_in_millions", TType.DOUBLE, (short)23);
+  private static final TField REPLICATE_ON_WRITE_FIELD_DESC = new TField("replicate_on_write", TType.BOOL, (short)24);
 
   public String keyspace;
   public String name;
@@ -92,6 +93,7 @@ public class CfDef implements TBase<CfDe
   public int memtable_flush_after_mins;
   public int memtable_throughput_in_mb;
   public double memtable_operations_in_millions;
+  public boolean replicate_on_write;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements TFieldIdEnum {
@@ -114,7 +116,8 @@ public class CfDef implements TBase<CfDe
     KEY_CACHE_SAVE_PERIOD_IN_SECONDS((short)20, "key_cache_save_period_in_seconds"),
     MEMTABLE_FLUSH_AFTER_MINS((short)21, "memtable_flush_after_mins"),
     MEMTABLE_THROUGHPUT_IN_MB((short)22, "memtable_throughput_in_mb"),
-    MEMTABLE_OPERATIONS_IN_MILLIONS((short)23, "memtable_operations_in_millions");
+    MEMTABLE_OPERATIONS_IN_MILLIONS((short)23, "memtable_operations_in_millions"),
+    REPLICATE_ON_WRITE((short)24, "replicate_on_write");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -169,6 +172,8 @@ public class CfDef implements TBase<CfDe
           return MEMTABLE_THROUGHPUT_IN_MB;
         case 23: // MEMTABLE_OPERATIONS_IN_MILLIONS
           return MEMTABLE_OPERATIONS_IN_MILLIONS;
+        case 24: // REPLICATE_ON_WRITE
+          return REPLICATE_ON_WRITE;
         default:
           return null;
       }
@@ -221,7 +226,8 @@ public class CfDef implements TBase<CfDe
   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);
+  private static final int __REPLICATE_ON_WRITE_ISSET_ID = 12;
+  private BitSet __isset_bit_vector = new BitSet(13);
 
   public static final Map<_Fields, FieldMetaData> metaDataMap;
   static {
@@ -267,6 +273,8 @@ public class CfDef implements TBase<CfDe
         new FieldValueMetaData(TType.I32)));
     tmpMap.put(_Fields.MEMTABLE_OPERATIONS_IN_MILLIONS, new FieldMetaData("memtable_operations_in_millions", TFieldRequirementType.OPTIONAL, 
         new FieldValueMetaData(TType.DOUBLE)));
+    tmpMap.put(_Fields.REPLICATE_ON_WRITE, new FieldMetaData("replicate_on_write", TFieldRequirementType.OPTIONAL, 
+        new FieldValueMetaData(TType.BOOL)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     FieldMetaData.addStructMetaDataMap(CfDef.class, metaDataMap);
   }
@@ -282,6 +290,8 @@ public class CfDef implements TBase<CfDe
 
     this.read_repair_chance = 1;
 
+    this.replicate_on_write = false;
+
   }
 
   public CfDef(
@@ -339,6 +349,7 @@ public class CfDef implements TBase<CfDe
     this.memtable_flush_after_mins = other.memtable_flush_after_mins;
     this.memtable_throughput_in_mb = other.memtable_throughput_in_mb;
     this.memtable_operations_in_millions = other.memtable_operations_in_millions;
+    this.replicate_on_write = other.replicate_on_write;
   }
 
   public CfDef deepCopy() {
@@ -381,6 +392,8 @@ public class CfDef implements TBase<CfDe
     this.memtable_throughput_in_mb = 0;
     setMemtable_operations_in_millionsIsSet(false);
     this.memtable_operations_in_millions = 0.0;
+    this.replicate_on_write = false;
+
   }
 
   public String getKeyspace() {
@@ -866,6 +879,29 @@ public class CfDef implements TBase<CfDe
     __isset_bit_vector.set(__MEMTABLE_OPERATIONS_IN_MILLIONS_ISSET_ID, value);
   }
 
+  public boolean isReplicate_on_write() {
+    return this.replicate_on_write;
+  }
+
+  public CfDef setReplicate_on_write(boolean replicate_on_write) {
+    this.replicate_on_write = replicate_on_write;
+    setReplicate_on_writeIsSet(true);
+    return this;
+  }
+
+  public void unsetReplicate_on_write() {
+    __isset_bit_vector.clear(__REPLICATE_ON_WRITE_ISSET_ID);
+  }
+
+  /** Returns true if field replicate_on_write is set (has been asigned a value) and false otherwise */
+  public boolean isSetReplicate_on_write() {
+    return __isset_bit_vector.get(__REPLICATE_ON_WRITE_ISSET_ID);
+  }
+
+  public void setReplicate_on_writeIsSet(boolean value) {
+    __isset_bit_vector.set(__REPLICATE_ON_WRITE_ISSET_ID, value);
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case KEYSPACE:
@@ -1028,6 +1064,14 @@ public class CfDef implements TBase<CfDe
       }
       break;
 
+    case REPLICATE_ON_WRITE:
+      if (value == null) {
+        unsetReplicate_on_write();
+      } else {
+        setReplicate_on_write((Boolean)value);
+      }
+      break;
+
     }
   }
 
@@ -1093,6 +1137,9 @@ public class CfDef implements TBase<CfDe
     case MEMTABLE_OPERATIONS_IN_MILLIONS:
       return new Double(getMemtable_operations_in_millions());
 
+    case REPLICATE_ON_WRITE:
+      return new Boolean(isReplicate_on_write());
+
     }
     throw new IllegalStateException();
   }
@@ -1144,6 +1191,8 @@ public class CfDef implements TBase<CfDe
       return isSetMemtable_throughput_in_mb();
     case MEMTABLE_OPERATIONS_IN_MILLIONS:
       return isSetMemtable_operations_in_millions();
+    case REPLICATE_ON_WRITE:
+      return isSetReplicate_on_write();
     }
     throw new IllegalStateException();
   }
@@ -1341,6 +1390,15 @@ public class CfDef implements TBase<CfDe
         return false;
     }
 
+    boolean this_present_replicate_on_write = true && this.isSetReplicate_on_write();
+    boolean that_present_replicate_on_write = true && that.isSetReplicate_on_write();
+    if (this_present_replicate_on_write || that_present_replicate_on_write) {
+      if (!(this_present_replicate_on_write && that_present_replicate_on_write))
+        return false;
+      if (this.replicate_on_write != that.replicate_on_write)
+        return false;
+    }
+
     return true;
   }
 
@@ -1448,6 +1506,11 @@ public class CfDef implements TBase<CfDe
     if (present_memtable_operations_in_millions)
       builder.append(memtable_operations_in_millions);
 
+    boolean present_replicate_on_write = true && (isSetReplicate_on_write());
+    builder.append(present_replicate_on_write);
+    if (present_replicate_on_write)
+      builder.append(replicate_on_write);
+
     return builder.toHashCode();
   }
 
@@ -1659,6 +1722,16 @@ public class CfDef implements TBase<CfDe
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetReplicate_on_write()).compareTo(typedOther.isSetReplicate_on_write());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetReplicate_on_write()) {
+      lastComparison = TBaseHelper.compareTo(this.replicate_on_write, typedOther.replicate_on_write);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1745,14 +1818,14 @@ public class CfDef implements TBase<CfDe
         case 13: // COLUMN_METADATA
           if (field.type == TType.LIST) {
             {
-              TList _list25 = iprot.readListBegin();
-              this.column_metadata = new ArrayList<ColumnDef>(_list25.size);
-              for (int _i26 = 0; _i26 < _list25.size; ++_i26)
+              TList _list29 = iprot.readListBegin();
+              this.column_metadata = new ArrayList<ColumnDef>(_list29.size);
+              for (int _i30 = 0; _i30 < _list29.size; ++_i30)
               {
-                ColumnDef _elem27;
-                _elem27 = new ColumnDef();
-                _elem27.read(iprot);
-                this.column_metadata.add(_elem27);
+                ColumnDef _elem31;
+                _elem31 = new ColumnDef();
+                _elem31.read(iprot);
+                this.column_metadata.add(_elem31);
               }
               iprot.readListEnd();
             }
@@ -1839,6 +1912,14 @@ public class CfDef implements TBase<CfDe
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
+        case 24: // REPLICATE_ON_WRITE
+          if (field.type == TType.BOOL) {
+            this.replicate_on_write = iprot.readBool();
+            setReplicate_on_writeIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
         default:
           TProtocolUtil.skip(iprot, field.type);
       }
@@ -1912,9 +1993,9 @@ public class CfDef implements TBase<CfDe
         oprot.writeFieldBegin(COLUMN_METADATA_FIELD_DESC);
         {
           oprot.writeListBegin(new TList(TType.STRUCT, this.column_metadata.size()));
-          for (ColumnDef _iter28 : this.column_metadata)
+          for (ColumnDef _iter32 : this.column_metadata)
           {
-            _iter28.write(oprot);
+            _iter32.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -1973,6 +2054,11 @@ public class CfDef implements TBase<CfDe
       oprot.writeDouble(this.memtable_operations_in_millions);
       oprot.writeFieldEnd();
     }
+    if (isSetReplicate_on_write()) {
+      oprot.writeFieldBegin(REPLICATE_ON_WRITE_FIELD_DESC);
+      oprot.writeBool(this.replicate_on_write);
+      oprot.writeFieldEnd();
+    }
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
@@ -2129,6 +2215,12 @@ public class CfDef implements TBase<CfDe
       sb.append(this.memtable_operations_in_millions);
       first = false;
     }
+    if (isSetReplicate_on_write()) {
+      if (!first) sb.append(", ");
+      sb.append("replicate_on_write:");
+      sb.append(this.replicate_on_write);
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }

Added: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Counter.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Counter.java?rev=1051679&view=auto
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Counter.java (added)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Counter.java Tue Dec 21 22:17:09 2010
@@ -0,0 +1,433 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.cassandra.thrift;
+/*
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ */
+
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class Counter implements TBase<Counter, Counter._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Counter");
+
+  private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRUCT, (short)1);
+  private static final TField SUPER_COLUMN_FIELD_DESC = new TField("super_column", TType.STRUCT, (short)2);
+
+  public CounterColumn column;
+  public CounterSuperColumn super_column;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    COLUMN((short)1, "column"),
+    SUPER_COLUMN((short)2, "super_column");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // COLUMN
+          return COLUMN;
+        case 2: // SUPER_COLUMN
+          return SUPER_COLUMN;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.OPTIONAL, 
+        new StructMetaData(TType.STRUCT, CounterColumn.class)));
+    tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL, 
+        new StructMetaData(TType.STRUCT, CounterSuperColumn.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(Counter.class, metaDataMap);
+  }
+
+  public Counter() {
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Counter(Counter other) {
+    if (other.isSetColumn()) {
+      this.column = new CounterColumn(other.column);
+    }
+    if (other.isSetSuper_column()) {
+      this.super_column = new CounterSuperColumn(other.super_column);
+    }
+  }
+
+  public Counter deepCopy() {
+    return new Counter(this);
+  }
+
+  @Override
+  public void clear() {
+    this.column = null;
+    this.super_column = null;
+  }
+
+  public CounterColumn getColumn() {
+    return this.column;
+  }
+
+  public Counter setColumn(CounterColumn column) {
+    this.column = column;
+    return this;
+  }
+
+  public void unsetColumn() {
+    this.column = null;
+  }
+
+  /** Returns true if field column is set (has been asigned a value) and false otherwise */
+  public boolean isSetColumn() {
+    return this.column != null;
+  }
+
+  public void setColumnIsSet(boolean value) {
+    if (!value) {
+      this.column = null;
+    }
+  }
+
+  public CounterSuperColumn getSuper_column() {
+    return this.super_column;
+  }
+
+  public Counter setSuper_column(CounterSuperColumn super_column) {
+    this.super_column = super_column;
+    return this;
+  }
+
+  public void unsetSuper_column() {
+    this.super_column = null;
+  }
+
+  /** Returns true if field super_column is set (has been asigned a value) and false otherwise */
+  public boolean isSetSuper_column() {
+    return this.super_column != null;
+  }
+
+  public void setSuper_columnIsSet(boolean value) {
+    if (!value) {
+      this.super_column = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case COLUMN:
+      if (value == null) {
+        unsetColumn();
+      } else {
+        setColumn((CounterColumn)value);
+      }
+      break;
+
+    case SUPER_COLUMN:
+      if (value == null) {
+        unsetSuper_column();
+      } else {
+        setSuper_column((CounterSuperColumn)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case COLUMN:
+      return getColumn();
+
+    case SUPER_COLUMN:
+      return getSuper_column();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case COLUMN:
+      return isSetColumn();
+    case SUPER_COLUMN:
+      return isSetSuper_column();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Counter)
+      return this.equals((Counter)that);
+    return false;
+  }
+
+  public boolean equals(Counter that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_column = true && this.isSetColumn();
+    boolean that_present_column = true && that.isSetColumn();
+    if (this_present_column || that_present_column) {
+      if (!(this_present_column && that_present_column))
+        return false;
+      if (!this.column.equals(that.column))
+        return false;
+    }
+
+    boolean this_present_super_column = true && this.isSetSuper_column();
+    boolean that_present_super_column = true && that.isSetSuper_column();
+    if (this_present_super_column || that_present_super_column) {
+      if (!(this_present_super_column && that_present_super_column))
+        return false;
+      if (!this.super_column.equals(that.super_column))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+
+    boolean present_column = true && (isSetColumn());
+    builder.append(present_column);
+    if (present_column)
+      builder.append(column);
+
+    boolean present_super_column = true && (isSetSuper_column());
+    builder.append(present_super_column);
+    if (present_super_column)
+      builder.append(super_column);
+
+    return builder.toHashCode();
+  }
+
+  public int compareTo(Counter other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Counter typedOther = (Counter)other;
+
+    lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetColumn()) {
+      lastComparison = TBaseHelper.compareTo(this.column, typedOther.column);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSuper_column()).compareTo(typedOther.isSetSuper_column());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSuper_column()) {
+      lastComparison = TBaseHelper.compareTo(this.super_column, typedOther.super_column);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // COLUMN
+          if (field.type == TType.STRUCT) {
+            this.column = new CounterColumn();
+            this.column.read(iprot);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // SUPER_COLUMN
+          if (field.type == TType.STRUCT) {
+            this.super_column = new CounterSuperColumn();
+            this.super_column.read(iprot);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.column != null) {
+      if (isSetColumn()) {
+        oprot.writeFieldBegin(COLUMN_FIELD_DESC);
+        this.column.write(oprot);
+        oprot.writeFieldEnd();
+      }
+    }
+    if (this.super_column != null) {
+      if (isSetSuper_column()) {
+        oprot.writeFieldBegin(SUPER_COLUMN_FIELD_DESC);
+        this.super_column.write(oprot);
+        oprot.writeFieldEnd();
+      }
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Counter(");
+    boolean first = true;
+
+    if (isSetColumn()) {
+      sb.append("column:");
+      if (this.column == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.column);
+      }
+      first = false;
+    }
+    if (isSetSuper_column()) {
+      if (!first) sb.append(", ");
+      sb.append("super_column:");
+      if (this.super_column == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.super_column);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+  }
+
+}
+

Added: 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=1051679&view=auto
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterColumn.java (added)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterColumn.java Tue Dec 21 22:17:09 2010
@@ -0,0 +1,448 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.cassandra.thrift;
+/*
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ */
+
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class CounterColumn implements TBase<CounterColumn, CounterColumn._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("CounterColumn");
+
+  private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
+  private static final TField VALUE_FIELD_DESC = new TField("value", TType.I64, (short)2);
+
+  public ByteBuffer name;
+  public long value;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    NAME((short)1, "name"),
+    VALUE((short)2, "value");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // NAME
+          return NAME;
+        case 2: // VALUE
+          return VALUE;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __VALUE_ISSET_ID = 0;
+  private BitSet __isset_bit_vector = new BitSet(1);
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED, 
+        new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.REQUIRED, 
+        new FieldValueMetaData(TType.I64)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(CounterColumn.class, metaDataMap);
+  }
+
+  public CounterColumn() {
+  }
+
+  public CounterColumn(
+    ByteBuffer name,
+    long value)
+  {
+    this();
+    this.name = name;
+    this.value = value;
+    setValueIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public CounterColumn(CounterColumn other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    if (other.isSetName()) {
+      this.name = TBaseHelper.copyBinary(other.name);
+;
+    }
+    this.value = other.value;
+  }
+
+  public CounterColumn deepCopy() {
+    return new CounterColumn(this);
+  }
+
+  @Override
+  public void clear() {
+    this.name = null;
+    setValueIsSet(false);
+    this.value = 0;
+  }
+
+  public byte[] getName() {
+    setName(TBaseHelper.rightSize(name));
+    return name.array();
+  }
+
+  public ByteBuffer BufferForName() {
+    return name;
+  }
+
+  public CounterColumn setName(byte[] name) {
+    setName(ByteBuffer.wrap(name));
+    return this;
+  }
+
+  public CounterColumn setName(ByteBuffer name) {
+    this.name = name;
+    return this;
+  }
+
+  public void unsetName() {
+    this.name = null;
+  }
+
+  /** Returns true if field name is set (has been asigned a value) and false otherwise */
+  public boolean isSetName() {
+    return this.name != null;
+  }
+
+  public void setNameIsSet(boolean value) {
+    if (!value) {
+      this.name = null;
+    }
+  }
+
+  public long getValue() {
+    return this.value;
+  }
+
+  public CounterColumn setValue(long value) {
+    this.value = value;
+    setValueIsSet(true);
+    return this;
+  }
+
+  public void unsetValue() {
+    __isset_bit_vector.clear(__VALUE_ISSET_ID);
+  }
+
+  /** Returns true if field value is set (has been asigned a value) and false otherwise */
+  public boolean isSetValue() {
+    return __isset_bit_vector.get(__VALUE_ISSET_ID);
+  }
+
+  public void setValueIsSet(boolean value) {
+    __isset_bit_vector.set(__VALUE_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case NAME:
+      if (value == null) {
+        unsetName();
+      } else {
+        setName((ByteBuffer)value);
+      }
+      break;
+
+    case VALUE:
+      if (value == null) {
+        unsetValue();
+      } else {
+        setValue((Long)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case NAME:
+      return getName();
+
+    case VALUE:
+      return new Long(getValue());
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case NAME:
+      return isSetName();
+    case VALUE:
+      return isSetValue();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof CounterColumn)
+      return this.equals((CounterColumn)that);
+    return false;
+  }
+
+  public boolean equals(CounterColumn that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_name = true && this.isSetName();
+    boolean that_present_name = true && that.isSetName();
+    if (this_present_name || that_present_name) {
+      if (!(this_present_name && that_present_name))
+        return false;
+      if (!this.name.equals(that.name))
+        return false;
+    }
+
+    boolean this_present_value = true;
+    boolean that_present_value = true;
+    if (this_present_value || that_present_value) {
+      if (!(this_present_value && that_present_value))
+        return false;
+      if (this.value != that.value)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+
+    boolean present_name = true && (isSetName());
+    builder.append(present_name);
+    if (present_name)
+      builder.append(name);
+
+    boolean present_value = true;
+    builder.append(present_value);
+    if (present_value)
+      builder.append(value);
+
+    return builder.toHashCode();
+  }
+
+  public int compareTo(CounterColumn other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    CounterColumn typedOther = (CounterColumn)other;
+
+    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetName()) {
+      lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetValue()) {
+      lastComparison = TBaseHelper.compareTo(this.value, typedOther.value);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // NAME
+          if (field.type == TType.STRING) {
+            this.name = iprot.readBinary();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // VALUE
+          if (field.type == TType.I64) {
+            this.value = iprot.readI64();
+            setValueIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    if (!isSetValue()) {
+      throw new TProtocolException("Required field 'value' was not found in serialized data! Struct: " + toString());
+    }
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.name != null) {
+      oprot.writeFieldBegin(NAME_FIELD_DESC);
+      oprot.writeBinary(this.name);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(VALUE_FIELD_DESC);
+    oprot.writeI64(this.value);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("CounterColumn(");
+    boolean first = true;
+
+    sb.append("name:");
+    if (this.name == null) {
+      sb.append("null");
+    } else {
+      TBaseHelper.toString(this.name, sb);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("value:");
+    sb.append(this.value);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    if (name == null) {
+      throw new TProtocolException("Required field 'name' was not present! Struct: " + toString());
+    }
+    // alas, we cannot check 'value' because it's a primitive and you chose the non-beans generator.
+  }
+
+}
+

Added: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterDeletion.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterDeletion.java?rev=1051679&view=auto
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterDeletion.java (added)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterDeletion.java Tue Dec 21 22:17:09 2010
@@ -0,0 +1,443 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.cassandra.thrift;
+/*
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ */
+
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class CounterDeletion implements TBase<CounterDeletion, CounterDeletion._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("CounterDeletion");
+
+  private static final TField SUPER_COLUMN_FIELD_DESC = new TField("super_column", TType.STRING, (short)1);
+  private static final TField PREDICATE_FIELD_DESC = new TField("predicate", TType.STRUCT, (short)2);
+
+  public ByteBuffer super_column;
+  public SlicePredicate predicate;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    SUPER_COLUMN((short)1, "super_column"),
+    PREDICATE((short)2, "predicate");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // SUPER_COLUMN
+          return SUPER_COLUMN;
+        case 2: // PREDICATE
+          return PREDICATE;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.SUPER_COLUMN, new FieldMetaData("super_column", TFieldRequirementType.OPTIONAL, 
+        new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.PREDICATE, new FieldMetaData("predicate", TFieldRequirementType.OPTIONAL, 
+        new StructMetaData(TType.STRUCT, SlicePredicate.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(CounterDeletion.class, metaDataMap);
+  }
+
+  public CounterDeletion() {
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public CounterDeletion(CounterDeletion other) {
+    if (other.isSetSuper_column()) {
+      this.super_column = TBaseHelper.copyBinary(other.super_column);
+;
+    }
+    if (other.isSetPredicate()) {
+      this.predicate = new SlicePredicate(other.predicate);
+    }
+  }
+
+  public CounterDeletion deepCopy() {
+    return new CounterDeletion(this);
+  }
+
+  @Override
+  public void clear() {
+    this.super_column = null;
+    this.predicate = null;
+  }
+
+  public byte[] getSuper_column() {
+    setSuper_column(TBaseHelper.rightSize(super_column));
+    return super_column.array();
+  }
+
+  public ByteBuffer BufferForSuper_column() {
+    return super_column;
+  }
+
+  public CounterDeletion setSuper_column(byte[] super_column) {
+    setSuper_column(ByteBuffer.wrap(super_column));
+    return this;
+  }
+
+  public CounterDeletion setSuper_column(ByteBuffer super_column) {
+    this.super_column = super_column;
+    return this;
+  }
+
+  public void unsetSuper_column() {
+    this.super_column = null;
+  }
+
+  /** Returns true if field super_column is set (has been asigned a value) and false otherwise */
+  public boolean isSetSuper_column() {
+    return this.super_column != null;
+  }
+
+  public void setSuper_columnIsSet(boolean value) {
+    if (!value) {
+      this.super_column = null;
+    }
+  }
+
+  public SlicePredicate getPredicate() {
+    return this.predicate;
+  }
+
+  public CounterDeletion setPredicate(SlicePredicate predicate) {
+    this.predicate = predicate;
+    return this;
+  }
+
+  public void unsetPredicate() {
+    this.predicate = null;
+  }
+
+  /** Returns true if field predicate is set (has been asigned a value) and false otherwise */
+  public boolean isSetPredicate() {
+    return this.predicate != null;
+  }
+
+  public void setPredicateIsSet(boolean value) {
+    if (!value) {
+      this.predicate = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case SUPER_COLUMN:
+      if (value == null) {
+        unsetSuper_column();
+      } else {
+        setSuper_column((ByteBuffer)value);
+      }
+      break;
+
+    case PREDICATE:
+      if (value == null) {
+        unsetPredicate();
+      } else {
+        setPredicate((SlicePredicate)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case SUPER_COLUMN:
+      return getSuper_column();
+
+    case PREDICATE:
+      return getPredicate();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case SUPER_COLUMN:
+      return isSetSuper_column();
+    case PREDICATE:
+      return isSetPredicate();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof CounterDeletion)
+      return this.equals((CounterDeletion)that);
+    return false;
+  }
+
+  public boolean equals(CounterDeletion that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_super_column = true && this.isSetSuper_column();
+    boolean that_present_super_column = true && that.isSetSuper_column();
+    if (this_present_super_column || that_present_super_column) {
+      if (!(this_present_super_column && that_present_super_column))
+        return false;
+      if (!this.super_column.equals(that.super_column))
+        return false;
+    }
+
+    boolean this_present_predicate = true && this.isSetPredicate();
+    boolean that_present_predicate = true && that.isSetPredicate();
+    if (this_present_predicate || that_present_predicate) {
+      if (!(this_present_predicate && that_present_predicate))
+        return false;
+      if (!this.predicate.equals(that.predicate))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+
+    boolean present_super_column = true && (isSetSuper_column());
+    builder.append(present_super_column);
+    if (present_super_column)
+      builder.append(super_column);
+
+    boolean present_predicate = true && (isSetPredicate());
+    builder.append(present_predicate);
+    if (present_predicate)
+      builder.append(predicate);
+
+    return builder.toHashCode();
+  }
+
+  public int compareTo(CounterDeletion other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    CounterDeletion typedOther = (CounterDeletion)other;
+
+    lastComparison = Boolean.valueOf(isSetSuper_column()).compareTo(typedOther.isSetSuper_column());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSuper_column()) {
+      lastComparison = TBaseHelper.compareTo(this.super_column, typedOther.super_column);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPredicate()).compareTo(typedOther.isSetPredicate());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPredicate()) {
+      lastComparison = TBaseHelper.compareTo(this.predicate, typedOther.predicate);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // SUPER_COLUMN
+          if (field.type == TType.STRING) {
+            this.super_column = iprot.readBinary();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // PREDICATE
+          if (field.type == TType.STRUCT) {
+            this.predicate = new SlicePredicate();
+            this.predicate.read(iprot);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.super_column != null) {
+      if (isSetSuper_column()) {
+        oprot.writeFieldBegin(SUPER_COLUMN_FIELD_DESC);
+        oprot.writeBinary(this.super_column);
+        oprot.writeFieldEnd();
+      }
+    }
+    if (this.predicate != null) {
+      if (isSetPredicate()) {
+        oprot.writeFieldBegin(PREDICATE_FIELD_DESC);
+        this.predicate.write(oprot);
+        oprot.writeFieldEnd();
+      }
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("CounterDeletion(");
+    boolean first = true;
+
+    if (isSetSuper_column()) {
+      sb.append("super_column:");
+      if (this.super_column == null) {
+        sb.append("null");
+      } else {
+        TBaseHelper.toString(this.super_column, sb);
+      }
+      first = false;
+    }
+    if (isSetPredicate()) {
+      if (!first) sb.append(", ");
+      sb.append("predicate:");
+      if (this.predicate == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.predicate);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+  }
+
+}
+

Added: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterMutation.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterMutation.java?rev=1051679&view=auto
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterMutation.java (added)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterMutation.java Tue Dec 21 22:17:09 2010
@@ -0,0 +1,438 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.cassandra.thrift;
+/*
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ */
+
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+/**
+ * A CounterMutation is either an insert, represented by filling counter, or a deletion, represented by filling the deletion attribute.
+ * @param counter. An insert to a counter column or supercolumn
+ * @param deletion. A deletion of a counter column or supercolumn
+ */
+public class CounterMutation implements TBase<CounterMutation, CounterMutation._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("CounterMutation");
+
+  private static final TField COUNTER_FIELD_DESC = new TField("counter", TType.STRUCT, (short)1);
+  private static final TField DELETION_FIELD_DESC = new TField("deletion", TType.STRUCT, (short)2);
+
+  public Counter counter;
+  public CounterDeletion deletion;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    COUNTER((short)1, "counter"),
+    DELETION((short)2, "deletion");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // COUNTER
+          return COUNTER;
+        case 2: // DELETION
+          return DELETION;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.COUNTER, new FieldMetaData("counter", TFieldRequirementType.OPTIONAL, 
+        new StructMetaData(TType.STRUCT, Counter.class)));
+    tmpMap.put(_Fields.DELETION, new FieldMetaData("deletion", TFieldRequirementType.OPTIONAL, 
+        new StructMetaData(TType.STRUCT, CounterDeletion.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(CounterMutation.class, metaDataMap);
+  }
+
+  public CounterMutation() {
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public CounterMutation(CounterMutation other) {
+    if (other.isSetCounter()) {
+      this.counter = new Counter(other.counter);
+    }
+    if (other.isSetDeletion()) {
+      this.deletion = new CounterDeletion(other.deletion);
+    }
+  }
+
+  public CounterMutation deepCopy() {
+    return new CounterMutation(this);
+  }
+
+  @Override
+  public void clear() {
+    this.counter = null;
+    this.deletion = null;
+  }
+
+  public Counter getCounter() {
+    return this.counter;
+  }
+
+  public CounterMutation setCounter(Counter counter) {
+    this.counter = counter;
+    return this;
+  }
+
+  public void unsetCounter() {
+    this.counter = null;
+  }
+
+  /** Returns true if field counter is set (has been asigned a value) and false otherwise */
+  public boolean isSetCounter() {
+    return this.counter != null;
+  }
+
+  public void setCounterIsSet(boolean value) {
+    if (!value) {
+      this.counter = null;
+    }
+  }
+
+  public CounterDeletion getDeletion() {
+    return this.deletion;
+  }
+
+  public CounterMutation setDeletion(CounterDeletion deletion) {
+    this.deletion = deletion;
+    return this;
+  }
+
+  public void unsetDeletion() {
+    this.deletion = null;
+  }
+
+  /** Returns true if field deletion is set (has been asigned a value) and false otherwise */
+  public boolean isSetDeletion() {
+    return this.deletion != null;
+  }
+
+  public void setDeletionIsSet(boolean value) {
+    if (!value) {
+      this.deletion = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case COUNTER:
+      if (value == null) {
+        unsetCounter();
+      } else {
+        setCounter((Counter)value);
+      }
+      break;
+
+    case DELETION:
+      if (value == null) {
+        unsetDeletion();
+      } else {
+        setDeletion((CounterDeletion)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case COUNTER:
+      return getCounter();
+
+    case DELETION:
+      return getDeletion();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case COUNTER:
+      return isSetCounter();
+    case DELETION:
+      return isSetDeletion();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof CounterMutation)
+      return this.equals((CounterMutation)that);
+    return false;
+  }
+
+  public boolean equals(CounterMutation that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_counter = true && this.isSetCounter();
+    boolean that_present_counter = true && that.isSetCounter();
+    if (this_present_counter || that_present_counter) {
+      if (!(this_present_counter && that_present_counter))
+        return false;
+      if (!this.counter.equals(that.counter))
+        return false;
+    }
+
+    boolean this_present_deletion = true && this.isSetDeletion();
+    boolean that_present_deletion = true && that.isSetDeletion();
+    if (this_present_deletion || that_present_deletion) {
+      if (!(this_present_deletion && that_present_deletion))
+        return false;
+      if (!this.deletion.equals(that.deletion))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+
+    boolean present_counter = true && (isSetCounter());
+    builder.append(present_counter);
+    if (present_counter)
+      builder.append(counter);
+
+    boolean present_deletion = true && (isSetDeletion());
+    builder.append(present_deletion);
+    if (present_deletion)
+      builder.append(deletion);
+
+    return builder.toHashCode();
+  }
+
+  public int compareTo(CounterMutation other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    CounterMutation typedOther = (CounterMutation)other;
+
+    lastComparison = Boolean.valueOf(isSetCounter()).compareTo(typedOther.isSetCounter());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCounter()) {
+      lastComparison = TBaseHelper.compareTo(this.counter, typedOther.counter);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDeletion()).compareTo(typedOther.isSetDeletion());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDeletion()) {
+      lastComparison = TBaseHelper.compareTo(this.deletion, typedOther.deletion);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // COUNTER
+          if (field.type == TType.STRUCT) {
+            this.counter = new Counter();
+            this.counter.read(iprot);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // DELETION
+          if (field.type == TType.STRUCT) {
+            this.deletion = new CounterDeletion();
+            this.deletion.read(iprot);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.counter != null) {
+      if (isSetCounter()) {
+        oprot.writeFieldBegin(COUNTER_FIELD_DESC);
+        this.counter.write(oprot);
+        oprot.writeFieldEnd();
+      }
+    }
+    if (this.deletion != null) {
+      if (isSetDeletion()) {
+        oprot.writeFieldBegin(DELETION_FIELD_DESC);
+        this.deletion.write(oprot);
+        oprot.writeFieldEnd();
+      }
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("CounterMutation(");
+    boolean first = true;
+
+    if (isSetCounter()) {
+      sb.append("counter:");
+      if (this.counter == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.counter);
+      }
+      first = false;
+    }
+    if (isSetDeletion()) {
+      if (!first) sb.append(", ");
+      sb.append("deletion:");
+      if (this.deletion == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.deletion);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+  }
+
+}
+

Added: 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=1051679&view=auto
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java (added)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java Tue Dec 21 22:17:09 2010
@@ -0,0 +1,487 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.cassandra.thrift;
+/*
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ */
+
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class CounterSuperColumn implements TBase<CounterSuperColumn, CounterSuperColumn._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("CounterSuperColumn");
+
+  private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
+  private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.LIST, (short)2);
+
+  public ByteBuffer name;
+  public List<CounterColumn> columns;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    NAME((short)1, "name"),
+    COLUMNS((short)2, "columns");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // NAME
+          return NAME;
+        case 2: // COLUMNS
+          return COLUMNS;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.REQUIRED, 
+        new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.REQUIRED, 
+        new ListMetaData(TType.LIST, 
+            new StructMetaData(TType.STRUCT, CounterColumn.class))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(CounterSuperColumn.class, metaDataMap);
+  }
+
+  public CounterSuperColumn() {
+  }
+
+  public CounterSuperColumn(
+    ByteBuffer name,
+    List<CounterColumn> columns)
+  {
+    this();
+    this.name = name;
+    this.columns = columns;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public CounterSuperColumn(CounterSuperColumn other) {
+    if (other.isSetName()) {
+      this.name = TBaseHelper.copyBinary(other.name);
+;
+    }
+    if (other.isSetColumns()) {
+      List<CounterColumn> __this__columns = new ArrayList<CounterColumn>();
+      for (CounterColumn other_element : other.columns) {
+        __this__columns.add(new CounterColumn(other_element));
+      }
+      this.columns = __this__columns;
+    }
+  }
+
+  public CounterSuperColumn deepCopy() {
+    return new CounterSuperColumn(this);
+  }
+
+  @Override
+  public void clear() {
+    this.name = null;
+    this.columns = null;
+  }
+
+  public byte[] getName() {
+    setName(TBaseHelper.rightSize(name));
+    return name.array();
+  }
+
+  public ByteBuffer BufferForName() {
+    return name;
+  }
+
+  public CounterSuperColumn setName(byte[] name) {
+    setName(ByteBuffer.wrap(name));
+    return this;
+  }
+
+  public CounterSuperColumn setName(ByteBuffer name) {
+    this.name = name;
+    return this;
+  }
+
+  public void unsetName() {
+    this.name = null;
+  }
+
+  /** Returns true if field name is set (has been asigned a value) and false otherwise */
+  public boolean isSetName() {
+    return this.name != null;
+  }
+
+  public void setNameIsSet(boolean value) {
+    if (!value) {
+      this.name = null;
+    }
+  }
+
+  public int getColumnsSize() {
+    return (this.columns == null) ? 0 : this.columns.size();
+  }
+
+  public java.util.Iterator<CounterColumn> getColumnsIterator() {
+    return (this.columns == null) ? null : this.columns.iterator();
+  }
+
+  public void addToColumns(CounterColumn elem) {
+    if (this.columns == null) {
+      this.columns = new ArrayList<CounterColumn>();
+    }
+    this.columns.add(elem);
+  }
+
+  public List<CounterColumn> getColumns() {
+    return this.columns;
+  }
+
+  public CounterSuperColumn setColumns(List<CounterColumn> columns) {
+    this.columns = columns;
+    return this;
+  }
+
+  public void unsetColumns() {
+    this.columns = null;
+  }
+
+  /** Returns true if field columns is set (has been asigned a value) and false otherwise */
+  public boolean isSetColumns() {
+    return this.columns != null;
+  }
+
+  public void setColumnsIsSet(boolean value) {
+    if (!value) {
+      this.columns = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case NAME:
+      if (value == null) {
+        unsetName();
+      } else {
+        setName((ByteBuffer)value);
+      }
+      break;
+
+    case COLUMNS:
+      if (value == null) {
+        unsetColumns();
+      } else {
+        setColumns((List<CounterColumn>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case NAME:
+      return getName();
+
+    case COLUMNS:
+      return getColumns();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case NAME:
+      return isSetName();
+    case COLUMNS:
+      return isSetColumns();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof CounterSuperColumn)
+      return this.equals((CounterSuperColumn)that);
+    return false;
+  }
+
+  public boolean equals(CounterSuperColumn that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_name = true && this.isSetName();
+    boolean that_present_name = true && that.isSetName();
+    if (this_present_name || that_present_name) {
+      if (!(this_present_name && that_present_name))
+        return false;
+      if (!this.name.equals(that.name))
+        return false;
+    }
+
+    boolean this_present_columns = true && this.isSetColumns();
+    boolean that_present_columns = true && that.isSetColumns();
+    if (this_present_columns || that_present_columns) {
+      if (!(this_present_columns && that_present_columns))
+        return false;
+      if (!this.columns.equals(that.columns))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+
+    boolean present_name = true && (isSetName());
+    builder.append(present_name);
+    if (present_name)
+      builder.append(name);
+
+    boolean present_columns = true && (isSetColumns());
+    builder.append(present_columns);
+    if (present_columns)
+      builder.append(columns);
+
+    return builder.toHashCode();
+  }
+
+  public int compareTo(CounterSuperColumn other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    CounterSuperColumn typedOther = (CounterSuperColumn)other;
+
+    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetName()) {
+      lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetColumns()) {
+      lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // NAME
+          if (field.type == TType.STRING) {
+            this.name = iprot.readBinary();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // COLUMNS
+          if (field.type == TType.LIST) {
+            {
+              TList _list4 = iprot.readListBegin();
+              this.columns = new ArrayList<CounterColumn>(_list4.size);
+              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
+              {
+                CounterColumn _elem6;
+                _elem6 = new CounterColumn();
+                _elem6.read(iprot);
+                this.columns.add(_elem6);
+              }
+              iprot.readListEnd();
+            }
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+
+    // check for required fields of primitive type, which can't be checked in the validate method
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.name != null) {
+      oprot.writeFieldBegin(NAME_FIELD_DESC);
+      oprot.writeBinary(this.name);
+      oprot.writeFieldEnd();
+    }
+    if (this.columns != null) {
+      oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
+      {
+        oprot.writeListBegin(new TList(TType.STRUCT, this.columns.size()));
+        for (CounterColumn _iter7 : this.columns)
+        {
+          _iter7.write(oprot);
+        }
+        oprot.writeListEnd();
+      }
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("CounterSuperColumn(");
+    boolean first = true;
+
+    sb.append("name:");
+    if (this.name == null) {
+      sb.append("null");
+    } else {
+      TBaseHelper.toString(this.name, sb);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("columns:");
+    if (this.columns == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.columns);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+    if (name == null) {
+      throw new TProtocolException("Required field 'name' was not present! Struct: " + toString());
+    }
+    if (columns == null) {
+      throw new TProtocolException("Required field 'columns' was not present! Struct: " + toString());
+    }
+  }
+
+}
+

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=1051679&r1=1051678&r2=1051679&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 Dec 21 22:17:09 2010
@@ -470,14 +470,14 @@ public class IndexClause implements TBas
         case 1: // EXPRESSIONS
           if (field.type == TType.LIST) {
             {
-              TList _list8 = iprot.readListBegin();
-              this.expressions = new ArrayList<IndexExpression>(_list8.size);
-              for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+              TList _list12 = iprot.readListBegin();
+              this.expressions = new ArrayList<IndexExpression>(_list12.size);
+              for (int _i13 = 0; _i13 < _list12.size; ++_i13)
               {
-                IndexExpression _elem10;
-                _elem10 = new IndexExpression();
-                _elem10.read(iprot);
-                this.expressions.add(_elem10);
+                IndexExpression _elem14;
+                _elem14 = new IndexExpression();
+                _elem14.read(iprot);
+                this.expressions.add(_elem14);
               }
               iprot.readListEnd();
             }
@@ -522,9 +522,9 @@ public class IndexClause implements TBas
       oprot.writeFieldBegin(EXPRESSIONS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRUCT, this.expressions.size()));
-        for (IndexExpression _iter11 : this.expressions)
+        for (IndexExpression _iter15 : this.expressions)
         {
-          _iter11.write(oprot);
+          _iter15.write(oprot);
         }
         oprot.writeListEnd();
       }

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=1051679&r1=1051678&r2=1051679&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 Dec 21 22:17:09 2010
@@ -405,14 +405,14 @@ public class KeySlice implements TBase<K
         case 2: // COLUMNS
           if (field.type == TType.LIST) {
             {
-              TList _list12 = iprot.readListBegin();
-              this.columns = new ArrayList<ColumnOrSuperColumn>(_list12.size);
-              for (int _i13 = 0; _i13 < _list12.size; ++_i13)
+              TList _list16 = iprot.readListBegin();
+              this.columns = new ArrayList<ColumnOrSuperColumn>(_list16.size);
+              for (int _i17 = 0; _i17 < _list16.size; ++_i17)
               {
-                ColumnOrSuperColumn _elem14;
-                _elem14 = new ColumnOrSuperColumn();
-                _elem14.read(iprot);
-                this.columns.add(_elem14);
+                ColumnOrSuperColumn _elem18;
+                _elem18 = new ColumnOrSuperColumn();
+                _elem18.read(iprot);
+                this.columns.add(_elem18);
               }
               iprot.readListEnd();
             }
@@ -444,9 +444,9 @@ public class KeySlice implements TBase<K
       oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRUCT, this.columns.size()));
-        for (ColumnOrSuperColumn _iter15 : this.columns)
+        for (ColumnOrSuperColumn _iter19 : this.columns)
         {
-          _iter15.write(oprot);
+          _iter19.write(oprot);
         }
         oprot.writeListEnd();
       }

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=1051679&r1=1051678&r2=1051679&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 Dec 21 22:17:09 2010
@@ -642,15 +642,15 @@ public class KsDef implements TBase<KsDe
         case 3: // STRATEGY_OPTIONS
           if (field.type == TType.MAP) {
             {
-              TMap _map29 = iprot.readMapBegin();
-              this.strategy_options = new HashMap<String,String>(2*_map29.size);
-              for (int _i30 = 0; _i30 < _map29.size; ++_i30)
+              TMap _map33 = iprot.readMapBegin();
+              this.strategy_options = new HashMap<String,String>(2*_map33.size);
+              for (int _i34 = 0; _i34 < _map33.size; ++_i34)
               {
-                String _key31;
-                String _val32;
-                _key31 = iprot.readString();
-                _val32 = iprot.readString();
-                this.strategy_options.put(_key31, _val32);
+                String _key35;
+                String _val36;
+                _key35 = iprot.readString();
+                _val36 = iprot.readString();
+                this.strategy_options.put(_key35, _val36);
               }
               iprot.readMapEnd();
             }
@@ -669,14 +669,14 @@ public class KsDef implements TBase<KsDe
         case 5: // CF_DEFS
           if (field.type == TType.LIST) {
             {
-              TList _list33 = iprot.readListBegin();
-              this.cf_defs = new ArrayList<CfDef>(_list33.size);
-              for (int _i34 = 0; _i34 < _list33.size; ++_i34)
+              TList _list37 = iprot.readListBegin();
+              this.cf_defs = new ArrayList<CfDef>(_list37.size);
+              for (int _i38 = 0; _i38 < _list37.size; ++_i38)
               {
-                CfDef _elem35;
-                _elem35 = new CfDef();
-                _elem35.read(iprot);
-                this.cf_defs.add(_elem35);
+                CfDef _elem39;
+                _elem39 = new CfDef();
+                _elem39.read(iprot);
+                this.cf_defs.add(_elem39);
               }
               iprot.readListEnd();
             }
@@ -717,10 +717,10 @@ public class KsDef implements TBase<KsDe
         oprot.writeFieldBegin(STRATEGY_OPTIONS_FIELD_DESC);
         {
           oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.strategy_options.size()));
-          for (Map.Entry<String, String> _iter36 : this.strategy_options.entrySet())
+          for (Map.Entry<String, String> _iter40 : this.strategy_options.entrySet())
           {
-            oprot.writeString(_iter36.getKey());
-            oprot.writeString(_iter36.getValue());
+            oprot.writeString(_iter40.getKey());
+            oprot.writeString(_iter40.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -734,9 +734,9 @@ public class KsDef implements TBase<KsDe
       oprot.writeFieldBegin(CF_DEFS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRUCT, this.cf_defs.size()));
-        for (CfDef _iter37 : this.cf_defs)
+        for (CfDef _iter41 : this.cf_defs)
         {
-          _iter37.write(oprot);
+          _iter41.write(oprot);
         }
         oprot.writeListEnd();
       }

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=1051679&r1=1051678&r2=1051679&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 Dec 21 22:17:09 2010
@@ -385,13 +385,13 @@ public class SlicePredicate implements T
         case 1: // COLUMN_NAMES
           if (field.type == TType.LIST) {
             {
-              TList _list4 = iprot.readListBegin();
-              this.column_names = new ArrayList<ByteBuffer>(_list4.size);
-              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
+              TList _list8 = iprot.readListBegin();
+              this.column_names = new ArrayList<ByteBuffer>(_list8.size);
+              for (int _i9 = 0; _i9 < _list8.size; ++_i9)
               {
-                ByteBuffer _elem6;
-                _elem6 = iprot.readBinary();
-                this.column_names.add(_elem6);
+                ByteBuffer _elem10;
+                _elem10 = iprot.readBinary();
+                this.column_names.add(_elem10);
               }
               iprot.readListEnd();
             }
@@ -427,9 +427,9 @@ public class SlicePredicate implements T
         oprot.writeFieldBegin(COLUMN_NAMES_FIELD_DESC);
         {
           oprot.writeListBegin(new TList(TType.STRING, this.column_names.size()));
-          for (ByteBuffer _iter7 : this.column_names)
+          for (ByteBuffer _iter11 : this.column_names)
           {
-            oprot.writeBinary(_iter7);
+            oprot.writeBinary(_iter11);
           }
           oprot.writeListEnd();
         }

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=1051679&r1=1051678&r2=1051679&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 Dec 21 22:17:09 2010
@@ -468,13 +468,13 @@ public class TokenRange implements TBase
         case 3: // ENDPOINTS
           if (field.type == TType.LIST) {
             {
-              TList _list16 = iprot.readListBegin();
-              this.endpoints = new ArrayList<String>(_list16.size);
-              for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+              TList _list20 = iprot.readListBegin();
+              this.endpoints = new ArrayList<String>(_list20.size);
+              for (int _i21 = 0; _i21 < _list20.size; ++_i21)
               {
-                String _elem18;
-                _elem18 = iprot.readString();
-                this.endpoints.add(_elem18);
+                String _elem22;
+                _elem22 = iprot.readString();
+                this.endpoints.add(_elem22);
               }
               iprot.readListEnd();
             }
@@ -511,9 +511,9 @@ public class TokenRange implements TBase
       oprot.writeFieldBegin(ENDPOINTS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRING, this.endpoints.size()));
-        for (String _iter19 : this.endpoints)
+        for (String _iter23 : this.endpoints)
         {
-          oprot.writeString(_iter19);
+          oprot.writeString(_iter23);
         }
         oprot.writeListEnd();
       }

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=1051679&r1=1051678&r2=1051679&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java Tue Dec 21 22:17:09 2010
@@ -88,7 +88,6 @@ public class CassandraServer implements 
     
     // CfDef default values
     private final static String D_CF_CFTYPE = "Standard";
-    private final static String D_CF_CFCLOCKTYPE = "Timestamp";
     private final static String D_CF_COMPTYPE = "BytesType";
     private final static String D_CF_SUBCOMPTYPE = "";
     private final static String D_CF_RECONCILER = null;
@@ -837,6 +836,7 @@ public class CassandraServer implements 
                               cf_def.row_cache_size == null ? CFMetaData.DEFAULT_ROW_CACHE_SIZE : cf_def.row_cache_size,
                               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.replicate_on_write == null ? CFMetaData.DEFAULT_REPLICATE_ON_WRITE : cf_def.replicate_on_write,
                               cf_def.gc_grace_seconds != null ? cf_def.gc_grace_seconds : CFMetaData.DEFAULT_GC_GRACE_SECONDS,
                               DatabaseDescriptor.getComparator(validate),
                               cf_def.min_compaction_threshold == null ? CFMetaData.DEFAULT_MIN_COMPACTION_THRESHOLD : cf_def.min_compaction_threshold,



Mime
View raw message