You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2013/01/14 21:30:11 UTC

[4/9] Upgrade thrift version to 0.9.0

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java
index 180a2b3..c98aab6 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Deletion.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.cassandra.thrift;
 /*
@@ -27,6 +28,15 @@ package org.apache.cassandra.thrift;
 
 
 import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -52,9 +62,15 @@ public class Deletion implements org.apache.thrift.TBase<Deletion, Deletion._Fie
   private static final org.apache.thrift.protocol.TField SUPER_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("super_column", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField PREDICATE_FIELD_DESC = new org.apache.thrift.protocol.TField("predicate", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
-  public long timestamp; // required
-  public ByteBuffer super_column; // required
-  public SlicePredicate predicate; // required
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new DeletionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new DeletionTupleSchemeFactory());
+  }
+
+  public long timestamp; // optional
+  public ByteBuffer super_column; // optional
+  public SlicePredicate predicate; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -122,8 +138,8 @@ public class Deletion implements org.apache.thrift.TBase<Deletion, Deletion._Fie
 
   // isset id assignments
   private static final int __TIMESTAMP_ISSET_ID = 0;
-  private BitSet __isset_bit_vector = new BitSet(1);
-
+  private byte __isset_bitfield = 0;
+  private _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.SUPER_COLUMN,_Fields.PREDICATE};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -144,8 +160,7 @@ public class Deletion implements org.apache.thrift.TBase<Deletion, Deletion._Fie
    * Performs a deep copy on <i>other</i>.
    */
   public Deletion(Deletion other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     this.timestamp = other.timestamp;
     if (other.isSetSuper_column()) {
       this.super_column = org.apache.thrift.TBaseHelper.copyBinary(other.super_column);
@@ -179,16 +194,16 @@ public class Deletion implements org.apache.thrift.TBase<Deletion, Deletion._Fie
   }
 
   public void unsetTimestamp() {
-    __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
   }
 
   /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
   public boolean isSetTimestamp() {
-    return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
   }
 
   public void setTimestampIsSet(boolean value) {
-    __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
   }
 
   public byte[] getSuper_column() {
@@ -421,74 +436,11 @@ public class Deletion implements org.apache.thrift.TBase<Deletion, Deletion._Fie
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // TIMESTAMP
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.timestamp = iprot.readI64();
-            setTimestampIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // SUPER_COLUMN
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.super_column = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // PREDICATE
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.predicate = new SlicePredicate();
-            this.predicate.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.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();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (isSetTimestamp()) {
-      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
-      oprot.writeI64(this.timestamp);
-      oprot.writeFieldEnd();
-    }
-    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();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -527,6 +479,10 @@ public class Deletion implements org.apache.thrift.TBase<Deletion, Deletion._Fie
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (predicate != null) {
+      predicate.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -540,12 +496,148 @@ public class Deletion implements org.apache.thrift.TBase<Deletion, Deletion._Fie
   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);
+      __isset_bitfield = 0;
       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);
     }
   }
 
+  private static class DeletionStandardSchemeFactory implements SchemeFactory {
+    public DeletionStandardScheme getScheme() {
+      return new DeletionStandardScheme();
+    }
+  }
+
+  private static class DeletionStandardScheme extends StandardScheme<Deletion> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Deletion struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // TIMESTAMP
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.timestamp = iprot.readI64();
+              struct.setTimestampIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // SUPER_COLUMN
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.super_column = iprot.readBinary();
+              struct.setSuper_columnIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // PREDICATE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.predicate = new SlicePredicate();
+              struct.predicate.read(iprot);
+              struct.setPredicateIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, Deletion struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.isSetTimestamp()) {
+        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
+        oprot.writeI64(struct.timestamp);
+        oprot.writeFieldEnd();
+      }
+      if (struct.super_column != null) {
+        if (struct.isSetSuper_column()) {
+          oprot.writeFieldBegin(SUPER_COLUMN_FIELD_DESC);
+          oprot.writeBinary(struct.super_column);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.predicate != null) {
+        if (struct.isSetPredicate()) {
+          oprot.writeFieldBegin(PREDICATE_FIELD_DESC);
+          struct.predicate.write(oprot);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class DeletionTupleSchemeFactory implements SchemeFactory {
+    public DeletionTupleScheme getScheme() {
+      return new DeletionTupleScheme();
+    }
+  }
+
+  private static class DeletionTupleScheme extends TupleScheme<Deletion> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Deletion struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetTimestamp()) {
+        optionals.set(0);
+      }
+      if (struct.isSetSuper_column()) {
+        optionals.set(1);
+      }
+      if (struct.isSetPredicate()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetTimestamp()) {
+        oprot.writeI64(struct.timestamp);
+      }
+      if (struct.isSetSuper_column()) {
+        oprot.writeBinary(struct.super_column);
+      }
+      if (struct.isSetPredicate()) {
+        struct.predicate.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Deletion struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.timestamp = iprot.readI64();
+        struct.setTimestampIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.super_column = iprot.readBinary();
+        struct.setSuper_columnIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.predicate = new SlicePredicate();
+        struct.predicate.read(iprot);
+        struct.setPredicateIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/interface/thrift/gen-java/org/apache/cassandra/thrift/EndpointDetails.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/EndpointDetails.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/EndpointDetails.java
index 125b159..7654e9e 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/EndpointDetails.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/EndpointDetails.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.cassandra.thrift;
 /*
@@ -27,6 +28,15 @@ package org.apache.cassandra.thrift;
 
 
 import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -49,9 +59,15 @@ public class EndpointDetails implements org.apache.thrift.TBase<EndpointDetails,
   private static final org.apache.thrift.protocol.TField DATACENTER_FIELD_DESC = new org.apache.thrift.protocol.TField("datacenter", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField RACK_FIELD_DESC = new org.apache.thrift.protocol.TField("rack", org.apache.thrift.protocol.TType.STRING, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new EndpointDetailsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new EndpointDetailsTupleSchemeFactory());
+  }
+
   public String host; // required
   public String datacenter; // required
-  public String rack; // required
+  public String rack; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -118,7 +134,7 @@ public class EndpointDetails implements org.apache.thrift.TBase<EndpointDetails,
   }
 
   // isset id assignments
-
+  private _Fields optionals[] = {_Fields.RACK};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -414,70 +430,11 @@ public class EndpointDetails implements org.apache.thrift.TBase<EndpointDetails,
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // HOST
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.host = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // DATACENTER
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.datacenter = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // RACK
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.rack = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.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();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.host != null) {
-      oprot.writeFieldBegin(HOST_FIELD_DESC);
-      oprot.writeString(this.host);
-      oprot.writeFieldEnd();
-    }
-    if (this.datacenter != null) {
-      oprot.writeFieldBegin(DATACENTER_FIELD_DESC);
-      oprot.writeString(this.datacenter);
-      oprot.writeFieldEnd();
-    }
-    if (this.rack != null) {
-      if (isSetRack()) {
-        oprot.writeFieldBegin(RACK_FIELD_DESC);
-        oprot.writeString(this.rack);
-        oprot.writeFieldEnd();
-      }
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -516,6 +473,7 @@ public class EndpointDetails implements org.apache.thrift.TBase<EndpointDetails,
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -534,5 +492,137 @@ public class EndpointDetails implements org.apache.thrift.TBase<EndpointDetails,
     }
   }
 
+  private static class EndpointDetailsStandardSchemeFactory implements SchemeFactory {
+    public EndpointDetailsStandardScheme getScheme() {
+      return new EndpointDetailsStandardScheme();
+    }
+  }
+
+  private static class EndpointDetailsStandardScheme extends StandardScheme<EndpointDetails> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, EndpointDetails struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // HOST
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.host = iprot.readString();
+              struct.setHostIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // DATACENTER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.datacenter = iprot.readString();
+              struct.setDatacenterIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // RACK
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.rack = iprot.readString();
+              struct.setRackIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, EndpointDetails struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.host != null) {
+        oprot.writeFieldBegin(HOST_FIELD_DESC);
+        oprot.writeString(struct.host);
+        oprot.writeFieldEnd();
+      }
+      if (struct.datacenter != null) {
+        oprot.writeFieldBegin(DATACENTER_FIELD_DESC);
+        oprot.writeString(struct.datacenter);
+        oprot.writeFieldEnd();
+      }
+      if (struct.rack != null) {
+        if (struct.isSetRack()) {
+          oprot.writeFieldBegin(RACK_FIELD_DESC);
+          oprot.writeString(struct.rack);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class EndpointDetailsTupleSchemeFactory implements SchemeFactory {
+    public EndpointDetailsTupleScheme getScheme() {
+      return new EndpointDetailsTupleScheme();
+    }
+  }
+
+  private static class EndpointDetailsTupleScheme extends TupleScheme<EndpointDetails> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, EndpointDetails struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetHost()) {
+        optionals.set(0);
+      }
+      if (struct.isSetDatacenter()) {
+        optionals.set(1);
+      }
+      if (struct.isSetRack()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetHost()) {
+        oprot.writeString(struct.host);
+      }
+      if (struct.isSetDatacenter()) {
+        oprot.writeString(struct.datacenter);
+      }
+      if (struct.isSetRack()) {
+        oprot.writeString(struct.rack);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, EndpointDetails struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.host = iprot.readString();
+        struct.setHostIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.datacenter = iprot.readString();
+        struct.setDatacenterIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.rack = iprot.readString();
+        struct.setRackIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
index 76c2606..499a081 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.cassandra.thrift;
 /*
@@ -27,6 +28,15 @@ package org.apache.cassandra.thrift;
 
 
 import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -52,6 +62,12 @@ public class IndexClause implements org.apache.thrift.TBase<IndexClause, IndexCl
   private static final org.apache.thrift.protocol.TField START_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("start_key", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new IndexClauseStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new IndexClauseTupleSchemeFactory());
+  }
+
   public List<IndexExpression> expressions; // required
   public ByteBuffer start_key; // required
   public int count; // required
@@ -122,8 +138,7 @@ public class IndexClause implements org.apache.thrift.TBase<IndexClause, IndexCl
 
   // isset id assignments
   private static final int __COUNT_ISSET_ID = 0;
-  private BitSet __isset_bit_vector = new BitSet(1);
-
+  private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -159,8 +174,7 @@ public class IndexClause implements org.apache.thrift.TBase<IndexClause, IndexCl
    * Performs a deep copy on <i>other</i>.
    */
   public IndexClause(IndexClause other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetExpressions()) {
       List<IndexExpression> __this__expressions = new ArrayList<IndexExpression>();
       for (IndexExpression other_element : other.expressions) {
@@ -271,16 +285,16 @@ public class IndexClause implements org.apache.thrift.TBase<IndexClause, IndexCl
   }
 
   public void unsetCount() {
-    __isset_bit_vector.clear(__COUNT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID);
   }
 
   /** Returns true if field count is set (has been assigned a value) and false otherwise */
   public boolean isSetCount() {
-    return __isset_bit_vector.get(__COUNT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID);
   }
 
   public void setCountIsSet(boolean value) {
-    __isset_bit_vector.set(__COUNT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -455,88 +469,11 @@ public class IndexClause implements org.apache.thrift.TBase<IndexClause, IndexCl
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // EXPRESSIONS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
-              this.expressions = new ArrayList<IndexExpression>(_list12.size);
-              for (int _i13 = 0; _i13 < _list12.size; ++_i13)
-              {
-                IndexExpression _elem14; // required
-                _elem14 = new IndexExpression();
-                _elem14.read(iprot);
-                this.expressions.add(_elem14);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // START_KEY
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.start_key = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // COUNT
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.count = iprot.readI32();
-            setCountIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.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 (!isSetCount()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
-    }
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.expressions != null) {
-      oprot.writeFieldBegin(EXPRESSIONS_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.expressions.size()));
-        for (IndexExpression _iter15 : this.expressions)
-        {
-          _iter15.write(oprot);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    if (this.start_key != null) {
-      oprot.writeFieldBegin(START_KEY_FIELD_DESC);
-      oprot.writeBinary(this.start_key);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(COUNT_FIELD_DESC);
-    oprot.writeI32(this.count);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -576,6 +513,7 @@ public class IndexClause implements org.apache.thrift.TBase<IndexClause, IndexCl
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'start_key' was not present! Struct: " + toString());
     }
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -589,12 +527,153 @@ public class IndexClause implements org.apache.thrift.TBase<IndexClause, IndexCl
   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);
+      __isset_bitfield = 0;
       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);
     }
   }
 
+  private static class IndexClauseStandardSchemeFactory implements SchemeFactory {
+    public IndexClauseStandardScheme getScheme() {
+      return new IndexClauseStandardScheme();
+    }
+  }
+
+  private static class IndexClauseStandardScheme extends StandardScheme<IndexClause> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, IndexClause struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // EXPRESSIONS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
+                struct.expressions = new ArrayList<IndexExpression>(_list24.size);
+                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
+                {
+                  IndexExpression _elem26; // required
+                  _elem26 = new IndexExpression();
+                  _elem26.read(iprot);
+                  struct.expressions.add(_elem26);
+                }
+                iprot.readListEnd();
+              }
+              struct.setExpressionsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // START_KEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.start_key = iprot.readBinary();
+              struct.setStart_keyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // COUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.count = iprot.readI32();
+              struct.setCountIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      if (!struct.isSetCount()) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
+      }
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, IndexClause struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.expressions != null) {
+        oprot.writeFieldBegin(EXPRESSIONS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.expressions.size()));
+          for (IndexExpression _iter27 : struct.expressions)
+          {
+            _iter27.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.start_key != null) {
+        oprot.writeFieldBegin(START_KEY_FIELD_DESC);
+        oprot.writeBinary(struct.start_key);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(COUNT_FIELD_DESC);
+      oprot.writeI32(struct.count);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class IndexClauseTupleSchemeFactory implements SchemeFactory {
+    public IndexClauseTupleScheme getScheme() {
+      return new IndexClauseTupleScheme();
+    }
+  }
+
+  private static class IndexClauseTupleScheme extends TupleScheme<IndexClause> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, IndexClause struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      {
+        oprot.writeI32(struct.expressions.size());
+        for (IndexExpression _iter28 : struct.expressions)
+        {
+          _iter28.write(oprot);
+        }
+      }
+      oprot.writeBinary(struct.start_key);
+      oprot.writeI32(struct.count);
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, IndexClause struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      {
+        org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.expressions = new ArrayList<IndexExpression>(_list29.size);
+        for (int _i30 = 0; _i30 < _list29.size; ++_i30)
+        {
+          IndexExpression _elem31; // required
+          _elem31 = new IndexExpression();
+          _elem31.read(iprot);
+          struct.expressions.add(_elem31);
+        }
+      }
+      struct.setExpressionsIsSet(true);
+      struct.start_key = iprot.readBinary();
+      struct.setStart_keyIsSet(true);
+      struct.count = iprot.readI32();
+      struct.setCountIsSet(true);
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java
index 43b89a8..0622fd4 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexExpression.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.cassandra.thrift;
 /*
@@ -27,6 +28,15 @@ package org.apache.cassandra.thrift;
 
 
 import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -49,6 +59,12 @@ public class IndexExpression implements org.apache.thrift.TBase<IndexExpression,
   private static final org.apache.thrift.protocol.TField OP_FIELD_DESC = new org.apache.thrift.protocol.TField("op", org.apache.thrift.protocol.TType.I32, (short)2);
   private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new IndexExpressionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new IndexExpressionTupleSchemeFactory());
+  }
+
   public ByteBuffer column_name; // required
   /**
    * 
@@ -126,7 +142,6 @@ public class IndexExpression implements org.apache.thrift.TBase<IndexExpression,
   }
 
   // isset id assignments
-
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -454,68 +469,11 @@ public class IndexExpression implements org.apache.thrift.TBase<IndexExpression,
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // COLUMN_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.column_name = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // OP
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.op = IndexOperator.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // VALUE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.value = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.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();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.column_name != null) {
-      oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC);
-      oprot.writeBinary(this.column_name);
-      oprot.writeFieldEnd();
-    }
-    if (this.op != null) {
-      oprot.writeFieldBegin(OP_FIELD_DESC);
-      oprot.writeI32(this.op.getValue());
-      oprot.writeFieldEnd();
-    }
-    if (this.value != null) {
-      oprot.writeFieldBegin(VALUE_FIELD_DESC);
-      oprot.writeBinary(this.value);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -561,6 +519,7 @@ public class IndexExpression implements org.apache.thrift.TBase<IndexExpression,
     if (value == null) {
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'value' was not present! Struct: " + toString());
     }
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -579,5 +538,111 @@ public class IndexExpression implements org.apache.thrift.TBase<IndexExpression,
     }
   }
 
+  private static class IndexExpressionStandardSchemeFactory implements SchemeFactory {
+    public IndexExpressionStandardScheme getScheme() {
+      return new IndexExpressionStandardScheme();
+    }
+  }
+
+  private static class IndexExpressionStandardScheme extends StandardScheme<IndexExpression> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, IndexExpression struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // COLUMN_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.column_name = iprot.readBinary();
+              struct.setColumn_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // OP
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.op = IndexOperator.findByValue(iprot.readI32());
+              struct.setOpIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // VALUE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.value = iprot.readBinary();
+              struct.setValueIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, IndexExpression struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.column_name != null) {
+        oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC);
+        oprot.writeBinary(struct.column_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.op != null) {
+        oprot.writeFieldBegin(OP_FIELD_DESC);
+        oprot.writeI32(struct.op.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.value != null) {
+        oprot.writeFieldBegin(VALUE_FIELD_DESC);
+        oprot.writeBinary(struct.value);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class IndexExpressionTupleSchemeFactory implements SchemeFactory {
+    public IndexExpressionTupleScheme getScheme() {
+      return new IndexExpressionTupleScheme();
+    }
+  }
+
+  private static class IndexExpressionTupleScheme extends TupleScheme<IndexExpression> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, IndexExpression struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBinary(struct.column_name);
+      oprot.writeI32(struct.op.getValue());
+      oprot.writeBinary(struct.value);
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, IndexExpression struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.column_name = iprot.readBinary();
+      struct.setColumn_nameIsSet(true);
+      struct.op = IndexOperator.findByValue(iprot.readI32());
+      struct.setOpIsSet(true);
+      struct.value = iprot.readBinary();
+      struct.setValueIsSet(true);
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexOperator.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexOperator.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexOperator.java
index c5d29e3..a35e089 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexOperator.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexOperator.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.cassandra.thrift;
 /*

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java
index 283fa71..6bdf7db 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexType.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.cassandra.thrift;
 /*

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
index 7ee266b..1344ba6 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.cassandra.thrift;
 /*
@@ -27,6 +28,15 @@ package org.apache.cassandra.thrift;
 
 
 import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -46,11 +56,17 @@ import org.slf4j.LoggerFactory;
  * Invalid request could mean keyspace or column family does not exist, required parameters are missing, or a parameter is malformed.
  * why contains an associated error message.
  */
-public class InvalidRequestException extends Exception implements org.apache.thrift.TBase<InvalidRequestException, InvalidRequestException._Fields>, java.io.Serializable, Cloneable {
+public class InvalidRequestException extends TException implements org.apache.thrift.TBase<InvalidRequestException, InvalidRequestException._Fields>, java.io.Serializable, Cloneable {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidRequestException");
 
   private static final org.apache.thrift.protocol.TField WHY_FIELD_DESC = new org.apache.thrift.protocol.TField("why", org.apache.thrift.protocol.TType.STRING, (short)1);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new InvalidRequestExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new InvalidRequestExceptionTupleSchemeFactory());
+  }
+
   public String why; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -112,7 +128,6 @@ public class InvalidRequestException extends Exception implements org.apache.thr
   }
 
   // isset id assignments
-
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -272,44 +287,11 @@ public class InvalidRequestException extends Exception implements org.apache.thr
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // WHY
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.why = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.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();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.why != null) {
-      oprot.writeFieldBegin(WHY_FIELD_DESC);
-      oprot.writeString(this.why);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -333,6 +315,7 @@ public class InvalidRequestException extends Exception implements org.apache.thr
     if (why == null) {
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'why' was not present! Struct: " + toString());
     }
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -351,5 +334,79 @@ public class InvalidRequestException extends Exception implements org.apache.thr
     }
   }
 
+  private static class InvalidRequestExceptionStandardSchemeFactory implements SchemeFactory {
+    public InvalidRequestExceptionStandardScheme getScheme() {
+      return new InvalidRequestExceptionStandardScheme();
+    }
+  }
+
+  private static class InvalidRequestExceptionStandardScheme extends StandardScheme<InvalidRequestException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidRequestException struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // WHY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.why = iprot.readString();
+              struct.setWhyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, InvalidRequestException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.why != null) {
+        oprot.writeFieldBegin(WHY_FIELD_DESC);
+        oprot.writeString(struct.why);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class InvalidRequestExceptionTupleSchemeFactory implements SchemeFactory {
+    public InvalidRequestExceptionTupleScheme getScheme() {
+      return new InvalidRequestExceptionTupleScheme();
+    }
+  }
+
+  private static class InvalidRequestExceptionTupleScheme extends TupleScheme<InvalidRequestException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, InvalidRequestException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeString(struct.why);
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, InvalidRequestException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.why = iprot.readString();
+      struct.setWhyIsSet(true);
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java
index 30f194e..54c7656 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyCount.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.cassandra.thrift;
 /*
@@ -27,6 +28,15 @@ package org.apache.cassandra.thrift;
 
 
 import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -48,6 +58,12 @@ public class KeyCount implements org.apache.thrift.TBase<KeyCount, KeyCount._Fie
   private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)2);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new KeyCountStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new KeyCountTupleSchemeFactory());
+  }
+
   public ByteBuffer key; // required
   public int count; // required
 
@@ -114,8 +130,7 @@ public class KeyCount implements org.apache.thrift.TBase<KeyCount, KeyCount._Fie
 
   // isset id assignments
   private static final int __COUNT_ISSET_ID = 0;
-  private BitSet __isset_bit_vector = new BitSet(1);
-
+  private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -144,8 +159,7 @@ public class KeyCount implements org.apache.thrift.TBase<KeyCount, KeyCount._Fie
    * Performs a deep copy on <i>other</i>.
    */
   public KeyCount(KeyCount other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetKey()) {
       this.key = org.apache.thrift.TBaseHelper.copyBinary(other.key);
 ;
@@ -209,16 +223,16 @@ public class KeyCount implements org.apache.thrift.TBase<KeyCount, KeyCount._Fie
   }
 
   public void unsetCount() {
-    __isset_bit_vector.clear(__COUNT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID);
   }
 
   /** Returns true if field count is set (has been assigned a value) and false otherwise */
   public boolean isSetCount() {
-    return __isset_bit_vector.get(__COUNT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID);
   }
 
   public void setCountIsSet(boolean value) {
-    __isset_bit_vector.set(__COUNT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -356,58 +370,11 @@ public class KeyCount implements org.apache.thrift.TBase<KeyCount, KeyCount._Fie
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // KEY
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.key = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // COUNT
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.count = iprot.readI32();
-            setCountIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.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 (!isSetCount()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
-    }
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.key != null) {
-      oprot.writeFieldBegin(KEY_FIELD_DESC);
-      oprot.writeBinary(this.key);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(COUNT_FIELD_DESC);
-    oprot.writeI32(this.count);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -436,6 +403,7 @@ public class KeyCount implements org.apache.thrift.TBase<KeyCount, KeyCount._Fie
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'key' was not present! Struct: " + toString());
     }
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -449,12 +417,103 @@ public class KeyCount implements org.apache.thrift.TBase<KeyCount, KeyCount._Fie
   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);
+      __isset_bitfield = 0;
       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);
     }
   }
 
+  private static class KeyCountStandardSchemeFactory implements SchemeFactory {
+    public KeyCountStandardScheme getScheme() {
+      return new KeyCountStandardScheme();
+    }
+  }
+
+  private static class KeyCountStandardScheme extends StandardScheme<KeyCount> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, KeyCount struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // KEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.key = iprot.readBinary();
+              struct.setKeyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // COUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.count = iprot.readI32();
+              struct.setCountIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      if (!struct.isSetCount()) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
+      }
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, KeyCount struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.key != null) {
+        oprot.writeFieldBegin(KEY_FIELD_DESC);
+        oprot.writeBinary(struct.key);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(COUNT_FIELD_DESC);
+      oprot.writeI32(struct.count);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class KeyCountTupleSchemeFactory implements SchemeFactory {
+    public KeyCountTupleScheme getScheme() {
+      return new KeyCountTupleScheme();
+    }
+  }
+
+  private static class KeyCountTupleScheme extends TupleScheme<KeyCount> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, KeyCount struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBinary(struct.key);
+      oprot.writeI32(struct.count);
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, KeyCount struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.key = iprot.readBinary();
+      struct.setKeyIsSet(true);
+      struct.count = iprot.readI32();
+      struct.setCountIsSet(true);
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b153d456/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java
----------------------------------------------------------------------
diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java
index 585d40e..243327d 100644
--- a/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java
+++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.cassandra.thrift;
 /*
@@ -27,6 +28,15 @@ package org.apache.cassandra.thrift;
 
 
 import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -60,11 +70,17 @@ public class KeyRange implements org.apache.thrift.TBase<KeyRange, KeyRange._Fie
   private static final org.apache.thrift.protocol.TField ROW_FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("row_filter", org.apache.thrift.protocol.TType.LIST, (short)6);
   private static final org.apache.thrift.protocol.TField COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("count", org.apache.thrift.protocol.TType.I32, (short)5);
 
-  public ByteBuffer start_key; // required
-  public ByteBuffer end_key; // required
-  public String start_token; // required
-  public String end_token; // required
-  public List<IndexExpression> row_filter; // required
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new KeyRangeStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new KeyRangeTupleSchemeFactory());
+  }
+
+  public ByteBuffer start_key; // optional
+  public ByteBuffer end_key; // optional
+  public String start_token; // optional
+  public String end_token; // optional
+  public List<IndexExpression> row_filter; // optional
   public int count; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -142,8 +158,8 @@ public class KeyRange implements org.apache.thrift.TBase<KeyRange, KeyRange._Fie
 
   // isset id assignments
   private static final int __COUNT_ISSET_ID = 0;
-  private BitSet __isset_bit_vector = new BitSet(1);
-
+  private byte __isset_bitfield = 0;
+  private _Fields optionals[] = {_Fields.START_KEY,_Fields.END_KEY,_Fields.START_TOKEN,_Fields.END_TOKEN,_Fields.ROW_FILTER};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -181,8 +197,7 @@ public class KeyRange implements org.apache.thrift.TBase<KeyRange, KeyRange._Fie
    * Performs a deep copy on <i>other</i>.
    */
   public KeyRange(KeyRange other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetStart_key()) {
       this.start_key = org.apache.thrift.TBaseHelper.copyBinary(other.start_key);
 ;
@@ -388,16 +403,16 @@ public class KeyRange implements org.apache.thrift.TBase<KeyRange, KeyRange._Fie
   }
 
   public void unsetCount() {
-    __isset_bit_vector.clear(__COUNT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COUNT_ISSET_ID);
   }
 
   /** Returns true if field count is set (has been assigned a value) and false otherwise */
   public boolean isSetCount() {
-    return __isset_bit_vector.get(__COUNT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __COUNT_ISSET_ID);
   }
 
   public void setCountIsSet(boolean value) {
-    __isset_bit_vector.set(__COUNT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COUNT_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -683,134 +698,11 @@ public class KeyRange implements org.apache.thrift.TBase<KeyRange, KeyRange._Fie
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // START_KEY
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.start_key = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // END_KEY
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.end_key = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // START_TOKEN
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.start_token = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // END_TOKEN
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.end_token = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 6: // ROW_FILTER
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
-              this.row_filter = new ArrayList<IndexExpression>(_list16.size);
-              for (int _i17 = 0; _i17 < _list16.size; ++_i17)
-              {
-                IndexExpression _elem18; // required
-                _elem18 = new IndexExpression();
-                _elem18.read(iprot);
-                this.row_filter.add(_elem18);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // COUNT
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.count = iprot.readI32();
-            setCountIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.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 (!isSetCount()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
-    }
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.start_key != null) {
-      if (isSetStart_key()) {
-        oprot.writeFieldBegin(START_KEY_FIELD_DESC);
-        oprot.writeBinary(this.start_key);
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.end_key != null) {
-      if (isSetEnd_key()) {
-        oprot.writeFieldBegin(END_KEY_FIELD_DESC);
-        oprot.writeBinary(this.end_key);
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.start_token != null) {
-      if (isSetStart_token()) {
-        oprot.writeFieldBegin(START_TOKEN_FIELD_DESC);
-        oprot.writeString(this.start_token);
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.end_token != null) {
-      if (isSetEnd_token()) {
-        oprot.writeFieldBegin(END_TOKEN_FIELD_DESC);
-        oprot.writeString(this.end_token);
-        oprot.writeFieldEnd();
-      }
-    }
-    oprot.writeFieldBegin(COUNT_FIELD_DESC);
-    oprot.writeI32(this.count);
-    oprot.writeFieldEnd();
-    if (this.row_filter != null) {
-      if (isSetRow_filter()) {
-        oprot.writeFieldBegin(ROW_FILTER_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.row_filter.size()));
-          for (IndexExpression _iter19 : this.row_filter)
-          {
-            _iter19.write(oprot);
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -878,6 +770,7 @@ public class KeyRange implements org.apache.thrift.TBase<KeyRange, KeyRange._Fie
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
     // alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -891,12 +784,249 @@ public class KeyRange implements org.apache.thrift.TBase<KeyRange, KeyRange._Fie
   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);
+      __isset_bitfield = 0;
       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);
     }
   }
 
+  private static class KeyRangeStandardSchemeFactory implements SchemeFactory {
+    public KeyRangeStandardScheme getScheme() {
+      return new KeyRangeStandardScheme();
+    }
+  }
+
+  private static class KeyRangeStandardScheme extends StandardScheme<KeyRange> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, KeyRange struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // START_KEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.start_key = iprot.readBinary();
+              struct.setStart_keyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // END_KEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.end_key = iprot.readBinary();
+              struct.setEnd_keyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // START_TOKEN
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.start_token = iprot.readString();
+              struct.setStart_tokenIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // END_TOKEN
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.end_token = iprot.readString();
+              struct.setEnd_tokenIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // ROW_FILTER
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
+                struct.row_filter = new ArrayList<IndexExpression>(_list32.size);
+                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
+                {
+                  IndexExpression _elem34; // required
+                  _elem34 = new IndexExpression();
+                  _elem34.read(iprot);
+                  struct.row_filter.add(_elem34);
+                }
+                iprot.readListEnd();
+              }
+              struct.setRow_filterIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // COUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.count = iprot.readI32();
+              struct.setCountIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      if (!struct.isSetCount()) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'count' was not found in serialized data! Struct: " + toString());
+      }
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, KeyRange struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.start_key != null) {
+        if (struct.isSetStart_key()) {
+          oprot.writeFieldBegin(START_KEY_FIELD_DESC);
+          oprot.writeBinary(struct.start_key);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.end_key != null) {
+        if (struct.isSetEnd_key()) {
+          oprot.writeFieldBegin(END_KEY_FIELD_DESC);
+          oprot.writeBinary(struct.end_key);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.start_token != null) {
+        if (struct.isSetStart_token()) {
+          oprot.writeFieldBegin(START_TOKEN_FIELD_DESC);
+          oprot.writeString(struct.start_token);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.end_token != null) {
+        if (struct.isSetEnd_token()) {
+          oprot.writeFieldBegin(END_TOKEN_FIELD_DESC);
+          oprot.writeString(struct.end_token);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldBegin(COUNT_FIELD_DESC);
+      oprot.writeI32(struct.count);
+      oprot.writeFieldEnd();
+      if (struct.row_filter != null) {
+        if (struct.isSetRow_filter()) {
+          oprot.writeFieldBegin(ROW_FILTER_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.row_filter.size()));
+            for (IndexExpression _iter35 : struct.row_filter)
+            {
+              _iter35.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class KeyRangeTupleSchemeFactory implements SchemeFactory {
+    public KeyRangeTupleScheme getScheme() {
+      return new KeyRangeTupleScheme();
+    }
+  }
+
+  private static class KeyRangeTupleScheme extends TupleScheme<KeyRange> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, KeyRange struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeI32(struct.count);
+      BitSet optionals = new BitSet();
+      if (struct.isSetStart_key()) {
+        optionals.set(0);
+      }
+      if (struct.isSetEnd_key()) {
+        optionals.set(1);
+      }
+      if (struct.isSetStart_token()) {
+        optionals.set(2);
+      }
+      if (struct.isSetEnd_token()) {
+        optionals.set(3);
+      }
+      if (struct.isSetRow_filter()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetStart_key()) {
+        oprot.writeBinary(struct.start_key);
+      }
+      if (struct.isSetEnd_key()) {
+        oprot.writeBinary(struct.end_key);
+      }
+      if (struct.isSetStart_token()) {
+        oprot.writeString(struct.start_token);
+      }
+      if (struct.isSetEnd_token()) {
+        oprot.writeString(struct.end_token);
+      }
+      if (struct.isSetRow_filter()) {
+        {
+          oprot.writeI32(struct.row_filter.size());
+          for (IndexExpression _iter36 : struct.row_filter)
+          {
+            _iter36.write(oprot);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, KeyRange struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.count = iprot.readI32();
+      struct.setCountIsSet(true);
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.start_key = iprot.readBinary();
+        struct.setStart_keyIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.end_key = iprot.readBinary();
+        struct.setEnd_keyIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.start_token = iprot.readString();
+        struct.setStart_tokenIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.end_token = iprot.readString();
+        struct.setEnd_tokenIsSet(true);
+      }
+      if (incoming.get(4)) {
+        {
+          org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.row_filter = new ArrayList<IndexExpression>(_list37.size);
+          for (int _i38 = 0; _i38 < _list37.size; ++_i38)
+          {
+            IndexExpression _elem39; // required
+            _elem39 = new IndexExpression();
+            _elem39.read(iprot);
+            struct.row_filter.add(_elem39);
+          }
+        }
+        struct.setRow_filterIsSet(true);
+      }
+    }
+  }
+
 }