You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2012/11/08 10:44:29 UTC

svn commit: r1406984 [24/29] - in /hive/trunk: contrib/src/java/org/apache/hadoop/hive/contrib/genericudf/example/ contrib/src/java/org/apache/hadoop/hive/contrib/serde2/ contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/ contrib/src/test...

Modified: hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java (original)
+++ hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java Thu Nov  8 09:44:19 2012
@@ -1,10 +1,20 @@
 /**
- * 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.hadoop.hive.serde2.thrift.test;
 
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
@@ -44,26 +54,32 @@ public class MegaStruct implements org.a
   private static final org.apache.thrift.protocol.TField MY_ENUMSET_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enumset", org.apache.thrift.protocol.TType.SET, (short)19);
   private static final org.apache.thrift.protocol.TField MY_STRUCTSET_FIELD_DESC = new org.apache.thrift.protocol.TField("my_structset", org.apache.thrift.protocol.TType.SET, (short)20);
 
-  private boolean my_bool; // required
-  private byte my_byte; // required
-  private short my_16bit_int; // required
-  private int my_32bit_int; // required
-  private long my_64bit_int; // required
-  private double my_double; // required
-  private String my_string; // required
-  private ByteBuffer my_binary; // required
-  private Map<String,String> my_string_string_map; // required
-  private Map<String,MyEnum> my_string_enum_map; // required
-  private Map<MyEnum,String> my_enum_string_map; // required
-  private Map<MyEnum,MiniStruct> my_enum_struct_map; // required
-  private Map<MyEnum,List<String>> my_enum_stringlist_map; // required
-  private Map<MyEnum,List<MiniStruct>> my_enum_structlist_map; // required
-  private List<String> my_stringlist; // required
-  private List<MiniStruct> my_structlist; // required
-  private List<MyEnum> my_enumlist; // required
-  private Set<String> my_stringset; // required
-  private Set<MyEnum> my_enumset; // required
-  private Set<MiniStruct> my_structset; // required
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new MegaStructStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new MegaStructTupleSchemeFactory());
+  }
+
+  private boolean my_bool; // optional
+  private byte my_byte; // optional
+  private short my_16bit_int; // optional
+  private int my_32bit_int; // optional
+  private long my_64bit_int; // optional
+  private double my_double; // optional
+  private String my_string; // optional
+  private ByteBuffer my_binary; // optional
+  private Map<String,String> my_string_string_map; // optional
+  private Map<String,MyEnum> my_string_enum_map; // optional
+  private Map<MyEnum,String> my_enum_string_map; // optional
+  private Map<MyEnum,MiniStruct> my_enum_struct_map; // optional
+  private Map<MyEnum,List<String>> my_enum_stringlist_map; // optional
+  private Map<MyEnum,List<MiniStruct>> my_enum_structlist_map; // optional
+  private List<String> my_stringlist; // optional
+  private List<MiniStruct> my_structlist; // optional
+  private List<MyEnum> my_enumlist; // optional
+  private Set<String> my_stringset; // optional
+  private Set<MyEnum> my_enumset; // optional
+  private Set<MiniStruct> my_structset; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -187,8 +203,8 @@ public class MegaStruct implements org.a
   private static final int __MY_32BIT_INT_ISSET_ID = 3;
   private static final int __MY_64BIT_INT_ISSET_ID = 4;
   private static final int __MY_DOUBLE_ISSET_ID = 5;
-  private BitSet __isset_bit_vector = new BitSet(6);
-
+  private byte __isset_bitfield = 0;
+  private _Fields optionals[] = {_Fields.MY_BOOL,_Fields.MY_BYTE,_Fields.MY_16BIT_INT,_Fields.MY_32BIT_INT,_Fields.MY_64BIT_INT,_Fields.MY_DOUBLE,_Fields.MY_STRING,_Fields.MY_BINARY,_Fields.MY_STRING_STRING_MAP,_Fields.MY_STRING_ENUM_MAP,_Fields.MY_ENUM_STRING_MAP,_Fields.MY_ENUM_STRUCT_MAP,_Fields.MY_ENUM_STRINGLIST_MAP,_Fields.MY_ENUM_STRUCTLIST_MAP,_Fields.MY_STRINGLIST,_Fields.MY_STRUCTLIST,_Fields.MY_ENUMLIST,_Fields.MY_STRINGSET,_Fields.MY_ENUMSET,_Fields.MY_STRUCTSET};
   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);
@@ -263,8 +279,7 @@ public class MegaStruct implements org.a
    * Performs a deep copy on <i>other</i>.
    */
   public MegaStruct(MegaStruct other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     this.my_bool = other.my_bool;
     this.my_byte = other.my_byte;
     this.my_16bit_int = other.my_16bit_int;
@@ -462,16 +477,16 @@ public class MegaStruct implements org.a
   }
 
   public void unsetMy_bool() {
-    __isset_bit_vector.clear(__MY_BOOL_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_BOOL_ISSET_ID);
   }
 
   /** Returns true if field my_bool is set (has been assigned a value) and false otherwise */
   public boolean isSetMy_bool() {
-    return __isset_bit_vector.get(__MY_BOOL_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MY_BOOL_ISSET_ID);
   }
 
   public void setMy_boolIsSet(boolean value) {
-    __isset_bit_vector.set(__MY_BOOL_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_BOOL_ISSET_ID, value);
   }
 
   public byte getMy_byte() {
@@ -484,16 +499,16 @@ public class MegaStruct implements org.a
   }
 
   public void unsetMy_byte() {
-    __isset_bit_vector.clear(__MY_BYTE_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_BYTE_ISSET_ID);
   }
 
   /** Returns true if field my_byte is set (has been assigned a value) and false otherwise */
   public boolean isSetMy_byte() {
-    return __isset_bit_vector.get(__MY_BYTE_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MY_BYTE_ISSET_ID);
   }
 
   public void setMy_byteIsSet(boolean value) {
-    __isset_bit_vector.set(__MY_BYTE_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_BYTE_ISSET_ID, value);
   }
 
   public short getMy_16bit_int() {
@@ -506,16 +521,16 @@ public class MegaStruct implements org.a
   }
 
   public void unsetMy_16bit_int() {
-    __isset_bit_vector.clear(__MY_16BIT_INT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_16BIT_INT_ISSET_ID);
   }
 
   /** Returns true if field my_16bit_int is set (has been assigned a value) and false otherwise */
   public boolean isSetMy_16bit_int() {
-    return __isset_bit_vector.get(__MY_16BIT_INT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MY_16BIT_INT_ISSET_ID);
   }
 
   public void setMy_16bit_intIsSet(boolean value) {
-    __isset_bit_vector.set(__MY_16BIT_INT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_16BIT_INT_ISSET_ID, value);
   }
 
   public int getMy_32bit_int() {
@@ -528,16 +543,16 @@ public class MegaStruct implements org.a
   }
 
   public void unsetMy_32bit_int() {
-    __isset_bit_vector.clear(__MY_32BIT_INT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_32BIT_INT_ISSET_ID);
   }
 
   /** Returns true if field my_32bit_int is set (has been assigned a value) and false otherwise */
   public boolean isSetMy_32bit_int() {
-    return __isset_bit_vector.get(__MY_32BIT_INT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MY_32BIT_INT_ISSET_ID);
   }
 
   public void setMy_32bit_intIsSet(boolean value) {
-    __isset_bit_vector.set(__MY_32BIT_INT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_32BIT_INT_ISSET_ID, value);
   }
 
   public long getMy_64bit_int() {
@@ -550,16 +565,16 @@ public class MegaStruct implements org.a
   }
 
   public void unsetMy_64bit_int() {
-    __isset_bit_vector.clear(__MY_64BIT_INT_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_64BIT_INT_ISSET_ID);
   }
 
   /** Returns true if field my_64bit_int is set (has been assigned a value) and false otherwise */
   public boolean isSetMy_64bit_int() {
-    return __isset_bit_vector.get(__MY_64BIT_INT_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MY_64BIT_INT_ISSET_ID);
   }
 
   public void setMy_64bit_intIsSet(boolean value) {
-    __isset_bit_vector.set(__MY_64BIT_INT_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_64BIT_INT_ISSET_ID, value);
   }
 
   public double getMy_double() {
@@ -572,16 +587,16 @@ public class MegaStruct implements org.a
   }
 
   public void unsetMy_double() {
-    __isset_bit_vector.clear(__MY_DOUBLE_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MY_DOUBLE_ISSET_ID);
   }
 
   /** Returns true if field my_double is set (has been assigned a value) and false otherwise */
   public boolean isSetMy_double() {
-    return __isset_bit_vector.get(__MY_DOUBLE_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __MY_DOUBLE_ISSET_ID);
   }
 
   public void setMy_doubleIsSet(boolean value) {
-    __isset_bit_vector.set(__MY_DOUBLE_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MY_DOUBLE_ISSET_ID, value);
   }
 
   public String getMy_string() {
@@ -1770,564 +1785,11 @@ public class MegaStruct implements org.a
   }
 
   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: // MY_BOOL
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.my_bool = iprot.readBool();
-            setMy_boolIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // MY_BYTE
-          if (field.type == org.apache.thrift.protocol.TType.BYTE) {
-            this.my_byte = iprot.readByte();
-            setMy_byteIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // MY_16BIT_INT
-          if (field.type == org.apache.thrift.protocol.TType.I16) {
-            this.my_16bit_int = iprot.readI16();
-            setMy_16bit_intIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // MY_32BIT_INT
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.my_32bit_int = iprot.readI32();
-            setMy_32bit_intIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // MY_64BIT_INT
-          if (field.type == org.apache.thrift.protocol.TType.I64) {
-            this.my_64bit_int = iprot.readI64();
-            setMy_64bit_intIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 6: // MY_DOUBLE
-          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-            this.my_double = iprot.readDouble();
-            setMy_doubleIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 7: // MY_STRING
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.my_string = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 8: // MY_BINARY
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.my_binary = iprot.readBinary();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 9: // MY_STRING_STRING_MAP
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
-              this.my_string_string_map = new HashMap<String,String>(2*_map0.size);
-              for (int _i1 = 0; _i1 < _map0.size; ++_i1)
-              {
-                String _key2; // required
-                String _val3; // required
-                _key2 = iprot.readString();
-                _val3 = iprot.readString();
-                this.my_string_string_map.put(_key2, _val3);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 10: // MY_STRING_ENUM_MAP
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map4 = iprot.readMapBegin();
-              this.my_string_enum_map = new HashMap<String,MyEnum>(2*_map4.size);
-              for (int _i5 = 0; _i5 < _map4.size; ++_i5)
-              {
-                String _key6; // required
-                MyEnum _val7; // required
-                _key6 = iprot.readString();
-                _val7 = MyEnum.findByValue(iprot.readI32());
-                this.my_string_enum_map.put(_key6, _val7);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 11: // MY_ENUM_STRING_MAP
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
-              this.my_enum_string_map = new HashMap<MyEnum,String>(2*_map8.size);
-              for (int _i9 = 0; _i9 < _map8.size; ++_i9)
-              {
-                MyEnum _key10; // required
-                String _val11; // required
-                _key10 = MyEnum.findByValue(iprot.readI32());
-                _val11 = iprot.readString();
-                this.my_enum_string_map.put(_key10, _val11);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 12: // MY_ENUM_STRUCT_MAP
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin();
-              this.my_enum_struct_map = new HashMap<MyEnum,MiniStruct>(2*_map12.size);
-              for (int _i13 = 0; _i13 < _map12.size; ++_i13)
-              {
-                MyEnum _key14; // required
-                MiniStruct _val15; // required
-                _key14 = MyEnum.findByValue(iprot.readI32());
-                _val15 = new MiniStruct();
-                _val15.read(iprot);
-                this.my_enum_struct_map.put(_key14, _val15);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 13: // MY_ENUM_STRINGLIST_MAP
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
-              this.my_enum_stringlist_map = new HashMap<MyEnum,List<String>>(2*_map16.size);
-              for (int _i17 = 0; _i17 < _map16.size; ++_i17)
-              {
-                MyEnum _key18; // required
-                List<String> _val19; // required
-                _key18 = MyEnum.findByValue(iprot.readI32());
-                {
-                  org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
-                  _val19 = new ArrayList<String>(_list20.size);
-                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
-                  {
-                    String _elem22; // required
-                    _elem22 = iprot.readString();
-                    _val19.add(_elem22);
-                  }
-                  iprot.readListEnd();
-                }
-                this.my_enum_stringlist_map.put(_key18, _val19);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 14: // MY_ENUM_STRUCTLIST_MAP
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map23 = iprot.readMapBegin();
-              this.my_enum_structlist_map = new HashMap<MyEnum,List<MiniStruct>>(2*_map23.size);
-              for (int _i24 = 0; _i24 < _map23.size; ++_i24)
-              {
-                MyEnum _key25; // required
-                List<MiniStruct> _val26; // required
-                _key25 = MyEnum.findByValue(iprot.readI32());
-                {
-                  org.apache.thrift.protocol.TList _list27 = iprot.readListBegin();
-                  _val26 = new ArrayList<MiniStruct>(_list27.size);
-                  for (int _i28 = 0; _i28 < _list27.size; ++_i28)
-                  {
-                    MiniStruct _elem29; // required
-                    _elem29 = new MiniStruct();
-                    _elem29.read(iprot);
-                    _val26.add(_elem29);
-                  }
-                  iprot.readListEnd();
-                }
-                this.my_enum_structlist_map.put(_key25, _val26);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 15: // MY_STRINGLIST
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
-              this.my_stringlist = new ArrayList<String>(_list30.size);
-              for (int _i31 = 0; _i31 < _list30.size; ++_i31)
-              {
-                String _elem32; // required
-                _elem32 = iprot.readString();
-                this.my_stringlist.add(_elem32);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 16: // MY_STRUCTLIST
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list33 = iprot.readListBegin();
-              this.my_structlist = new ArrayList<MiniStruct>(_list33.size);
-              for (int _i34 = 0; _i34 < _list33.size; ++_i34)
-              {
-                MiniStruct _elem35; // required
-                _elem35 = new MiniStruct();
-                _elem35.read(iprot);
-                this.my_structlist.add(_elem35);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 17: // MY_ENUMLIST
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
-              this.my_enumlist = new ArrayList<MyEnum>(_list36.size);
-              for (int _i37 = 0; _i37 < _list36.size; ++_i37)
-              {
-                MyEnum _elem38; // required
-                _elem38 = MyEnum.findByValue(iprot.readI32());
-                this.my_enumlist.add(_elem38);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 18: // MY_STRINGSET
-          if (field.type == org.apache.thrift.protocol.TType.SET) {
-            {
-              org.apache.thrift.protocol.TSet _set39 = iprot.readSetBegin();
-              this.my_stringset = new HashSet<String>(2*_set39.size);
-              for (int _i40 = 0; _i40 < _set39.size; ++_i40)
-              {
-                String _elem41; // required
-                _elem41 = iprot.readString();
-                this.my_stringset.add(_elem41);
-              }
-              iprot.readSetEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 19: // MY_ENUMSET
-          if (field.type == org.apache.thrift.protocol.TType.SET) {
-            {
-              org.apache.thrift.protocol.TSet _set42 = iprot.readSetBegin();
-              this.my_enumset = new HashSet<MyEnum>(2*_set42.size);
-              for (int _i43 = 0; _i43 < _set42.size; ++_i43)
-              {
-                MyEnum _elem44; // required
-                _elem44 = MyEnum.findByValue(iprot.readI32());
-                this.my_enumset.add(_elem44);
-              }
-              iprot.readSetEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 20: // MY_STRUCTSET
-          if (field.type == org.apache.thrift.protocol.TType.SET) {
-            {
-              org.apache.thrift.protocol.TSet _set45 = iprot.readSetBegin();
-              this.my_structset = new HashSet<MiniStruct>(2*_set45.size);
-              for (int _i46 = 0; _i46 < _set45.size; ++_i46)
-              {
-                MiniStruct _elem47; // required
-                _elem47 = new MiniStruct();
-                _elem47.read(iprot);
-                this.my_structset.add(_elem47);
-              }
-              iprot.readSetEnd();
-            }
-          } 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();
-    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 (isSetMy_bool()) {
-      oprot.writeFieldBegin(MY_BOOL_FIELD_DESC);
-      oprot.writeBool(this.my_bool);
-      oprot.writeFieldEnd();
-    }
-    if (isSetMy_byte()) {
-      oprot.writeFieldBegin(MY_BYTE_FIELD_DESC);
-      oprot.writeByte(this.my_byte);
-      oprot.writeFieldEnd();
-    }
-    if (isSetMy_16bit_int()) {
-      oprot.writeFieldBegin(MY_16BIT_INT_FIELD_DESC);
-      oprot.writeI16(this.my_16bit_int);
-      oprot.writeFieldEnd();
-    }
-    if (isSetMy_32bit_int()) {
-      oprot.writeFieldBegin(MY_32BIT_INT_FIELD_DESC);
-      oprot.writeI32(this.my_32bit_int);
-      oprot.writeFieldEnd();
-    }
-    if (isSetMy_64bit_int()) {
-      oprot.writeFieldBegin(MY_64BIT_INT_FIELD_DESC);
-      oprot.writeI64(this.my_64bit_int);
-      oprot.writeFieldEnd();
-    }
-    if (isSetMy_double()) {
-      oprot.writeFieldBegin(MY_DOUBLE_FIELD_DESC);
-      oprot.writeDouble(this.my_double);
-      oprot.writeFieldEnd();
-    }
-    if (this.my_string != null) {
-      if (isSetMy_string()) {
-        oprot.writeFieldBegin(MY_STRING_FIELD_DESC);
-        oprot.writeString(this.my_string);
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_binary != null) {
-      if (isSetMy_binary()) {
-        oprot.writeFieldBegin(MY_BINARY_FIELD_DESC);
-        oprot.writeBinary(this.my_binary);
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_string_string_map != null) {
-      if (isSetMy_string_string_map()) {
-        oprot.writeFieldBegin(MY_STRING_STRING_MAP_FIELD_DESC);
-        {
-          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.my_string_string_map.size()));
-          for (Map.Entry<String, String> _iter48 : this.my_string_string_map.entrySet())
-          {
-            oprot.writeString(_iter48.getKey());
-            oprot.writeString(_iter48.getValue());
-          }
-          oprot.writeMapEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_string_enum_map != null) {
-      if (isSetMy_string_enum_map()) {
-        oprot.writeFieldBegin(MY_STRING_ENUM_MAP_FIELD_DESC);
-        {
-          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, this.my_string_enum_map.size()));
-          for (Map.Entry<String, MyEnum> _iter49 : this.my_string_enum_map.entrySet())
-          {
-            oprot.writeString(_iter49.getKey());
-            oprot.writeI32(_iter49.getValue().getValue());
-          }
-          oprot.writeMapEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_enum_string_map != null) {
-      if (isSetMy_enum_string_map()) {
-        oprot.writeFieldBegin(MY_ENUM_STRING_MAP_FIELD_DESC);
-        {
-          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, this.my_enum_string_map.size()));
-          for (Map.Entry<MyEnum, String> _iter50 : this.my_enum_string_map.entrySet())
-          {
-            oprot.writeI32(_iter50.getKey().getValue());
-            oprot.writeString(_iter50.getValue());
-          }
-          oprot.writeMapEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_enum_struct_map != null) {
-      if (isSetMy_enum_struct_map()) {
-        oprot.writeFieldBegin(MY_ENUM_STRUCT_MAP_FIELD_DESC);
-        {
-          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, this.my_enum_struct_map.size()));
-          for (Map.Entry<MyEnum, MiniStruct> _iter51 : this.my_enum_struct_map.entrySet())
-          {
-            oprot.writeI32(_iter51.getKey().getValue());
-            _iter51.getValue().write(oprot);
-          }
-          oprot.writeMapEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_enum_stringlist_map != null) {
-      if (isSetMy_enum_stringlist_map()) {
-        oprot.writeFieldBegin(MY_ENUM_STRINGLIST_MAP_FIELD_DESC);
-        {
-          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, this.my_enum_stringlist_map.size()));
-          for (Map.Entry<MyEnum, List<String>> _iter52 : this.my_enum_stringlist_map.entrySet())
-          {
-            oprot.writeI32(_iter52.getKey().getValue());
-            {
-              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter52.getValue().size()));
-              for (String _iter53 : _iter52.getValue())
-              {
-                oprot.writeString(_iter53);
-              }
-              oprot.writeListEnd();
-            }
-          }
-          oprot.writeMapEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_enum_structlist_map != null) {
-      if (isSetMy_enum_structlist_map()) {
-        oprot.writeFieldBegin(MY_ENUM_STRUCTLIST_MAP_FIELD_DESC);
-        {
-          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, this.my_enum_structlist_map.size()));
-          for (Map.Entry<MyEnum, List<MiniStruct>> _iter54 : this.my_enum_structlist_map.entrySet())
-          {
-            oprot.writeI32(_iter54.getKey().getValue());
-            {
-              oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter54.getValue().size()));
-              for (MiniStruct _iter55 : _iter54.getValue())
-              {
-                _iter55.write(oprot);
-              }
-              oprot.writeListEnd();
-            }
-          }
-          oprot.writeMapEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_stringlist != null) {
-      if (isSetMy_stringlist()) {
-        oprot.writeFieldBegin(MY_STRINGLIST_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.my_stringlist.size()));
-          for (String _iter56 : this.my_stringlist)
-          {
-            oprot.writeString(_iter56);
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_structlist != null) {
-      if (isSetMy_structlist()) {
-        oprot.writeFieldBegin(MY_STRUCTLIST_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.my_structlist.size()));
-          for (MiniStruct _iter57 : this.my_structlist)
-          {
-            _iter57.write(oprot);
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_enumlist != null) {
-      if (isSetMy_enumlist()) {
-        oprot.writeFieldBegin(MY_ENUMLIST_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, this.my_enumlist.size()));
-          for (MyEnum _iter58 : this.my_enumlist)
-          {
-            oprot.writeI32(_iter58.getValue());
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_stringset != null) {
-      if (isSetMy_stringset()) {
-        oprot.writeFieldBegin(MY_STRINGSET_FIELD_DESC);
-        {
-          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, this.my_stringset.size()));
-          for (String _iter59 : this.my_stringset)
-          {
-            oprot.writeString(_iter59);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_enumset != null) {
-      if (isSetMy_enumset()) {
-        oprot.writeFieldBegin(MY_ENUMSET_FIELD_DESC);
-        {
-          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, this.my_enumset.size()));
-          for (MyEnum _iter60 : this.my_enumset)
-          {
-            oprot.writeI32(_iter60.getValue());
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_structset != null) {
-      if (isSetMy_structset()) {
-        oprot.writeFieldBegin(MY_STRUCTSET_FIELD_DESC);
-        {
-          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, this.my_structset.size()));
-          for (MiniStruct _iter61 : this.my_structset)
-          {
-            _iter61.write(oprot);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -2516,6 +1978,7 @@ public class MegaStruct implements org.a
 
   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 {
@@ -2529,12 +1992,1051 @@ public class MegaStruct implements org.a
   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 MegaStructStandardSchemeFactory implements SchemeFactory {
+    public MegaStructStandardScheme getScheme() {
+      return new MegaStructStandardScheme();
+    }
+  }
+
+  private static class MegaStructStandardScheme extends StandardScheme<MegaStruct> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, MegaStruct 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: // MY_BOOL
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.my_bool = iprot.readBool();
+              struct.setMy_boolIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // MY_BYTE
+            if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
+              struct.my_byte = iprot.readByte();
+              struct.setMy_byteIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // MY_16BIT_INT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
+              struct.my_16bit_int = iprot.readI16();
+              struct.setMy_16bit_intIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // MY_32BIT_INT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.my_32bit_int = iprot.readI32();
+              struct.setMy_32bit_intIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // MY_64BIT_INT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.my_64bit_int = iprot.readI64();
+              struct.setMy_64bit_intIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // MY_DOUBLE
+            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+              struct.my_double = iprot.readDouble();
+              struct.setMy_doubleIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // MY_STRING
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.my_string = iprot.readString();
+              struct.setMy_stringIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // MY_BINARY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.my_binary = iprot.readBinary();
+              struct.setMy_binaryIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 9: // MY_STRING_STRING_MAP
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
+                struct.my_string_string_map = new HashMap<String,String>(2*_map0.size);
+                for (int _i1 = 0; _i1 < _map0.size; ++_i1)
+                {
+                  String _key2; // required
+                  String _val3; // required
+                  _key2 = iprot.readString();
+                  _val3 = iprot.readString();
+                  struct.my_string_string_map.put(_key2, _val3);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setMy_string_string_mapIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 10: // MY_STRING_ENUM_MAP
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map4 = iprot.readMapBegin();
+                struct.my_string_enum_map = new HashMap<String,MyEnum>(2*_map4.size);
+                for (int _i5 = 0; _i5 < _map4.size; ++_i5)
+                {
+                  String _key6; // required
+                  MyEnum _val7; // required
+                  _key6 = iprot.readString();
+                  _val7 = MyEnum.findByValue(iprot.readI32());
+                  struct.my_string_enum_map.put(_key6, _val7);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setMy_string_enum_mapIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 11: // MY_ENUM_STRING_MAP
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
+                struct.my_enum_string_map = new HashMap<MyEnum,String>(2*_map8.size);
+                for (int _i9 = 0; _i9 < _map8.size; ++_i9)
+                {
+                  MyEnum _key10; // required
+                  String _val11; // required
+                  _key10 = MyEnum.findByValue(iprot.readI32());
+                  _val11 = iprot.readString();
+                  struct.my_enum_string_map.put(_key10, _val11);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setMy_enum_string_mapIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 12: // MY_ENUM_STRUCT_MAP
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map12 = iprot.readMapBegin();
+                struct.my_enum_struct_map = new HashMap<MyEnum,MiniStruct>(2*_map12.size);
+                for (int _i13 = 0; _i13 < _map12.size; ++_i13)
+                {
+                  MyEnum _key14; // required
+                  MiniStruct _val15; // required
+                  _key14 = MyEnum.findByValue(iprot.readI32());
+                  _val15 = new MiniStruct();
+                  _val15.read(iprot);
+                  struct.my_enum_struct_map.put(_key14, _val15);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setMy_enum_struct_mapIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 13: // MY_ENUM_STRINGLIST_MAP
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
+                struct.my_enum_stringlist_map = new HashMap<MyEnum,List<String>>(2*_map16.size);
+                for (int _i17 = 0; _i17 < _map16.size; ++_i17)
+                {
+                  MyEnum _key18; // required
+                  List<String> _val19; // required
+                  _key18 = MyEnum.findByValue(iprot.readI32());
+                  {
+                    org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
+                    _val19 = new ArrayList<String>(_list20.size);
+                    for (int _i21 = 0; _i21 < _list20.size; ++_i21)
+                    {
+                      String _elem22; // required
+                      _elem22 = iprot.readString();
+                      _val19.add(_elem22);
+                    }
+                    iprot.readListEnd();
+                  }
+                  struct.my_enum_stringlist_map.put(_key18, _val19);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setMy_enum_stringlist_mapIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 14: // MY_ENUM_STRUCTLIST_MAP
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map23 = iprot.readMapBegin();
+                struct.my_enum_structlist_map = new HashMap<MyEnum,List<MiniStruct>>(2*_map23.size);
+                for (int _i24 = 0; _i24 < _map23.size; ++_i24)
+                {
+                  MyEnum _key25; // required
+                  List<MiniStruct> _val26; // required
+                  _key25 = MyEnum.findByValue(iprot.readI32());
+                  {
+                    org.apache.thrift.protocol.TList _list27 = iprot.readListBegin();
+                    _val26 = new ArrayList<MiniStruct>(_list27.size);
+                    for (int _i28 = 0; _i28 < _list27.size; ++_i28)
+                    {
+                      MiniStruct _elem29; // required
+                      _elem29 = new MiniStruct();
+                      _elem29.read(iprot);
+                      _val26.add(_elem29);
+                    }
+                    iprot.readListEnd();
+                  }
+                  struct.my_enum_structlist_map.put(_key25, _val26);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setMy_enum_structlist_mapIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 15: // MY_STRINGLIST
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
+                struct.my_stringlist = new ArrayList<String>(_list30.size);
+                for (int _i31 = 0; _i31 < _list30.size; ++_i31)
+                {
+                  String _elem32; // required
+                  _elem32 = iprot.readString();
+                  struct.my_stringlist.add(_elem32);
+                }
+                iprot.readListEnd();
+              }
+              struct.setMy_stringlistIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 16: // MY_STRUCTLIST
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list33 = iprot.readListBegin();
+                struct.my_structlist = new ArrayList<MiniStruct>(_list33.size);
+                for (int _i34 = 0; _i34 < _list33.size; ++_i34)
+                {
+                  MiniStruct _elem35; // required
+                  _elem35 = new MiniStruct();
+                  _elem35.read(iprot);
+                  struct.my_structlist.add(_elem35);
+                }
+                iprot.readListEnd();
+              }
+              struct.setMy_structlistIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 17: // MY_ENUMLIST
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
+                struct.my_enumlist = new ArrayList<MyEnum>(_list36.size);
+                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
+                {
+                  MyEnum _elem38; // required
+                  _elem38 = MyEnum.findByValue(iprot.readI32());
+                  struct.my_enumlist.add(_elem38);
+                }
+                iprot.readListEnd();
+              }
+              struct.setMy_enumlistIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 18: // MY_STRINGSET
+            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+              {
+                org.apache.thrift.protocol.TSet _set39 = iprot.readSetBegin();
+                struct.my_stringset = new HashSet<String>(2*_set39.size);
+                for (int _i40 = 0; _i40 < _set39.size; ++_i40)
+                {
+                  String _elem41; // required
+                  _elem41 = iprot.readString();
+                  struct.my_stringset.add(_elem41);
+                }
+                iprot.readSetEnd();
+              }
+              struct.setMy_stringsetIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 19: // MY_ENUMSET
+            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+              {
+                org.apache.thrift.protocol.TSet _set42 = iprot.readSetBegin();
+                struct.my_enumset = new HashSet<MyEnum>(2*_set42.size);
+                for (int _i43 = 0; _i43 < _set42.size; ++_i43)
+                {
+                  MyEnum _elem44; // required
+                  _elem44 = MyEnum.findByValue(iprot.readI32());
+                  struct.my_enumset.add(_elem44);
+                }
+                iprot.readSetEnd();
+              }
+              struct.setMy_enumsetIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 20: // MY_STRUCTSET
+            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+              {
+                org.apache.thrift.protocol.TSet _set45 = iprot.readSetBegin();
+                struct.my_structset = new HashSet<MiniStruct>(2*_set45.size);
+                for (int _i46 = 0; _i46 < _set45.size; ++_i46)
+                {
+                  MiniStruct _elem47; // required
+                  _elem47 = new MiniStruct();
+                  _elem47.read(iprot);
+                  struct.my_structset.add(_elem47);
+                }
+                iprot.readSetEnd();
+              }
+              struct.setMy_structsetIsSet(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();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, MegaStruct struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.isSetMy_bool()) {
+        oprot.writeFieldBegin(MY_BOOL_FIELD_DESC);
+        oprot.writeBool(struct.my_bool);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetMy_byte()) {
+        oprot.writeFieldBegin(MY_BYTE_FIELD_DESC);
+        oprot.writeByte(struct.my_byte);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetMy_16bit_int()) {
+        oprot.writeFieldBegin(MY_16BIT_INT_FIELD_DESC);
+        oprot.writeI16(struct.my_16bit_int);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetMy_32bit_int()) {
+        oprot.writeFieldBegin(MY_32BIT_INT_FIELD_DESC);
+        oprot.writeI32(struct.my_32bit_int);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetMy_64bit_int()) {
+        oprot.writeFieldBegin(MY_64BIT_INT_FIELD_DESC);
+        oprot.writeI64(struct.my_64bit_int);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetMy_double()) {
+        oprot.writeFieldBegin(MY_DOUBLE_FIELD_DESC);
+        oprot.writeDouble(struct.my_double);
+        oprot.writeFieldEnd();
+      }
+      if (struct.my_string != null) {
+        if (struct.isSetMy_string()) {
+          oprot.writeFieldBegin(MY_STRING_FIELD_DESC);
+          oprot.writeString(struct.my_string);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_binary != null) {
+        if (struct.isSetMy_binary()) {
+          oprot.writeFieldBegin(MY_BINARY_FIELD_DESC);
+          oprot.writeBinary(struct.my_binary);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_string_string_map != null) {
+        if (struct.isSetMy_string_string_map()) {
+          oprot.writeFieldBegin(MY_STRING_STRING_MAP_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.my_string_string_map.size()));
+            for (Map.Entry<String, String> _iter48 : struct.my_string_string_map.entrySet())
+            {
+              oprot.writeString(_iter48.getKey());
+              oprot.writeString(_iter48.getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_string_enum_map != null) {
+        if (struct.isSetMy_string_enum_map()) {
+          oprot.writeFieldBegin(MY_STRING_ENUM_MAP_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.my_string_enum_map.size()));
+            for (Map.Entry<String, MyEnum> _iter49 : struct.my_string_enum_map.entrySet())
+            {
+              oprot.writeString(_iter49.getKey());
+              oprot.writeI32(_iter49.getValue().getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_enum_string_map != null) {
+        if (struct.isSetMy_enum_string_map()) {
+          oprot.writeFieldBegin(MY_ENUM_STRING_MAP_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, struct.my_enum_string_map.size()));
+            for (Map.Entry<MyEnum, String> _iter50 : struct.my_enum_string_map.entrySet())
+            {
+              oprot.writeI32(_iter50.getKey().getValue());
+              oprot.writeString(_iter50.getValue());
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_enum_struct_map != null) {
+        if (struct.isSetMy_enum_struct_map()) {
+          oprot.writeFieldBegin(MY_ENUM_STRUCT_MAP_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, struct.my_enum_struct_map.size()));
+            for (Map.Entry<MyEnum, MiniStruct> _iter51 : struct.my_enum_struct_map.entrySet())
+            {
+              oprot.writeI32(_iter51.getKey().getValue());
+              _iter51.getValue().write(oprot);
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_enum_stringlist_map != null) {
+        if (struct.isSetMy_enum_stringlist_map()) {
+          oprot.writeFieldBegin(MY_ENUM_STRINGLIST_MAP_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, struct.my_enum_stringlist_map.size()));
+            for (Map.Entry<MyEnum, List<String>> _iter52 : struct.my_enum_stringlist_map.entrySet())
+            {
+              oprot.writeI32(_iter52.getKey().getValue());
+              {
+                oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter52.getValue().size()));
+                for (String _iter53 : _iter52.getValue())
+                {
+                  oprot.writeString(_iter53);
+                }
+                oprot.writeListEnd();
+              }
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_enum_structlist_map != null) {
+        if (struct.isSetMy_enum_structlist_map()) {
+          oprot.writeFieldBegin(MY_ENUM_STRUCTLIST_MAP_FIELD_DESC);
+          {
+            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, struct.my_enum_structlist_map.size()));
+            for (Map.Entry<MyEnum, List<MiniStruct>> _iter54 : struct.my_enum_structlist_map.entrySet())
+            {
+              oprot.writeI32(_iter54.getKey().getValue());
+              {
+                oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter54.getValue().size()));
+                for (MiniStruct _iter55 : _iter54.getValue())
+                {
+                  _iter55.write(oprot);
+                }
+                oprot.writeListEnd();
+              }
+            }
+            oprot.writeMapEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_stringlist != null) {
+        if (struct.isSetMy_stringlist()) {
+          oprot.writeFieldBegin(MY_STRINGLIST_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.my_stringlist.size()));
+            for (String _iter56 : struct.my_stringlist)
+            {
+              oprot.writeString(_iter56);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_structlist != null) {
+        if (struct.isSetMy_structlist()) {
+          oprot.writeFieldBegin(MY_STRUCTLIST_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.my_structlist.size()));
+            for (MiniStruct _iter57 : struct.my_structlist)
+            {
+              _iter57.write(oprot);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_enumlist != null) {
+        if (struct.isSetMy_enumlist()) {
+          oprot.writeFieldBegin(MY_ENUMLIST_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.my_enumlist.size()));
+            for (MyEnum _iter58 : struct.my_enumlist)
+            {
+              oprot.writeI32(_iter58.getValue());
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_stringset != null) {
+        if (struct.isSetMy_stringset()) {
+          oprot.writeFieldBegin(MY_STRINGSET_FIELD_DESC);
+          {
+            oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.my_stringset.size()));
+            for (String _iter59 : struct.my_stringset)
+            {
+              oprot.writeString(_iter59);
+            }
+            oprot.writeSetEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_enumset != null) {
+        if (struct.isSetMy_enumset()) {
+          oprot.writeFieldBegin(MY_ENUMSET_FIELD_DESC);
+          {
+            oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, struct.my_enumset.size()));
+            for (MyEnum _iter60 : struct.my_enumset)
+            {
+              oprot.writeI32(_iter60.getValue());
+            }
+            oprot.writeSetEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_structset != null) {
+        if (struct.isSetMy_structset()) {
+          oprot.writeFieldBegin(MY_STRUCTSET_FIELD_DESC);
+          {
+            oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.my_structset.size()));
+            for (MiniStruct _iter61 : struct.my_structset)
+            {
+              _iter61.write(oprot);
+            }
+            oprot.writeSetEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class MegaStructTupleSchemeFactory implements SchemeFactory {
+    public MegaStructTupleScheme getScheme() {
+      return new MegaStructTupleScheme();
+    }
+  }
+
+  private static class MegaStructTupleScheme extends TupleScheme<MegaStruct> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, MegaStruct struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetMy_bool()) {
+        optionals.set(0);
+      }
+      if (struct.isSetMy_byte()) {
+        optionals.set(1);
+      }
+      if (struct.isSetMy_16bit_int()) {
+        optionals.set(2);
+      }
+      if (struct.isSetMy_32bit_int()) {
+        optionals.set(3);
+      }
+      if (struct.isSetMy_64bit_int()) {
+        optionals.set(4);
+      }
+      if (struct.isSetMy_double()) {
+        optionals.set(5);
+      }
+      if (struct.isSetMy_string()) {
+        optionals.set(6);
+      }
+      if (struct.isSetMy_binary()) {
+        optionals.set(7);
+      }
+      if (struct.isSetMy_string_string_map()) {
+        optionals.set(8);
+      }
+      if (struct.isSetMy_string_enum_map()) {
+        optionals.set(9);
+      }
+      if (struct.isSetMy_enum_string_map()) {
+        optionals.set(10);
+      }
+      if (struct.isSetMy_enum_struct_map()) {
+        optionals.set(11);
+      }
+      if (struct.isSetMy_enum_stringlist_map()) {
+        optionals.set(12);
+      }
+      if (struct.isSetMy_enum_structlist_map()) {
+        optionals.set(13);
+      }
+      if (struct.isSetMy_stringlist()) {
+        optionals.set(14);
+      }
+      if (struct.isSetMy_structlist()) {
+        optionals.set(15);
+      }
+      if (struct.isSetMy_enumlist()) {
+        optionals.set(16);
+      }
+      if (struct.isSetMy_stringset()) {
+        optionals.set(17);
+      }
+      if (struct.isSetMy_enumset()) {
+        optionals.set(18);
+      }
+      if (struct.isSetMy_structset()) {
+        optionals.set(19);
+      }
+      oprot.writeBitSet(optionals, 20);
+      if (struct.isSetMy_bool()) {
+        oprot.writeBool(struct.my_bool);
+      }
+      if (struct.isSetMy_byte()) {
+        oprot.writeByte(struct.my_byte);
+      }
+      if (struct.isSetMy_16bit_int()) {
+        oprot.writeI16(struct.my_16bit_int);
+      }
+      if (struct.isSetMy_32bit_int()) {
+        oprot.writeI32(struct.my_32bit_int);
+      }
+      if (struct.isSetMy_64bit_int()) {
+        oprot.writeI64(struct.my_64bit_int);
+      }
+      if (struct.isSetMy_double()) {
+        oprot.writeDouble(struct.my_double);
+      }
+      if (struct.isSetMy_string()) {
+        oprot.writeString(struct.my_string);
+      }
+      if (struct.isSetMy_binary()) {
+        oprot.writeBinary(struct.my_binary);
+      }
+      if (struct.isSetMy_string_string_map()) {
+        {
+          oprot.writeI32(struct.my_string_string_map.size());
+          for (Map.Entry<String, String> _iter62 : struct.my_string_string_map.entrySet())
+          {
+            oprot.writeString(_iter62.getKey());
+            oprot.writeString(_iter62.getValue());
+          }
+        }
+      }
+      if (struct.isSetMy_string_enum_map()) {
+        {
+          oprot.writeI32(struct.my_string_enum_map.size());
+          for (Map.Entry<String, MyEnum> _iter63 : struct.my_string_enum_map.entrySet())
+          {
+            oprot.writeString(_iter63.getKey());
+            oprot.writeI32(_iter63.getValue().getValue());
+          }
+        }
+      }
+      if (struct.isSetMy_enum_string_map()) {
+        {
+          oprot.writeI32(struct.my_enum_string_map.size());
+          for (Map.Entry<MyEnum, String> _iter64 : struct.my_enum_string_map.entrySet())
+          {
+            oprot.writeI32(_iter64.getKey().getValue());
+            oprot.writeString(_iter64.getValue());
+          }
+        }
+      }
+      if (struct.isSetMy_enum_struct_map()) {
+        {
+          oprot.writeI32(struct.my_enum_struct_map.size());
+          for (Map.Entry<MyEnum, MiniStruct> _iter65 : struct.my_enum_struct_map.entrySet())
+          {
+            oprot.writeI32(_iter65.getKey().getValue());
+            _iter65.getValue().write(oprot);
+          }
+        }
+      }
+      if (struct.isSetMy_enum_stringlist_map()) {
+        {
+          oprot.writeI32(struct.my_enum_stringlist_map.size());
+          for (Map.Entry<MyEnum, List<String>> _iter66 : struct.my_enum_stringlist_map.entrySet())
+          {
+            oprot.writeI32(_iter66.getKey().getValue());
+            {
+              oprot.writeI32(_iter66.getValue().size());
+              for (String _iter67 : _iter66.getValue())
+              {
+                oprot.writeString(_iter67);
+              }
+            }
+          }
+        }
+      }
+      if (struct.isSetMy_enum_structlist_map()) {
+        {
+          oprot.writeI32(struct.my_enum_structlist_map.size());
+          for (Map.Entry<MyEnum, List<MiniStruct>> _iter68 : struct.my_enum_structlist_map.entrySet())
+          {
+            oprot.writeI32(_iter68.getKey().getValue());
+            {
+              oprot.writeI32(_iter68.getValue().size());
+              for (MiniStruct _iter69 : _iter68.getValue())
+              {
+                _iter69.write(oprot);
+              }
+            }
+          }
+        }
+      }
+      if (struct.isSetMy_stringlist()) {
+        {
+          oprot.writeI32(struct.my_stringlist.size());
+          for (String _iter70 : struct.my_stringlist)
+          {
+            oprot.writeString(_iter70);
+          }
+        }
+      }
+      if (struct.isSetMy_structlist()) {
+        {
+          oprot.writeI32(struct.my_structlist.size());
+          for (MiniStruct _iter71 : struct.my_structlist)
+          {
+            _iter71.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetMy_enumlist()) {
+        {
+          oprot.writeI32(struct.my_enumlist.size());
+          for (MyEnum _iter72 : struct.my_enumlist)
+          {
+            oprot.writeI32(_iter72.getValue());
+          }
+        }
+      }
+      if (struct.isSetMy_stringset()) {
+        {
+          oprot.writeI32(struct.my_stringset.size());
+          for (String _iter73 : struct.my_stringset)
+          {
+            oprot.writeString(_iter73);
+          }
+        }
+      }
+      if (struct.isSetMy_enumset()) {
+        {
+          oprot.writeI32(struct.my_enumset.size());
+          for (MyEnum _iter74 : struct.my_enumset)
+          {
+            oprot.writeI32(_iter74.getValue());
+          }
+        }
+      }
+      if (struct.isSetMy_structset()) {
+        {
+          oprot.writeI32(struct.my_structset.size());
+          for (MiniStruct _iter75 : struct.my_structset)
+          {
+            _iter75.write(oprot);
+          }
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, MegaStruct struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(20);
+      if (incoming.get(0)) {
+        struct.my_bool = iprot.readBool();
+        struct.setMy_boolIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.my_byte = iprot.readByte();
+        struct.setMy_byteIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.my_16bit_int = iprot.readI16();
+        struct.setMy_16bit_intIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.my_32bit_int = iprot.readI32();
+        struct.setMy_32bit_intIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.my_64bit_int = iprot.readI64();
+        struct.setMy_64bit_intIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.my_double = iprot.readDouble();
+        struct.setMy_doubleIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.my_string = iprot.readString();
+        struct.setMy_stringIsSet(true);
+      }
+      if (incoming.get(7)) {
+        struct.my_binary = iprot.readBinary();
+        struct.setMy_binaryIsSet(true);
+      }
+      if (incoming.get(8)) {
+        {
+          org.apache.thrift.protocol.TMap _map76 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.my_string_string_map = new HashMap<String,String>(2*_map76.size);
+          for (int _i77 = 0; _i77 < _map76.size; ++_i77)
+          {
+            String _key78; // required
+            String _val79; // required
+            _key78 = iprot.readString();
+            _val79 = iprot.readString();
+            struct.my_string_string_map.put(_key78, _val79);
+          }
+        }
+        struct.setMy_string_string_mapIsSet(true);
+      }
+      if (incoming.get(9)) {
+        {
+          org.apache.thrift.protocol.TMap _map80 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32());
+          struct.my_string_enum_map = new HashMap<String,MyEnum>(2*_map80.size);
+          for (int _i81 = 0; _i81 < _map80.size; ++_i81)
+          {
+            String _key82; // required
+            MyEnum _val83; // required
+            _key82 = iprot.readString();
+            _val83 = MyEnum.findByValue(iprot.readI32());
+            struct.my_string_enum_map.put(_key82, _val83);
+          }
+        }
+        struct.setMy_string_enum_mapIsSet(true);
+      }
+      if (incoming.get(10)) {
+        {
+          org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.my_enum_string_map = new HashMap<MyEnum,String>(2*_map84.size);
+          for (int _i85 = 0; _i85 < _map84.size; ++_i85)
+          {
+            MyEnum _key86; // required
+            String _val87; // required
+            _key86 = MyEnum.findByValue(iprot.readI32());
+            _val87 = iprot.readString();
+            struct.my_enum_string_map.put(_key86, _val87);
+          }
+        }
+        struct.setMy_enum_string_mapIsSet(true);
+      }
+      if (incoming.get(11)) {
+        {
+          org.apache.thrift.protocol.TMap _map88 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.my_enum_struct_map = new HashMap<MyEnum,MiniStruct>(2*_map88.size);
+          for (int _i89 = 0; _i89 < _map88.size; ++_i89)
+          {
+            MyEnum _key90; // required
+            MiniStruct _val91; // required
+            _key90 = MyEnum.findByValue(iprot.readI32());
+            _val91 = new MiniStruct();
+            _val91.read(iprot);
+            struct.my_enum_struct_map.put(_key90, _val91);
+          }
+        }
+        struct.setMy_enum_struct_mapIsSet(true);
+      }
+      if (incoming.get(12)) {
+        {
+          org.apache.thrift.protocol.TMap _map92 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
+          struct.my_enum_stringlist_map = new HashMap<MyEnum,List<String>>(2*_map92.size);
+          for (int _i93 = 0; _i93 < _map92.size; ++_i93)
+          {
+            MyEnum _key94; // required
+            List<String> _val95; // required
+            _key94 = MyEnum.findByValue(iprot.readI32());
+            {
+              org.apache.thrift.protocol.TList _list96 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+              _val95 = new ArrayList<String>(_list96.size);
+              for (int _i97 = 0; _i97 < _list96.size; ++_i97)
+              {
+                String _elem98; // required
+                _elem98 = iprot.readString();
+                _val95.add(_elem98);
+              }
+            }
+            struct.my_enum_stringlist_map.put(_key94, _val95);
+          }
+        }
+        struct.setMy_enum_stringlist_mapIsSet(true);
+      }
+      if (incoming.get(13)) {
+        {
+          org.apache.thrift.protocol.TMap _map99 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.LIST, iprot.readI32());
+          struct.my_enum_structlist_map = new HashMap<MyEnum,List<MiniStruct>>(2*_map99.size);
+          for (int _i100 = 0; _i100 < _map99.size; ++_i100)
+          {
+            MyEnum _key101; // required
+            List<MiniStruct> _val102; // required
+            _key101 = MyEnum.findByValue(iprot.readI32());
+            {
+              org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+              _val102 = new ArrayList<MiniStruct>(_list103.size);
+              for (int _i104 = 0; _i104 < _list103.size; ++_i104)
+              {
+                MiniStruct _elem105; // required
+                _elem105 = new MiniStruct();
+                _elem105.read(iprot);
+                _val102.add(_elem105);
+              }
+            }
+            struct.my_enum_structlist_map.put(_key101, _val102);
+          }
+        }
+        struct.setMy_enum_structlist_mapIsSet(true);
+      }
+      if (incoming.get(14)) {
+        {
+          org.apache.thrift.protocol.TList _list106 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.my_stringlist = new ArrayList<String>(_list106.size);
+          for (int _i107 = 0; _i107 < _list106.size; ++_i107)
+          {
+            String _elem108; // required
+            _elem108 = iprot.readString();
+            struct.my_stringlist.add(_elem108);
+          }
+        }
+        struct.setMy_stringlistIsSet(true);
+      }
+      if (incoming.get(15)) {
+        {
+          org.apache.thrift.protocol.TList _list109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.my_structlist = new ArrayList<MiniStruct>(_list109.size);
+          for (int _i110 = 0; _i110 < _list109.size; ++_i110)
+          {
+            MiniStruct _elem111; // required
+            _elem111 = new MiniStruct();
+            _elem111.read(iprot);
+            struct.my_structlist.add(_elem111);
+          }
+        }
+        struct.setMy_structlistIsSet(true);
+      }
+      if (incoming.get(16)) {
+        {
+          org.apache.thrift.protocol.TList _list112 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
+          struct.my_enumlist = new ArrayList<MyEnum>(_list112.size);
+          for (int _i113 = 0; _i113 < _list112.size; ++_i113)
+          {
+            MyEnum _elem114; // required
+            _elem114 = MyEnum.findByValue(iprot.readI32());
+            struct.my_enumlist.add(_elem114);
+          }
+        }
+        struct.setMy_enumlistIsSet(true);
+      }
+      if (incoming.get(17)) {
+        {
+          org.apache.thrift.protocol.TSet _set115 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.my_stringset = new HashSet<String>(2*_set115.size);
+          for (int _i116 = 0; _i116 < _set115.size; ++_i116)
+          {
+            String _elem117; // required
+            _elem117 = iprot.readString();
+            struct.my_stringset.add(_elem117);
+          }
+        }
+        struct.setMy_stringsetIsSet(true);
+      }
+      if (incoming.get(18)) {
+        {
+          org.apache.thrift.protocol.TSet _set118 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, iprot.readI32());
+          struct.my_enumset = new HashSet<MyEnum>(2*_set118.size);
+          for (int _i119 = 0; _i119 < _set118.size; ++_i119)
+          {
+            MyEnum _elem120; // required
+            _elem120 = MyEnum.findByValue(iprot.readI32());
+            struct.my_enumset.add(_elem120);
+          }
+        }
+        struct.setMy_enumsetIsSet(true);
+      }
+      if (incoming.get(19)) {
+        {
+          org.apache.thrift.protocol.TSet _set121 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.my_structset = new HashSet<MiniStruct>(2*_set121.size);
+          for (int _i122 = 0; _i122 < _set121.size; ++_i122)
+          {
+            MiniStruct _elem123; // required
+            _elem123 = new MiniStruct();
+            _elem123.read(iprot);
+            struct.my_structset.add(_elem123);
+          }
+        }
+        struct.setMy_structsetIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MiniStruct.java
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MiniStruct.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MiniStruct.java (original)
+++ hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MiniStruct.java Thu Nov  8 09:44:19 2012
@@ -1,10 +1,20 @@
 /**
- * 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.hadoop.hive.serde2.thrift.test;
 
+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;
@@ -26,8 +36,14 @@ public class MiniStruct implements org.a
   private static final org.apache.thrift.protocol.TField MY_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("my_string", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField MY_ENUM_FIELD_DESC = new org.apache.thrift.protocol.TField("my_enum", org.apache.thrift.protocol.TType.I32, (short)2);
 
-  private String my_string; // required
-  private MyEnum my_enum; // required
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new MiniStructStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new MiniStructTupleSchemeFactory());
+  }
+
+  private String my_string; // optional
+  private MyEnum my_enum; // optional
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -95,7 +111,7 @@ public class MiniStruct implements org.a
   }
 
   // isset id assignments
-
+  private _Fields optionals[] = {_Fields.MY_STRING,_Fields.MY_ENUM};
   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);
@@ -309,58 +325,11 @@ public class MiniStruct implements org.a
   }
 
   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: // MY_STRING
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.my_string = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // MY_ENUM
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.my_enum = MyEnum.findByValue(iprot.readI32());
-          } 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();
-    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.my_string != null) {
-      if (isSetMy_string()) {
-        oprot.writeFieldBegin(MY_STRING_FIELD_DESC);
-        oprot.writeString(this.my_string);
-        oprot.writeFieldEnd();
-      }
-    }
-    if (this.my_enum != null) {
-      if (isSetMy_enum()) {
-        oprot.writeFieldBegin(MY_ENUM_FIELD_DESC);
-        oprot.writeI32(this.my_enum.getValue());
-        oprot.writeFieldEnd();
-      }
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -393,6 +362,7 @@ public class MiniStruct implements org.a
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -411,5 +381,114 @@ public class MiniStruct implements org.a
     }
   }
 
+  private static class MiniStructStandardSchemeFactory implements SchemeFactory {
+    public MiniStructStandardScheme getScheme() {
+      return new MiniStructStandardScheme();
+    }
+  }
+
+  private static class MiniStructStandardScheme extends StandardScheme<MiniStruct> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, MiniStruct 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: // MY_STRING
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.my_string = iprot.readString();
+              struct.setMy_stringIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // MY_ENUM
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.my_enum = MyEnum.findByValue(iprot.readI32());
+              struct.setMy_enumIsSet(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();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, MiniStruct struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.my_string != null) {
+        if (struct.isSetMy_string()) {
+          oprot.writeFieldBegin(MY_STRING_FIELD_DESC);
+          oprot.writeString(struct.my_string);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.my_enum != null) {
+        if (struct.isSetMy_enum()) {
+          oprot.writeFieldBegin(MY_ENUM_FIELD_DESC);
+          oprot.writeI32(struct.my_enum.getValue());
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class MiniStructTupleSchemeFactory implements SchemeFactory {
+    public MiniStructTupleScheme getScheme() {
+      return new MiniStructTupleScheme();
+    }
+  }
+
+  private static class MiniStructTupleScheme extends TupleScheme<MiniStruct> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, MiniStruct struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetMy_string()) {
+        optionals.set(0);
+      }
+      if (struct.isSetMy_enum()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetMy_string()) {
+        oprot.writeString(struct.my_string);
+      }
+      if (struct.isSetMy_enum()) {
+        oprot.writeI32(struct.my_enum.getValue());
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, MiniStruct struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.my_string = iprot.readString();
+        struct.setMy_stringIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.my_enum = MyEnum.findByValue(iprot.readI32());
+        struct.setMy_enumIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MyEnum.java
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MyEnum.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MyEnum.java (original)
+++ hive/trunk/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MyEnum.java Thu Nov  8 09:44:19 2012
@@ -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.hadoop.hive.serde2.thrift.test;
 

Added: hive/trunk/serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php?rev=1406984&view=auto
==============================================================================
--- hive/trunk/serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php (added)
+++ hive/trunk/serde/src/gen/thrift/gen-php/org/apache/hadoop/hive/serde/Types.php Thu Nov  8 09:44:19 2012
@@ -0,0 +1,106 @@
+<?php
+namespace org\apache\hadoop\hive\serde;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Exception\TApplicationException;
+
+
+$GLOBALS['serde_CONSTANTS']['SERIALIZATION_LIB'] = "serialization.lib";
+
+$GLOBALS['serde_CONSTANTS']['SERIALIZATION_CLASS'] = "serialization.class";
+
+$GLOBALS['serde_CONSTANTS']['SERIALIZATION_FORMAT'] = "serialization.format";
+
+$GLOBALS['serde_CONSTANTS']['SERIALIZATION_DDL'] = "serialization.ddl";
+
+$GLOBALS['serde_CONSTANTS']['SERIALIZATION_NULL_FORMAT'] = "serialization.null.format";
+
+$GLOBALS['serde_CONSTANTS']['SERIALIZATION_LAST_COLUMN_TAKES_REST'] = "serialization.last.column.takes.rest";
+
+$GLOBALS['serde_CONSTANTS']['SERIALIZATION_SORT_ORDER'] = "serialization.sort.order";
+
+$GLOBALS['serde_CONSTANTS']['SERIALIZATION_USE_JSON_OBJECTS'] = "serialization.use.json.object";
+
+$GLOBALS['serde_CONSTANTS']['FIELD_DELIM'] = "field.delim";
+
+$GLOBALS['serde_CONSTANTS']['COLLECTION_DELIM'] = "colelction.delim";
+
+$GLOBALS['serde_CONSTANTS']['LINE_DELIM'] = "line.delim";
+
+$GLOBALS['serde_CONSTANTS']['MAPKEY_DELIM'] = "mapkey.delim";
+
+$GLOBALS['serde_CONSTANTS']['QUOTE_CHAR'] = "quote.delim";
+
+$GLOBALS['serde_CONSTANTS']['ESCAPE_CHAR'] = "escape.delim";
+
+$GLOBALS['serde_CONSTANTS']['VOID_TYPE_NAME'] = "void";
+
+$GLOBALS['serde_CONSTANTS']['BOOLEAN_TYPE_NAME'] = "boolean";
+
+$GLOBALS['serde_CONSTANTS']['TINYINT_TYPE_NAME'] = "tinyint";
+
+$GLOBALS['serde_CONSTANTS']['SMALLINT_TYPE_NAME'] = "smallint";
+
+$GLOBALS['serde_CONSTANTS']['INT_TYPE_NAME'] = "int";
+
+$GLOBALS['serde_CONSTANTS']['BIGINT_TYPE_NAME'] = "bigint";
+
+$GLOBALS['serde_CONSTANTS']['FLOAT_TYPE_NAME'] = "float";
+
+$GLOBALS['serde_CONSTANTS']['DOUBLE_TYPE_NAME'] = "double";
+
+$GLOBALS['serde_CONSTANTS']['STRING_TYPE_NAME'] = "string";
+
+$GLOBALS['serde_CONSTANTS']['DATE_TYPE_NAME'] = "date";
+
+$GLOBALS['serde_CONSTANTS']['DATETIME_TYPE_NAME'] = "datetime";
+
+$GLOBALS['serde_CONSTANTS']['TIMESTAMP_TYPE_NAME'] = "timestamp";
+
+$GLOBALS['serde_CONSTANTS']['BINARY_TYPE_NAME'] = "binary";
+
+$GLOBALS['serde_CONSTANTS']['LIST_TYPE_NAME'] = "array";
+
+$GLOBALS['serde_CONSTANTS']['MAP_TYPE_NAME'] = "map";
+
+$GLOBALS['serde_CONSTANTS']['STRUCT_TYPE_NAME'] = "struct";
+
+$GLOBALS['serde_CONSTANTS']['UNION_TYPE_NAME'] = "uniontype";
+
+$GLOBALS['serde_CONSTANTS']['LIST_COLUMNS'] = "columns";
+
+$GLOBALS['serde_CONSTANTS']['LIST_COLUMN_TYPES'] = "columns.types";
+
+$GLOBALS['serde_CONSTANTS']['PrimitiveTypes'] = array(
+  "void" => true,
+  "boolean" => true,
+  "tinyint" => true,
+  "smallint" => true,
+  "int" => true,
+  "bigint" => true,
+  "float" => true,
+  "double" => true,
+  "string" => true,
+  "date" => true,
+  "datetime" => true,
+  "timestamp" => true,
+  "binary" => true,
+);
+
+$GLOBALS['serde_CONSTANTS']['CollectionTypes'] = array(
+  "array" => true,
+  "map" => true,
+);
+
+

Added: hive/trunk/serde/src/gen/thrift/gen-py/__init__.py
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/gen/thrift/gen-py/__init__.py?rev=1406984&view=auto
==============================================================================
    (empty)