incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [8/25] Regenerated thrift code.
Date Tue, 30 Oct 2012 00:15:29 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/interface/gen-java/org/apache/blur/thrift/generated/DocLocation.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/DocLocation.java b/interface/gen-java/org/apache/blur/thrift/generated/DocLocation.java
index 2462ffb..2312d4a 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/DocLocation.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/DocLocation.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 DocLocation implements org.apache.thrift.TBase<DocLocation, DocLoca
   private static final org.apache.thrift.protocol.TField DOC_FIELD_DESC = new org.apache.thrift.protocol.TField("doc", org.apache.thrift.protocol.TType.I32, (short)1);
   private static final org.apache.thrift.protocol.TField SHARD_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("shardIndex", org.apache.thrift.protocol.TType.I32, (short)2);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new DocLocationStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new DocLocationTupleSchemeFactory());
+  }
+
   public int doc; // required
   public int shardIndex; // required
 
@@ -112,8 +128,7 @@ public class DocLocation implements org.apache.thrift.TBase<DocLocation, DocLoca
   // isset id assignments
   private static final int __DOC_ISSET_ID = 0;
   private static final int __SHARDINDEX_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);
@@ -143,8 +158,7 @@ public class DocLocation implements org.apache.thrift.TBase<DocLocation, DocLoca
    * Performs a deep copy on <i>other</i>.
    */
   public DocLocation(DocLocation other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     this.doc = other.doc;
     this.shardIndex = other.shardIndex;
   }
@@ -172,16 +186,16 @@ public class DocLocation implements org.apache.thrift.TBase<DocLocation, DocLoca
   }
 
   public void unsetDoc() {
-    __isset_bit_vector.clear(__DOC_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOC_ISSET_ID);
   }
 
   /** Returns true if field doc is set (has been assigned a value) and false otherwise */
   public boolean isSetDoc() {
-    return __isset_bit_vector.get(__DOC_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __DOC_ISSET_ID);
   }
 
   public void setDocIsSet(boolean value) {
-    __isset_bit_vector.set(__DOC_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DOC_ISSET_ID, value);
   }
 
   public int getShardIndex() {
@@ -195,16 +209,16 @@ public class DocLocation implements org.apache.thrift.TBase<DocLocation, DocLoca
   }
 
   public void unsetShardIndex() {
-    __isset_bit_vector.clear(__SHARDINDEX_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARDINDEX_ISSET_ID);
   }
 
   /** Returns true if field shardIndex is set (has been assigned a value) and false otherwise */
   public boolean isSetShardIndex() {
-    return __isset_bit_vector.get(__SHARDINDEX_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __SHARDINDEX_ISSET_ID);
   }
 
   public void setShardIndexIsSet(boolean value) {
-    __isset_bit_vector.set(__SHARDINDEX_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARDINDEX_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -330,54 +344,11 @@ public class DocLocation implements org.apache.thrift.TBase<DocLocation, DocLoca
   }
 
   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: // DOC
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.doc = iprot.readI32();
-            setDocIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // SHARD_INDEX
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.shardIndex = iprot.readI32();
-            setShardIndexIsSet(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(DOC_FIELD_DESC);
-    oprot.writeI32(this.doc);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(SHARD_INDEX_FIELD_DESC);
-    oprot.writeI32(this.shardIndex);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -398,6 +369,7 @@ public class DocLocation implements org.apache.thrift.TBase<DocLocation, DocLoca
 
   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 {
@@ -411,12 +383,115 @@ public class DocLocation implements org.apache.thrift.TBase<DocLocation, DocLoca
   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 DocLocationStandardSchemeFactory implements SchemeFactory {
+    public DocLocationStandardScheme getScheme() {
+      return new DocLocationStandardScheme();
+    }
+  }
+
+  private static class DocLocationStandardScheme extends StandardScheme<DocLocation> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, DocLocation 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: // DOC
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.doc = iprot.readI32();
+              struct.setDocIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // SHARD_INDEX
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.shardIndex = iprot.readI32();
+              struct.setShardIndexIsSet(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, DocLocation struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(DOC_FIELD_DESC);
+      oprot.writeI32(struct.doc);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(SHARD_INDEX_FIELD_DESC);
+      oprot.writeI32(struct.shardIndex);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class DocLocationTupleSchemeFactory implements SchemeFactory {
+    public DocLocationTupleScheme getScheme() {
+      return new DocLocationTupleScheme();
+    }
+  }
+
+  private static class DocLocationTupleScheme extends TupleScheme<DocLocation> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, DocLocation struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetDoc()) {
+        optionals.set(0);
+      }
+      if (struct.isSetShardIndex()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetDoc()) {
+        oprot.writeI32(struct.doc);
+      }
+      if (struct.isSetShardIndex()) {
+        oprot.writeI32(struct.shardIndex);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, DocLocation struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.doc = iprot.readI32();
+        struct.setDocIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.shardIndex = iprot.readI32();
+        struct.setShardIndexIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/interface/gen-java/org/apache/blur/thrift/generated/Document.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/Document.java b/interface/gen-java/org/apache/blur/thrift/generated/Document.java
index 36d8272..52244c2 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/Document.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/Document.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 Document implements org.apache.thrift.TBase<Document, Document._Fie
 
   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 DocumentStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new DocumentTupleSchemeFactory());
+  }
+
   public List<Field> fields; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -105,7 +121,6 @@ public class Document implements org.apache.thrift.TBase<Document, Document._Fie
   }
 
   // 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 Document implements org.apache.thrift.TBase<Document, Document._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: // FIELDS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list108 = iprot.readListBegin();
-              this.fields = new ArrayList<Field>(_list108.size);
-              for (int _i109 = 0; _i109 < _list108.size; ++_i109)
-              {
-                Field _elem110; // required
-                _elem110 = new Field();
-                _elem110.read(iprot);
-                this.fields.add(_elem110);
-              }
-              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 (Field _iter111 : this.fields)
-        {
-          _iter111.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 Document implements org.apache.thrift.TBase<Document, Document._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 {
@@ -372,5 +337,123 @@ public class Document implements org.apache.thrift.TBase<Document, Document._Fie
     }
   }
 
+  private static class DocumentStandardSchemeFactory implements SchemeFactory {
+    public DocumentStandardScheme getScheme() {
+      return new DocumentStandardScheme();
+    }
+  }
+
+  private static class DocumentStandardScheme extends StandardScheme<Document> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Document 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 _list216 = iprot.readListBegin();
+                struct.fields = new ArrayList<Field>(_list216.size);
+                for (int _i217 = 0; _i217 < _list216.size; ++_i217)
+                {
+                  Field _elem218; // required
+                  _elem218 = new Field();
+                  _elem218.read(iprot);
+                  struct.fields.add(_elem218);
+                }
+                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, Document 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 (Field _iter219 : struct.fields)
+          {
+            _iter219.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class DocumentTupleSchemeFactory implements SchemeFactory {
+    public DocumentTupleScheme getScheme() {
+      return new DocumentTupleScheme();
+    }
+  }
+
+  private static class DocumentTupleScheme extends TupleScheme<Document> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Document 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 (Field _iter220 : struct.fields)
+          {
+            _iter220.write(oprot);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Document struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        {
+          org.apache.thrift.protocol.TList _list221 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.fields = new ArrayList<Field>(_list221.size);
+          for (int _i222 = 0; _i222 < _list221.size; ++_i222)
+          {
+            Field _elem223; // required
+            _elem223 = new Field();
+            _elem223.read(iprot);
+            struct.fields.add(_elem223);
+          }
+        }
+        struct.setFieldsIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/interface/gen-java/org/apache/blur/thrift/generated/ExpertQuery.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/ExpertQuery.java b/interface/gen-java/org/apache/blur/thrift/generated/ExpertQuery.java
index 0636566..a9f823e 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/ExpertQuery.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/ExpertQuery.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 ExpertQuery implements org.apache.thrift.TBase<ExpertQuery, ExpertQ
   private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("filter", org.apache.thrift.protocol.TType.STRING, (short)2);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ExpertQueryStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ExpertQueryTupleSchemeFactory());
+  }
+
   /**
    * The serialized query.
    */
@@ -125,7 +141,6 @@ public class ExpertQuery implements org.apache.thrift.TBase<ExpertQuery, ExpertQ
   }
 
   // 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);
@@ -376,56 +391,11 @@ public class ExpertQuery implements org.apache.thrift.TBase<ExpertQuery, ExpertQ
   }
 
   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
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.query = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // FILTER
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.filter = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.query != null) {
-      oprot.writeFieldBegin(QUERY_FIELD_DESC);
-      oprot.writeBinary(this.query);
-      oprot.writeFieldEnd();
-    }
-    if (this.filter != null) {
-      oprot.writeFieldBegin(FILTER_FIELD_DESC);
-      oprot.writeBinary(this.filter);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -454,6 +424,7 @@ public class ExpertQuery implements org.apache.thrift.TBase<ExpertQuery, ExpertQ
 
   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 {
@@ -472,5 +443,112 @@ public class ExpertQuery implements org.apache.thrift.TBase<ExpertQuery, ExpertQ
     }
   }
 
+  private static class ExpertQueryStandardSchemeFactory implements SchemeFactory {
+    public ExpertQueryStandardScheme getScheme() {
+      return new ExpertQueryStandardScheme();
+    }
+  }
+
+  private static class ExpertQueryStandardScheme extends StandardScheme<ExpertQuery> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, ExpertQuery 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
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.query = iprot.readBinary();
+              struct.setQueryIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // FILTER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.filter = iprot.readBinary();
+              struct.setFilterIsSet(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, ExpertQuery struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.query != null) {
+        oprot.writeFieldBegin(QUERY_FIELD_DESC);
+        oprot.writeBinary(struct.query);
+        oprot.writeFieldEnd();
+      }
+      if (struct.filter != null) {
+        oprot.writeFieldBegin(FILTER_FIELD_DESC);
+        oprot.writeBinary(struct.filter);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ExpertQueryTupleSchemeFactory implements SchemeFactory {
+    public ExpertQueryTupleScheme getScheme() {
+      return new ExpertQueryTupleScheme();
+    }
+  }
+
+  private static class ExpertQueryTupleScheme extends TupleScheme<ExpertQuery> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, ExpertQuery struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetQuery()) {
+        optionals.set(0);
+      }
+      if (struct.isSetFilter()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetQuery()) {
+        oprot.writeBinary(struct.query);
+      }
+      if (struct.isSetFilter()) {
+        oprot.writeBinary(struct.filter);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, ExpertQuery struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.query = iprot.readBinary();
+        struct.setQueryIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.filter = iprot.readBinary();
+        struct.setFilterIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/interface/gen-java/org/apache/blur/thrift/generated/Facet.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/Facet.java b/interface/gen-java/org/apache/blur/thrift/generated/Facet.java
index 8542c6b..b294cc3 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/Facet.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/Facet.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 Facet implements org.apache.thrift.TBase<Facet, Facet._Fields>, jav
   private static final org.apache.thrift.protocol.TField QUERY_STR_FIELD_DESC = new org.apache.thrift.protocol.TField("queryStr", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField MINIMUM_NUMBER_OF_BLUR_RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("minimumNumberOfBlurResults", org.apache.thrift.protocol.TType.I64, (short)2);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new FacetStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new FacetTupleSchemeFactory());
+  }
+
   public String queryStr; // required
   public long minimumNumberOfBlurResults; // required
 
@@ -114,8 +130,7 @@ public class Facet implements org.apache.thrift.TBase<Facet, Facet._Fields>, jav
 
   // isset id assignments
   private static final int __MINIMUMNUMBEROFBLURRESULTS_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);
@@ -146,8 +161,7 @@ public class Facet implements org.apache.thrift.TBase<Facet, Facet._Fields>, jav
    * Performs a deep copy on <i>other</i>.
    */
   public Facet(Facet 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;
     }
@@ -200,16 +214,16 @@ public class Facet implements org.apache.thrift.TBase<Facet, Facet._Fields>, jav
   }
 
   public void unsetMinimumNumberOfBlurResults() {
-    __isset_bit_vector.clear(__MINIMUMNUMBEROFBLURRESULTS_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MINIMUMNUMBEROFBLURRESULTS_ISSET_ID);
   }
 
   /** Returns true if field minimumNumberOfBlurResults is set (has been assigned a value) and false otherwise */
   public boolean isSetMinimumNumberOfBlurResults() {
-    return __isset_bit_vector.get(__MINIMUMNUMBEROFBLURRESULTS_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MINIMUMNUMBEROFBLURRESULTS_ISSET_ID);
   }
 
   public void setMinimumNumberOfBlurResultsIsSet(boolean value) {
-    __isset_bit_vector.set(__MINIMUMNUMBEROFBLURRESULTS_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MINIMUMNUMBEROFBLURRESULTS_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -335,55 +349,11 @@ public class Facet implements org.apache.thrift.TBase<Facet, Facet._Fields>, jav
   }
 
   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: // MINIMUM_NUMBER_OF_BLUR_RESULTS
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.minimumNumberOfBlurResults = iprot.readI64();
-            setMinimumNumberOfBlurResultsIsSet(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.queryStr != null) {
-      oprot.writeFieldBegin(QUERY_STR_FIELD_DESC);
-      oprot.writeString(this.queryStr);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(MINIMUM_NUMBER_OF_BLUR_RESULTS_FIELD_DESC);
-    oprot.writeI64(this.minimumNumberOfBlurResults);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -408,6 +378,7 @@ public class Facet implements org.apache.thrift.TBase<Facet, Facet._Fields>, jav
 
   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 {
@@ -421,12 +392,117 @@ public class Facet implements org.apache.thrift.TBase<Facet, Facet._Fields>, jav
   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 FacetStandardSchemeFactory implements SchemeFactory {
+    public FacetStandardScheme getScheme() {
+      return new FacetStandardScheme();
+    }
+  }
+
+  private static class FacetStandardScheme extends StandardScheme<Facet> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Facet 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: // MINIMUM_NUMBER_OF_BLUR_RESULTS
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.minimumNumberOfBlurResults = iprot.readI64();
+              struct.setMinimumNumberOfBlurResultsIsSet(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, Facet 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(MINIMUM_NUMBER_OF_BLUR_RESULTS_FIELD_DESC);
+      oprot.writeI64(struct.minimumNumberOfBlurResults);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class FacetTupleSchemeFactory implements SchemeFactory {
+    public FacetTupleScheme getScheme() {
+      return new FacetTupleScheme();
+    }
+  }
+
+  private static class FacetTupleScheme extends TupleScheme<Facet> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Facet struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetQueryStr()) {
+        optionals.set(0);
+      }
+      if (struct.isSetMinimumNumberOfBlurResults()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetQueryStr()) {
+        oprot.writeString(struct.queryStr);
+      }
+      if (struct.isSetMinimumNumberOfBlurResults()) {
+        oprot.writeI64(struct.minimumNumberOfBlurResults);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Facet struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.queryStr = iprot.readString();
+        struct.setQueryStrIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.minimumNumberOfBlurResults = iprot.readI64();
+        struct.setMinimumNumberOfBlurResultsIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/interface/gen-java/org/apache/blur/thrift/generated/FetchRecordResult.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/FetchRecordResult.java b/interface/gen-java/org/apache/blur/thrift/generated/FetchRecordResult.java
index c6dc2c3..ceb2d06 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/FetchRecordResult.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/FetchRecordResult.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 FetchRecordResult implements org.apache.thrift.TBase<FetchRecordRes
   private static final org.apache.thrift.protocol.TField ROWID_FIELD_DESC = new org.apache.thrift.protocol.TField("rowid", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField RECORD_FIELD_DESC = new org.apache.thrift.protocol.TField("record", org.apache.thrift.protocol.TType.STRUCT, (short)2);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new FetchRecordResultStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new FetchRecordResultTupleSchemeFactory());
+  }
+
   /**
    * The row id of the record being fetched.
    */
@@ -125,7 +141,6 @@ public class FetchRecordResult implements org.apache.thrift.TBase<FetchRecordRes
   }
 
   // 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);
@@ -354,57 +369,11 @@ public class FetchRecordResult implements org.apache.thrift.TBase<FetchRecordRes
   }
 
   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: // ROWID
-          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 2: // RECORD
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.record = new Record();
-            this.record.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.rowid != null) {
-      oprot.writeFieldBegin(ROWID_FIELD_DESC);
-      oprot.writeString(this.rowid);
-      oprot.writeFieldEnd();
-    }
-    if (this.record != null) {
-      oprot.writeFieldBegin(RECORD_FIELD_DESC);
-      this.record.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -433,6 +402,10 @@ public class FetchRecordResult implements org.apache.thrift.TBase<FetchRecordRes
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (record != null) {
+      record.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -451,5 +424,114 @@ public class FetchRecordResult implements org.apache.thrift.TBase<FetchRecordRes
     }
   }
 
+  private static class FetchRecordResultStandardSchemeFactory implements SchemeFactory {
+    public FetchRecordResultStandardScheme getScheme() {
+      return new FetchRecordResultStandardScheme();
+    }
+  }
+
+  private static class FetchRecordResultStandardScheme extends StandardScheme<FetchRecordResult> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, FetchRecordResult 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: // ROWID
+            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 2: // RECORD
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.record = new Record();
+              struct.record.read(iprot);
+              struct.setRecordIsSet(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, FetchRecordResult struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.rowid != null) {
+        oprot.writeFieldBegin(ROWID_FIELD_DESC);
+        oprot.writeString(struct.rowid);
+        oprot.writeFieldEnd();
+      }
+      if (struct.record != null) {
+        oprot.writeFieldBegin(RECORD_FIELD_DESC);
+        struct.record.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class FetchRecordResultTupleSchemeFactory implements SchemeFactory {
+    public FetchRecordResultTupleScheme getScheme() {
+      return new FetchRecordResultTupleScheme();
+    }
+  }
+
+  private static class FetchRecordResultTupleScheme extends TupleScheme<FetchRecordResult> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, FetchRecordResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetRowid()) {
+        optionals.set(0);
+      }
+      if (struct.isSetRecord()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetRowid()) {
+        oprot.writeString(struct.rowid);
+      }
+      if (struct.isSetRecord()) {
+        struct.record.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, FetchRecordResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.rowid = iprot.readString();
+        struct.setRowidIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.record = new Record();
+        struct.record.read(iprot);
+        struct.setRecordIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/interface/gen-java/org/apache/blur/thrift/generated/FetchResult.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/FetchResult.java b/interface/gen-java/org/apache/blur/thrift/generated/FetchResult.java
index ea9a190..7d17d9a 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/FetchResult.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/FetchResult.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 FetchResult implements org.apache.thrift.TBase<FetchResult, FetchRe
   private static final org.apache.thrift.protocol.TField ROW_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("rowResult", org.apache.thrift.protocol.TType.STRUCT, (short)4);
   private static final org.apache.thrift.protocol.TField RECORD_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("recordResult", org.apache.thrift.protocol.TType.STRUCT, (short)5);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new FetchResultStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new FetchResultTupleSchemeFactory());
+  }
+
   /**
    * True if the result exists, false if it doesn't.
    */
@@ -160,8 +176,7 @@ public class FetchResult implements org.apache.thrift.TBase<FetchResult, FetchRe
   // isset id assignments
   private static final int __EXISTS_ISSET_ID = 0;
   private static final int __DELETED_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);
@@ -203,8 +218,7 @@ public class FetchResult implements org.apache.thrift.TBase<FetchResult, FetchRe
    * Performs a deep copy on <i>other</i>.
    */
   public FetchResult(FetchResult other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     this.exists = other.exists;
     this.deleted = other.deleted;
     if (other.isSetTable()) {
@@ -250,16 +264,16 @@ public class FetchResult implements org.apache.thrift.TBase<FetchResult, FetchRe
   }
 
   public void unsetExists() {
-    __isset_bit_vector.clear(__EXISTS_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXISTS_ISSET_ID);
   }
 
   /** Returns true if field exists is set (has been assigned a value) and false otherwise */
   public boolean isSetExists() {
-    return __isset_bit_vector.get(__EXISTS_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __EXISTS_ISSET_ID);
   }
 
   public void setExistsIsSet(boolean value) {
-    __isset_bit_vector.set(__EXISTS_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXISTS_ISSET_ID, value);
   }
 
   /**
@@ -279,16 +293,16 @@ public class FetchResult implements org.apache.thrift.TBase<FetchResult, FetchRe
   }
 
   public void unsetDeleted() {
-    __isset_bit_vector.clear(__DELETED_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DELETED_ISSET_ID);
   }
 
   /** Returns true if field deleted is set (has been assigned a value) and false otherwise */
   public boolean isSetDeleted() {
-    return __isset_bit_vector.get(__DELETED_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __DELETED_ISSET_ID);
   }
 
   public void setDeletedIsSet(boolean value) {
-    __isset_bit_vector.set(__DELETED_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DELETED_ISSET_ID, value);
   }
 
   /**
@@ -600,92 +614,11 @@ public class FetchResult implements org.apache.thrift.TBase<FetchResult, FetchRe
   }
 
   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: // EXISTS
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.exists = iprot.readBool();
-            setExistsIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // DELETED
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.deleted = iprot.readBool();
-            setDeletedIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // 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 4: // ROW_RESULT
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.rowResult = new FetchRowResult();
-            this.rowResult.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // RECORD_RESULT
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.recordResult = new FetchRecordResult();
-            this.recordResult.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    oprot.writeFieldBegin(EXISTS_FIELD_DESC);
-    oprot.writeBool(this.exists);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(DELETED_FIELD_DESC);
-    oprot.writeBool(this.deleted);
-    oprot.writeFieldEnd();
-    if (this.table != null) {
-      oprot.writeFieldBegin(TABLE_FIELD_DESC);
-      oprot.writeString(this.table);
-      oprot.writeFieldEnd();
-    }
-    if (this.rowResult != null) {
-      oprot.writeFieldBegin(ROW_RESULT_FIELD_DESC);
-      this.rowResult.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    if (this.recordResult != null) {
-      oprot.writeFieldBegin(RECORD_RESULT_FIELD_DESC);
-      this.recordResult.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -730,6 +663,13 @@ public class FetchResult implements org.apache.thrift.TBase<FetchResult, FetchRe
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (rowResult != null) {
+      rowResult.validate();
+    }
+    if (recordResult != null) {
+      recordResult.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -743,12 +683,188 @@ public class FetchResult implements org.apache.thrift.TBase<FetchResult, FetchRe
   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 FetchResultStandardSchemeFactory implements SchemeFactory {
+    public FetchResultStandardScheme getScheme() {
+      return new FetchResultStandardScheme();
+    }
+  }
+
+  private static class FetchResultStandardScheme extends StandardScheme<FetchResult> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, FetchResult 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: // EXISTS
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.exists = iprot.readBool();
+              struct.setExistsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // DELETED
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.deleted = iprot.readBool();
+              struct.setDeletedIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // 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 4: // ROW_RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.rowResult = new FetchRowResult();
+              struct.rowResult.read(iprot);
+              struct.setRowResultIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // RECORD_RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.recordResult = new FetchRecordResult();
+              struct.recordResult.read(iprot);
+              struct.setRecordResultIsSet(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, FetchResult struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(EXISTS_FIELD_DESC);
+      oprot.writeBool(struct.exists);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(DELETED_FIELD_DESC);
+      oprot.writeBool(struct.deleted);
+      oprot.writeFieldEnd();
+      if (struct.table != null) {
+        oprot.writeFieldBegin(TABLE_FIELD_DESC);
+        oprot.writeString(struct.table);
+        oprot.writeFieldEnd();
+      }
+      if (struct.rowResult != null) {
+        oprot.writeFieldBegin(ROW_RESULT_FIELD_DESC);
+        struct.rowResult.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.recordResult != null) {
+        oprot.writeFieldBegin(RECORD_RESULT_FIELD_DESC);
+        struct.recordResult.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class FetchResultTupleSchemeFactory implements SchemeFactory {
+    public FetchResultTupleScheme getScheme() {
+      return new FetchResultTupleScheme();
+    }
+  }
+
+  private static class FetchResultTupleScheme extends TupleScheme<FetchResult> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, FetchResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetExists()) {
+        optionals.set(0);
+      }
+      if (struct.isSetDeleted()) {
+        optionals.set(1);
+      }
+      if (struct.isSetTable()) {
+        optionals.set(2);
+      }
+      if (struct.isSetRowResult()) {
+        optionals.set(3);
+      }
+      if (struct.isSetRecordResult()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetExists()) {
+        oprot.writeBool(struct.exists);
+      }
+      if (struct.isSetDeleted()) {
+        oprot.writeBool(struct.deleted);
+      }
+      if (struct.isSetTable()) {
+        oprot.writeString(struct.table);
+      }
+      if (struct.isSetRowResult()) {
+        struct.rowResult.write(oprot);
+      }
+      if (struct.isSetRecordResult()) {
+        struct.recordResult.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, FetchResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.exists = iprot.readBool();
+        struct.setExistsIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.deleted = iprot.readBool();
+        struct.setDeletedIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.table = iprot.readString();
+        struct.setTableIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.rowResult = new FetchRowResult();
+        struct.rowResult.read(iprot);
+        struct.setRowResultIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.recordResult = new FetchRecordResult();
+        struct.recordResult.read(iprot);
+        struct.setRecordResultIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/interface/gen-java/org/apache/blur/thrift/generated/FetchRowResult.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/FetchRowResult.java b/interface/gen-java/org/apache/blur/thrift/generated/FetchRowResult.java
index 2452b24..44bf06e 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/FetchRowResult.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/FetchRowResult.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;
@@ -47,6 +57,12 @@ public class FetchRowResult implements org.apache.thrift.TBase<FetchRowResult, F
 
   private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new FetchRowResultStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new FetchRowResultTupleSchemeFactory());
+  }
+
   /**
    * The row fetched.
    */
@@ -114,7 +130,6 @@ public class FetchRowResult implements org.apache.thrift.TBase<FetchRowResult, F
   }
 
   // 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);
@@ -273,45 +288,11 @@ public class FetchRowResult implements org.apache.thrift.TBase<FetchRowResult, F
   }
 
   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: // ROW
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.row = new Row();
-            this.row.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.row != null) {
-      oprot.writeFieldBegin(ROW_FIELD_DESC);
-      this.row.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -332,6 +313,10 @@ public class FetchRowResult implements org.apache.thrift.TBase<FetchRowResult, F
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (row != null) {
+      row.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -350,5 +335,91 @@ public class FetchRowResult implements org.apache.thrift.TBase<FetchRowResult, F
     }
   }
 
+  private static class FetchRowResultStandardSchemeFactory implements SchemeFactory {
+    public FetchRowResultStandardScheme getScheme() {
+      return new FetchRowResultStandardScheme();
+    }
+  }
+
+  private static class FetchRowResultStandardScheme extends StandardScheme<FetchRowResult> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, FetchRowResult 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: // ROW
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.row = new Row();
+              struct.row.read(iprot);
+              struct.setRowIsSet(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, FetchRowResult struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.row != null) {
+        oprot.writeFieldBegin(ROW_FIELD_DESC);
+        struct.row.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class FetchRowResultTupleSchemeFactory implements SchemeFactory {
+    public FetchRowResultTupleScheme getScheme() {
+      return new FetchRowResultTupleScheme();
+    }
+  }
+
+  private static class FetchRowResultTupleScheme extends TupleScheme<FetchRowResult> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, FetchRowResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetRow()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetRow()) {
+        struct.row.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, FetchRowResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.row = new Row();
+        struct.row.read(iprot);
+        struct.setRowIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/interface/gen-java/org/apache/blur/thrift/generated/Field.java
----------------------------------------------------------------------
diff --git a/interface/gen-java/org/apache/blur/thrift/generated/Field.java b/interface/gen-java/org/apache/blur/thrift/generated/Field.java
index 636a98a..e2a556d 100644
--- a/interface/gen-java/org/apache/blur/thrift/generated/Field.java
+++ b/interface/gen-java/org/apache/blur/thrift/generated/Field.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;
@@ -47,6 +57,12 @@ public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, jav
   private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)3);
   private static final org.apache.thrift.protocol.TField BOOST_FIELD_DESC = new org.apache.thrift.protocol.TField("boost", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new FieldStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new FieldTupleSchemeFactory());
+  }
+
   public String name; // required
   public ByteBuffer value; // required
   /**
@@ -129,8 +145,7 @@ public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, jav
 
   // isset id assignments
   private static final int __BOOST_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);
@@ -167,8 +182,7 @@ public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, jav
    * Performs a deep copy on <i>other</i>.
    */
   public Field(Field other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetName()) {
       this.name = other.name;
     }
@@ -296,16 +310,16 @@ public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, jav
   }
 
   public void unsetBoost() {
-    __isset_bit_vector.clear(__BOOST_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BOOST_ISSET_ID);
   }
 
   /** Returns true if field boost is set (has been assigned a value) and false otherwise */
   public boolean isSetBoost() {
-    return __isset_bit_vector.get(__BOOST_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __BOOST_ISSET_ID);
   }
 
   public void setBoostIsSet(boolean value) {
-    __isset_bit_vector.set(__BOOST_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BOOST_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -495,79 +509,11 @@ public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, jav
   }
 
   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: // NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.name = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // VALUE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.value = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // TYPE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.type = TYPE.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // BOOST
-          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-            this.boost = iprot.readDouble();
-            setBoostIsSet(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.name != null) {
-      oprot.writeFieldBegin(NAME_FIELD_DESC);
-      oprot.writeString(this.name);
-      oprot.writeFieldEnd();
-    }
-    if (this.value != null) {
-      oprot.writeFieldBegin(VALUE_FIELD_DESC);
-      oprot.writeBinary(this.value);
-      oprot.writeFieldEnd();
-    }
-    if (this.type != null) {
-      oprot.writeFieldBegin(TYPE_FIELD_DESC);
-      oprot.writeI32(this.type.getValue());
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(BOOST_FIELD_DESC);
-    oprot.writeDouble(this.boost);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -608,6 +554,7 @@ public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, jav
 
   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 {
@@ -621,12 +568,163 @@ public class Field implements org.apache.thrift.TBase<Field, Field._Fields>, jav
   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 FieldStandardSchemeFactory implements SchemeFactory {
+    public FieldStandardScheme getScheme() {
+      return new FieldStandardScheme();
+    }
+  }
+
+  private static class FieldStandardScheme extends StandardScheme<Field> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Field 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: // NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.name = iprot.readString();
+              struct.setNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // VALUE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.value = iprot.readBinary();
+              struct.setValueIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.type = TYPE.findByValue(iprot.readI32());
+              struct.setTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // BOOST
+            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+              struct.boost = iprot.readDouble();
+              struct.setBoostIsSet(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, Field struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.name != null) {
+        oprot.writeFieldBegin(NAME_FIELD_DESC);
+        oprot.writeString(struct.name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.value != null) {
+        oprot.writeFieldBegin(VALUE_FIELD_DESC);
+        oprot.writeBinary(struct.value);
+        oprot.writeFieldEnd();
+      }
+      if (struct.type != null) {
+        oprot.writeFieldBegin(TYPE_FIELD_DESC);
+        oprot.writeI32(struct.type.getValue());
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(BOOST_FIELD_DESC);
+      oprot.writeDouble(struct.boost);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class FieldTupleSchemeFactory implements SchemeFactory {
+    public FieldTupleScheme getScheme() {
+      return new FieldTupleScheme();
+    }
+  }
+
+  private static class FieldTupleScheme extends TupleScheme<Field> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Field struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetName()) {
+        optionals.set(0);
+      }
+      if (struct.isSetValue()) {
+        optionals.set(1);
+      }
+      if (struct.isSetType()) {
+        optionals.set(2);
+      }
+      if (struct.isSetBoost()) {
+        optionals.set(3);
+      }
+      oprot.writeBitSet(optionals, 4);
+      if (struct.isSetName()) {
+        oprot.writeString(struct.name);
+      }
+      if (struct.isSetValue()) {
+        oprot.writeBinary(struct.value);
+      }
+      if (struct.isSetType()) {
+        oprot.writeI32(struct.type.getValue());
+      }
+      if (struct.isSetBoost()) {
+        oprot.writeDouble(struct.boost);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Field struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(4);
+      if (incoming.get(0)) {
+        struct.name = iprot.readString();
+        struct.setNameIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.value = iprot.readBinary();
+        struct.setValueIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.type = TYPE.findByValue(iprot.readI32());
+        struct.setTypeIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.boost = iprot.readDouble();
+        struct.setBoostIsSet(true);
+      }
+    }
+  }
+
 }
 


Mime
View raw message