incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [20/28] Initial commit of the back port. The blur-util, blur-store, have been completed. Also a new distribution project help with the building of the project. Also all of the pom files have been updated to the new version. This is very much a work i
Date Mon, 18 Mar 2013 01:10:31 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ExpertQuery.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ExpertQuery.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ExpertQuery.java
index 0636566..a9f823e 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/ExpertQuery.java
+++ b/src/blur-thrift/src/main/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/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Facet.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Facet.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Facet.java
index 8542c6b..b294cc3 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Facet.java
+++ b/src/blur-thrift/src/main/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/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchRecordResult.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchRecordResult.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchRecordResult.java
index c6dc2c3..ceb2d06 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchRecordResult.java
+++ b/src/blur-thrift/src/main/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/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchResult.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchResult.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchResult.java
index ea9a190..7d17d9a 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchResult.java
+++ b/src/blur-thrift/src/main/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/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchRowResult.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchRowResult.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchRowResult.java
index 2452b24..44bf06e 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/FetchRowResult.java
+++ b/src/blur-thrift/src/main/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/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/QueryState.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/QueryState.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/QueryState.java
index 2ec19e1..8e1dc2b 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/QueryState.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/QueryState.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/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Record.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Record.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Record.java
index 4e0e512..0ba063d 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Record.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Record.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;
@@ -49,6 +59,12 @@ public class Record implements org.apache.thrift.TBase<Record, Record._Fields>,
   private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new RecordStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new RecordTupleSchemeFactory());
+  }
+
   /**
    * Record id uniquely identifies a record within a single row.
    */
@@ -136,7 +152,6 @@ public class Record implements org.apache.thrift.TBase<Record, Record._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);
@@ -455,86 +470,11 @@ public class Record implements org.apache.thrift.TBase<Record, Record._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: // 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 2: // FAMILY
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.family = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // COLUMNS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
-              this.columns = new ArrayList<Column>(_list0.size);
-              for (int _i1 = 0; _i1 < _list0.size; ++_i1)
-              {
-                Column _elem2; // required
-                _elem2 = new Column();
-                _elem2.read(iprot);
-                this.columns.add(_elem2);
-              }
-              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.recordId != null) {
-      oprot.writeFieldBegin(RECORD_ID_FIELD_DESC);
-      oprot.writeString(this.recordId);
-      oprot.writeFieldEnd();
-    }
-    if (this.family != null) {
-      oprot.writeFieldBegin(FAMILY_FIELD_DESC);
-      oprot.writeString(this.family);
-      oprot.writeFieldEnd();
-    }
-    if (this.columns != null) {
-      oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.columns.size()));
-        for (Column _iter3 : this.columns)
-        {
-          _iter3.write(oprot);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -571,6 +511,7 @@ public class Record implements org.apache.thrift.TBase<Record, Record._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 {
@@ -589,5 +530,169 @@ public class Record implements org.apache.thrift.TBase<Record, Record._Fields>,
     }
   }
 
+  private static class RecordStandardSchemeFactory implements SchemeFactory {
+    public RecordStandardScheme getScheme() {
+      return new RecordStandardScheme();
+    }
+  }
+
+  private static class RecordStandardScheme extends StandardScheme<Record> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Record 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_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 2: // FAMILY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.family = iprot.readString();
+              struct.setFamilyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // COLUMNS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+                struct.columns = new ArrayList<Column>(_list0.size);
+                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+                {
+                  Column _elem2; // required
+                  _elem2 = new Column();
+                  _elem2.read(iprot);
+                  struct.columns.add(_elem2);
+                }
+                iprot.readListEnd();
+              }
+              struct.setColumnsIsSet(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, Record struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.recordId != null) {
+        oprot.writeFieldBegin(RECORD_ID_FIELD_DESC);
+        oprot.writeString(struct.recordId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.family != null) {
+        oprot.writeFieldBegin(FAMILY_FIELD_DESC);
+        oprot.writeString(struct.family);
+        oprot.writeFieldEnd();
+      }
+      if (struct.columns != null) {
+        oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
+          for (Column _iter3 : struct.columns)
+          {
+            _iter3.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class RecordTupleSchemeFactory implements SchemeFactory {
+    public RecordTupleScheme getScheme() {
+      return new RecordTupleScheme();
+    }
+  }
+
+  private static class RecordTupleScheme extends TupleScheme<Record> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Record struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetRecordId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetFamily()) {
+        optionals.set(1);
+      }
+      if (struct.isSetColumns()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetRecordId()) {
+        oprot.writeString(struct.recordId);
+      }
+      if (struct.isSetFamily()) {
+        oprot.writeString(struct.family);
+      }
+      if (struct.isSetColumns()) {
+        {
+          oprot.writeI32(struct.columns.size());
+          for (Column _iter4 : struct.columns)
+          {
+            _iter4.write(oprot);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Record struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.recordId = iprot.readString();
+        struct.setRecordIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.family = iprot.readString();
+        struct.setFamilyIsSet(true);
+      }
+      if (incoming.get(2)) {
+        {
+          org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.columns = new ArrayList<Column>(_list5.size);
+          for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+          {
+            Column _elem7; // required
+            _elem7 = new Column();
+            _elem7.read(iprot);
+            struct.columns.add(_elem7);
+          }
+        }
+        struct.setColumnsIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutation.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutation.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutation.java
index c075570..3074c75 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutation.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutation.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 RecordMutation implements org.apache.thrift.TBase<RecordMutation, R
   private static final org.apache.thrift.protocol.TField RECORD_MUTATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("recordMutationType", org.apache.thrift.protocol.TType.I32, (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 RecordMutationStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new RecordMutationTupleSchemeFactory());
+  }
+
   /**
    * 
    * 
@@ -129,7 +145,6 @@ public class RecordMutation implements org.apache.thrift.TBase<RecordMutation, R
   }
 
   // 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);
@@ -362,57 +377,11 @@ public class RecordMutation implements org.apache.thrift.TBase<RecordMutation, R
   }
 
   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_MUTATION_TYPE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.recordMutationType = RecordMutationType.findByValue(iprot.readI32());
-          } 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.recordMutationType != null) {
-      oprot.writeFieldBegin(RECORD_MUTATION_TYPE_FIELD_DESC);
-      oprot.writeI32(this.recordMutationType.getValue());
-      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
@@ -441,6 +410,10 @@ public class RecordMutation implements org.apache.thrift.TBase<RecordMutation, R
 
   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 {
@@ -459,5 +432,114 @@ public class RecordMutation implements org.apache.thrift.TBase<RecordMutation, R
     }
   }
 
+  private static class RecordMutationStandardSchemeFactory implements SchemeFactory {
+    public RecordMutationStandardScheme getScheme() {
+      return new RecordMutationStandardScheme();
+    }
+  }
+
+  private static class RecordMutationStandardScheme extends StandardScheme<RecordMutation> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, RecordMutation 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_MUTATION_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.recordMutationType = RecordMutationType.findByValue(iprot.readI32());
+              struct.setRecordMutationTypeIsSet(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, RecordMutation struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.recordMutationType != null) {
+        oprot.writeFieldBegin(RECORD_MUTATION_TYPE_FIELD_DESC);
+        oprot.writeI32(struct.recordMutationType.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.record != null) {
+        oprot.writeFieldBegin(RECORD_FIELD_DESC);
+        struct.record.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class RecordMutationTupleSchemeFactory implements SchemeFactory {
+    public RecordMutationTupleScheme getScheme() {
+      return new RecordMutationTupleScheme();
+    }
+  }
+
+  private static class RecordMutationTupleScheme extends TupleScheme<RecordMutation> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, RecordMutation struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetRecordMutationType()) {
+        optionals.set(0);
+      }
+      if (struct.isSetRecord()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetRecordMutationType()) {
+        oprot.writeI32(struct.recordMutationType.getValue());
+      }
+      if (struct.isSetRecord()) {
+        struct.record.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, RecordMutation struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.recordMutationType = RecordMutationType.findByValue(iprot.readI32());
+        struct.setRecordMutationTypeIsSet(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/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutationType.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutationType.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutationType.java
index 27f7a6f..25eb44b 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutationType.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/RecordMutationType.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/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Row.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Row.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Row.java
index 784ad35..b450cb8 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Row.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Row.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;
@@ -49,6 +59,12 @@ public class Row implements org.apache.thrift.TBase<Row, Row._Fields>, java.io.S
   private static final org.apache.thrift.protocol.TField RECORDS_FIELD_DESC = new org.apache.thrift.protocol.TField("records", org.apache.thrift.protocol.TType.LIST, (short)2);
   private static final org.apache.thrift.protocol.TField RECORD_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("recordCount", org.apache.thrift.protocol.TType.I32, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new RowStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new RowTupleSchemeFactory());
+  }
+
   /**
    * The row id.
    */
@@ -141,8 +157,7 @@ public class Row implements org.apache.thrift.TBase<Row, Row._Fields>, java.io.S
 
   // isset id assignments
   private static final int __RECORDCOUNT_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);
@@ -176,8 +191,7 @@ public class Row implements org.apache.thrift.TBase<Row, Row._Fields>, java.io.S
    * Performs a deep copy on <i>other</i>.
    */
   public Row(Row other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetId()) {
       this.id = other.id;
     }
@@ -299,16 +313,16 @@ public class Row implements org.apache.thrift.TBase<Row, Row._Fields>, java.io.S
   }
 
   public void unsetRecordCount() {
-    __isset_bit_vector.clear(__RECORDCOUNT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RECORDCOUNT_ISSET_ID);
   }
 
   /** Returns true if field recordCount is set (has been assigned a value) and false otherwise */
   public boolean isSetRecordCount() {
-    return __isset_bit_vector.get(__RECORDCOUNT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __RECORDCOUNT_ISSET_ID);
   }
 
   public void setRecordCountIsSet(boolean value) {
-    __isset_bit_vector.set(__RECORDCOUNT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RECORDCOUNT_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -466,85 +480,11 @@ public class Row implements org.apache.thrift.TBase<Row, Row._Fields>, java.io.S
   }
 
   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: // ID
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.id = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // RECORDS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
-              this.records = new ArrayList<Record>(_list4.size);
-              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
-              {
-                Record _elem6; // required
-                _elem6 = new Record();
-                _elem6.read(iprot);
-                this.records.add(_elem6);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // RECORD_COUNT
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.recordCount = iprot.readI32();
-            setRecordCountIsSet(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.id != null) {
-      oprot.writeFieldBegin(ID_FIELD_DESC);
-      oprot.writeString(this.id);
-      oprot.writeFieldEnd();
-    }
-    if (this.records != null) {
-      oprot.writeFieldBegin(RECORDS_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.records.size()));
-        for (Record _iter7 : this.records)
-        {
-          _iter7.write(oprot);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(RECORD_COUNT_FIELD_DESC);
-    oprot.writeI32(this.recordCount);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -577,6 +517,7 @@ public class Row implements org.apache.thrift.TBase<Row, Row._Fields>, java.io.S
 
   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 {
@@ -590,12 +531,174 @@ public class Row implements org.apache.thrift.TBase<Row, Row._Fields>, java.io.S
   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 RowStandardSchemeFactory implements SchemeFactory {
+    public RowStandardScheme getScheme() {
+      return new RowStandardScheme();
+    }
+  }
+
+  private static class RowStandardScheme extends StandardScheme<Row> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Row 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: // ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.id = iprot.readString();
+              struct.setIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // RECORDS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+                struct.records = new ArrayList<Record>(_list8.size);
+                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+                {
+                  Record _elem10; // required
+                  _elem10 = new Record();
+                  _elem10.read(iprot);
+                  struct.records.add(_elem10);
+                }
+                iprot.readListEnd();
+              }
+              struct.setRecordsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // RECORD_COUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.recordCount = iprot.readI32();
+              struct.setRecordCountIsSet(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, Row struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.id != null) {
+        oprot.writeFieldBegin(ID_FIELD_DESC);
+        oprot.writeString(struct.id);
+        oprot.writeFieldEnd();
+      }
+      if (struct.records != null) {
+        oprot.writeFieldBegin(RECORDS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.records.size()));
+          for (Record _iter11 : struct.records)
+          {
+            _iter11.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(RECORD_COUNT_FIELD_DESC);
+      oprot.writeI32(struct.recordCount);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class RowTupleSchemeFactory implements SchemeFactory {
+    public RowTupleScheme getScheme() {
+      return new RowTupleScheme();
+    }
+  }
+
+  private static class RowTupleScheme extends TupleScheme<Row> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Row struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetRecords()) {
+        optionals.set(1);
+      }
+      if (struct.isSetRecordCount()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetId()) {
+        oprot.writeString(struct.id);
+      }
+      if (struct.isSetRecords()) {
+        {
+          oprot.writeI32(struct.records.size());
+          for (Record _iter12 : struct.records)
+          {
+            _iter12.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetRecordCount()) {
+        oprot.writeI32(struct.recordCount);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Row struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.id = iprot.readString();
+        struct.setIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        {
+          org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.records = new ArrayList<Record>(_list13.size);
+          for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+          {
+            Record _elem15; // required
+            _elem15 = new Record();
+            _elem15.read(iprot);
+            struct.records.add(_elem15);
+          }
+        }
+        struct.setRecordsIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.recordCount = iprot.readI32();
+        struct.setRecordCountIsSet(true);
+      }
+    }
+  }
+
 }
 


Mime
View raw message