incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [06/11] More changes, blur-core compile and tests pass.
Date Sun, 24 Mar 2013 20:05:23 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f4c3cc19/interface/gen-java/org/apache/blur/thrift/generated/RowMutation.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/RowMutation.java b/interface/gen-java/org/apache/blur/thrift/generated/RowMutation.java
index 49e4ee2..33a5530 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/RowMutation.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/RowMutation.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.blur.thrift.generated;
 
@@ -24,6 +25,15 @@ package org.apache.blur.thrift.generated;
 
 
 
+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 RowMutation implements org.apache.thrift.TBase<RowMutation, RowMuta
   private static final org.apache.thrift.protocol.TField RECORD_MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("recordMutations", org.apache.thrift.protocol.TType.LIST, (short)5);
   private static final org.apache.thrift.protocol.TField WAIT_TO_BE_VISIBLE_FIELD_DESC = new org.apache.thrift.protocol.TField("waitToBeVisible", org.apache.thrift.protocol.TType.BOOL, (short)6);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new RowMutationStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new RowMutationTupleSchemeFactory());
+  }
+
   /**
    * The that that the row mutation is to act upon.
    */
@@ -167,8 +183,7 @@ public class RowMutation implements org.apache.thrift.TBase<RowMutation, RowMuta
   // isset id assignments
   private static final int __WAL_ISSET_ID = 0;
   private static final int __WAITTOBEVISIBLE_ISSET_ID = 1;
-  private BitSet __isset_bit_vector = new BitSet(2);
-
+  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);
@@ -219,8 +234,7 @@ public class RowMutation implements org.apache.thrift.TBase<RowMutation, RowMuta
    * Performs a deep copy on <i>other</i>.
    */
   public RowMutation(RowMutation other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetTable()) {
       this.table = other.table;
     }
@@ -334,16 +348,16 @@ public class RowMutation implements org.apache.thrift.TBase<RowMutation, RowMuta
   }
 
   public void unsetWal() {
-    __isset_bit_vector.clear(__WAL_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WAL_ISSET_ID);
   }
 
   /** Returns true if field wal is set (has been assigned a value) and false otherwise */
   public boolean isSetWal() {
-    return __isset_bit_vector.get(__WAL_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __WAL_ISSET_ID);
   }
 
   public void setWalIsSet(boolean value) {
-    __isset_bit_vector.set(__WAL_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WAL_ISSET_ID, value);
   }
 
   /**
@@ -434,16 +448,16 @@ public class RowMutation implements org.apache.thrift.TBase<RowMutation, RowMuta
   }
 
   public void unsetWaitToBeVisible() {
-    __isset_bit_vector.clear(__WAITTOBEVISIBLE_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WAITTOBEVISIBLE_ISSET_ID);
   }
 
   /** Returns true if field waitToBeVisible is set (has been assigned a value) and false otherwise */
   public boolean isSetWaitToBeVisible() {
-    return __isset_bit_vector.get(__WAITTOBEVISIBLE_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __WAITTOBEVISIBLE_ISSET_ID);
   }
 
   public void setWaitToBeVisibleIsSet(boolean value) {
-    __isset_bit_vector.set(__WAITTOBEVISIBLE_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WAITTOBEVISIBLE_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -697,120 +711,11 @@ public class RowMutation implements org.apache.thrift.TBase<RowMutation, RowMuta
   }
 
   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: // TABLE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.table = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // ROW_ID
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.rowId = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // WAL
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.wal = iprot.readBool();
-            setWalIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // ROW_MUTATION_TYPE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.rowMutationType = RowMutationType.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // RECORD_MUTATIONS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list42 = iprot.readListBegin();
-              this.recordMutations = new ArrayList<RecordMutation>(_list42.size);
-              for (int _i43 = 0; _i43 < _list42.size; ++_i43)
-              {
-                RecordMutation _elem44; // required
-                _elem44 = new RecordMutation();
-                _elem44.read(iprot);
-                this.recordMutations.add(_elem44);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 6: // WAIT_TO_BE_VISIBLE
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.waitToBeVisible = iprot.readBool();
-            setWaitToBeVisibleIsSet(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
-    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.table != null) {
-      oprot.writeFieldBegin(TABLE_FIELD_DESC);
-      oprot.writeString(this.table);
-      oprot.writeFieldEnd();
-    }
-    if (this.rowId != null) {
-      oprot.writeFieldBegin(ROW_ID_FIELD_DESC);
-      oprot.writeString(this.rowId);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(WAL_FIELD_DESC);
-    oprot.writeBool(this.wal);
-    oprot.writeFieldEnd();
-    if (this.rowMutationType != null) {
-      oprot.writeFieldBegin(ROW_MUTATION_TYPE_FIELD_DESC);
-      oprot.writeI32(this.rowMutationType.getValue());
-      oprot.writeFieldEnd();
-    }
-    if (this.recordMutations != null) {
-      oprot.writeFieldBegin(RECORD_MUTATIONS_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.recordMutations.size()));
-        for (RecordMutation _iter45 : this.recordMutations)
-        {
-          _iter45.write(oprot);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(WAIT_TO_BE_VISIBLE_FIELD_DESC);
-    oprot.writeBool(this.waitToBeVisible);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -863,6 +768,7 @@ public class RowMutation implements org.apache.thrift.TBase<RowMutation, RowMuta
 
   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 {
@@ -876,12 +782,241 @@ public class RowMutation implements org.apache.thrift.TBase<RowMutation, RowMuta
   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 RowMutationStandardSchemeFactory implements SchemeFactory {
+    public RowMutationStandardScheme getScheme() {
+      return new RowMutationStandardScheme();
+    }
+  }
+
+  private static class RowMutationStandardScheme extends StandardScheme<RowMutation> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, RowMutation 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: // TABLE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.table = iprot.readString();
+              struct.setTableIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // ROW_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.rowId = iprot.readString();
+              struct.setRowIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // WAL
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.wal = iprot.readBool();
+              struct.setWalIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // ROW_MUTATION_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.rowMutationType = RowMutationType.findByValue(iprot.readI32());
+              struct.setRowMutationTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // RECORD_MUTATIONS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list84 = iprot.readListBegin();
+                struct.recordMutations = new ArrayList<RecordMutation>(_list84.size);
+                for (int _i85 = 0; _i85 < _list84.size; ++_i85)
+                {
+                  RecordMutation _elem86; // required
+                  _elem86 = new RecordMutation();
+                  _elem86.read(iprot);
+                  struct.recordMutations.add(_elem86);
+                }
+                iprot.readListEnd();
+              }
+              struct.setRecordMutationsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // WAIT_TO_BE_VISIBLE
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.waitToBeVisible = iprot.readBool();
+              struct.setWaitToBeVisibleIsSet(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, RowMutation struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.table != null) {
+        oprot.writeFieldBegin(TABLE_FIELD_DESC);
+        oprot.writeString(struct.table);
+        oprot.writeFieldEnd();
+      }
+      if (struct.rowId != null) {
+        oprot.writeFieldBegin(ROW_ID_FIELD_DESC);
+        oprot.writeString(struct.rowId);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(WAL_FIELD_DESC);
+      oprot.writeBool(struct.wal);
+      oprot.writeFieldEnd();
+      if (struct.rowMutationType != null) {
+        oprot.writeFieldBegin(ROW_MUTATION_TYPE_FIELD_DESC);
+        oprot.writeI32(struct.rowMutationType.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.recordMutations != null) {
+        oprot.writeFieldBegin(RECORD_MUTATIONS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.recordMutations.size()));
+          for (RecordMutation _iter87 : struct.recordMutations)
+          {
+            _iter87.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(WAIT_TO_BE_VISIBLE_FIELD_DESC);
+      oprot.writeBool(struct.waitToBeVisible);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class RowMutationTupleSchemeFactory implements SchemeFactory {
+    public RowMutationTupleScheme getScheme() {
+      return new RowMutationTupleScheme();
+    }
+  }
+
+  private static class RowMutationTupleScheme extends TupleScheme<RowMutation> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, RowMutation struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetTable()) {
+        optionals.set(0);
+      }
+      if (struct.isSetRowId()) {
+        optionals.set(1);
+      }
+      if (struct.isSetWal()) {
+        optionals.set(2);
+      }
+      if (struct.isSetRowMutationType()) {
+        optionals.set(3);
+      }
+      if (struct.isSetRecordMutations()) {
+        optionals.set(4);
+      }
+      if (struct.isSetWaitToBeVisible()) {
+        optionals.set(5);
+      }
+      oprot.writeBitSet(optionals, 6);
+      if (struct.isSetTable()) {
+        oprot.writeString(struct.table);
+      }
+      if (struct.isSetRowId()) {
+        oprot.writeString(struct.rowId);
+      }
+      if (struct.isSetWal()) {
+        oprot.writeBool(struct.wal);
+      }
+      if (struct.isSetRowMutationType()) {
+        oprot.writeI32(struct.rowMutationType.getValue());
+      }
+      if (struct.isSetRecordMutations()) {
+        {
+          oprot.writeI32(struct.recordMutations.size());
+          for (RecordMutation _iter88 : struct.recordMutations)
+          {
+            _iter88.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetWaitToBeVisible()) {
+        oprot.writeBool(struct.waitToBeVisible);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, RowMutation struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(6);
+      if (incoming.get(0)) {
+        struct.table = iprot.readString();
+        struct.setTableIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.rowId = iprot.readString();
+        struct.setRowIdIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.wal = iprot.readBool();
+        struct.setWalIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.rowMutationType = RowMutationType.findByValue(iprot.readI32());
+        struct.setRowMutationTypeIsSet(true);
+      }
+      if (incoming.get(4)) {
+        {
+          org.apache.thrift.protocol.TList _list89 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.recordMutations = new ArrayList<RecordMutation>(_list89.size);
+          for (int _i90 = 0; _i90 < _list89.size; ++_i90)
+          {
+            RecordMutation _elem91; // required
+            _elem91 = new RecordMutation();
+            _elem91.read(iprot);
+            struct.recordMutations.add(_elem91);
+          }
+        }
+        struct.setRecordMutationsIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.waitToBeVisible = iprot.readBool();
+        struct.setWaitToBeVisibleIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f4c3cc19/interface/gen-java/org/apache/blur/thrift/generated/RowMutationType.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/RowMutationType.java b/interface/gen-java/org/apache/blur/thrift/generated/RowMutationType.java
index 74e3f5c..a052094 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/RowMutationType.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/RowMutationType.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.blur.thrift.generated;
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f4c3cc19/interface/gen-java/org/apache/blur/thrift/generated/Schema.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/Schema.java b/interface/gen-java/org/apache/blur/thrift/generated/Schema.java
index a0c4656..be75a4a 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/Schema.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/Schema.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.blur.thrift.generated;
 
@@ -24,6 +25,15 @@ package org.apache.blur.thrift.generated;
 
 
 
+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 Schema implements org.apache.thrift.TBase<Schema, Schema._Fields>,
   private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField COLUMN_FAMILIES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnFamilies", org.apache.thrift.protocol.TType.MAP, (short)2);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SchemaStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SchemaTupleSchemeFactory());
+  }
+
   /**
    * 
    */
@@ -125,7 +141,6 @@ public class Schema implements org.apache.thrift.TBase<Schema, Schema._Fields>,
   }
 
   // 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);
@@ -383,93 +398,11 @@ public class Schema implements org.apache.thrift.TBase<Schema, Schema._Fields>,
   }
 
   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: // TABLE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.table = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // COLUMN_FAMILIES
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map51 = iprot.readMapBegin();
-              this.columnFamilies = new HashMap<String,Set<String>>(2*_map51.size);
-              for (int _i52 = 0; _i52 < _map51.size; ++_i52)
-              {
-                String _key53; // required
-                Set<String> _val54; // required
-                _key53 = iprot.readString();
-                {
-                  org.apache.thrift.protocol.TSet _set55 = iprot.readSetBegin();
-                  _val54 = new HashSet<String>(2*_set55.size);
-                  for (int _i56 = 0; _i56 < _set55.size; ++_i56)
-                  {
-                    String _elem57; // required
-                    _elem57 = iprot.readString();
-                    _val54.add(_elem57);
-                  }
-                  iprot.readSetEnd();
-                }
-                this.columnFamilies.put(_key53, _val54);
-              }
-              iprot.readMapEnd();
-            }
-          } 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.table != null) {
-      oprot.writeFieldBegin(TABLE_FIELD_DESC);
-      oprot.writeString(this.table);
-      oprot.writeFieldEnd();
-    }
-    if (this.columnFamilies != null) {
-      oprot.writeFieldBegin(COLUMN_FAMILIES_FIELD_DESC);
-      {
-        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, this.columnFamilies.size()));
-        for (Map.Entry<String, Set<String>> _iter58 : this.columnFamilies.entrySet())
-        {
-          oprot.writeString(_iter58.getKey());
-          {
-            oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, _iter58.getValue().size()));
-            for (String _iter59 : _iter58.getValue())
-            {
-              oprot.writeString(_iter59);
-            }
-            oprot.writeSetEnd();
-          }
-        }
-        oprot.writeMapEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -498,6 +431,7 @@ public class Schema implements org.apache.thrift.TBase<Schema, Schema._Fields>,
 
   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 {
@@ -516,5 +450,182 @@ public class Schema implements org.apache.thrift.TBase<Schema, Schema._Fields>,
     }
   }
 
+  private static class SchemaStandardSchemeFactory implements SchemeFactory {
+    public SchemaStandardScheme getScheme() {
+      return new SchemaStandardScheme();
+    }
+  }
+
+  private static class SchemaStandardScheme extends StandardScheme<Schema> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Schema 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: // TABLE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.table = iprot.readString();
+              struct.setTableIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // COLUMN_FAMILIES
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map102 = iprot.readMapBegin();
+                struct.columnFamilies = new HashMap<String,Set<String>>(2*_map102.size);
+                for (int _i103 = 0; _i103 < _map102.size; ++_i103)
+                {
+                  String _key104; // required
+                  Set<String> _val105; // optional
+                  _key104 = iprot.readString();
+                  {
+                    org.apache.thrift.protocol.TSet _set106 = iprot.readSetBegin();
+                    _val105 = new HashSet<String>(2*_set106.size);
+                    for (int _i107 = 0; _i107 < _set106.size; ++_i107)
+                    {
+                      String _elem108; // required
+                      _elem108 = iprot.readString();
+                      _val105.add(_elem108);
+                    }
+                    iprot.readSetEnd();
+                  }
+                  struct.columnFamilies.put(_key104, _val105);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setColumnFamiliesIsSet(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, Schema struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.table != null) {
+        oprot.writeFieldBegin(TABLE_FIELD_DESC);
+        oprot.writeString(struct.table);
+        oprot.writeFieldEnd();
+      }
+      if (struct.columnFamilies != null) {
+        oprot.writeFieldBegin(COLUMN_FAMILIES_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, struct.columnFamilies.size()));
+          for (Map.Entry<String, Set<String>> _iter109 : struct.columnFamilies.entrySet())
+          {
+            oprot.writeString(_iter109.getKey());
+            {
+              oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, _iter109.getValue().size()));
+              for (String _iter110 : _iter109.getValue())
+              {
+                oprot.writeString(_iter110);
+              }
+              oprot.writeSetEnd();
+            }
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SchemaTupleSchemeFactory implements SchemeFactory {
+    public SchemaTupleScheme getScheme() {
+      return new SchemaTupleScheme();
+    }
+  }
+
+  private static class SchemaTupleScheme extends TupleScheme<Schema> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Schema struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetTable()) {
+        optionals.set(0);
+      }
+      if (struct.isSetColumnFamilies()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetTable()) {
+        oprot.writeString(struct.table);
+      }
+      if (struct.isSetColumnFamilies()) {
+        {
+          oprot.writeI32(struct.columnFamilies.size());
+          for (Map.Entry<String, Set<String>> _iter111 : struct.columnFamilies.entrySet())
+          {
+            oprot.writeString(_iter111.getKey());
+            {
+              oprot.writeI32(_iter111.getValue().size());
+              for (String _iter112 : _iter111.getValue())
+              {
+                oprot.writeString(_iter112);
+              }
+            }
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Schema struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.table = iprot.readString();
+        struct.setTableIsSet(true);
+      }
+      if (incoming.get(1)) {
+        {
+          org.apache.thrift.protocol.TMap _map113 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32());
+          struct.columnFamilies = new HashMap<String,Set<String>>(2*_map113.size);
+          for (int _i114 = 0; _i114 < _map113.size; ++_i114)
+          {
+            String _key115; // required
+            Set<String> _val116; // optional
+            _key115 = iprot.readString();
+            {
+              org.apache.thrift.protocol.TSet _set117 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+              _val116 = new HashSet<String>(2*_set117.size);
+              for (int _i118 = 0; _i118 < _set117.size; ++_i118)
+              {
+                String _elem119; // required
+                _elem119 = iprot.readString();
+                _val116.add(_elem119);
+              }
+            }
+            struct.columnFamilies.put(_key115, _val116);
+          }
+        }
+        struct.setColumnFamiliesIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f4c3cc19/interface/gen-java/org/apache/blur/thrift/generated/ScoreType.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/ScoreType.java b/interface/gen-java/org/apache/blur/thrift/generated/ScoreType.java
index 7ff246c..fd75598 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/ScoreType.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/ScoreType.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.blur.thrift.generated;
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f4c3cc19/interface/gen-java/org/apache/blur/thrift/generated/Selector.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/Selector.java b/interface/gen-java/org/apache/blur/thrift/generated/Selector.java
index 1450997..e1a4c5b 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/Selector.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/Selector.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.blur.thrift.generated;
 
@@ -24,6 +25,15 @@ package org.apache.blur.thrift.generated;
 
 
 
+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;
@@ -53,6 +63,12 @@ public class Selector implements org.apache.thrift.TBase<Selector, Selector._Fie
   private static final org.apache.thrift.protocol.TField COLUMNS_TO_FETCH_FIELD_DESC = new org.apache.thrift.protocol.TField("columnsToFetch", org.apache.thrift.protocol.TType.MAP, (short)6);
   private static final org.apache.thrift.protocol.TField ALLOW_STALE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("allowStaleData", org.apache.thrift.protocol.TType.BOOL, (short)7);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SelectorStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SelectorTupleSchemeFactory());
+  }
+
   /**
    * Fetch the Record only, not the entire Row.
    */
@@ -182,8 +198,7 @@ public class Selector implements org.apache.thrift.TBase<Selector, Selector._Fie
   // isset id assignments
   private static final int __RECORDONLY_ISSET_ID = 0;
   private static final int __ALLOWSTALEDATA_ISSET_ID = 1;
-  private BitSet __isset_bit_vector = new BitSet(2);
-
+  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);
@@ -237,8 +252,7 @@ public class Selector implements org.apache.thrift.TBase<Selector, Selector._Fie
    * Performs a deep copy on <i>other</i>.
    */
   public Selector(Selector other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     this.recordOnly = other.recordOnly;
     if (other.isSetLocationId()) {
       this.locationId = other.locationId;
@@ -311,16 +325,16 @@ public class Selector implements org.apache.thrift.TBase<Selector, Selector._Fie
   }
 
   public void unsetRecordOnly() {
-    __isset_bit_vector.clear(__RECORDONLY_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORDONLY_ISSET_ID);
   }
 
   /** Returns true if field recordOnly is set (has been assigned a value) and false otherwise */
   public boolean isSetRecordOnly() {
-    return __isset_bit_vector.get(__RECORDONLY_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __RECORDONLY_ISSET_ID);
   }
 
   public void setRecordOnlyIsSet(boolean value) {
-    __isset_bit_vector.set(__RECORDONLY_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORDONLY_ISSET_ID, value);
   }
 
   /**
@@ -516,16 +530,16 @@ public class Selector implements org.apache.thrift.TBase<Selector, Selector._Fie
   }
 
   public void unsetAllowStaleData() {
-    __isset_bit_vector.clear(__ALLOWSTALEDATA_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ALLOWSTALEDATA_ISSET_ID);
   }
 
   /** Returns true if field allowStaleData is set (has been assigned a value) and false otherwise */
   public boolean isSetAllowStaleData() {
-    return __isset_bit_vector.get(__ALLOWSTALEDATA_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __ALLOWSTALEDATA_ISSET_ID);
   }
 
   public void setAllowStaleDataIsSet(boolean value) {
-    __isset_bit_vector.set(__ALLOWSTALEDATA_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ALLOWSTALEDATA_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -811,168 +825,11 @@ public class Selector implements org.apache.thrift.TBase<Selector, Selector._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: // RECORD_ONLY
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.recordOnly = iprot.readBool();
-            setRecordOnlyIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // LOCATION_ID
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.locationId = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // ROW_ID
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.rowId = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // RECORD_ID
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.recordId = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // COLUMN_FAMILIES_TO_FETCH
-          if (field.type == org.apache.thrift.protocol.TType.SET) {
-            {
-              org.apache.thrift.protocol.TSet _set8 = iprot.readSetBegin();
-              this.columnFamiliesToFetch = new HashSet<String>(2*_set8.size);
-              for (int _i9 = 0; _i9 < _set8.size; ++_i9)
-              {
-                String _elem10; // required
-                _elem10 = iprot.readString();
-                this.columnFamiliesToFetch.add(_elem10);
-              }
-              iprot.readSetEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 6: // COLUMNS_TO_FETCH
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map11 = iprot.readMapBegin();
-              this.columnsToFetch = new HashMap<String,Set<String>>(2*_map11.size);
-              for (int _i12 = 0; _i12 < _map11.size; ++_i12)
-              {
-                String _key13; // required
-                Set<String> _val14; // required
-                _key13 = iprot.readString();
-                {
-                  org.apache.thrift.protocol.TSet _set15 = iprot.readSetBegin();
-                  _val14 = new HashSet<String>(2*_set15.size);
-                  for (int _i16 = 0; _i16 < _set15.size; ++_i16)
-                  {
-                    String _elem17; // required
-                    _elem17 = iprot.readString();
-                    _val14.add(_elem17);
-                  }
-                  iprot.readSetEnd();
-                }
-                this.columnsToFetch.put(_key13, _val14);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 7: // ALLOW_STALE_DATA
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.allowStaleData = iprot.readBool();
-            setAllowStaleDataIsSet(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
-    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);
-    oprot.writeFieldBegin(RECORD_ONLY_FIELD_DESC);
-    oprot.writeBool(this.recordOnly);
-    oprot.writeFieldEnd();
-    if (this.locationId != null) {
-      oprot.writeFieldBegin(LOCATION_ID_FIELD_DESC);
-      oprot.writeString(this.locationId);
-      oprot.writeFieldEnd();
-    }
-    if (this.rowId != null) {
-      oprot.writeFieldBegin(ROW_ID_FIELD_DESC);
-      oprot.writeString(this.rowId);
-      oprot.writeFieldEnd();
-    }
-    if (this.recordId != null) {
-      oprot.writeFieldBegin(RECORD_ID_FIELD_DESC);
-      oprot.writeString(this.recordId);
-      oprot.writeFieldEnd();
-    }
-    if (this.columnFamiliesToFetch != null) {
-      oprot.writeFieldBegin(COLUMN_FAMILIES_TO_FETCH_FIELD_DESC);
-      {
-        oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, this.columnFamiliesToFetch.size()));
-        for (String _iter18 : this.columnFamiliesToFetch)
-        {
-          oprot.writeString(_iter18);
-        }
-        oprot.writeSetEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    if (this.columnsToFetch != null) {
-      oprot.writeFieldBegin(COLUMNS_TO_FETCH_FIELD_DESC);
-      {
-        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, this.columnsToFetch.size()));
-        for (Map.Entry<String, Set<String>> _iter19 : this.columnsToFetch.entrySet())
-        {
-          oprot.writeString(_iter19.getKey());
-          {
-            oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, _iter19.getValue().size()));
-            for (String _iter20 : _iter19.getValue())
-            {
-              oprot.writeString(_iter20);
-            }
-            oprot.writeSetEnd();
-          }
-        }
-        oprot.writeMapEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(ALLOW_STALE_DATA_FIELD_DESC);
-    oprot.writeBool(this.allowStaleData);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -1033,6 +890,7 @@ public class Selector implements org.apache.thrift.TBase<Selector, Selector._Fie
 
   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 {
@@ -1046,12 +904,332 @@ public class Selector implements org.apache.thrift.TBase<Selector, Selector._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 SelectorStandardSchemeFactory implements SchemeFactory {
+    public SelectorStandardScheme getScheme() {
+      return new SelectorStandardScheme();
+    }
+  }
+
+  private static class SelectorStandardScheme extends StandardScheme<Selector> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Selector 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: // RECORD_ONLY
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.recordOnly = iprot.readBool();
+              struct.setRecordOnlyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // LOCATION_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.locationId = iprot.readString();
+              struct.setLocationIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // ROW_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.rowId = iprot.readString();
+              struct.setRowIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // RECORD_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.recordId = iprot.readString();
+              struct.setRecordIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // COLUMN_FAMILIES_TO_FETCH
+            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+              {
+                org.apache.thrift.protocol.TSet _set16 = iprot.readSetBegin();
+                struct.columnFamiliesToFetch = new HashSet<String>(2*_set16.size);
+                for (int _i17 = 0; _i17 < _set16.size; ++_i17)
+                {
+                  String _elem18; // required
+                  _elem18 = iprot.readString();
+                  struct.columnFamiliesToFetch.add(_elem18);
+                }
+                iprot.readSetEnd();
+              }
+              struct.setColumnFamiliesToFetchIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // COLUMNS_TO_FETCH
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map19 = iprot.readMapBegin();
+                struct.columnsToFetch = new HashMap<String,Set<String>>(2*_map19.size);
+                for (int _i20 = 0; _i20 < _map19.size; ++_i20)
+                {
+                  String _key21; // required
+                  Set<String> _val22; // optional
+                  _key21 = iprot.readString();
+                  {
+                    org.apache.thrift.protocol.TSet _set23 = iprot.readSetBegin();
+                    _val22 = new HashSet<String>(2*_set23.size);
+                    for (int _i24 = 0; _i24 < _set23.size; ++_i24)
+                    {
+                      String _elem25; // required
+                      _elem25 = iprot.readString();
+                      _val22.add(_elem25);
+                    }
+                    iprot.readSetEnd();
+                  }
+                  struct.columnsToFetch.put(_key21, _val22);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setColumnsToFetchIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // ALLOW_STALE_DATA
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.allowStaleData = iprot.readBool();
+              struct.setAllowStaleDataIsSet(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, Selector struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(RECORD_ONLY_FIELD_DESC);
+      oprot.writeBool(struct.recordOnly);
+      oprot.writeFieldEnd();
+      if (struct.locationId != null) {
+        oprot.writeFieldBegin(LOCATION_ID_FIELD_DESC);
+        oprot.writeString(struct.locationId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.rowId != null) {
+        oprot.writeFieldBegin(ROW_ID_FIELD_DESC);
+        oprot.writeString(struct.rowId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.recordId != null) {
+        oprot.writeFieldBegin(RECORD_ID_FIELD_DESC);
+        oprot.writeString(struct.recordId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.columnFamiliesToFetch != null) {
+        oprot.writeFieldBegin(COLUMN_FAMILIES_TO_FETCH_FIELD_DESC);
+        {
+          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.columnFamiliesToFetch.size()));
+          for (String _iter26 : struct.columnFamiliesToFetch)
+          {
+            oprot.writeString(_iter26);
+          }
+          oprot.writeSetEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.columnsToFetch != null) {
+        oprot.writeFieldBegin(COLUMNS_TO_FETCH_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, struct.columnsToFetch.size()));
+          for (Map.Entry<String, Set<String>> _iter27 : struct.columnsToFetch.entrySet())
+          {
+            oprot.writeString(_iter27.getKey());
+            {
+              oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, _iter27.getValue().size()));
+              for (String _iter28 : _iter27.getValue())
+              {
+                oprot.writeString(_iter28);
+              }
+              oprot.writeSetEnd();
+            }
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(ALLOW_STALE_DATA_FIELD_DESC);
+      oprot.writeBool(struct.allowStaleData);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SelectorTupleSchemeFactory implements SchemeFactory {
+    public SelectorTupleScheme getScheme() {
+      return new SelectorTupleScheme();
+    }
+  }
+
+  private static class SelectorTupleScheme extends TupleScheme<Selector> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Selector struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetRecordOnly()) {
+        optionals.set(0);
+      }
+      if (struct.isSetLocationId()) {
+        optionals.set(1);
+      }
+      if (struct.isSetRowId()) {
+        optionals.set(2);
+      }
+      if (struct.isSetRecordId()) {
+        optionals.set(3);
+      }
+      if (struct.isSetColumnFamiliesToFetch()) {
+        optionals.set(4);
+      }
+      if (struct.isSetColumnsToFetch()) {
+        optionals.set(5);
+      }
+      if (struct.isSetAllowStaleData()) {
+        optionals.set(6);
+      }
+      oprot.writeBitSet(optionals, 7);
+      if (struct.isSetRecordOnly()) {
+        oprot.writeBool(struct.recordOnly);
+      }
+      if (struct.isSetLocationId()) {
+        oprot.writeString(struct.locationId);
+      }
+      if (struct.isSetRowId()) {
+        oprot.writeString(struct.rowId);
+      }
+      if (struct.isSetRecordId()) {
+        oprot.writeString(struct.recordId);
+      }
+      if (struct.isSetColumnFamiliesToFetch()) {
+        {
+          oprot.writeI32(struct.columnFamiliesToFetch.size());
+          for (String _iter29 : struct.columnFamiliesToFetch)
+          {
+            oprot.writeString(_iter29);
+          }
+        }
+      }
+      if (struct.isSetColumnsToFetch()) {
+        {
+          oprot.writeI32(struct.columnsToFetch.size());
+          for (Map.Entry<String, Set<String>> _iter30 : struct.columnsToFetch.entrySet())
+          {
+            oprot.writeString(_iter30.getKey());
+            {
+              oprot.writeI32(_iter30.getValue().size());
+              for (String _iter31 : _iter30.getValue())
+              {
+                oprot.writeString(_iter31);
+              }
+            }
+          }
+        }
+      }
+      if (struct.isSetAllowStaleData()) {
+        oprot.writeBool(struct.allowStaleData);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Selector struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(7);
+      if (incoming.get(0)) {
+        struct.recordOnly = iprot.readBool();
+        struct.setRecordOnlyIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.locationId = iprot.readString();
+        struct.setLocationIdIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.rowId = iprot.readString();
+        struct.setRowIdIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.recordId = iprot.readString();
+        struct.setRecordIdIsSet(true);
+      }
+      if (incoming.get(4)) {
+        {
+          org.apache.thrift.protocol.TSet _set32 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.columnFamiliesToFetch = new HashSet<String>(2*_set32.size);
+          for (int _i33 = 0; _i33 < _set32.size; ++_i33)
+          {
+            String _elem34; // required
+            _elem34 = iprot.readString();
+            struct.columnFamiliesToFetch.add(_elem34);
+          }
+        }
+        struct.setColumnFamiliesToFetchIsSet(true);
+      }
+      if (incoming.get(5)) {
+        {
+          org.apache.thrift.protocol.TMap _map35 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32());
+          struct.columnsToFetch = new HashMap<String,Set<String>>(2*_map35.size);
+          for (int _i36 = 0; _i36 < _map35.size; ++_i36)
+          {
+            String _key37; // required
+            Set<String> _val38; // optional
+            _key37 = iprot.readString();
+            {
+              org.apache.thrift.protocol.TSet _set39 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+              _val38 = new HashSet<String>(2*_set39.size);
+              for (int _i40 = 0; _i40 < _set39.size; ++_i40)
+              {
+                String _elem41; // required
+                _elem41 = iprot.readString();
+                _val38.add(_elem41);
+              }
+            }
+            struct.columnsToFetch.put(_key37, _val38);
+          }
+        }
+        struct.setColumnsToFetchIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.allowStaleData = iprot.readBool();
+        struct.setAllowStaleDataIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f4c3cc19/interface/gen-java/org/apache/blur/thrift/generated/SimpleQuery.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/SimpleQuery.java b/interface/gen-java/org/apache/blur/thrift/generated/SimpleQuery.java
index 3184149..2b1892b 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/SimpleQuery.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/SimpleQuery.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.blur.thrift.generated;
 
@@ -24,6 +25,15 @@ package org.apache.blur.thrift.generated;
 
 
 
+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;
@@ -51,6 +61,12 @@ public class SimpleQuery implements org.apache.thrift.TBase<SimpleQuery, SimpleQ
   private static final org.apache.thrift.protocol.TField POST_SUPER_FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("postSuperFilter", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField PRE_SUPER_FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("preSuperFilter", org.apache.thrift.protocol.TType.STRING, (short)5);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SimpleQueryStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SimpleQueryTupleSchemeFactory());
+  }
+
   /**
    * A Lucene syntax based query.
    */
@@ -163,8 +179,7 @@ public class SimpleQuery implements org.apache.thrift.TBase<SimpleQuery, SimpleQ
 
   // isset id assignments
   private static final int __SUPERQUERYON_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);
@@ -209,8 +224,7 @@ public class SimpleQuery implements org.apache.thrift.TBase<SimpleQuery, SimpleQ
    * Performs a deep copy on <i>other</i>.
    */
   public SimpleQuery(SimpleQuery other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetQueryStr()) {
       this.queryStr = other.queryStr;
     }
@@ -288,16 +302,16 @@ public class SimpleQuery implements org.apache.thrift.TBase<SimpleQuery, SimpleQ
   }
 
   public void unsetSuperQueryOn() {
-    __isset_bit_vector.clear(__SUPERQUERYON_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUPERQUERYON_ISSET_ID);
   }
 
   /** Returns true if field superQueryOn is set (has been assigned a value) and false otherwise */
   public boolean isSetSuperQueryOn() {
-    return __isset_bit_vector.get(__SUPERQUERYON_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __SUPERQUERYON_ISSET_ID);
   }
 
   public void setSuperQueryOnIsSet(boolean value) {
-    __isset_bit_vector.set(__SUPERQUERYON_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUPERQUERYON_ISSET_ID, value);
   }
 
   /**
@@ -613,91 +627,11 @@ public class SimpleQuery implements org.apache.thrift.TBase<SimpleQuery, SimpleQ
   }
 
   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: // QUERY_STR
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.queryStr = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // SUPER_QUERY_ON
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.superQueryOn = iprot.readBool();
-            setSuperQueryOnIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // TYPE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.type = ScoreType.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // POST_SUPER_FILTER
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.postSuperFilter = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // PRE_SUPER_FILTER
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.preSuperFilter = 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.queryStr != null) {
-      oprot.writeFieldBegin(QUERY_STR_FIELD_DESC);
-      oprot.writeString(this.queryStr);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(SUPER_QUERY_ON_FIELD_DESC);
-    oprot.writeBool(this.superQueryOn);
-    oprot.writeFieldEnd();
-    if (this.type != null) {
-      oprot.writeFieldBegin(TYPE_FIELD_DESC);
-      oprot.writeI32(this.type.getValue());
-      oprot.writeFieldEnd();
-    }
-    if (this.postSuperFilter != null) {
-      oprot.writeFieldBegin(POST_SUPER_FILTER_FIELD_DESC);
-      oprot.writeString(this.postSuperFilter);
-      oprot.writeFieldEnd();
-    }
-    if (this.preSuperFilter != null) {
-      oprot.writeFieldBegin(PRE_SUPER_FILTER_FIELD_DESC);
-      oprot.writeString(this.preSuperFilter);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -746,6 +680,7 @@ public class SimpleQuery implements org.apache.thrift.TBase<SimpleQuery, SimpleQ
 
   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 {
@@ -759,12 +694,186 @@ public class SimpleQuery implements org.apache.thrift.TBase<SimpleQuery, SimpleQ
   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 SimpleQueryStandardSchemeFactory implements SchemeFactory {
+    public SimpleQueryStandardScheme getScheme() {
+      return new SimpleQueryStandardScheme();
+    }
+  }
+
+  private static class SimpleQueryStandardScheme extends StandardScheme<SimpleQuery> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, SimpleQuery 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: // QUERY_STR
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.queryStr = iprot.readString();
+              struct.setQueryStrIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // SUPER_QUERY_ON
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.superQueryOn = iprot.readBool();
+              struct.setSuperQueryOnIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.type = ScoreType.findByValue(iprot.readI32());
+              struct.setTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // POST_SUPER_FILTER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.postSuperFilter = iprot.readString();
+              struct.setPostSuperFilterIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // PRE_SUPER_FILTER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.preSuperFilter = iprot.readString();
+              struct.setPreSuperFilterIsSet(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, SimpleQuery struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.queryStr != null) {
+        oprot.writeFieldBegin(QUERY_STR_FIELD_DESC);
+        oprot.writeString(struct.queryStr);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(SUPER_QUERY_ON_FIELD_DESC);
+      oprot.writeBool(struct.superQueryOn);
+      oprot.writeFieldEnd();
+      if (struct.type != null) {
+        oprot.writeFieldBegin(TYPE_FIELD_DESC);
+        oprot.writeI32(struct.type.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.postSuperFilter != null) {
+        oprot.writeFieldBegin(POST_SUPER_FILTER_FIELD_DESC);
+        oprot.writeString(struct.postSuperFilter);
+        oprot.writeFieldEnd();
+      }
+      if (struct.preSuperFilter != null) {
+        oprot.writeFieldBegin(PRE_SUPER_FILTER_FIELD_DESC);
+        oprot.writeString(struct.preSuperFilter);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SimpleQueryTupleSchemeFactory implements SchemeFactory {
+    public SimpleQueryTupleScheme getScheme() {
+      return new SimpleQueryTupleScheme();
+    }
+  }
+
+  private static class SimpleQueryTupleScheme extends TupleScheme<SimpleQuery> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, SimpleQuery struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetQueryStr()) {
+        optionals.set(0);
+      }
+      if (struct.isSetSuperQueryOn()) {
+        optionals.set(1);
+      }
+      if (struct.isSetType()) {
+        optionals.set(2);
+      }
+      if (struct.isSetPostSuperFilter()) {
+        optionals.set(3);
+      }
+      if (struct.isSetPreSuperFilter()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetQueryStr()) {
+        oprot.writeString(struct.queryStr);
+      }
+      if (struct.isSetSuperQueryOn()) {
+        oprot.writeBool(struct.superQueryOn);
+      }
+      if (struct.isSetType()) {
+        oprot.writeI32(struct.type.getValue());
+      }
+      if (struct.isSetPostSuperFilter()) {
+        oprot.writeString(struct.postSuperFilter);
+      }
+      if (struct.isSetPreSuperFilter()) {
+        oprot.writeString(struct.preSuperFilter);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, SimpleQuery struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.queryStr = iprot.readString();
+        struct.setQueryStrIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.superQueryOn = iprot.readBool();
+        struct.setSuperQueryOnIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.type = ScoreType.findByValue(iprot.readI32());
+        struct.setTypeIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.postSuperFilter = iprot.readString();
+        struct.setPostSuperFilterIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.preSuperFilter = iprot.readString();
+        struct.setPreSuperFilterIsSet(true);
+      }
+    }
+  }
+
 }
 


Mime
View raw message