incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [22/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/BlurException.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurException.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurException.java
index 4fa888c..5e60ca2 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurException.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurException.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;
@@ -43,12 +53,18 @@ import org.slf4j.LoggerFactory;
  * BlurException that carries a message plus the original stack
  * trace (if any).
  */
-public class BlurException extends Exception implements org.apache.thrift.TBase<BlurException, BlurException._Fields>, java.io.Serializable, Cloneable {
+public class BlurException extends TException implements org.apache.thrift.TBase<BlurException, BlurException._Fields>, java.io.Serializable, Cloneable {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BlurException");
 
   private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField STACK_TRACE_STR_FIELD_DESC = new org.apache.thrift.protocol.TField("stackTraceStr", 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 BlurExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new BlurExceptionTupleSchemeFactory());
+  }
+
   /**
    * The message in the exception.
    */
@@ -126,7 +142,6 @@ public class BlurException extends Exception implements org.apache.thrift.TBase<
   }
 
   // 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);
@@ -355,56 +370,11 @@ public class BlurException extends Exception implements org.apache.thrift.TBase<
   }
 
   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: // MESSAGE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.message = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // STACK_TRACE_STR
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.stackTraceStr = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        default:
-          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-      }
-      iprot.readFieldEnd();
-    }
-    iprot.readStructEnd();
-
-    // check for required fields of primitive type, which can't be checked in the validate method
-    validate();
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
   }
 
   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    validate();
-
-    oprot.writeStructBegin(STRUCT_DESC);
-    if (this.message != null) {
-      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
-      oprot.writeString(this.message);
-      oprot.writeFieldEnd();
-    }
-    if (this.stackTraceStr != null) {
-      oprot.writeFieldBegin(STACK_TRACE_STR_FIELD_DESC);
-      oprot.writeString(this.stackTraceStr);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -433,6 +403,7 @@ public class BlurException extends Exception implements org.apache.thrift.TBase<
 
   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 {
@@ -451,5 +422,112 @@ public class BlurException extends Exception implements org.apache.thrift.TBase<
     }
   }
 
+  private static class BlurExceptionStandardSchemeFactory implements SchemeFactory {
+    public BlurExceptionStandardScheme getScheme() {
+      return new BlurExceptionStandardScheme();
+    }
+  }
+
+  private static class BlurExceptionStandardScheme extends StandardScheme<BlurException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, BlurException 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: // MESSAGE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.message = iprot.readString();
+              struct.setMessageIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // STACK_TRACE_STR
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.stackTraceStr = iprot.readString();
+              struct.setStackTraceStrIsSet(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, BlurException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.message != null) {
+        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+        oprot.writeString(struct.message);
+        oprot.writeFieldEnd();
+      }
+      if (struct.stackTraceStr != null) {
+        oprot.writeFieldBegin(STACK_TRACE_STR_FIELD_DESC);
+        oprot.writeString(struct.stackTraceStr);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class BlurExceptionTupleSchemeFactory implements SchemeFactory {
+    public BlurExceptionTupleScheme getScheme() {
+      return new BlurExceptionTupleScheme();
+    }
+  }
+
+  private static class BlurExceptionTupleScheme extends TupleScheme<BlurException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, BlurException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetMessage()) {
+        optionals.set(0);
+      }
+      if (struct.isSetStackTraceStr()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetMessage()) {
+        oprot.writeString(struct.message);
+      }
+      if (struct.isSetStackTraceStr()) {
+        oprot.writeString(struct.stackTraceStr);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, BlurException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.message = iprot.readString();
+        struct.setMessageIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.stackTraceStr = iprot.readString();
+        struct.setStackTraceStrIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQuery.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQuery.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQuery.java
index 869c019..9975741 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQuery.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQuery.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;
@@ -61,6 +71,12 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)14);
   private static final org.apache.thrift.protocol.TField MODIFY_FILE_CACHES_FIELD_DESC = new org.apache.thrift.protocol.TField("modifyFileCaches", org.apache.thrift.protocol.TType.BOOL, (short)15);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new BlurQueryStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new BlurQueryTupleSchemeFactory());
+  }
+
   /**
    * 
    */
@@ -278,8 +294,7 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   private static final int __CACHERESULT_ISSET_ID = 7;
   private static final int __STARTTIME_ISSET_ID = 8;
   private static final int __MODIFYFILECACHES_ISSET_ID = 9;
-  private BitSet __isset_bit_vector = new BitSet(10);
-
+  private short __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);
@@ -388,8 +403,7 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
    * Performs a deep copy on <i>other</i>.
    */
   public BlurQuery(BlurQuery other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetSimpleQuery()) {
       this.simpleQuery = new SimpleQuery(other.simpleQuery);
     }
@@ -606,16 +620,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetAllowStaleData() {
-    __isset_bit_vector.clear(__ALLOWSTALEDATA_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ALLOWSTALEDATA_ISSET_ID);
   }
 
   /** Returns true if field allowStaleData is set (has been assigned a value) and false otherwise */
   public boolean isSetAllowStaleData() {
-    return __isset_bit_vector.get(__ALLOWSTALEDATA_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __ALLOWSTALEDATA_ISSET_ID);
   }
 
   public void setAllowStaleDataIsSet(boolean value) {
-    __isset_bit_vector.set(__ALLOWSTALEDATA_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ALLOWSTALEDATA_ISSET_ID, value);
   }
 
   /**
@@ -635,16 +649,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetUseCacheIfPresent() {
-    __isset_bit_vector.clear(__USECACHEIFPRESENT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USECACHEIFPRESENT_ISSET_ID);
   }
 
   /** Returns true if field useCacheIfPresent is set (has been assigned a value) and false otherwise */
   public boolean isSetUseCacheIfPresent() {
-    return __isset_bit_vector.get(__USECACHEIFPRESENT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __USECACHEIFPRESENT_ISSET_ID);
   }
 
   public void setUseCacheIfPresentIsSet(boolean value) {
-    __isset_bit_vector.set(__USECACHEIFPRESENT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USECACHEIFPRESENT_ISSET_ID, value);
   }
 
   /**
@@ -664,16 +678,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetStart() {
-    __isset_bit_vector.clear(__START_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __START_ISSET_ID);
   }
 
   /** Returns true if field start is set (has been assigned a value) and false otherwise */
   public boolean isSetStart() {
-    return __isset_bit_vector.get(__START_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __START_ISSET_ID);
   }
 
   public void setStartIsSet(boolean value) {
-    __isset_bit_vector.set(__START_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __START_ISSET_ID, value);
   }
 
   /**
@@ -693,16 +707,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetFetch() {
-    __isset_bit_vector.clear(__FETCH_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FETCH_ISSET_ID);
   }
 
   /** Returns true if field fetch is set (has been assigned a value) and false otherwise */
   public boolean isSetFetch() {
-    return __isset_bit_vector.get(__FETCH_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __FETCH_ISSET_ID);
   }
 
   public void setFetchIsSet(boolean value) {
-    __isset_bit_vector.set(__FETCH_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FETCH_ISSET_ID, value);
   }
 
   /**
@@ -722,16 +736,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetMinimumNumberOfResults() {
-    __isset_bit_vector.clear(__MINIMUMNUMBEROFRESULTS_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MINIMUMNUMBEROFRESULTS_ISSET_ID);
   }
 
   /** Returns true if field minimumNumberOfResults is set (has been assigned a value) and false otherwise */
   public boolean isSetMinimumNumberOfResults() {
-    return __isset_bit_vector.get(__MINIMUMNUMBEROFRESULTS_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MINIMUMNUMBEROFRESULTS_ISSET_ID);
   }
 
   public void setMinimumNumberOfResultsIsSet(boolean value) {
-    __isset_bit_vector.set(__MINIMUMNUMBEROFRESULTS_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MINIMUMNUMBEROFRESULTS_ISSET_ID, value);
   }
 
   /**
@@ -751,16 +765,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetMaxQueryTime() {
-    __isset_bit_vector.clear(__MAXQUERYTIME_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXQUERYTIME_ISSET_ID);
   }
 
   /** Returns true if field maxQueryTime is set (has been assigned a value) and false otherwise */
   public boolean isSetMaxQueryTime() {
-    return __isset_bit_vector.get(__MAXQUERYTIME_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MAXQUERYTIME_ISSET_ID);
   }
 
   public void setMaxQueryTimeIsSet(boolean value) {
-    __isset_bit_vector.set(__MAXQUERYTIME_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXQUERYTIME_ISSET_ID, value);
   }
 
   /**
@@ -780,16 +794,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetUuid() {
-    __isset_bit_vector.clear(__UUID_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UUID_ISSET_ID);
   }
 
   /** Returns true if field uuid is set (has been assigned a value) and false otherwise */
   public boolean isSetUuid() {
-    return __isset_bit_vector.get(__UUID_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __UUID_ISSET_ID);
   }
 
   public void setUuidIsSet(boolean value) {
-    __isset_bit_vector.set(__UUID_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UUID_ISSET_ID, value);
   }
 
   /**
@@ -839,16 +853,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetCacheResult() {
-    __isset_bit_vector.clear(__CACHERESULT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHERESULT_ISSET_ID);
   }
 
   /** Returns true if field cacheResult is set (has been assigned a value) and false otherwise */
   public boolean isSetCacheResult() {
-    return __isset_bit_vector.get(__CACHERESULT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __CACHERESULT_ISSET_ID);
   }
 
   public void setCacheResultIsSet(boolean value) {
-    __isset_bit_vector.set(__CACHERESULT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHERESULT_ISSET_ID, value);
   }
 
   /**
@@ -868,16 +882,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetStartTime() {
-    __isset_bit_vector.clear(__STARTTIME_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
   }
 
   /** Returns true if field startTime is set (has been assigned a value) and false otherwise */
   public boolean isSetStartTime() {
-    return __isset_bit_vector.get(__STARTTIME_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
   }
 
   public void setStartTimeIsSet(boolean value) {
-    __isset_bit_vector.set(__STARTTIME_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
   }
 
   /**
@@ -897,16 +911,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   public void unsetModifyFileCaches() {
-    __isset_bit_vector.clear(__MODIFYFILECACHES_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MODIFYFILECACHES_ISSET_ID);
   }
 
   /** Returns true if field modifyFileCaches is set (has been assigned a value) and false otherwise */
   public boolean isSetModifyFileCaches() {
-    return __isset_bit_vector.get(__MODIFYFILECACHES_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MODIFYFILECACHES_ISSET_ID);
   }
 
   public void setModifyFileCachesIsSet(boolean value) {
-    __isset_bit_vector.set(__MODIFYFILECACHES_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MODIFYFILECACHES_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -1448,223 +1462,11 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   }
 
   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: // SIMPLE_QUERY
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.simpleQuery = new SimpleQuery();
-            this.simpleQuery.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // EXPERT_QUERY
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.expertQuery = new ExpertQuery();
-            this.expertQuery.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // FACETS
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list21 = iprot.readListBegin();
-              this.facets = new ArrayList<Facet>(_list21.size);
-              for (int _i22 = 0; _i22 < _list21.size; ++_i22)
-              {
-                Facet _elem23; // required
-                _elem23 = new Facet();
-                _elem23.read(iprot);
-                this.facets.add(_elem23);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // SELECTOR
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.selector = new Selector();
-            this.selector.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // ALLOW_STALE_DATA
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.allowStaleData = iprot.readBool();
-            setAllowStaleDataIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 6: // USE_CACHE_IF_PRESENT
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.useCacheIfPresent = iprot.readBool();
-            setUseCacheIfPresentIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 7: // START
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.start = iprot.readI64();
-            setStartIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 8: // FETCH
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.fetch = iprot.readI32();
-            setFetchIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 9: // MINIMUM_NUMBER_OF_RESULTS
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.minimumNumberOfResults = iprot.readI64();
-            setMinimumNumberOfResultsIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 10: // MAX_QUERY_TIME
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.maxQueryTime = iprot.readI64();
-            setMaxQueryTimeIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 11: // UUID
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.uuid = iprot.readI64();
-            setUuidIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 12: // USER_CONTEXT
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.userContext = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 13: // CACHE_RESULT
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.cacheResult = iprot.readBool();
-            setCacheResultIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 14: // START_TIME
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.startTime = iprot.readI64();
-            setStartTimeIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 15: // MODIFY_FILE_CACHES
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.modifyFileCaches = iprot.readBool();
-            setModifyFileCachesIsSet(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.simpleQuery != null) {
-      oprot.writeFieldBegin(SIMPLE_QUERY_FIELD_DESC);
-      this.simpleQuery.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    if (this.expertQuery != null) {
-      oprot.writeFieldBegin(EXPERT_QUERY_FIELD_DESC);
-      this.expertQuery.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    if (this.facets != null) {
-      oprot.writeFieldBegin(FACETS_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.facets.size()));
-        for (Facet _iter24 : this.facets)
-        {
-          _iter24.write(oprot);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    if (this.selector != null) {
-      oprot.writeFieldBegin(SELECTOR_FIELD_DESC);
-      this.selector.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(ALLOW_STALE_DATA_FIELD_DESC);
-    oprot.writeBool(this.allowStaleData);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(USE_CACHE_IF_PRESENT_FIELD_DESC);
-    oprot.writeBool(this.useCacheIfPresent);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(START_FIELD_DESC);
-    oprot.writeI64(this.start);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(FETCH_FIELD_DESC);
-    oprot.writeI32(this.fetch);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(MINIMUM_NUMBER_OF_RESULTS_FIELD_DESC);
-    oprot.writeI64(this.minimumNumberOfResults);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(MAX_QUERY_TIME_FIELD_DESC);
-    oprot.writeI64(this.maxQueryTime);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(UUID_FIELD_DESC);
-    oprot.writeI64(this.uuid);
-    oprot.writeFieldEnd();
-    if (this.userContext != null) {
-      oprot.writeFieldBegin(USER_CONTEXT_FIELD_DESC);
-      oprot.writeString(this.userContext);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(CACHE_RESULT_FIELD_DESC);
-    oprot.writeBool(this.cacheResult);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(START_TIME_FIELD_DESC);
-    oprot.writeI64(this.startTime);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(MODIFY_FILE_CACHES_FIELD_DESC);
-    oprot.writeBool(this.modifyFileCaches);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -1757,6 +1559,16 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (simpleQuery != null) {
+      simpleQuery.validate();
+    }
+    if (expertQuery != null) {
+      expertQuery.validate();
+    }
+    if (selector != null) {
+      selector.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -1770,12 +1582,438 @@ public class BlurQuery implements org.apache.thrift.TBase<BlurQuery, BlurQuery._
   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 BlurQueryStandardSchemeFactory implements SchemeFactory {
+    public BlurQueryStandardScheme getScheme() {
+      return new BlurQueryStandardScheme();
+    }
+  }
+
+  private static class BlurQueryStandardScheme extends StandardScheme<BlurQuery> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, BlurQuery 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: // SIMPLE_QUERY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.simpleQuery = new SimpleQuery();
+              struct.simpleQuery.read(iprot);
+              struct.setSimpleQueryIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // EXPERT_QUERY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.expertQuery = new ExpertQuery();
+              struct.expertQuery.read(iprot);
+              struct.setExpertQueryIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // FACETS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list42 = iprot.readListBegin();
+                struct.facets = new ArrayList<Facet>(_list42.size);
+                for (int _i43 = 0; _i43 < _list42.size; ++_i43)
+                {
+                  Facet _elem44; // required
+                  _elem44 = new Facet();
+                  _elem44.read(iprot);
+                  struct.facets.add(_elem44);
+                }
+                iprot.readListEnd();
+              }
+              struct.setFacetsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // SELECTOR
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.selector = new Selector();
+              struct.selector.read(iprot);
+              struct.setSelectorIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // ALLOW_STALE_DATA
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.allowStaleData = iprot.readBool();
+              struct.setAllowStaleDataIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // USE_CACHE_IF_PRESENT
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.useCacheIfPresent = iprot.readBool();
+              struct.setUseCacheIfPresentIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // START
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.start = iprot.readI64();
+              struct.setStartIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // FETCH
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.fetch = iprot.readI32();
+              struct.setFetchIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 9: // MINIMUM_NUMBER_OF_RESULTS
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.minimumNumberOfResults = iprot.readI64();
+              struct.setMinimumNumberOfResultsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 10: // MAX_QUERY_TIME
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.maxQueryTime = iprot.readI64();
+              struct.setMaxQueryTimeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 11: // UUID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.uuid = iprot.readI64();
+              struct.setUuidIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 12: // USER_CONTEXT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.userContext = iprot.readString();
+              struct.setUserContextIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 13: // CACHE_RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.cacheResult = iprot.readBool();
+              struct.setCacheResultIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 14: // START_TIME
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.startTime = iprot.readI64();
+              struct.setStartTimeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 15: // MODIFY_FILE_CACHES
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.modifyFileCaches = iprot.readBool();
+              struct.setModifyFileCachesIsSet(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, BlurQuery struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.simpleQuery != null) {
+        oprot.writeFieldBegin(SIMPLE_QUERY_FIELD_DESC);
+        struct.simpleQuery.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.expertQuery != null) {
+        oprot.writeFieldBegin(EXPERT_QUERY_FIELD_DESC);
+        struct.expertQuery.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.facets != null) {
+        oprot.writeFieldBegin(FACETS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.facets.size()));
+          for (Facet _iter45 : struct.facets)
+          {
+            _iter45.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.selector != null) {
+        oprot.writeFieldBegin(SELECTOR_FIELD_DESC);
+        struct.selector.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(ALLOW_STALE_DATA_FIELD_DESC);
+      oprot.writeBool(struct.allowStaleData);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(USE_CACHE_IF_PRESENT_FIELD_DESC);
+      oprot.writeBool(struct.useCacheIfPresent);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(START_FIELD_DESC);
+      oprot.writeI64(struct.start);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(FETCH_FIELD_DESC);
+      oprot.writeI32(struct.fetch);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(MINIMUM_NUMBER_OF_RESULTS_FIELD_DESC);
+      oprot.writeI64(struct.minimumNumberOfResults);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(MAX_QUERY_TIME_FIELD_DESC);
+      oprot.writeI64(struct.maxQueryTime);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(UUID_FIELD_DESC);
+      oprot.writeI64(struct.uuid);
+      oprot.writeFieldEnd();
+      if (struct.userContext != null) {
+        oprot.writeFieldBegin(USER_CONTEXT_FIELD_DESC);
+        oprot.writeString(struct.userContext);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(CACHE_RESULT_FIELD_DESC);
+      oprot.writeBool(struct.cacheResult);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(START_TIME_FIELD_DESC);
+      oprot.writeI64(struct.startTime);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(MODIFY_FILE_CACHES_FIELD_DESC);
+      oprot.writeBool(struct.modifyFileCaches);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class BlurQueryTupleSchemeFactory implements SchemeFactory {
+    public BlurQueryTupleScheme getScheme() {
+      return new BlurQueryTupleScheme();
+    }
+  }
+
+  private static class BlurQueryTupleScheme extends TupleScheme<BlurQuery> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, BlurQuery struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetSimpleQuery()) {
+        optionals.set(0);
+      }
+      if (struct.isSetExpertQuery()) {
+        optionals.set(1);
+      }
+      if (struct.isSetFacets()) {
+        optionals.set(2);
+      }
+      if (struct.isSetSelector()) {
+        optionals.set(3);
+      }
+      if (struct.isSetAllowStaleData()) {
+        optionals.set(4);
+      }
+      if (struct.isSetUseCacheIfPresent()) {
+        optionals.set(5);
+      }
+      if (struct.isSetStart()) {
+        optionals.set(6);
+      }
+      if (struct.isSetFetch()) {
+        optionals.set(7);
+      }
+      if (struct.isSetMinimumNumberOfResults()) {
+        optionals.set(8);
+      }
+      if (struct.isSetMaxQueryTime()) {
+        optionals.set(9);
+      }
+      if (struct.isSetUuid()) {
+        optionals.set(10);
+      }
+      if (struct.isSetUserContext()) {
+        optionals.set(11);
+      }
+      if (struct.isSetCacheResult()) {
+        optionals.set(12);
+      }
+      if (struct.isSetStartTime()) {
+        optionals.set(13);
+      }
+      if (struct.isSetModifyFileCaches()) {
+        optionals.set(14);
+      }
+      oprot.writeBitSet(optionals, 15);
+      if (struct.isSetSimpleQuery()) {
+        struct.simpleQuery.write(oprot);
+      }
+      if (struct.isSetExpertQuery()) {
+        struct.expertQuery.write(oprot);
+      }
+      if (struct.isSetFacets()) {
+        {
+          oprot.writeI32(struct.facets.size());
+          for (Facet _iter46 : struct.facets)
+          {
+            _iter46.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetSelector()) {
+        struct.selector.write(oprot);
+      }
+      if (struct.isSetAllowStaleData()) {
+        oprot.writeBool(struct.allowStaleData);
+      }
+      if (struct.isSetUseCacheIfPresent()) {
+        oprot.writeBool(struct.useCacheIfPresent);
+      }
+      if (struct.isSetStart()) {
+        oprot.writeI64(struct.start);
+      }
+      if (struct.isSetFetch()) {
+        oprot.writeI32(struct.fetch);
+      }
+      if (struct.isSetMinimumNumberOfResults()) {
+        oprot.writeI64(struct.minimumNumberOfResults);
+      }
+      if (struct.isSetMaxQueryTime()) {
+        oprot.writeI64(struct.maxQueryTime);
+      }
+      if (struct.isSetUuid()) {
+        oprot.writeI64(struct.uuid);
+      }
+      if (struct.isSetUserContext()) {
+        oprot.writeString(struct.userContext);
+      }
+      if (struct.isSetCacheResult()) {
+        oprot.writeBool(struct.cacheResult);
+      }
+      if (struct.isSetStartTime()) {
+        oprot.writeI64(struct.startTime);
+      }
+      if (struct.isSetModifyFileCaches()) {
+        oprot.writeBool(struct.modifyFileCaches);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, BlurQuery struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(15);
+      if (incoming.get(0)) {
+        struct.simpleQuery = new SimpleQuery();
+        struct.simpleQuery.read(iprot);
+        struct.setSimpleQueryIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.expertQuery = new ExpertQuery();
+        struct.expertQuery.read(iprot);
+        struct.setExpertQueryIsSet(true);
+      }
+      if (incoming.get(2)) {
+        {
+          org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.facets = new ArrayList<Facet>(_list47.size);
+          for (int _i48 = 0; _i48 < _list47.size; ++_i48)
+          {
+            Facet _elem49; // required
+            _elem49 = new Facet();
+            _elem49.read(iprot);
+            struct.facets.add(_elem49);
+          }
+        }
+        struct.setFacetsIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.selector = new Selector();
+        struct.selector.read(iprot);
+        struct.setSelectorIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.allowStaleData = iprot.readBool();
+        struct.setAllowStaleDataIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.useCacheIfPresent = iprot.readBool();
+        struct.setUseCacheIfPresentIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.start = iprot.readI64();
+        struct.setStartIsSet(true);
+      }
+      if (incoming.get(7)) {
+        struct.fetch = iprot.readI32();
+        struct.setFetchIsSet(true);
+      }
+      if (incoming.get(8)) {
+        struct.minimumNumberOfResults = iprot.readI64();
+        struct.setMinimumNumberOfResultsIsSet(true);
+      }
+      if (incoming.get(9)) {
+        struct.maxQueryTime = iprot.readI64();
+        struct.setMaxQueryTimeIsSet(true);
+      }
+      if (incoming.get(10)) {
+        struct.uuid = iprot.readI64();
+        struct.setUuidIsSet(true);
+      }
+      if (incoming.get(11)) {
+        struct.userContext = iprot.readString();
+        struct.setUserContextIsSet(true);
+      }
+      if (incoming.get(12)) {
+        struct.cacheResult = iprot.readBool();
+        struct.setCacheResultIsSet(true);
+      }
+      if (incoming.get(13)) {
+        struct.startTime = iprot.readI64();
+        struct.setStartTimeIsSet(true);
+      }
+      if (incoming.get(14)) {
+        struct.modifyFileCaches = iprot.readBool();
+        struct.setModifyFileCachesIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQueryStatus.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQueryStatus.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQueryStatus.java
index 906216e..9a69659 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQueryStatus.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurQueryStatus.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.blur.thrift.generated;
 
@@ -24,6 +25,15 @@ package org.apache.blur.thrift.generated;
 
 
 
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -52,6 +62,12 @@ public class BlurQueryStatus implements org.apache.thrift.TBase<BlurQueryStatus,
   private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)5);
   private static final org.apache.thrift.protocol.TField UUID_FIELD_DESC = new org.apache.thrift.protocol.TField("uuid", org.apache.thrift.protocol.TType.I64, (short)6);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new BlurQueryStatusStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new BlurQueryStatusTupleSchemeFactory());
+  }
+
   /**
    * 
    */
@@ -176,8 +192,7 @@ public class BlurQueryStatus implements org.apache.thrift.TBase<BlurQueryStatus,
   private static final int __COMPLETESHARDS_ISSET_ID = 0;
   private static final int __TOTALSHARDS_ISSET_ID = 1;
   private static final int __UUID_ISSET_ID = 2;
-  private BitSet __isset_bit_vector = new BitSet(3);
-
+  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);
@@ -226,8 +241,7 @@ public class BlurQueryStatus implements org.apache.thrift.TBase<BlurQueryStatus,
    * Performs a deep copy on <i>other</i>.
    */
   public BlurQueryStatus(BlurQueryStatus other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetQuery()) {
       this.query = new BlurQuery(other.query);
     }
@@ -359,16 +373,16 @@ public class BlurQueryStatus implements org.apache.thrift.TBase<BlurQueryStatus,
   }
 
   public void unsetCompleteShards() {
-    __isset_bit_vector.clear(__COMPLETESHARDS_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPLETESHARDS_ISSET_ID);
   }
 
   /** Returns true if field completeShards is set (has been assigned a value) and false otherwise */
   public boolean isSetCompleteShards() {
-    return __isset_bit_vector.get(__COMPLETESHARDS_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __COMPLETESHARDS_ISSET_ID);
   }
 
   public void setCompleteShardsIsSet(boolean value) {
-    __isset_bit_vector.set(__COMPLETESHARDS_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPLETESHARDS_ISSET_ID, value);
   }
 
   /**
@@ -388,16 +402,16 @@ public class BlurQueryStatus implements org.apache.thrift.TBase<BlurQueryStatus,
   }
 
   public void unsetTotalShards() {
-    __isset_bit_vector.clear(__TOTALSHARDS_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTALSHARDS_ISSET_ID);
   }
 
   /** Returns true if field totalShards is set (has been assigned a value) and false otherwise */
   public boolean isSetTotalShards() {
-    return __isset_bit_vector.get(__TOTALSHARDS_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __TOTALSHARDS_ISSET_ID);
   }
 
   public void setTotalShardsIsSet(boolean value) {
-    __isset_bit_vector.set(__TOTALSHARDS_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALSHARDS_ISSET_ID, value);
   }
 
   /**
@@ -451,16 +465,16 @@ public class BlurQueryStatus implements org.apache.thrift.TBase<BlurQueryStatus,
   }
 
   public void unsetUuid() {
-    __isset_bit_vector.clear(__UUID_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UUID_ISSET_ID);
   }
 
   /** Returns true if field uuid is set (has been assigned a value) and false otherwise */
   public boolean isSetUuid() {
-    return __isset_bit_vector.get(__UUID_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __UUID_ISSET_ID);
   }
 
   public void setUuidIsSet(boolean value) {
-    __isset_bit_vector.set(__UUID_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UUID_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -714,123 +728,11 @@ public class BlurQueryStatus implements org.apache.thrift.TBase<BlurQueryStatus,
   }
 
   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.STRUCT) {
-            this.query = new BlurQuery();
-            this.query.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // CPU_TIMES
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map46 = iprot.readMapBegin();
-              this.cpuTimes = new HashMap<String,CpuTime>(2*_map46.size);
-              for (int _i47 = 0; _i47 < _map46.size; ++_i47)
-              {
-                String _key48; // required
-                CpuTime _val49; // required
-                _key48 = iprot.readString();
-                _val49 = new CpuTime();
-                _val49.read(iprot);
-                this.cpuTimes.put(_key48, _val49);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // COMPLETE_SHARDS
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.completeShards = iprot.readI32();
-            setCompleteShardsIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // TOTAL_SHARDS
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.totalShards = iprot.readI32();
-            setTotalShardsIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // STATE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.state = QueryState.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 6: // UUID
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.uuid = iprot.readI64();
-            setUuidIsSet(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.query != null) {
-      oprot.writeFieldBegin(QUERY_FIELD_DESC);
-      this.query.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    if (this.cpuTimes != null) {
-      oprot.writeFieldBegin(CPU_TIMES_FIELD_DESC);
-      {
-        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, this.cpuTimes.size()));
-        for (Map.Entry<String, CpuTime> _iter50 : this.cpuTimes.entrySet())
-        {
-          oprot.writeString(_iter50.getKey());
-          _iter50.getValue().write(oprot);
-        }
-        oprot.writeMapEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(COMPLETE_SHARDS_FIELD_DESC);
-    oprot.writeI32(this.completeShards);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(TOTAL_SHARDS_FIELD_DESC);
-    oprot.writeI32(this.totalShards);
-    oprot.writeFieldEnd();
-    if (this.state != null) {
-      oprot.writeFieldBegin(STATE_FIELD_DESC);
-      oprot.writeI32(this.state.getValue());
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(UUID_FIELD_DESC);
-    oprot.writeI64(this.uuid);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -879,6 +781,10 @@ public class BlurQueryStatus implements org.apache.thrift.TBase<BlurQueryStatus,
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (query != null) {
+      query.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -892,12 +798,247 @@ public class BlurQueryStatus implements org.apache.thrift.TBase<BlurQueryStatus,
   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 BlurQueryStatusStandardSchemeFactory implements SchemeFactory {
+    public BlurQueryStatusStandardScheme getScheme() {
+      return new BlurQueryStatusStandardScheme();
+    }
+  }
+
+  private static class BlurQueryStatusStandardScheme extends StandardScheme<BlurQueryStatus> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, BlurQueryStatus 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.STRUCT) {
+              struct.query = new BlurQuery();
+              struct.query.read(iprot);
+              struct.setQueryIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // CPU_TIMES
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map92 = iprot.readMapBegin();
+                struct.cpuTimes = new HashMap<String,CpuTime>(2*_map92.size);
+                for (int _i93 = 0; _i93 < _map92.size; ++_i93)
+                {
+                  String _key94; // required
+                  CpuTime _val95; // optional
+                  _key94 = iprot.readString();
+                  _val95 = new CpuTime();
+                  _val95.read(iprot);
+                  struct.cpuTimes.put(_key94, _val95);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setCpuTimesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // COMPLETE_SHARDS
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.completeShards = iprot.readI32();
+              struct.setCompleteShardsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TOTAL_SHARDS
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.totalShards = iprot.readI32();
+              struct.setTotalShardsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // STATE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.state = QueryState.findByValue(iprot.readI32());
+              struct.setStateIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // UUID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.uuid = iprot.readI64();
+              struct.setUuidIsSet(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, BlurQueryStatus struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.query != null) {
+        oprot.writeFieldBegin(QUERY_FIELD_DESC);
+        struct.query.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.cpuTimes != null) {
+        oprot.writeFieldBegin(CPU_TIMES_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.cpuTimes.size()));
+          for (Map.Entry<String, CpuTime> _iter96 : struct.cpuTimes.entrySet())
+          {
+            oprot.writeString(_iter96.getKey());
+            _iter96.getValue().write(oprot);
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(COMPLETE_SHARDS_FIELD_DESC);
+      oprot.writeI32(struct.completeShards);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(TOTAL_SHARDS_FIELD_DESC);
+      oprot.writeI32(struct.totalShards);
+      oprot.writeFieldEnd();
+      if (struct.state != null) {
+        oprot.writeFieldBegin(STATE_FIELD_DESC);
+        oprot.writeI32(struct.state.getValue());
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(UUID_FIELD_DESC);
+      oprot.writeI64(struct.uuid);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class BlurQueryStatusTupleSchemeFactory implements SchemeFactory {
+    public BlurQueryStatusTupleScheme getScheme() {
+      return new BlurQueryStatusTupleScheme();
+    }
+  }
+
+  private static class BlurQueryStatusTupleScheme extends TupleScheme<BlurQueryStatus> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, BlurQueryStatus struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetQuery()) {
+        optionals.set(0);
+      }
+      if (struct.isSetCpuTimes()) {
+        optionals.set(1);
+      }
+      if (struct.isSetCompleteShards()) {
+        optionals.set(2);
+      }
+      if (struct.isSetTotalShards()) {
+        optionals.set(3);
+      }
+      if (struct.isSetState()) {
+        optionals.set(4);
+      }
+      if (struct.isSetUuid()) {
+        optionals.set(5);
+      }
+      oprot.writeBitSet(optionals, 6);
+      if (struct.isSetQuery()) {
+        struct.query.write(oprot);
+      }
+      if (struct.isSetCpuTimes()) {
+        {
+          oprot.writeI32(struct.cpuTimes.size());
+          for (Map.Entry<String, CpuTime> _iter97 : struct.cpuTimes.entrySet())
+          {
+            oprot.writeString(_iter97.getKey());
+            _iter97.getValue().write(oprot);
+          }
+        }
+      }
+      if (struct.isSetCompleteShards()) {
+        oprot.writeI32(struct.completeShards);
+      }
+      if (struct.isSetTotalShards()) {
+        oprot.writeI32(struct.totalShards);
+      }
+      if (struct.isSetState()) {
+        oprot.writeI32(struct.state.getValue());
+      }
+      if (struct.isSetUuid()) {
+        oprot.writeI64(struct.uuid);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, BlurQueryStatus struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(6);
+      if (incoming.get(0)) {
+        struct.query = new BlurQuery();
+        struct.query.read(iprot);
+        struct.setQueryIsSet(true);
+      }
+      if (incoming.get(1)) {
+        {
+          org.apache.thrift.protocol.TMap _map98 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.cpuTimes = new HashMap<String,CpuTime>(2*_map98.size);
+          for (int _i99 = 0; _i99 < _map98.size; ++_i99)
+          {
+            String _key100; // required
+            CpuTime _val101; // optional
+            _key100 = iprot.readString();
+            _val101 = new CpuTime();
+            _val101.read(iprot);
+            struct.cpuTimes.put(_key100, _val101);
+          }
+        }
+        struct.setCpuTimesIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.completeShards = iprot.readI32();
+        struct.setCompleteShardsIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.totalShards = iprot.readI32();
+        struct.setTotalShardsIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.state = QueryState.findByValue(iprot.readI32());
+        struct.setStateIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.uuid = iprot.readI64();
+        struct.setUuidIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a4601422/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurResult.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurResult.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurResult.java
index 4288dcc..bf7cacd 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurResult.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/BlurResult.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 BlurResult implements org.apache.thrift.TBase<BlurResult, BlurResul
   private static final org.apache.thrift.protocol.TField SCORE_FIELD_DESC = new org.apache.thrift.protocol.TField("score", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
   private static final org.apache.thrift.protocol.TField FETCH_RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("fetchResult", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new BlurResultStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new BlurResultTupleSchemeFactory());
+  }
+
   /**
    * 
    */
@@ -137,8 +153,7 @@ public class BlurResult implements org.apache.thrift.TBase<BlurResult, BlurResul
 
   // isset id assignments
   private static final int __SCORE_ISSET_ID = 0;
-  private BitSet __isset_bit_vector = new BitSet(1);
-
+  private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -171,8 +186,7 @@ public class BlurResult implements org.apache.thrift.TBase<BlurResult, BlurResul
    * Performs a deep copy on <i>other</i>.
    */
   public BlurResult(BlurResult other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetLocationId()) {
       this.locationId = other.locationId;
     }
@@ -241,16 +255,16 @@ public class BlurResult implements org.apache.thrift.TBase<BlurResult, BlurResul
   }
 
   public void unsetScore() {
-    __isset_bit_vector.clear(__SCORE_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCORE_ISSET_ID);
   }
 
   /** Returns true if field score is set (has been assigned a value) and false otherwise */
   public boolean isSetScore() {
-    return __isset_bit_vector.get(__SCORE_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __SCORE_ISSET_ID);
   }
 
   public void setScoreIsSet(boolean value) {
-    __isset_bit_vector.set(__SCORE_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCORE_ISSET_ID, value);
   }
 
   /**
@@ -438,68 +452,11 @@ public class BlurResult implements org.apache.thrift.TBase<BlurResult, BlurResul
   }
 
   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: // LOCATION_ID
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.locationId = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // SCORE
-          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-            this.score = iprot.readDouble();
-            setScoreIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // FETCH_RESULT
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.fetchResult = new FetchResult();
-            this.fetchResult.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.locationId != null) {
-      oprot.writeFieldBegin(LOCATION_ID_FIELD_DESC);
-      oprot.writeString(this.locationId);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(SCORE_FIELD_DESC);
-    oprot.writeDouble(this.score);
-    oprot.writeFieldEnd();
-    if (this.fetchResult != null) {
-      oprot.writeFieldBegin(FETCH_RESULT_FIELD_DESC);
-      this.fetchResult.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -532,6 +489,10 @@ public class BlurResult implements org.apache.thrift.TBase<BlurResult, BlurResul
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (fetchResult != null) {
+      fetchResult.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -545,12 +506,142 @@ public class BlurResult implements org.apache.thrift.TBase<BlurResult, BlurResul
   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 BlurResultStandardSchemeFactory implements SchemeFactory {
+    public BlurResultStandardScheme getScheme() {
+      return new BlurResultStandardScheme();
+    }
+  }
+
+  private static class BlurResultStandardScheme extends StandardScheme<BlurResult> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, BlurResult 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: // LOCATION_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.locationId = iprot.readString();
+              struct.setLocationIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // SCORE
+            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+              struct.score = iprot.readDouble();
+              struct.setScoreIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // FETCH_RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.fetchResult = new FetchResult();
+              struct.fetchResult.read(iprot);
+              struct.setFetchResultIsSet(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, BlurResult struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.locationId != null) {
+        oprot.writeFieldBegin(LOCATION_ID_FIELD_DESC);
+        oprot.writeString(struct.locationId);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(SCORE_FIELD_DESC);
+      oprot.writeDouble(struct.score);
+      oprot.writeFieldEnd();
+      if (struct.fetchResult != null) {
+        oprot.writeFieldBegin(FETCH_RESULT_FIELD_DESC);
+        struct.fetchResult.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class BlurResultTupleSchemeFactory implements SchemeFactory {
+    public BlurResultTupleScheme getScheme() {
+      return new BlurResultTupleScheme();
+    }
+  }
+
+  private static class BlurResultTupleScheme extends TupleScheme<BlurResult> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, BlurResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetLocationId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetScore()) {
+        optionals.set(1);
+      }
+      if (struct.isSetFetchResult()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetLocationId()) {
+        oprot.writeString(struct.locationId);
+      }
+      if (struct.isSetScore()) {
+        oprot.writeDouble(struct.score);
+      }
+      if (struct.isSetFetchResult()) {
+        struct.fetchResult.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, BlurResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.locationId = iprot.readString();
+        struct.setLocationIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.score = iprot.readDouble();
+        struct.setScoreIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.fetchResult = new FetchResult();
+        struct.fetchResult.read(iprot);
+        struct.setFetchResultIsSet(true);
+      }
+    }
+  }
+
 }
 


Mime
View raw message