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 [28/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/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java (original)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java Thu Nov  8 09:44:19 2012
@@ -1,11 +1,21 @@
 /**
- * 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.service;
 
 import org.apache.commons.lang.builder.HashCodeBuilder;
+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;
@@ -592,7 +602,7 @@ public class ThriftHive {
 
   }
 
-  public static class Processor<I extends Iface> extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Processor implements org.apache.thrift.TProcessor {
+  public static class Processor<I extends Iface> extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Processor<I> implements org.apache.thrift.TProcessor {
     private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
     public Processor(I iface) {
       super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
@@ -615,16 +625,20 @@ public class ThriftHive {
       return processMap;
     }
 
-    private static class execute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_args> {
+    public static class execute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, execute_args> {
       public execute() {
         super("execute");
       }
 
-      protected execute_args getEmptyArgsInstance() {
+      public execute_args getEmptyArgsInstance() {
         return new execute_args();
       }
 
-      protected execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public execute_result getResult(I iface, execute_args args) throws org.apache.thrift.TException {
         execute_result result = new execute_result();
         try {
           iface.execute(args.query);
@@ -635,16 +649,20 @@ public class ThriftHive {
       }
     }
 
-    private static class fetchOne<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchOne_args> {
+    public static class fetchOne<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchOne_args> {
       public fetchOne() {
         super("fetchOne");
       }
 
-      protected fetchOne_args getEmptyArgsInstance() {
+      public fetchOne_args getEmptyArgsInstance() {
         return new fetchOne_args();
       }
 
-      protected fetchOne_result getResult(I iface, fetchOne_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public fetchOne_result getResult(I iface, fetchOne_args args) throws org.apache.thrift.TException {
         fetchOne_result result = new fetchOne_result();
         try {
           result.success = iface.fetchOne();
@@ -655,16 +673,20 @@ public class ThriftHive {
       }
     }
 
-    private static class fetchN<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchN_args> {
+    public static class fetchN<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchN_args> {
       public fetchN() {
         super("fetchN");
       }
 
-      protected fetchN_args getEmptyArgsInstance() {
+      public fetchN_args getEmptyArgsInstance() {
         return new fetchN_args();
       }
 
-      protected fetchN_result getResult(I iface, fetchN_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public fetchN_result getResult(I iface, fetchN_args args) throws org.apache.thrift.TException {
         fetchN_result result = new fetchN_result();
         try {
           result.success = iface.fetchN(args.numRows);
@@ -675,16 +697,20 @@ public class ThriftHive {
       }
     }
 
-    private static class fetchAll<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchAll_args> {
+    public static class fetchAll<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchAll_args> {
       public fetchAll() {
         super("fetchAll");
       }
 
-      protected fetchAll_args getEmptyArgsInstance() {
+      public fetchAll_args getEmptyArgsInstance() {
         return new fetchAll_args();
       }
 
-      protected fetchAll_result getResult(I iface, fetchAll_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public fetchAll_result getResult(I iface, fetchAll_args args) throws org.apache.thrift.TException {
         fetchAll_result result = new fetchAll_result();
         try {
           result.success = iface.fetchAll();
@@ -695,16 +721,20 @@ public class ThriftHive {
       }
     }
 
-    private static class getSchema<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSchema_args> {
+    public static class getSchema<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSchema_args> {
       public getSchema() {
         super("getSchema");
       }
 
-      protected getSchema_args getEmptyArgsInstance() {
+      public getSchema_args getEmptyArgsInstance() {
         return new getSchema_args();
       }
 
-      protected getSchema_result getResult(I iface, getSchema_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getSchema_result getResult(I iface, getSchema_args args) throws org.apache.thrift.TException {
         getSchema_result result = new getSchema_result();
         try {
           result.success = iface.getSchema();
@@ -715,16 +745,20 @@ public class ThriftHive {
       }
     }
 
-    private static class getThriftSchema<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getThriftSchema_args> {
+    public static class getThriftSchema<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getThriftSchema_args> {
       public getThriftSchema() {
         super("getThriftSchema");
       }
 
-      protected getThriftSchema_args getEmptyArgsInstance() {
+      public getThriftSchema_args getEmptyArgsInstance() {
         return new getThriftSchema_args();
       }
 
-      protected getThriftSchema_result getResult(I iface, getThriftSchema_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getThriftSchema_result getResult(I iface, getThriftSchema_args args) throws org.apache.thrift.TException {
         getThriftSchema_result result = new getThriftSchema_result();
         try {
           result.success = iface.getThriftSchema();
@@ -735,16 +769,20 @@ public class ThriftHive {
       }
     }
 
-    private static class getClusterStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getClusterStatus_args> {
+    public static class getClusterStatus<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getClusterStatus_args> {
       public getClusterStatus() {
         super("getClusterStatus");
       }
 
-      protected getClusterStatus_args getEmptyArgsInstance() {
+      public getClusterStatus_args getEmptyArgsInstance() {
         return new getClusterStatus_args();
       }
 
-      protected getClusterStatus_result getResult(I iface, getClusterStatus_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getClusterStatus_result getResult(I iface, getClusterStatus_args args) throws org.apache.thrift.TException {
         getClusterStatus_result result = new getClusterStatus_result();
         try {
           result.success = iface.getClusterStatus();
@@ -755,16 +793,20 @@ public class ThriftHive {
       }
     }
 
-    private static class getQueryPlan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getQueryPlan_args> {
+    public static class getQueryPlan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getQueryPlan_args> {
       public getQueryPlan() {
         super("getQueryPlan");
       }
 
-      protected getQueryPlan_args getEmptyArgsInstance() {
+      public getQueryPlan_args getEmptyArgsInstance() {
         return new getQueryPlan_args();
       }
 
-      protected getQueryPlan_result getResult(I iface, getQueryPlan_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public getQueryPlan_result getResult(I iface, getQueryPlan_args args) throws org.apache.thrift.TException {
         getQueryPlan_result result = new getQueryPlan_result();
         try {
           result.success = iface.getQueryPlan();
@@ -775,16 +817,20 @@ public class ThriftHive {
       }
     }
 
-    private static class clean<I extends Iface> extends org.apache.thrift.ProcessFunction<I, clean_args> {
+    public static class clean<I extends Iface> extends org.apache.thrift.ProcessFunction<I, clean_args> {
       public clean() {
         super("clean");
       }
 
-      protected clean_args getEmptyArgsInstance() {
+      public clean_args getEmptyArgsInstance() {
         return new clean_args();
       }
 
-      protected clean_result getResult(I iface, clean_args args) throws org.apache.thrift.TException {
+      protected boolean isOneway() {
+        return false;
+      }
+
+      public clean_result getResult(I iface, clean_args args) throws org.apache.thrift.TException {
         clean_result result = new clean_result();
         iface.clean();
         return result;
@@ -798,6 +844,12 @@ public class ThriftHive {
 
     private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new execute_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new execute_argsTupleSchemeFactory());
+    }
+
     private String query; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -859,7 +911,6 @@ public class ThriftHive {
     }
 
     // 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);
@@ -1018,42 +1069,11 @@ public class ThriftHive {
     }
 
     public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField field;
-      iprot.readStructBegin();
-      while (true)
-      {
-        field = iprot.readFieldBegin();
-        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (field.id) {
-          case 1: // QUERY
-            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-              this.query = iprot.readString();
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      if (this.query != null) {
-        oprot.writeFieldBegin(QUERY_FIELD_DESC);
-        oprot.writeString(this.query);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -1074,6 +1094,7 @@ public class ThriftHive {
 
     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 {
@@ -1092,6 +1113,88 @@ public class ThriftHive {
       }
     }
 
+    private static class execute_argsStandardSchemeFactory implements SchemeFactory {
+      public execute_argsStandardScheme getScheme() {
+        return new execute_argsStandardScheme();
+      }
+    }
+
+    private static class execute_argsStandardScheme extends StandardScheme<execute_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, execute_args struct) throws org.apache.thrift.TException {
+        org.apache.thrift.protocol.TField schemeField;
+        iprot.readStructBegin();
+        while (true)
+        {
+          schemeField = iprot.readFieldBegin();
+          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+            break;
+          }
+          switch (schemeField.id) {
+            case 1: // QUERY
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.query = iprot.readString();
+                struct.setQueryIsSet(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, execute_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.query != null) {
+          oprot.writeFieldBegin(QUERY_FIELD_DESC);
+          oprot.writeString(struct.query);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class execute_argsTupleSchemeFactory implements SchemeFactory {
+      public execute_argsTupleScheme getScheme() {
+        return new execute_argsTupleScheme();
+      }
+    }
+
+    private static class execute_argsTupleScheme extends TupleScheme<execute_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, execute_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetQuery()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetQuery()) {
+          oprot.writeString(struct.query);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, execute_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.query = iprot.readString();
+          struct.setQueryIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class execute_result implements org.apache.thrift.TBase<execute_result, execute_result._Fields>, java.io.Serializable, Cloneable   {
@@ -1099,6 +1202,12 @@ public class ThriftHive {
 
     private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new execute_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new execute_resultTupleSchemeFactory());
+    }
+
     private HiveServerException ex; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -1160,7 +1269,6 @@ public class ThriftHive {
     }
 
     // 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);
@@ -1319,43 +1427,12 @@ public class ThriftHive {
     }
 
     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: // EX
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.ex = new HiveServerException();
-              this.ex.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();
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetEx()) {
-        oprot.writeFieldBegin(EX_FIELD_DESC);
-        this.ex.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -1375,6 +1452,7 @@ public class ThriftHive {
 
     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 {
@@ -1393,12 +1471,102 @@ public class ThriftHive {
       }
     }
 
+    private static class execute_resultStandardSchemeFactory implements SchemeFactory {
+      public execute_resultStandardScheme getScheme() {
+        return new execute_resultStandardScheme();
+      }
+    }
+
+    private static class execute_resultStandardScheme extends StandardScheme<execute_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, execute_result 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: // EX
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ex = new HiveServerException();
+                struct.ex.read(iprot);
+                struct.setExIsSet(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, execute_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.ex != null) {
+          oprot.writeFieldBegin(EX_FIELD_DESC);
+          struct.ex.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class execute_resultTupleSchemeFactory implements SchemeFactory {
+      public execute_resultTupleScheme getScheme() {
+        return new execute_resultTupleScheme();
+      }
+    }
+
+    private static class execute_resultTupleScheme extends TupleScheme<execute_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetEx()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetEx()) {
+          struct.ex.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.ex = new HiveServerException();
+          struct.ex.read(iprot);
+          struct.setExIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class fetchOne_args implements org.apache.thrift.TBase<fetchOne_args, fetchOne_args._Fields>, java.io.Serializable, Cloneable   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchOne_args");
 
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new fetchOne_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new fetchOne_argsTupleSchemeFactory());
+    }
+
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -1540,30 +1708,11 @@ public class ThriftHive {
     }
 
     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) {
-          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);
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -1577,6 +1726,7 @@ public class ThriftHive {
 
     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 {
@@ -1595,6 +1745,62 @@ public class ThriftHive {
       }
     }
 
+    private static class fetchOne_argsStandardSchemeFactory implements SchemeFactory {
+      public fetchOne_argsStandardScheme getScheme() {
+        return new fetchOne_argsStandardScheme();
+      }
+    }
+
+    private static class fetchOne_argsStandardScheme extends StandardScheme<fetchOne_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, fetchOne_args 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) {
+            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, fetchOne_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class fetchOne_argsTupleSchemeFactory implements SchemeFactory {
+      public fetchOne_argsTupleScheme getScheme() {
+        return new fetchOne_argsTupleScheme();
+      }
+    }
+
+    private static class fetchOne_argsTupleScheme extends TupleScheme<fetchOne_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, fetchOne_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, fetchOne_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+      }
+    }
+
   }
 
   public static class fetchOne_result implements org.apache.thrift.TBase<fetchOne_result, fetchOne_result._Fields>, java.io.Serializable, Cloneable   {
@@ -1603,6 +1809,12 @@ public class ThriftHive {
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
     private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new fetchOne_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new fetchOne_resultTupleSchemeFactory());
+    }
+
     private String success; // required
     private HiveServerException ex; // required
 
@@ -1668,7 +1880,6 @@ public class ThriftHive {
     }
 
     // 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);
@@ -1895,54 +2106,12 @@ public class ThriftHive {
     }
 
     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 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-              this.success = iprot.readString();
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // EX
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.ex = new HiveServerException();
-              this.ex.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();
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        oprot.writeString(this.success);
-        oprot.writeFieldEnd();
-      } else if (this.isSetEx()) {
-        oprot.writeFieldBegin(EX_FIELD_DESC);
-        this.ex.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -1970,6 +2139,7 @@ public class ThriftHive {
 
     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 {
@@ -1988,6 +2158,113 @@ public class ThriftHive {
       }
     }
 
+    private static class fetchOne_resultStandardSchemeFactory implements SchemeFactory {
+      public fetchOne_resultStandardScheme getScheme() {
+        return new fetchOne_resultStandardScheme();
+      }
+    }
+
+    private static class fetchOne_resultStandardScheme extends StandardScheme<fetchOne_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, fetchOne_result 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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                struct.success = iprot.readString();
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // EX
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ex = new HiveServerException();
+                struct.ex.read(iprot);
+                struct.setExIsSet(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, fetchOne_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          oprot.writeString(struct.success);
+          oprot.writeFieldEnd();
+        }
+        if (struct.ex != null) {
+          oprot.writeFieldBegin(EX_FIELD_DESC);
+          struct.ex.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class fetchOne_resultTupleSchemeFactory implements SchemeFactory {
+      public fetchOne_resultTupleScheme getScheme() {
+        return new fetchOne_resultTupleScheme();
+      }
+    }
+
+    private static class fetchOne_resultTupleScheme extends TupleScheme<fetchOne_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, fetchOne_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetEx()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          oprot.writeString(struct.success);
+        }
+        if (struct.isSetEx()) {
+          struct.ex.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, fetchOne_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.success = iprot.readString();
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.ex = new HiveServerException();
+          struct.ex.read(iprot);
+          struct.setExIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class fetchN_args implements org.apache.thrift.TBase<fetchN_args, fetchN_args._Fields>, java.io.Serializable, Cloneable   {
@@ -1995,6 +2272,12 @@ public class ThriftHive {
 
     private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I32, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new fetchN_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new fetchN_argsTupleSchemeFactory());
+    }
+
     private int numRows; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -2057,8 +2340,7 @@ public class ThriftHive {
 
     // isset id assignments
     private static final int __NUMROWS_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);
@@ -2083,8 +2365,7 @@ public class ThriftHive {
      * Performs a deep copy on <i>other</i>.
      */
     public fetchN_args(fetchN_args other) {
-      __isset_bit_vector.clear();
-      __isset_bit_vector.or(other.__isset_bit_vector);
+      __isset_bitfield = other.__isset_bitfield;
       this.numRows = other.numRows;
     }
 
@@ -2108,16 +2389,16 @@ public class ThriftHive {
     }
 
     public void unsetNumRows() {
-      __isset_bit_vector.clear(__NUMROWS_ISSET_ID);
+      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID);
     }
 
     /** Returns true if field numRows is set (has been assigned a value) and false otherwise */
     public boolean isSetNumRows() {
-      return __isset_bit_vector.get(__NUMROWS_ISSET_ID);
+      return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID);
     }
 
     public void setNumRowsIsSet(boolean value) {
-      __isset_bit_vector.set(__NUMROWS_ISSET_ID, value);
+      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value);
     }
 
     public void setFieldValue(_Fields field, Object value) {
@@ -2218,41 +2499,11 @@ public class ThriftHive {
     }
 
     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: // NUM_ROWS
-            if (field.type == org.apache.thrift.protocol.TType.I32) {
-              this.numRows = iprot.readI32();
-              setNumRowsIsSet(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();
-      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(NUM_ROWS_FIELD_DESC);
-      oprot.writeI32(this.numRows);
-      oprot.writeFieldEnd();
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -2269,6 +2520,7 @@ public class ThriftHive {
 
     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 {
@@ -2282,13 +2534,93 @@ public class ThriftHive {
     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 fetchN_argsStandardSchemeFactory implements SchemeFactory {
+      public fetchN_argsStandardScheme getScheme() {
+        return new fetchN_argsStandardScheme();
+      }
+    }
+
+    private static class fetchN_argsStandardScheme extends StandardScheme<fetchN_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, fetchN_args 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: // NUM_ROWS
+              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                struct.numRows = iprot.readI32();
+                struct.setNumRowsIsSet(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, fetchN_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC);
+        oprot.writeI32(struct.numRows);
+        oprot.writeFieldEnd();
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class fetchN_argsTupleSchemeFactory implements SchemeFactory {
+      public fetchN_argsTupleScheme getScheme() {
+        return new fetchN_argsTupleScheme();
+      }
+    }
+
+    private static class fetchN_argsTupleScheme extends TupleScheme<fetchN_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, fetchN_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetNumRows()) {
+          optionals.set(0);
+        }
+        oprot.writeBitSet(optionals, 1);
+        if (struct.isSetNumRows()) {
+          oprot.writeI32(struct.numRows);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, fetchN_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(1);
+        if (incoming.get(0)) {
+          struct.numRows = iprot.readI32();
+          struct.setNumRowsIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class fetchN_result implements org.apache.thrift.TBase<fetchN_result, fetchN_result._Fields>, java.io.Serializable, Cloneable   {
@@ -2297,6 +2629,12 @@ public class ThriftHive {
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
     private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new fetchN_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new fetchN_resultTupleSchemeFactory());
+    }
+
     private List<String> success; // required
     private HiveServerException ex; // required
 
@@ -2362,7 +2700,6 @@ public class ThriftHive {
     }
 
     // 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);
@@ -2609,71 +2946,12 @@ public class ThriftHive {
     }
 
     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 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-              {
-                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
-                this.success = new ArrayList<String>(_list0.size);
-                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
-                {
-                  String _elem2; // required
-                  _elem2 = iprot.readString();
-                  this.success.add(_elem2);
-                }
-                iprot.readListEnd();
-              }
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // EX
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.ex = new HiveServerException();
-              this.ex.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();
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
-          for (String _iter3 : this.success)
-          {
-            oprot.writeString(_iter3);
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      } else if (this.isSetEx()) {
-        oprot.writeFieldBegin(EX_FIELD_DESC);
-        this.ex.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -2701,6 +2979,7 @@ public class ThriftHive {
 
     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 {
@@ -2719,12 +2998,157 @@ public class ThriftHive {
       }
     }
 
+    private static class fetchN_resultStandardSchemeFactory implements SchemeFactory {
+      public fetchN_resultStandardScheme getScheme() {
+        return new fetchN_resultStandardScheme();
+      }
+    }
+
+    private static class fetchN_resultStandardScheme extends StandardScheme<fetchN_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, fetchN_result 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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
+                  struct.success = new ArrayList<String>(_list0.size);
+                  for (int _i1 = 0; _i1 < _list0.size; ++_i1)
+                  {
+                    String _elem2; // required
+                    _elem2 = iprot.readString();
+                    struct.success.add(_elem2);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // EX
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ex = new HiveServerException();
+                struct.ex.read(iprot);
+                struct.setExIsSet(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, fetchN_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
+            for (String _iter3 : struct.success)
+            {
+              oprot.writeString(_iter3);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.ex != null) {
+          oprot.writeFieldBegin(EX_FIELD_DESC);
+          struct.ex.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class fetchN_resultTupleSchemeFactory implements SchemeFactory {
+      public fetchN_resultTupleScheme getScheme() {
+        return new fetchN_resultTupleScheme();
+      }
+    }
+
+    private static class fetchN_resultTupleScheme extends TupleScheme<fetchN_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, fetchN_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetEx()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          {
+            oprot.writeI32(struct.success.size());
+            for (String _iter4 : struct.success)
+            {
+              oprot.writeString(_iter4);
+            }
+          }
+        }
+        if (struct.isSetEx()) {
+          struct.ex.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, fetchN_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          {
+            org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.success = new ArrayList<String>(_list5.size);
+            for (int _i6 = 0; _i6 < _list5.size; ++_i6)
+            {
+              String _elem7; // required
+              _elem7 = iprot.readString();
+              struct.success.add(_elem7);
+            }
+          }
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.ex = new HiveServerException();
+          struct.ex.read(iprot);
+          struct.setExIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class fetchAll_args implements org.apache.thrift.TBase<fetchAll_args, fetchAll_args._Fields>, java.io.Serializable, Cloneable   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchAll_args");
 
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new fetchAll_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new fetchAll_argsTupleSchemeFactory());
+    }
+
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -2866,30 +3290,11 @@ public class ThriftHive {
     }
 
     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) {
-          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);
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -2903,6 +3308,7 @@ public class ThriftHive {
 
     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 {
@@ -2921,6 +3327,62 @@ public class ThriftHive {
       }
     }
 
+    private static class fetchAll_argsStandardSchemeFactory implements SchemeFactory {
+      public fetchAll_argsStandardScheme getScheme() {
+        return new fetchAll_argsStandardScheme();
+      }
+    }
+
+    private static class fetchAll_argsStandardScheme extends StandardScheme<fetchAll_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAll_args 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) {
+            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, fetchAll_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class fetchAll_argsTupleSchemeFactory implements SchemeFactory {
+      public fetchAll_argsTupleScheme getScheme() {
+        return new fetchAll_argsTupleScheme();
+      }
+    }
+
+    private static class fetchAll_argsTupleScheme extends TupleScheme<fetchAll_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, fetchAll_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, fetchAll_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+      }
+    }
+
   }
 
   public static class fetchAll_result implements org.apache.thrift.TBase<fetchAll_result, fetchAll_result._Fields>, java.io.Serializable, Cloneable   {
@@ -2929,6 +3391,12 @@ public class ThriftHive {
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
     private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new fetchAll_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new fetchAll_resultTupleSchemeFactory());
+    }
+
     private List<String> success; // required
     private HiveServerException ex; // required
 
@@ -2994,7 +3462,6 @@ public class ThriftHive {
     }
 
     // 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);
@@ -3241,71 +3708,12 @@ public class ThriftHive {
     }
 
     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 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-              {
-                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
-                this.success = new ArrayList<String>(_list4.size);
-                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
-                {
-                  String _elem6; // required
-                  _elem6 = iprot.readString();
-                  this.success.add(_elem6);
-                }
-                iprot.readListEnd();
-              }
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // EX
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.ex = new HiveServerException();
-              this.ex.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();
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        {
-          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
-          for (String _iter7 : this.success)
-          {
-            oprot.writeString(_iter7);
-          }
-          oprot.writeListEnd();
-        }
-        oprot.writeFieldEnd();
-      } else if (this.isSetEx()) {
-        oprot.writeFieldBegin(EX_FIELD_DESC);
-        this.ex.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -3333,6 +3741,7 @@ public class ThriftHive {
 
     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 {
@@ -3351,12 +3760,157 @@ public class ThriftHive {
       }
     }
 
+    private static class fetchAll_resultStandardSchemeFactory implements SchemeFactory {
+      public fetchAll_resultStandardScheme getScheme() {
+        return new fetchAll_resultStandardScheme();
+      }
+    }
+
+    private static class fetchAll_resultStandardScheme extends StandardScheme<fetchAll_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAll_result 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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+                {
+                  org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+                  struct.success = new ArrayList<String>(_list8.size);
+                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+                  {
+                    String _elem10; // required
+                    _elem10 = iprot.readString();
+                    struct.success.add(_elem10);
+                  }
+                  iprot.readListEnd();
+                }
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // EX
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ex = new HiveServerException();
+                struct.ex.read(iprot);
+                struct.setExIsSet(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, fetchAll_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          {
+            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
+            for (String _iter11 : struct.success)
+            {
+              oprot.writeString(_iter11);
+            }
+            oprot.writeListEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+        if (struct.ex != null) {
+          oprot.writeFieldBegin(EX_FIELD_DESC);
+          struct.ex.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class fetchAll_resultTupleSchemeFactory implements SchemeFactory {
+      public fetchAll_resultTupleScheme getScheme() {
+        return new fetchAll_resultTupleScheme();
+      }
+    }
+
+    private static class fetchAll_resultTupleScheme extends TupleScheme<fetchAll_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, fetchAll_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetEx()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          {
+            oprot.writeI32(struct.success.size());
+            for (String _iter12 : struct.success)
+            {
+              oprot.writeString(_iter12);
+            }
+          }
+        }
+        if (struct.isSetEx()) {
+          struct.ex.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, fetchAll_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          {
+            org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+            struct.success = new ArrayList<String>(_list13.size);
+            for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+            {
+              String _elem15; // required
+              _elem15 = iprot.readString();
+              struct.success.add(_elem15);
+            }
+          }
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.ex = new HiveServerException();
+          struct.ex.read(iprot);
+          struct.setExIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class getSchema_args implements org.apache.thrift.TBase<getSchema_args, getSchema_args._Fields>, java.io.Serializable, Cloneable   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSchema_args");
 
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getSchema_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getSchema_argsTupleSchemeFactory());
+    }
+
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -3498,30 +4052,11 @@ public class ThriftHive {
     }
 
     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) {
-          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);
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -3535,6 +4070,7 @@ public class ThriftHive {
 
     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 {
@@ -3553,6 +4089,62 @@ public class ThriftHive {
       }
     }
 
+    private static class getSchema_argsStandardSchemeFactory implements SchemeFactory {
+      public getSchema_argsStandardScheme getScheme() {
+        return new getSchema_argsStandardScheme();
+      }
+    }
+
+    private static class getSchema_argsStandardScheme extends StandardScheme<getSchema_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getSchema_args 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) {
+            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, getSchema_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getSchema_argsTupleSchemeFactory implements SchemeFactory {
+      public getSchema_argsTupleScheme getScheme() {
+        return new getSchema_argsTupleScheme();
+      }
+    }
+
+    private static class getSchema_argsTupleScheme extends TupleScheme<getSchema_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getSchema_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getSchema_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+      }
+    }
+
   }
 
   public static class getSchema_result implements org.apache.thrift.TBase<getSchema_result, getSchema_result._Fields>, java.io.Serializable, Cloneable   {
@@ -3561,6 +4153,12 @@ public class ThriftHive {
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
     private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getSchema_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getSchema_resultTupleSchemeFactory());
+    }
+
     private org.apache.hadoop.hive.metastore.api.Schema success; // required
     private HiveServerException ex; // required
 
@@ -3626,7 +4224,6 @@ public class ThriftHive {
     }
 
     // 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);
@@ -3853,55 +4450,12 @@ public class ThriftHive {
     }
 
     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 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.success = new org.apache.hadoop.hive.metastore.api.Schema();
-              this.success.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // EX
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.ex = new HiveServerException();
-              this.ex.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();
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        this.success.write(oprot);
-        oprot.writeFieldEnd();
-      } else if (this.isSetEx()) {
-        oprot.writeFieldBegin(EX_FIELD_DESC);
-        this.ex.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -3929,6 +4483,10 @@ public class ThriftHive {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      // check for sub-struct validity
+      if (success != null) {
+        success.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -3947,12 +4505,127 @@ public class ThriftHive {
       }
     }
 
+    private static class getSchema_resultStandardSchemeFactory implements SchemeFactory {
+      public getSchema_resultStandardScheme getScheme() {
+        return new getSchema_resultStandardScheme();
+      }
+    }
+
+    private static class getSchema_resultStandardScheme extends StandardScheme<getSchema_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getSchema_result 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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.success = new org.apache.hadoop.hive.metastore.api.Schema();
+                struct.success.read(iprot);
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // EX
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ex = new HiveServerException();
+                struct.ex.read(iprot);
+                struct.setExIsSet(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, getSchema_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          struct.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.ex != null) {
+          oprot.writeFieldBegin(EX_FIELD_DESC);
+          struct.ex.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getSchema_resultTupleSchemeFactory implements SchemeFactory {
+      public getSchema_resultTupleScheme getScheme() {
+        return new getSchema_resultTupleScheme();
+      }
+    }
+
+    private static class getSchema_resultTupleScheme extends TupleScheme<getSchema_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getSchema_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetEx()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          struct.success.write(oprot);
+        }
+        if (struct.isSetEx()) {
+          struct.ex.write(oprot);
+        }
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getSchema_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+        BitSet incoming = iprot.readBitSet(2);
+        if (incoming.get(0)) {
+          struct.success = new org.apache.hadoop.hive.metastore.api.Schema();
+          struct.success.read(iprot);
+          struct.setSuccessIsSet(true);
+        }
+        if (incoming.get(1)) {
+          struct.ex = new HiveServerException();
+          struct.ex.read(iprot);
+          struct.setExIsSet(true);
+        }
+      }
+    }
+
   }
 
   public static class getThriftSchema_args implements org.apache.thrift.TBase<getThriftSchema_args, getThriftSchema_args._Fields>, java.io.Serializable, Cloneable   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getThriftSchema_args");
 
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getThriftSchema_argsStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getThriftSchema_argsTupleSchemeFactory());
+    }
+
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -4094,30 +4767,11 @@ public class ThriftHive {
     }
 
     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) {
-          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);
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
@@ -4131,6 +4785,7 @@ public class ThriftHive {
 
     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 {
@@ -4149,6 +4804,62 @@ public class ThriftHive {
       }
     }
 
+    private static class getThriftSchema_argsStandardSchemeFactory implements SchemeFactory {
+      public getThriftSchema_argsStandardScheme getScheme() {
+        return new getThriftSchema_argsStandardScheme();
+      }
+    }
+
+    private static class getThriftSchema_argsStandardScheme extends StandardScheme<getThriftSchema_args> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftSchema_args 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) {
+            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, getThriftSchema_args struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getThriftSchema_argsTupleSchemeFactory implements SchemeFactory {
+      public getThriftSchema_argsTupleScheme getScheme() {
+        return new getThriftSchema_argsTupleScheme();
+      }
+    }
+
+    private static class getThriftSchema_argsTupleScheme extends TupleScheme<getThriftSchema_args> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+      }
+
+      @Override
+      public void read(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_args struct) throws org.apache.thrift.TException {
+        TTupleProtocol iprot = (TTupleProtocol) prot;
+      }
+    }
+
   }
 
   public static class getThriftSchema_result implements org.apache.thrift.TBase<getThriftSchema_result, getThriftSchema_result._Fields>, java.io.Serializable, Cloneable   {
@@ -4157,6 +4868,12 @@ public class ThriftHive {
     private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
     private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
 
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+      schemes.put(StandardScheme.class, new getThriftSchema_resultStandardSchemeFactory());
+      schemes.put(TupleScheme.class, new getThriftSchema_resultTupleSchemeFactory());
+    }
+
     private org.apache.hadoop.hive.metastore.api.Schema success; // required
     private HiveServerException ex; // required
 
@@ -4222,7 +4939,6 @@ public class ThriftHive {
     }
 
     // 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);
@@ -4449,55 +5165,12 @@ public class ThriftHive {
     }
 
     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 0: // SUCCESS
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.success = new org.apache.hadoop.hive.metastore.api.Schema();
-              this.success.read(iprot);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-            }
-            break;
-          case 1: // EX
-            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-              this.ex = new HiveServerException();
-              this.ex.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();
-      validate();
+      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
     }
 
     public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-      oprot.writeStructBegin(STRUCT_DESC);
-
-      if (this.isSetSuccess()) {
-        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-        this.success.write(oprot);
-        oprot.writeFieldEnd();
-      } else if (this.isSetEx()) {
-        oprot.writeFieldBegin(EX_FIELD_DESC);
-        this.ex.write(oprot);
-        oprot.writeFieldEnd();
+      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
       }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
 
     @Override
     public String toString() {
@@ -4525,6 +5198,10 @@ public class ThriftHive {
 
     public void validate() throws org.apache.thrift.TException {
       // check for required fields
+      // check for sub-struct validity
+      if (success != null) {
+        success.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -4535,11 +5212,120 @@ public class ThriftHive {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        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 void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        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 getThriftSchema_resultStandardSchemeFactory implements SchemeFactory {
+      public getThriftSchema_resultStandardScheme getScheme() {
+        return new getThriftSchema_resultStandardScheme();
+      }
+    }
+
+    private static class getThriftSchema_resultStandardScheme extends StandardScheme<getThriftSchema_result> {
+
+      public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftSchema_result 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 0: // SUCCESS
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.success = new org.apache.hadoop.hive.metastore.api.Schema();
+                struct.success.read(iprot);
+                struct.setSuccessIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
+            case 1: // EX
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.ex = new HiveServerException();
+                struct.ex.read(iprot);
+                struct.setExIsSet(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, getThriftSchema_result struct) throws org.apache.thrift.TException {
+        struct.validate();
+
+        oprot.writeStructBegin(STRUCT_DESC);
+        if (struct.success != null) {
+          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+          struct.success.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        if (struct.ex != null) {
+          oprot.writeFieldBegin(EX_FIELD_DESC);
+          struct.ex.write(oprot);
+          oprot.writeFieldEnd();
+        }
+        oprot.writeFieldStop();
+        oprot.writeStructEnd();
+      }
+
+    }
+
+    private static class getThriftSchema_resultTupleSchemeFactory implements SchemeFactory {
+      public getThriftSchema_resultTupleScheme getScheme() {
+        return new getThriftSchema_resultTupleScheme();
+      }
+    }
+
+    private static class getThriftSchema_resultTupleScheme extends TupleScheme<getThriftSchema_result> {
+
+      @Override
+      public void write(org.apache.thrift.protocol.TProtocol prot, getThriftSchema_result struct) throws org.apache.thrift.TException {
+        TTupleProtocol oprot = (TTupleProtocol) prot;
+        BitSet optionals = new BitSet();
+        if (struct.isSetSuccess()) {
+          optionals.set(0);
+        }
+        if (struct.isSetEx()) {
+          optionals.set(1);
+        }
+        oprot.writeBitSet(optionals, 2);
+        if (struct.isSetSuccess()) {
+          struct.success.write(oprot);
+        }
+        if (struct.isSetEx()) {
+          struct.ex.write(oprot);
+        }
+      }
+
+      @Override

[... 895 lines stripped ...]