incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [25/46] Regenerated thrift code.
Date Tue, 30 Oct 2012 02:53:19 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Schema.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Schema.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Schema.java
index a0c4656..be75a4a 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Schema.java
+++ b/src/blur-thrift/src/main/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/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ScoreDoc.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ScoreDoc.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ScoreDoc.java
index 4bb7e15..84f73f3 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ScoreDoc.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ScoreDoc.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;
@@ -46,6 +56,12 @@ public class ScoreDoc implements org.apache.thrift.TBase<ScoreDoc, ScoreDoc._Fie
   private static final org.apache.thrift.protocol.TField DOC_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("docLocation", org.apache.thrift.protocol.TType.STRUCT, (short)2);
   private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.LIST, (short)4);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ScoreDocStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ScoreDocTupleSchemeFactory());
+  }
+
   public double score; // required
   public DocLocation docLocation; // required
   public List<ByteBuffer> fields; // required
@@ -116,8 +132,7 @@ public class ScoreDoc implements org.apache.thrift.TBase<ScoreDoc, ScoreDoc._Fie
 
   // isset id assignments
   private static final int __SCORE_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);
@@ -151,8 +166,7 @@ public class ScoreDoc implements org.apache.thrift.TBase<ScoreDoc, ScoreDoc._Fie
    * Performs a deep copy on <i>other</i>.
    */
   public ScoreDoc(ScoreDoc other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     this.score = other.score;
     if (other.isSetDocLocation()) {
       this.docLocation = new DocLocation(other.docLocation);
@@ -191,16 +205,16 @@ public class ScoreDoc implements org.apache.thrift.TBase<ScoreDoc, ScoreDoc._Fie
   }
 
   public void unsetScore() {
-    __isset_bit_vector.clear(__SCORE_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCORE_ISSET_ID);
   }
 
   /** Returns true if field score is set (has been assigned a value) and false otherwise */
   public boolean isSetScore() {
-    return __isset_bit_vector.get(__SCORE_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __SCORE_ISSET_ID);
   }
 
   public void setScoreIsSet(boolean value) {
-    __isset_bit_vector.set(__SCORE_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCORE_ISSET_ID, value);
   }
 
   public DocLocation getDocLocation() {
@@ -421,85 +435,11 @@ public class ScoreDoc implements org.apache.thrift.TBase<ScoreDoc, ScoreDoc._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: // SCORE
-          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-            this.score = iprot.readDouble();
-            setScoreIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // DOC_LOCATION
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.docLocation = new DocLocation();
-            this.docLocation.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // FIELDS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list92 = iprot.readListBegin();
-              this.fields = new ArrayList<ByteBuffer>(_list92.size);
-              for (int _i93 = 0; _i93 < _list92.size; ++_i93)
-              {
-                ByteBuffer _elem94; // required
-                _elem94 = iprot.readBinary();
-                this.fields.add(_elem94);
-              }
-              iprot.readListEnd();
-            }
-          } 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(SCORE_FIELD_DESC);
-    oprot.writeDouble(this.score);
-    oprot.writeFieldEnd();
-    if (this.docLocation != null) {
-      oprot.writeFieldBegin(DOC_LOCATION_FIELD_DESC);
-      this.docLocation.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    if (this.fields != null) {
-      oprot.writeFieldBegin(FIELDS_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.fields.size()));
-        for (ByteBuffer _iter95 : this.fields)
-        {
-          oprot.writeBinary(_iter95);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -532,6 +472,10 @@ public class ScoreDoc implements org.apache.thrift.TBase<ScoreDoc, ScoreDoc._Fie
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (docLocation != null) {
+      docLocation.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -545,12 +489,174 @@ public class ScoreDoc implements org.apache.thrift.TBase<ScoreDoc, ScoreDoc._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 ScoreDocStandardSchemeFactory implements SchemeFactory {
+    public ScoreDocStandardScheme getScheme() {
+      return new ScoreDocStandardScheme();
+    }
+  }
+
+  private static class ScoreDocStandardScheme extends StandardScheme<ScoreDoc> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, ScoreDoc 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: // SCORE
+            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+              struct.score = iprot.readDouble();
+              struct.setScoreIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // DOC_LOCATION
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.docLocation = new DocLocation();
+              struct.docLocation.read(iprot);
+              struct.setDocLocationIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // FIELDS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list184 = iprot.readListBegin();
+                struct.fields = new ArrayList<ByteBuffer>(_list184.size);
+                for (int _i185 = 0; _i185 < _list184.size; ++_i185)
+                {
+                  ByteBuffer _elem186; // required
+                  _elem186 = iprot.readBinary();
+                  struct.fields.add(_elem186);
+                }
+                iprot.readListEnd();
+              }
+              struct.setFieldsIsSet(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, ScoreDoc struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(SCORE_FIELD_DESC);
+      oprot.writeDouble(struct.score);
+      oprot.writeFieldEnd();
+      if (struct.docLocation != null) {
+        oprot.writeFieldBegin(DOC_LOCATION_FIELD_DESC);
+        struct.docLocation.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.fields != null) {
+        oprot.writeFieldBegin(FIELDS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.fields.size()));
+          for (ByteBuffer _iter187 : struct.fields)
+          {
+            oprot.writeBinary(_iter187);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ScoreDocTupleSchemeFactory implements SchemeFactory {
+    public ScoreDocTupleScheme getScheme() {
+      return new ScoreDocTupleScheme();
+    }
+  }
+
+  private static class ScoreDocTupleScheme extends TupleScheme<ScoreDoc> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, ScoreDoc struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetScore()) {
+        optionals.set(0);
+      }
+      if (struct.isSetDocLocation()) {
+        optionals.set(1);
+      }
+      if (struct.isSetFields()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetScore()) {
+        oprot.writeDouble(struct.score);
+      }
+      if (struct.isSetDocLocation()) {
+        struct.docLocation.write(oprot);
+      }
+      if (struct.isSetFields()) {
+        {
+          oprot.writeI32(struct.fields.size());
+          for (ByteBuffer _iter188 : struct.fields)
+          {
+            oprot.writeBinary(_iter188);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, ScoreDoc struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.score = iprot.readDouble();
+        struct.setScoreIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.docLocation = new DocLocation();
+        struct.docLocation.read(iprot);
+        struct.setDocLocationIsSet(true);
+      }
+      if (incoming.get(2)) {
+        {
+          org.apache.thrift.protocol.TList _list189 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.fields = new ArrayList<ByteBuffer>(_list189.size);
+          for (int _i190 = 0; _i190 < _list189.size; ++_i190)
+          {
+            ByteBuffer _elem191; // required
+            _elem191 = iprot.readBinary();
+            struct.fields.add(_elem191);
+          }
+        }
+        struct.setFieldsIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ScoreType.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ScoreType.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ScoreType.java
index 7ff246c..fd75598 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ScoreType.java
+++ b/src/blur-thrift/src/main/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/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Selector.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Selector.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Selector.java
index 1450997..e1a4c5b 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Selector.java
+++ b/src/blur-thrift/src/main/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/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Session.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Session.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Session.java
index 503c798..30b8be9 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Session.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Session.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;
@@ -45,6 +55,12 @@ public class Session implements org.apache.thrift.TBase<Session, Session._Fields
   private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", 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 SessionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SessionTupleSchemeFactory());
+  }
+
   public String sessionId; // required
   public Map<String,String> properties; // required
 
@@ -110,7 +126,6 @@ public class Session implements org.apache.thrift.TBase<Session, Session._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);
@@ -352,76 +367,11 @@ public class Session implements org.apache.thrift.TBase<Session, Session._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: // SESSION_ID
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.sessionId = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // PROPERTIES
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map83 = iprot.readMapBegin();
-              this.properties = new HashMap<String,String>(2*_map83.size);
-              for (int _i84 = 0; _i84 < _map83.size; ++_i84)
-              {
-                String _key85; // required
-                String _val86; // required
-                _key85 = iprot.readString();
-                _val86 = iprot.readString();
-                this.properties.put(_key85, _val86);
-              }
-              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.sessionId != null) {
-      oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
-      oprot.writeString(this.sessionId);
-      oprot.writeFieldEnd();
-    }
-    if (this.properties != null) {
-      oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
-      {
-        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.properties.size()));
-        for (Map.Entry<String, String> _iter87 : this.properties.entrySet())
-        {
-          oprot.writeString(_iter87.getKey());
-          oprot.writeString(_iter87.getValue());
-        }
-        oprot.writeMapEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -450,6 +400,7 @@ public class Session implements org.apache.thrift.TBase<Session, Session._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 {
@@ -468,5 +419,150 @@ public class Session implements org.apache.thrift.TBase<Session, Session._Fields
     }
   }
 
+  private static class SessionStandardSchemeFactory implements SchemeFactory {
+    public SessionStandardScheme getScheme() {
+      return new SessionStandardScheme();
+    }
+  }
+
+  private static class SessionStandardScheme extends StandardScheme<Session> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Session 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: // SESSION_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.sessionId = iprot.readString();
+              struct.setSessionIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // PROPERTIES
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map166 = iprot.readMapBegin();
+                struct.properties = new HashMap<String,String>(2*_map166.size);
+                for (int _i167 = 0; _i167 < _map166.size; ++_i167)
+                {
+                  String _key168; // required
+                  String _val169; // optional
+                  _key168 = iprot.readString();
+                  _val169 = iprot.readString();
+                  struct.properties.put(_key168, _val169);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setPropertiesIsSet(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, Session struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.sessionId != null) {
+        oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
+        oprot.writeString(struct.sessionId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.properties != null) {
+        oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
+          for (Map.Entry<String, String> _iter170 : struct.properties.entrySet())
+          {
+            oprot.writeString(_iter170.getKey());
+            oprot.writeString(_iter170.getValue());
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SessionTupleSchemeFactory implements SchemeFactory {
+    public SessionTupleScheme getScheme() {
+      return new SessionTupleScheme();
+    }
+  }
+
+  private static class SessionTupleScheme extends TupleScheme<Session> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Session struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetSessionId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetProperties()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetSessionId()) {
+        oprot.writeString(struct.sessionId);
+      }
+      if (struct.isSetProperties()) {
+        {
+          oprot.writeI32(struct.properties.size());
+          for (Map.Entry<String, String> _iter171 : struct.properties.entrySet())
+          {
+            oprot.writeString(_iter171.getKey());
+            oprot.writeString(_iter171.getValue());
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Session struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.sessionId = iprot.readString();
+        struct.setSessionIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        {
+          org.apache.thrift.protocol.TMap _map172 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.properties = new HashMap<String,String>(2*_map172.size);
+          for (int _i173 = 0; _i173 < _map172.size; ++_i173)
+          {
+            String _key174; // required
+            String _val175; // optional
+            _key174 = iprot.readString();
+            _val175 = iprot.readString();
+            struct.properties.put(_key174, _val175);
+          }
+        }
+        struct.setPropertiesIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SimpleQuery.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SimpleQuery.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SimpleQuery.java
index 3184149..2b1892b 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SimpleQuery.java
+++ b/src/blur-thrift/src/main/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);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Sort.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Sort.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Sort.java
index 54f9012..f2d9c8f 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Sort.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Sort.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;
@@ -44,6 +54,12 @@ public class Sort implements org.apache.thrift.TBase<Sort, Sort._Fields>, java.i
 
   private static final org.apache.thrift.protocol.TField FIELDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fields", org.apache.thrift.protocol.TType.LIST, (short)1);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SortStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SortTupleSchemeFactory());
+  }
+
   public List<SortField> fields; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -105,7 +121,6 @@ public class Sort implements org.apache.thrift.TBase<Sort, Sort._Fields>, java.i
   }
 
   // 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);
@@ -278,62 +293,11 @@ public class Sort implements org.apache.thrift.TBase<Sort, Sort._Fields>, java.i
   }
 
   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: // FIELDS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
-              this.fields = new ArrayList<SortField>(_list88.size);
-              for (int _i89 = 0; _i89 < _list88.size; ++_i89)
-              {
-                SortField _elem90; // required
-                _elem90 = new SortField();
-                _elem90.read(iprot);
-                this.fields.add(_elem90);
-              }
-              iprot.readListEnd();
-            }
-          } 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.fields != null) {
-      oprot.writeFieldBegin(FIELDS_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.fields.size()));
-        for (SortField _iter91 : this.fields)
-        {
-          _iter91.write(oprot);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -354,6 +318,7 @@ public class Sort implements org.apache.thrift.TBase<Sort, Sort._Fields>, java.i
 
   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 {
@@ -372,5 +337,123 @@ public class Sort implements org.apache.thrift.TBase<Sort, Sort._Fields>, java.i
     }
   }
 
+  private static class SortStandardSchemeFactory implements SchemeFactory {
+    public SortStandardScheme getScheme() {
+      return new SortStandardScheme();
+    }
+  }
+
+  private static class SortStandardScheme extends StandardScheme<Sort> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Sort 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: // FIELDS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list176 = iprot.readListBegin();
+                struct.fields = new ArrayList<SortField>(_list176.size);
+                for (int _i177 = 0; _i177 < _list176.size; ++_i177)
+                {
+                  SortField _elem178; // required
+                  _elem178 = new SortField();
+                  _elem178.read(iprot);
+                  struct.fields.add(_elem178);
+                }
+                iprot.readListEnd();
+              }
+              struct.setFieldsIsSet(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, Sort struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.fields != null) {
+        oprot.writeFieldBegin(FIELDS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fields.size()));
+          for (SortField _iter179 : struct.fields)
+          {
+            _iter179.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SortTupleSchemeFactory implements SchemeFactory {
+    public SortTupleScheme getScheme() {
+      return new SortTupleScheme();
+    }
+  }
+
+  private static class SortTupleScheme extends TupleScheme<Sort> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Sort struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetFields()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetFields()) {
+        {
+          oprot.writeI32(struct.fields.size());
+          for (SortField _iter180 : struct.fields)
+          {
+            _iter180.write(oprot);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Sort struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        {
+          org.apache.thrift.protocol.TList _list181 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.fields = new ArrayList<SortField>(_list181.size);
+          for (int _i182 = 0; _i182 < _list181.size; ++_i182)
+          {
+            SortField _elem183; // required
+            _elem183 = new SortField();
+            _elem183.read(iprot);
+            struct.fields.add(_elem183);
+          }
+        }
+        struct.setFieldsIsSet(true);
+      }
+    }
+  }
+
 }
 


Mime
View raw message