incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [24/25] Regenerated thrift code.
Date Tue, 30 Oct 2012 00:15:29 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortField.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortField.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortField.java
index 02a1e82..3198d21 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortField.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortField.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.blur.thrift.generated;
 
@@ -24,6 +25,15 @@ package org.apache.blur.thrift.generated;
 
 
 
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -46,6 +56,12 @@ public class SortField implements org.apache.thrift.TBase<SortField, SortField._
   private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);
   private static final org.apache.thrift.protocol.TField REVERSE_FIELD_DESC = new org.apache.thrift.protocol.TField("reverse", org.apache.thrift.protocol.TType.BOOL, (short)3);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new SortFieldStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new SortFieldTupleSchemeFactory());
+  }
+
   public String field; // required
   /**
    * 
@@ -124,8 +140,7 @@ public class SortField implements org.apache.thrift.TBase<SortField, SortField._
 
   // isset id assignments
   private static final int __REVERSE_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);
@@ -158,8 +173,7 @@ public class SortField implements org.apache.thrift.TBase<SortField, SortField._
    * Performs a deep copy on <i>other</i>.
    */
   public SortField(SortField other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetField()) {
       this.field = other.field;
     }
@@ -248,16 +262,16 @@ public class SortField implements org.apache.thrift.TBase<SortField, SortField._
   }
 
   public void unsetReverse() {
-    __isset_bit_vector.clear(__REVERSE_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REVERSE_ISSET_ID);
   }
 
   /** Returns true if field reverse is set (has been assigned a value) and false otherwise */
   public boolean isSetReverse() {
-    return __isset_bit_vector.get(__REVERSE_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __REVERSE_ISSET_ID);
   }
 
   public void setReverseIsSet(boolean value) {
-    __isset_bit_vector.set(__REVERSE_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REVERSE_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -415,67 +429,11 @@ public class SortField implements org.apache.thrift.TBase<SortField, SortField._
   }
 
   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: // FIELD
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.field = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // TYPE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.type = SortType.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // REVERSE
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.reverse = iprot.readBool();
-            setReverseIsSet(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.field != null) {
-      oprot.writeFieldBegin(FIELD_FIELD_DESC);
-      oprot.writeString(this.field);
-      oprot.writeFieldEnd();
-    }
-    if (this.type != null) {
-      oprot.writeFieldBegin(TYPE_FIELD_DESC);
-      oprot.writeI32(this.type.getValue());
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(REVERSE_FIELD_DESC);
-    oprot.writeBool(this.reverse);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -508,6 +466,7 @@ public class SortField implements org.apache.thrift.TBase<SortField, SortField._
 
   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 {
@@ -521,12 +480,140 @@ public class SortField implements org.apache.thrift.TBase<SortField, SortField._
   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 SortFieldStandardSchemeFactory implements SchemeFactory {
+    public SortFieldStandardScheme getScheme() {
+      return new SortFieldStandardScheme();
+    }
+  }
+
+  private static class SortFieldStandardScheme extends StandardScheme<SortField> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, SortField 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: // FIELD
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.field = iprot.readString();
+              struct.setFieldIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.type = SortType.findByValue(iprot.readI32());
+              struct.setTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // REVERSE
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.reverse = iprot.readBool();
+              struct.setReverseIsSet(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, SortField struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.field != null) {
+        oprot.writeFieldBegin(FIELD_FIELD_DESC);
+        oprot.writeString(struct.field);
+        oprot.writeFieldEnd();
+      }
+      if (struct.type != null) {
+        oprot.writeFieldBegin(TYPE_FIELD_DESC);
+        oprot.writeI32(struct.type.getValue());
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(REVERSE_FIELD_DESC);
+      oprot.writeBool(struct.reverse);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class SortFieldTupleSchemeFactory implements SchemeFactory {
+    public SortFieldTupleScheme getScheme() {
+      return new SortFieldTupleScheme();
+    }
+  }
+
+  private static class SortFieldTupleScheme extends TupleScheme<SortField> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, SortField struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetField()) {
+        optionals.set(0);
+      }
+      if (struct.isSetType()) {
+        optionals.set(1);
+      }
+      if (struct.isSetReverse()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetField()) {
+        oprot.writeString(struct.field);
+      }
+      if (struct.isSetType()) {
+        oprot.writeI32(struct.type.getValue());
+      }
+      if (struct.isSetReverse()) {
+        oprot.writeBool(struct.reverse);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, SortField struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.field = iprot.readString();
+        struct.setFieldIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.type = SortType.findByValue(iprot.readI32());
+        struct.setTypeIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.reverse = iprot.readBool();
+        struct.setReverseIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortType.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortType.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortType.java
index 09fddb5..3508bfc 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortType.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SortType.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.blur.thrift.generated;
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TYPE.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TYPE.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TYPE.java
index ba2ef66..a35a804 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TYPE.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TYPE.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.blur.thrift.generated;
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.java
index d297dbb..816b66f 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.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;
@@ -59,6 +69,12 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
   private static final org.apache.thrift.protocol.TField READ_ONLY_FIELD_DESC = new org.apache.thrift.protocol.TField("readOnly", org.apache.thrift.protocol.TType.BOOL, (short)12);
   private static final org.apache.thrift.protocol.TField COLUMN_PRE_CACHE_FIELD_DESC = new org.apache.thrift.protocol.TField("columnPreCache", org.apache.thrift.protocol.TType.STRUCT, (short)13);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TableDescriptorStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TableDescriptorTupleSchemeFactory());
+  }
+
   /**
    * 
    */
@@ -253,8 +269,7 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
   private static final int __COMPRESSIONBLOCKSIZE_ISSET_ID = 2;
   private static final int __BLOCKCACHING_ISSET_ID = 3;
   private static final int __READONLY_ISSET_ID = 4;
-  private BitSet __isset_bit_vector = new BitSet(5);
-
+  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);
@@ -346,8 +361,7 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
    * Performs a deep copy on <i>other</i>.
    */
   public TableDescriptor(TableDescriptor other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     this.isEnabled = other.isEnabled;
     if (other.isSetAnalyzerDefinition()) {
       this.analyzerDefinition = new AnalyzerDefinition(other.analyzerDefinition);
@@ -428,16 +442,16 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
   }
 
   public void unsetIsEnabled() {
-    __isset_bit_vector.clear(__ISENABLED_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
   }
 
   /** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
   public boolean isSetIsEnabled() {
-    return __isset_bit_vector.get(__ISENABLED_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
   }
 
   public void setIsEnabledIsSet(boolean value) {
-    __isset_bit_vector.set(__ISENABLED_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
   }
 
   /**
@@ -487,16 +501,16 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
   }
 
   public void unsetShardCount() {
-    __isset_bit_vector.clear(__SHARDCOUNT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHARDCOUNT_ISSET_ID);
   }
 
   /** Returns true if field shardCount is set (has been assigned a value) and false otherwise */
   public boolean isSetShardCount() {
-    return __isset_bit_vector.get(__SHARDCOUNT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __SHARDCOUNT_ISSET_ID);
   }
 
   public void setShardCountIsSet(boolean value) {
-    __isset_bit_vector.set(__SHARDCOUNT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHARDCOUNT_ISSET_ID, value);
   }
 
   /**
@@ -576,16 +590,16 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
   }
 
   public void unsetCompressionBlockSize() {
-    __isset_bit_vector.clear(__COMPRESSIONBLOCKSIZE_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPRESSIONBLOCKSIZE_ISSET_ID);
   }
 
   /** Returns true if field compressionBlockSize is set (has been assigned a value) and false otherwise */
   public boolean isSetCompressionBlockSize() {
-    return __isset_bit_vector.get(__COMPRESSIONBLOCKSIZE_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __COMPRESSIONBLOCKSIZE_ISSET_ID);
   }
 
   public void setCompressionBlockSizeIsSet(boolean value) {
-    __isset_bit_vector.set(__COMPRESSIONBLOCKSIZE_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPRESSIONBLOCKSIZE_ISSET_ID, value);
   }
 
   /**
@@ -695,16 +709,16 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
   }
 
   public void unsetBlockCaching() {
-    __isset_bit_vector.clear(__BLOCKCACHING_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKCACHING_ISSET_ID);
   }
 
   /** Returns true if field blockCaching is set (has been assigned a value) and false otherwise */
   public boolean isSetBlockCaching() {
-    return __isset_bit_vector.get(__BLOCKCACHING_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __BLOCKCACHING_ISSET_ID);
   }
 
   public void setBlockCachingIsSet(boolean value) {
-    __isset_bit_vector.set(__BLOCKCACHING_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKCACHING_ISSET_ID, value);
   }
 
   public int getBlockCachingFileTypesSize() {
@@ -771,16 +785,16 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
   }
 
   public void unsetReadOnly() {
-    __isset_bit_vector.clear(__READONLY_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __READONLY_ISSET_ID);
   }
 
   /** Returns true if field readOnly is set (has been assigned a value) and false otherwise */
   public boolean isSetReadOnly() {
-    return __isset_bit_vector.get(__READONLY_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __READONLY_ISSET_ID);
   }
 
   public void setReadOnlyIsSet(boolean value) {
-    __isset_bit_vector.set(__READONLY_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __READONLY_ISSET_ID, value);
   }
 
   /**
@@ -1288,202 +1302,11 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
   }
 
   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: // IS_ENABLED
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.isEnabled = iprot.readBool();
-            setIsEnabledIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // ANALYZER_DEFINITION
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.analyzerDefinition = new AnalyzerDefinition();
-            this.analyzerDefinition.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // SHARD_COUNT
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.shardCount = iprot.readI32();
-            setShardCountIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // TABLE_URI
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.tableUri = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // COMPRESSION_CLASS
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.compressionClass = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 6: // COMPRESSION_BLOCK_SIZE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.compressionBlockSize = iprot.readI32();
-            setCompressionBlockSizeIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 7: // CLUSTER
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.cluster = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 8: // NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.name = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 9: // SIMILARITY_CLASS
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.similarityClass = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 10: // BLOCK_CACHING
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.blockCaching = iprot.readBool();
-            setBlockCachingIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 11: // BLOCK_CACHING_FILE_TYPES
-          if (field.type == org.apache.thrift.protocol.TType.SET) {
-            {
-              org.apache.thrift.protocol.TSet _set79 = iprot.readSetBegin();
-              this.blockCachingFileTypes = new HashSet<String>(2*_set79.size);
-              for (int _i80 = 0; _i80 < _set79.size; ++_i80)
-              {
-                String _elem81; // required
-                _elem81 = iprot.readString();
-                this.blockCachingFileTypes.add(_elem81);
-              }
-              iprot.readSetEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 12: // READ_ONLY
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.readOnly = iprot.readBool();
-            setReadOnlyIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 13: // COLUMN_PRE_CACHE
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.columnPreCache = new ColumnPreCache();
-            this.columnPreCache.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(IS_ENABLED_FIELD_DESC);
-    oprot.writeBool(this.isEnabled);
-    oprot.writeFieldEnd();
-    if (this.analyzerDefinition != null) {
-      oprot.writeFieldBegin(ANALYZER_DEFINITION_FIELD_DESC);
-      this.analyzerDefinition.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(SHARD_COUNT_FIELD_DESC);
-    oprot.writeI32(this.shardCount);
-    oprot.writeFieldEnd();
-    if (this.tableUri != null) {
-      oprot.writeFieldBegin(TABLE_URI_FIELD_DESC);
-      oprot.writeString(this.tableUri);
-      oprot.writeFieldEnd();
-    }
-    if (this.compressionClass != null) {
-      oprot.writeFieldBegin(COMPRESSION_CLASS_FIELD_DESC);
-      oprot.writeString(this.compressionClass);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(COMPRESSION_BLOCK_SIZE_FIELD_DESC);
-    oprot.writeI32(this.compressionBlockSize);
-    oprot.writeFieldEnd();
-    if (this.cluster != null) {
-      oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
-      oprot.writeString(this.cluster);
-      oprot.writeFieldEnd();
-    }
-    if (this.name != null) {
-      oprot.writeFieldBegin(NAME_FIELD_DESC);
-      oprot.writeString(this.name);
-      oprot.writeFieldEnd();
-    }
-    if (this.similarityClass != null) {
-      oprot.writeFieldBegin(SIMILARITY_CLASS_FIELD_DESC);
-      oprot.writeString(this.similarityClass);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(BLOCK_CACHING_FIELD_DESC);
-    oprot.writeBool(this.blockCaching);
-    oprot.writeFieldEnd();
-    if (this.blockCachingFileTypes != null) {
-      oprot.writeFieldBegin(BLOCK_CACHING_FILE_TYPES_FIELD_DESC);
-      {
-        oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, this.blockCachingFileTypes.size()));
-        for (String _iter82 : this.blockCachingFileTypes)
-        {
-          oprot.writeString(_iter82);
-        }
-        oprot.writeSetEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(READ_ONLY_FIELD_DESC);
-    oprot.writeBool(this.readOnly);
-    oprot.writeFieldEnd();
-    if (this.columnPreCache != null) {
-      oprot.writeFieldBegin(COLUMN_PRE_CACHE_FIELD_DESC);
-      this.columnPreCache.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -1580,6 +1403,13 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (analyzerDefinition != null) {
+      analyzerDefinition.validate();
+    }
+    if (columnPreCache != null) {
+      columnPreCache.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -1593,12 +1423,398 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor,
   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 TableDescriptorStandardSchemeFactory implements SchemeFactory {
+    public TableDescriptorStandardScheme getScheme() {
+      return new TableDescriptorStandardScheme();
+    }
+  }
+
+  private static class TableDescriptorStandardScheme extends StandardScheme<TableDescriptor> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TableDescriptor 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: // IS_ENABLED
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.isEnabled = iprot.readBool();
+              struct.setIsEnabledIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // ANALYZER_DEFINITION
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.analyzerDefinition = new AnalyzerDefinition();
+              struct.analyzerDefinition.read(iprot);
+              struct.setAnalyzerDefinitionIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // SHARD_COUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.shardCount = iprot.readI32();
+              struct.setShardCountIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TABLE_URI
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tableUri = iprot.readString();
+              struct.setTableUriIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // COMPRESSION_CLASS
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.compressionClass = iprot.readString();
+              struct.setCompressionClassIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // COMPRESSION_BLOCK_SIZE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.compressionBlockSize = iprot.readI32();
+              struct.setCompressionBlockSizeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // CLUSTER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.cluster = iprot.readString();
+              struct.setClusterIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.name = iprot.readString();
+              struct.setNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 9: // SIMILARITY_CLASS
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.similarityClass = iprot.readString();
+              struct.setSimilarityClassIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 10: // BLOCK_CACHING
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.blockCaching = iprot.readBool();
+              struct.setBlockCachingIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 11: // BLOCK_CACHING_FILE_TYPES
+            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+              {
+                org.apache.thrift.protocol.TSet _set158 = iprot.readSetBegin();
+                struct.blockCachingFileTypes = new HashSet<String>(2*_set158.size);
+                for (int _i159 = 0; _i159 < _set158.size; ++_i159)
+                {
+                  String _elem160; // required
+                  _elem160 = iprot.readString();
+                  struct.blockCachingFileTypes.add(_elem160);
+                }
+                iprot.readSetEnd();
+              }
+              struct.setBlockCachingFileTypesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 12: // READ_ONLY
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.readOnly = iprot.readBool();
+              struct.setReadOnlyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 13: // COLUMN_PRE_CACHE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.columnPreCache = new ColumnPreCache();
+              struct.columnPreCache.read(iprot);
+              struct.setColumnPreCacheIsSet(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, TableDescriptor struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(IS_ENABLED_FIELD_DESC);
+      oprot.writeBool(struct.isEnabled);
+      oprot.writeFieldEnd();
+      if (struct.analyzerDefinition != null) {
+        oprot.writeFieldBegin(ANALYZER_DEFINITION_FIELD_DESC);
+        struct.analyzerDefinition.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(SHARD_COUNT_FIELD_DESC);
+      oprot.writeI32(struct.shardCount);
+      oprot.writeFieldEnd();
+      if (struct.tableUri != null) {
+        oprot.writeFieldBegin(TABLE_URI_FIELD_DESC);
+        oprot.writeString(struct.tableUri);
+        oprot.writeFieldEnd();
+      }
+      if (struct.compressionClass != null) {
+        oprot.writeFieldBegin(COMPRESSION_CLASS_FIELD_DESC);
+        oprot.writeString(struct.compressionClass);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(COMPRESSION_BLOCK_SIZE_FIELD_DESC);
+      oprot.writeI32(struct.compressionBlockSize);
+      oprot.writeFieldEnd();
+      if (struct.cluster != null) {
+        oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
+        oprot.writeString(struct.cluster);
+        oprot.writeFieldEnd();
+      }
+      if (struct.name != null) {
+        oprot.writeFieldBegin(NAME_FIELD_DESC);
+        oprot.writeString(struct.name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.similarityClass != null) {
+        oprot.writeFieldBegin(SIMILARITY_CLASS_FIELD_DESC);
+        oprot.writeString(struct.similarityClass);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(BLOCK_CACHING_FIELD_DESC);
+      oprot.writeBool(struct.blockCaching);
+      oprot.writeFieldEnd();
+      if (struct.blockCachingFileTypes != null) {
+        oprot.writeFieldBegin(BLOCK_CACHING_FILE_TYPES_FIELD_DESC);
+        {
+          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.blockCachingFileTypes.size()));
+          for (String _iter161 : struct.blockCachingFileTypes)
+          {
+            oprot.writeString(_iter161);
+          }
+          oprot.writeSetEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(READ_ONLY_FIELD_DESC);
+      oprot.writeBool(struct.readOnly);
+      oprot.writeFieldEnd();
+      if (struct.columnPreCache != null) {
+        oprot.writeFieldBegin(COLUMN_PRE_CACHE_FIELD_DESC);
+        struct.columnPreCache.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TableDescriptorTupleSchemeFactory implements SchemeFactory {
+    public TableDescriptorTupleScheme getScheme() {
+      return new TableDescriptorTupleScheme();
+    }
+  }
+
+  private static class TableDescriptorTupleScheme extends TupleScheme<TableDescriptor> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TableDescriptor struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetIsEnabled()) {
+        optionals.set(0);
+      }
+      if (struct.isSetAnalyzerDefinition()) {
+        optionals.set(1);
+      }
+      if (struct.isSetShardCount()) {
+        optionals.set(2);
+      }
+      if (struct.isSetTableUri()) {
+        optionals.set(3);
+      }
+      if (struct.isSetCompressionClass()) {
+        optionals.set(4);
+      }
+      if (struct.isSetCompressionBlockSize()) {
+        optionals.set(5);
+      }
+      if (struct.isSetCluster()) {
+        optionals.set(6);
+      }
+      if (struct.isSetName()) {
+        optionals.set(7);
+      }
+      if (struct.isSetSimilarityClass()) {
+        optionals.set(8);
+      }
+      if (struct.isSetBlockCaching()) {
+        optionals.set(9);
+      }
+      if (struct.isSetBlockCachingFileTypes()) {
+        optionals.set(10);
+      }
+      if (struct.isSetReadOnly()) {
+        optionals.set(11);
+      }
+      if (struct.isSetColumnPreCache()) {
+        optionals.set(12);
+      }
+      oprot.writeBitSet(optionals, 13);
+      if (struct.isSetIsEnabled()) {
+        oprot.writeBool(struct.isEnabled);
+      }
+      if (struct.isSetAnalyzerDefinition()) {
+        struct.analyzerDefinition.write(oprot);
+      }
+      if (struct.isSetShardCount()) {
+        oprot.writeI32(struct.shardCount);
+      }
+      if (struct.isSetTableUri()) {
+        oprot.writeString(struct.tableUri);
+      }
+      if (struct.isSetCompressionClass()) {
+        oprot.writeString(struct.compressionClass);
+      }
+      if (struct.isSetCompressionBlockSize()) {
+        oprot.writeI32(struct.compressionBlockSize);
+      }
+      if (struct.isSetCluster()) {
+        oprot.writeString(struct.cluster);
+      }
+      if (struct.isSetName()) {
+        oprot.writeString(struct.name);
+      }
+      if (struct.isSetSimilarityClass()) {
+        oprot.writeString(struct.similarityClass);
+      }
+      if (struct.isSetBlockCaching()) {
+        oprot.writeBool(struct.blockCaching);
+      }
+      if (struct.isSetBlockCachingFileTypes()) {
+        {
+          oprot.writeI32(struct.blockCachingFileTypes.size());
+          for (String _iter162 : struct.blockCachingFileTypes)
+          {
+            oprot.writeString(_iter162);
+          }
+        }
+      }
+      if (struct.isSetReadOnly()) {
+        oprot.writeBool(struct.readOnly);
+      }
+      if (struct.isSetColumnPreCache()) {
+        struct.columnPreCache.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TableDescriptor struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(13);
+      if (incoming.get(0)) {
+        struct.isEnabled = iprot.readBool();
+        struct.setIsEnabledIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.analyzerDefinition = new AnalyzerDefinition();
+        struct.analyzerDefinition.read(iprot);
+        struct.setAnalyzerDefinitionIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.shardCount = iprot.readI32();
+        struct.setShardCountIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.tableUri = iprot.readString();
+        struct.setTableUriIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.compressionClass = iprot.readString();
+        struct.setCompressionClassIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.compressionBlockSize = iprot.readI32();
+        struct.setCompressionBlockSizeIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.cluster = iprot.readString();
+        struct.setClusterIsSet(true);
+      }
+      if (incoming.get(7)) {
+        struct.name = iprot.readString();
+        struct.setNameIsSet(true);
+      }
+      if (incoming.get(8)) {
+        struct.similarityClass = iprot.readString();
+        struct.setSimilarityClassIsSet(true);
+      }
+      if (incoming.get(9)) {
+        struct.blockCaching = iprot.readBool();
+        struct.setBlockCachingIsSet(true);
+      }
+      if (incoming.get(10)) {
+        {
+          org.apache.thrift.protocol.TSet _set163 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.blockCachingFileTypes = new HashSet<String>(2*_set163.size);
+          for (int _i164 = 0; _i164 < _set163.size; ++_i164)
+          {
+            String _elem165; // required
+            _elem165 = iprot.readString();
+            struct.blockCachingFileTypes.add(_elem165);
+          }
+        }
+        struct.setBlockCachingFileTypesIsSet(true);
+      }
+      if (incoming.get(11)) {
+        struct.readOnly = iprot.readBool();
+        struct.setReadOnlyIsSet(true);
+      }
+      if (incoming.get(12)) {
+        struct.columnPreCache = new ColumnPreCache();
+        struct.columnPreCache.read(iprot);
+        struct.setColumnPreCacheIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableStats.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableStats.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableStats.java
index f4bae2d..dca3f1d 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableStats.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableStats.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 TableStats implements org.apache.thrift.TBase<TableStats, TableStat
   private static final org.apache.thrift.protocol.TField ROW_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("rowCount", org.apache.thrift.protocol.TType.I64, (short)4);
   private static final org.apache.thrift.protocol.TField QUERIES_FIELD_DESC = new org.apache.thrift.protocol.TField("queries", org.apache.thrift.protocol.TType.I64, (short)5);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new TableStatsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TableStatsTupleSchemeFactory());
+  }
+
   /**
    * 
    */
@@ -162,8 +178,7 @@ public class TableStats implements org.apache.thrift.TBase<TableStats, TableStat
   private static final int __RECORDCOUNT_ISSET_ID = 1;
   private static final int __ROWCOUNT_ISSET_ID = 2;
   private static final int __QUERIES_ISSET_ID = 3;
-  private BitSet __isset_bit_vector = new BitSet(4);
-
+  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);
@@ -207,8 +222,7 @@ public class TableStats implements org.apache.thrift.TBase<TableStats, TableStat
    * Performs a deep copy on <i>other</i>.
    */
   public TableStats(TableStats other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetTableName()) {
       this.tableName = other.tableName;
     }
@@ -282,16 +296,16 @@ public class TableStats implements org.apache.thrift.TBase<TableStats, TableStat
   }
 
   public void unsetBytes() {
-    __isset_bit_vector.clear(__BYTES_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BYTES_ISSET_ID);
   }
 
   /** Returns true if field bytes is set (has been assigned a value) and false otherwise */
   public boolean isSetBytes() {
-    return __isset_bit_vector.get(__BYTES_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __BYTES_ISSET_ID);
   }
 
   public void setBytesIsSet(boolean value) {
-    __isset_bit_vector.set(__BYTES_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BYTES_ISSET_ID, value);
   }
 
   /**
@@ -311,16 +325,16 @@ public class TableStats implements org.apache.thrift.TBase<TableStats, TableStat
   }
 
   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);
   }
 
   /**
@@ -340,16 +354,16 @@ public class TableStats implements org.apache.thrift.TBase<TableStats, TableStat
   }
 
   public void unsetRowCount() {
-    __isset_bit_vector.clear(__ROWCOUNT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ROWCOUNT_ISSET_ID);
   }
 
   /** Returns true if field rowCount is set (has been assigned a value) and false otherwise */
   public boolean isSetRowCount() {
-    return __isset_bit_vector.get(__ROWCOUNT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __ROWCOUNT_ISSET_ID);
   }
 
   public void setRowCountIsSet(boolean value) {
-    __isset_bit_vector.set(__ROWCOUNT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ROWCOUNT_ISSET_ID, value);
   }
 
   /**
@@ -369,16 +383,16 @@ public class TableStats implements org.apache.thrift.TBase<TableStats, TableStat
   }
 
   public void unsetQueries() {
-    __isset_bit_vector.clear(__QUERIES_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUERIES_ISSET_ID);
   }
 
   /** Returns true if field queries is set (has been assigned a value) and false otherwise */
   public boolean isSetQueries() {
-    return __isset_bit_vector.get(__QUERIES_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __QUERIES_ISSET_ID);
   }
 
   public void setQueriesIsSet(boolean value) {
-    __isset_bit_vector.set(__QUERIES_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUERIES_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -600,88 +614,11 @@ public class TableStats implements org.apache.thrift.TBase<TableStats, TableStat
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // TABLE_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.tableName = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // BYTES
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.bytes = iprot.readI64();
-            setBytesIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // RECORD_COUNT
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.recordCount = iprot.readI64();
-            setRecordCountIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // ROW_COUNT
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.rowCount = iprot.readI64();
-            setRowCountIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // QUERIES
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.queries = iprot.readI64();
-            setQueriesIsSet(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.tableName != null) {
-      oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
-      oprot.writeString(this.tableName);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(BYTES_FIELD_DESC);
-    oprot.writeI64(this.bytes);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(RECORD_COUNT_FIELD_DESC);
-    oprot.writeI64(this.recordCount);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(ROW_COUNT_FIELD_DESC);
-    oprot.writeI64(this.rowCount);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(QUERIES_FIELD_DESC);
-    oprot.writeI64(this.queries);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -718,6 +655,7 @@ public class TableStats implements org.apache.thrift.TBase<TableStats, TableStat
 
   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 {
@@ -731,12 +669,180 @@ public class TableStats implements org.apache.thrift.TBase<TableStats, TableStat
   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 TableStatsStandardSchemeFactory implements SchemeFactory {
+    public TableStatsStandardScheme getScheme() {
+      return new TableStatsStandardScheme();
+    }
+  }
+
+  private static class TableStatsStandardScheme extends StandardScheme<TableStats> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, TableStats struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // TABLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tableName = iprot.readString();
+              struct.setTableNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // BYTES
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.bytes = iprot.readI64();
+              struct.setBytesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // RECORD_COUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.recordCount = iprot.readI64();
+              struct.setRecordCountIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // ROW_COUNT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.rowCount = iprot.readI64();
+              struct.setRowCountIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // QUERIES
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.queries = iprot.readI64();
+              struct.setQueriesIsSet(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, TableStats struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.tableName != null) {
+        oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.tableName);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(BYTES_FIELD_DESC);
+      oprot.writeI64(struct.bytes);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(RECORD_COUNT_FIELD_DESC);
+      oprot.writeI64(struct.recordCount);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(ROW_COUNT_FIELD_DESC);
+      oprot.writeI64(struct.rowCount);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(QUERIES_FIELD_DESC);
+      oprot.writeI64(struct.queries);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TableStatsTupleSchemeFactory implements SchemeFactory {
+    public TableStatsTupleScheme getScheme() {
+      return new TableStatsTupleScheme();
+    }
+  }
+
+  private static class TableStatsTupleScheme extends TupleScheme<TableStats> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, TableStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetTableName()) {
+        optionals.set(0);
+      }
+      if (struct.isSetBytes()) {
+        optionals.set(1);
+      }
+      if (struct.isSetRecordCount()) {
+        optionals.set(2);
+      }
+      if (struct.isSetRowCount()) {
+        optionals.set(3);
+      }
+      if (struct.isSetQueries()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetTableName()) {
+        oprot.writeString(struct.tableName);
+      }
+      if (struct.isSetBytes()) {
+        oprot.writeI64(struct.bytes);
+      }
+      if (struct.isSetRecordCount()) {
+        oprot.writeI64(struct.recordCount);
+      }
+      if (struct.isSetRowCount()) {
+        oprot.writeI64(struct.rowCount);
+      }
+      if (struct.isSetQueries()) {
+        oprot.writeI64(struct.queries);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, TableStats struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.tableName = iprot.readString();
+        struct.setTableNameIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.bytes = iprot.readI64();
+        struct.setBytesIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.recordCount = iprot.readI64();
+        struct.setRecordCountIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.rowCount = iprot.readI64();
+        struct.setRowCountIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.queries = iprot.readI64();
+        struct.setQueriesIsSet(true);
+      }
+    }
+  }
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/1befa5f5/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Term.java
----------------------------------------------------------------------
diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Term.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Term.java
index 568bf17..f13f05c 100644
--- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Term.java
+++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Term.java
@@ -1,7 +1,8 @@
 /**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
  */
 package org.apache.blur.thrift.generated;
 
@@ -24,6 +25,15 @@ package org.apache.blur.thrift.generated;
 
 
 
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -45,6 +55,12 @@ public class Term implements org.apache.thrift.TBase<Term, Term._Fields>, java.i
   private static final org.apache.thrift.protocol.TField FIELD_FIELD_DESC = new org.apache.thrift.protocol.TField("field", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("bytes", 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 TermStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new TermTupleSchemeFactory());
+  }
+
   public String field; // required
   public ByteBuffer bytes; // required
 
@@ -110,7 +126,6 @@ public class Term implements org.apache.thrift.TBase<Term, Term._Fields>, java.i
   }
 
   // isset id assignments
-
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -338,56 +353,11 @@ public class Term implements org.apache.thrift.TBase<Term, Term._Fields>, java.i
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // FIELD
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.field = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // BYTES
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.bytes = 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.field != null) {
-      oprot.writeFieldBegin(FIELD_FIELD_DESC);
-      oprot.writeString(this.field);
-      oprot.writeFieldEnd();
-    }
-    if (this.bytes != null) {
-      oprot.writeFieldBegin(BYTES_FIELD_DESC);
-      oprot.writeBinary(this.bytes);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -416,6 +386,7 @@ public class Term implements org.apache.thrift.TBase<Term, Term._Fields>, java.i
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -434,5 +405,112 @@ public class Term implements org.apache.thrift.TBase<Term, Term._Fields>, java.i
     }
   }
 
+  private static class TermStandardSchemeFactory implements SchemeFactory {
+    public TermStandardScheme getScheme() {
+      return new TermStandardScheme();
+    }
+  }
+
+  private static class TermStandardScheme extends StandardScheme<Term> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Term 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: // FIELD
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.field = iprot.readString();
+              struct.setFieldIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // BYTES
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.bytes = iprot.readBinary();
+              struct.setBytesIsSet(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, Term struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.field != null) {
+        oprot.writeFieldBegin(FIELD_FIELD_DESC);
+        oprot.writeString(struct.field);
+        oprot.writeFieldEnd();
+      }
+      if (struct.bytes != null) {
+        oprot.writeFieldBegin(BYTES_FIELD_DESC);
+        oprot.writeBinary(struct.bytes);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class TermTupleSchemeFactory implements SchemeFactory {
+    public TermTupleScheme getScheme() {
+      return new TermTupleScheme();
+    }
+  }
+
+  private static class TermTupleScheme extends TupleScheme<Term> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Term struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetField()) {
+        optionals.set(0);
+      }
+      if (struct.isSetBytes()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetField()) {
+        oprot.writeString(struct.field);
+      }
+      if (struct.isSetBytes()) {
+        oprot.writeBinary(struct.bytes);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Term struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.field = iprot.readString();
+        struct.setFieldIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.bytes = iprot.readBinary();
+        struct.setBytesIsSet(true);
+      }
+    }
+  }
+
 }
 


Mime
View raw message