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 [7/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/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.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.metastore.api;
 
 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;
@@ -30,6 +40,12 @@ public class HiveObjectRef implements or
   private static final org.apache.thrift.protocol.TField PART_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("partValues", org.apache.thrift.protocol.TType.LIST, (short)4);
   private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("columnName", org.apache.thrift.protocol.TType.STRING, (short)5);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new HiveObjectRefStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new HiveObjectRefTupleSchemeFactory());
+  }
+
   private HiveObjectType objectType; // required
   private String dbName; // required
   private String objectName; // required
@@ -111,7 +127,6 @@ public class HiveObjectRef implements or
   }
 
   // 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);
@@ -570,107 +585,11 @@ public class HiveObjectRef implements or
   }
 
   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: // OBJECT_TYPE
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.objectType = HiveObjectType.findByValue(iprot.readI32());
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // DB_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.dbName = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // OBJECT_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.objectName = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // PART_VALUES
-          if (field.type == org.apache.thrift.protocol.TType.LIST) {
-            {
-              org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
-              this.partValues = new ArrayList<String>(_list4.size);
-              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
-              {
-                String _elem6; // required
-                _elem6 = iprot.readString();
-                this.partValues.add(_elem6);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // COLUMN_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.columnName = 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.objectType != null) {
-      oprot.writeFieldBegin(OBJECT_TYPE_FIELD_DESC);
-      oprot.writeI32(this.objectType.getValue());
-      oprot.writeFieldEnd();
-    }
-    if (this.dbName != null) {
-      oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
-      oprot.writeString(this.dbName);
-      oprot.writeFieldEnd();
-    }
-    if (this.objectName != null) {
-      oprot.writeFieldBegin(OBJECT_NAME_FIELD_DESC);
-      oprot.writeString(this.objectName);
-      oprot.writeFieldEnd();
-    }
-    if (this.partValues != null) {
-      oprot.writeFieldBegin(PART_VALUES_FIELD_DESC);
-      {
-        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.partValues.size()));
-        for (String _iter7 : this.partValues)
-        {
-          oprot.writeString(_iter7);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    if (this.columnName != null) {
-      oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC);
-      oprot.writeString(this.columnName);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -723,6 +642,7 @@ public class HiveObjectRef implements or
 
   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 {
@@ -741,5 +661,211 @@ public class HiveObjectRef implements or
     }
   }
 
+  private static class HiveObjectRefStandardSchemeFactory implements SchemeFactory {
+    public HiveObjectRefStandardScheme getScheme() {
+      return new HiveObjectRefStandardScheme();
+    }
+  }
+
+  private static class HiveObjectRefStandardScheme extends StandardScheme<HiveObjectRef> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, HiveObjectRef 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: // OBJECT_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.objectType = HiveObjectType.findByValue(iprot.readI32());
+              struct.setObjectTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // DB_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.dbName = iprot.readString();
+              struct.setDbNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // OBJECT_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.objectName = iprot.readString();
+              struct.setObjectNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // PART_VALUES
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
+                struct.partValues = new ArrayList<String>(_list8.size);
+                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+                {
+                  String _elem10; // required
+                  _elem10 = iprot.readString();
+                  struct.partValues.add(_elem10);
+                }
+                iprot.readListEnd();
+              }
+              struct.setPartValuesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // COLUMN_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.columnName = iprot.readString();
+              struct.setColumnNameIsSet(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, HiveObjectRef struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.objectType != null) {
+        oprot.writeFieldBegin(OBJECT_TYPE_FIELD_DESC);
+        oprot.writeI32(struct.objectType.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.dbName != null) {
+        oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+        oprot.writeString(struct.dbName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.objectName != null) {
+        oprot.writeFieldBegin(OBJECT_NAME_FIELD_DESC);
+        oprot.writeString(struct.objectName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.partValues != null) {
+        oprot.writeFieldBegin(PART_VALUES_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partValues.size()));
+          for (String _iter11 : struct.partValues)
+          {
+            oprot.writeString(_iter11);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.columnName != null) {
+        oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC);
+        oprot.writeString(struct.columnName);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class HiveObjectRefTupleSchemeFactory implements SchemeFactory {
+    public HiveObjectRefTupleScheme getScheme() {
+      return new HiveObjectRefTupleScheme();
+    }
+  }
+
+  private static class HiveObjectRefTupleScheme extends TupleScheme<HiveObjectRef> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, HiveObjectRef struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetObjectType()) {
+        optionals.set(0);
+      }
+      if (struct.isSetDbName()) {
+        optionals.set(1);
+      }
+      if (struct.isSetObjectName()) {
+        optionals.set(2);
+      }
+      if (struct.isSetPartValues()) {
+        optionals.set(3);
+      }
+      if (struct.isSetColumnName()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetObjectType()) {
+        oprot.writeI32(struct.objectType.getValue());
+      }
+      if (struct.isSetDbName()) {
+        oprot.writeString(struct.dbName);
+      }
+      if (struct.isSetObjectName()) {
+        oprot.writeString(struct.objectName);
+      }
+      if (struct.isSetPartValues()) {
+        {
+          oprot.writeI32(struct.partValues.size());
+          for (String _iter12 : struct.partValues)
+          {
+            oprot.writeString(_iter12);
+          }
+        }
+      }
+      if (struct.isSetColumnName()) {
+        oprot.writeString(struct.columnName);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, HiveObjectRef struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.objectType = HiveObjectType.findByValue(iprot.readI32());
+        struct.setObjectTypeIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.dbName = iprot.readString();
+        struct.setDbNameIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.objectName = iprot.readString();
+        struct.setObjectNameIsSet(true);
+      }
+      if (incoming.get(3)) {
+        {
+          org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.partValues = new ArrayList<String>(_list13.size);
+          for (int _i14 = 0; _i14 < _list13.size; ++_i14)
+          {
+            String _elem15; // required
+            _elem15 = iprot.readString();
+            struct.partValues.add(_elem15);
+          }
+        }
+        struct.setPartValuesIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.columnName = iprot.readString();
+        struct.setColumnNameIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectType.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.metastore.api;
 

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.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.metastore.api;
 
 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;
@@ -35,6 +45,12 @@ public class Index implements org.apache
   private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)9);
   private static final org.apache.thrift.protocol.TField DEFERRED_REBUILD_FIELD_DESC = new org.apache.thrift.protocol.TField("deferredRebuild", org.apache.thrift.protocol.TType.BOOL, (short)10);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new IndexStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new IndexTupleSchemeFactory());
+  }
+
   private String indexName; // required
   private String indexHandlerClass; // required
   private String dbName; // required
@@ -135,8 +151,7 @@ public class Index implements org.apache
   private static final int __CREATETIME_ISSET_ID = 0;
   private static final int __LASTACCESSTIME_ISSET_ID = 1;
   private static final int __DEFERREDREBUILD_ISSET_ID = 2;
-  private BitSet __isset_bit_vector = new BitSet(3);
-
+  private byte __isset_bitfield = 0;
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -201,8 +216,7 @@ public class Index implements org.apache
    * Performs a deep copy on <i>other</i>.
    */
   public Index(Index other) {
-    __isset_bit_vector.clear();
-    __isset_bit_vector.or(other.__isset_bit_vector);
+    __isset_bitfield = other.__isset_bitfield;
     if (other.isSetIndexName()) {
       this.indexName = other.indexName;
     }
@@ -364,16 +378,16 @@ public class Index implements org.apache
   }
 
   public void unsetCreateTime() {
-    __isset_bit_vector.clear(__CREATETIME_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
   }
 
   /** Returns true if field createTime is set (has been assigned a value) and false otherwise */
   public boolean isSetCreateTime() {
-    return __isset_bit_vector.get(__CREATETIME_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
   }
 
   public void setCreateTimeIsSet(boolean value) {
-    __isset_bit_vector.set(__CREATETIME_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
   }
 
   public int getLastAccessTime() {
@@ -386,16 +400,16 @@ public class Index implements org.apache
   }
 
   public void unsetLastAccessTime() {
-    __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID);
   }
 
   /** Returns true if field lastAccessTime is set (has been assigned a value) and false otherwise */
   public boolean isSetLastAccessTime() {
-    return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID);
   }
 
   public void setLastAccessTimeIsSet(boolean value) {
-    __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value);
   }
 
   public String getIndexTableName() {
@@ -488,16 +502,16 @@ public class Index implements org.apache
   }
 
   public void unsetDeferredRebuild() {
-    __isset_bit_vector.clear(__DEFERREDREBUILD_ISSET_ID);
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID);
   }
 
   /** Returns true if field deferredRebuild is set (has been assigned a value) and false otherwise */
   public boolean isSetDeferredRebuild() {
-    return __isset_bit_vector.get(__DEFERREDREBUILD_ISSET_ID);
+    return EncodingUtils.testBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID);
   }
 
   public void setDeferredRebuildIsSet(boolean value) {
-    __isset_bit_vector.set(__DEFERREDREBUILD_ISSET_ID, value);
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFERREDREBUILD_ISSET_ID, value);
   }
 
   public void setFieldValue(_Fields field, Object value) {
@@ -931,168 +945,11 @@ public class Index implements org.apache
   }
 
   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: // INDEX_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.indexName = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 2: // INDEX_HANDLER_CLASS
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.indexHandlerClass = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 3: // DB_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.dbName = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 4: // ORIG_TABLE_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.origTableName = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 5: // CREATE_TIME
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.createTime = iprot.readI32();
-            setCreateTimeIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 6: // LAST_ACCESS_TIME
-          if (field.type == org.apache.thrift.protocol.TType.I32) {
-            this.lastAccessTime = iprot.readI32();
-            setLastAccessTimeIsSet(true);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 7: // INDEX_TABLE_NAME
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.indexTableName = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 8: // SD
-          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-            this.sd = new StorageDescriptor();
-            this.sd.read(iprot);
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 9: // PARAMETERS
-          if (field.type == org.apache.thrift.protocol.TType.MAP) {
-            {
-              org.apache.thrift.protocol.TMap _map105 = iprot.readMapBegin();
-              this.parameters = new HashMap<String,String>(2*_map105.size);
-              for (int _i106 = 0; _i106 < _map105.size; ++_i106)
-              {
-                String _key107; // required
-                String _val108; // required
-                _key107 = iprot.readString();
-                _val108 = iprot.readString();
-                this.parameters.put(_key107, _val108);
-              }
-              iprot.readMapEnd();
-            }
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        case 10: // DEFERRED_REBUILD
-          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-            this.deferredRebuild = iprot.readBool();
-            setDeferredRebuildIsSet(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);
-    if (this.indexName != null) {
-      oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC);
-      oprot.writeString(this.indexName);
-      oprot.writeFieldEnd();
-    }
-    if (this.indexHandlerClass != null) {
-      oprot.writeFieldBegin(INDEX_HANDLER_CLASS_FIELD_DESC);
-      oprot.writeString(this.indexHandlerClass);
-      oprot.writeFieldEnd();
-    }
-    if (this.dbName != null) {
-      oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
-      oprot.writeString(this.dbName);
-      oprot.writeFieldEnd();
-    }
-    if (this.origTableName != null) {
-      oprot.writeFieldBegin(ORIG_TABLE_NAME_FIELD_DESC);
-      oprot.writeString(this.origTableName);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
-    oprot.writeI32(this.createTime);
-    oprot.writeFieldEnd();
-    oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC);
-    oprot.writeI32(this.lastAccessTime);
-    oprot.writeFieldEnd();
-    if (this.indexTableName != null) {
-      oprot.writeFieldBegin(INDEX_TABLE_NAME_FIELD_DESC);
-      oprot.writeString(this.indexTableName);
-      oprot.writeFieldEnd();
-    }
-    if (this.sd != null) {
-      oprot.writeFieldBegin(SD_FIELD_DESC);
-      this.sd.write(oprot);
-      oprot.writeFieldEnd();
-    }
-    if (this.parameters != null) {
-      oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
-      {
-        oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size()));
-        for (Map.Entry<String, String> _iter109 : this.parameters.entrySet())
-        {
-          oprot.writeString(_iter109.getKey());
-          oprot.writeString(_iter109.getValue());
-        }
-        oprot.writeMapEnd();
-      }
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldBegin(DEFERRED_REBUILD_FIELD_DESC);
-    oprot.writeBool(this.deferredRebuild);
-    oprot.writeFieldEnd();
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -1173,6 +1030,10 @@ public class Index implements org.apache
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
+    // check for sub-struct validity
+    if (sd != null) {
+      sd.validate();
+    }
   }
 
   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -1186,12 +1047,335 @@ public class Index implements org.apache
   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 IndexStandardSchemeFactory implements SchemeFactory {
+    public IndexStandardScheme getScheme() {
+      return new IndexStandardScheme();
+    }
+  }
+
+  private static class IndexStandardScheme extends StandardScheme<Index> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Index 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: // INDEX_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.indexName = iprot.readString();
+              struct.setIndexNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // INDEX_HANDLER_CLASS
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.indexHandlerClass = iprot.readString();
+              struct.setIndexHandlerClassIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // DB_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.dbName = iprot.readString();
+              struct.setDbNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // ORIG_TABLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.origTableName = iprot.readString();
+              struct.setOrigTableNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // CREATE_TIME
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.createTime = iprot.readI32();
+              struct.setCreateTimeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // LAST_ACCESS_TIME
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.lastAccessTime = iprot.readI32();
+              struct.setLastAccessTimeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // INDEX_TABLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.indexTableName = iprot.readString();
+              struct.setIndexTableNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // SD
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.sd = new StorageDescriptor();
+              struct.sd.read(iprot);
+              struct.setSdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 9: // PARAMETERS
+            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+              {
+                org.apache.thrift.protocol.TMap _map210 = iprot.readMapBegin();
+                struct.parameters = new HashMap<String,String>(2*_map210.size);
+                for (int _i211 = 0; _i211 < _map210.size; ++_i211)
+                {
+                  String _key212; // required
+                  String _val213; // required
+                  _key212 = iprot.readString();
+                  _val213 = iprot.readString();
+                  struct.parameters.put(_key212, _val213);
+                }
+                iprot.readMapEnd();
+              }
+              struct.setParametersIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 10: // DEFERRED_REBUILD
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.deferredRebuild = iprot.readBool();
+              struct.setDeferredRebuildIsSet(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, Index struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.indexName != null) {
+        oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC);
+        oprot.writeString(struct.indexName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.indexHandlerClass != null) {
+        oprot.writeFieldBegin(INDEX_HANDLER_CLASS_FIELD_DESC);
+        oprot.writeString(struct.indexHandlerClass);
+        oprot.writeFieldEnd();
+      }
+      if (struct.dbName != null) {
+        oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+        oprot.writeString(struct.dbName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.origTableName != null) {
+        oprot.writeFieldBegin(ORIG_TABLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.origTableName);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+      oprot.writeI32(struct.createTime);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC);
+      oprot.writeI32(struct.lastAccessTime);
+      oprot.writeFieldEnd();
+      if (struct.indexTableName != null) {
+        oprot.writeFieldBegin(INDEX_TABLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.indexTableName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.sd != null) {
+        oprot.writeFieldBegin(SD_FIELD_DESC);
+        struct.sd.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.parameters != null) {
+        oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
+        {
+          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size()));
+          for (Map.Entry<String, String> _iter214 : struct.parameters.entrySet())
+          {
+            oprot.writeString(_iter214.getKey());
+            oprot.writeString(_iter214.getValue());
+          }
+          oprot.writeMapEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(DEFERRED_REBUILD_FIELD_DESC);
+      oprot.writeBool(struct.deferredRebuild);
+      oprot.writeFieldEnd();
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class IndexTupleSchemeFactory implements SchemeFactory {
+    public IndexTupleScheme getScheme() {
+      return new IndexTupleScheme();
+    }
+  }
+
+  private static class IndexTupleScheme extends TupleScheme<Index> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Index struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetIndexName()) {
+        optionals.set(0);
+      }
+      if (struct.isSetIndexHandlerClass()) {
+        optionals.set(1);
+      }
+      if (struct.isSetDbName()) {
+        optionals.set(2);
+      }
+      if (struct.isSetOrigTableName()) {
+        optionals.set(3);
+      }
+      if (struct.isSetCreateTime()) {
+        optionals.set(4);
+      }
+      if (struct.isSetLastAccessTime()) {
+        optionals.set(5);
+      }
+      if (struct.isSetIndexTableName()) {
+        optionals.set(6);
+      }
+      if (struct.isSetSd()) {
+        optionals.set(7);
+      }
+      if (struct.isSetParameters()) {
+        optionals.set(8);
+      }
+      if (struct.isSetDeferredRebuild()) {
+        optionals.set(9);
+      }
+      oprot.writeBitSet(optionals, 10);
+      if (struct.isSetIndexName()) {
+        oprot.writeString(struct.indexName);
+      }
+      if (struct.isSetIndexHandlerClass()) {
+        oprot.writeString(struct.indexHandlerClass);
+      }
+      if (struct.isSetDbName()) {
+        oprot.writeString(struct.dbName);
+      }
+      if (struct.isSetOrigTableName()) {
+        oprot.writeString(struct.origTableName);
+      }
+      if (struct.isSetCreateTime()) {
+        oprot.writeI32(struct.createTime);
+      }
+      if (struct.isSetLastAccessTime()) {
+        oprot.writeI32(struct.lastAccessTime);
+      }
+      if (struct.isSetIndexTableName()) {
+        oprot.writeString(struct.indexTableName);
+      }
+      if (struct.isSetSd()) {
+        struct.sd.write(oprot);
+      }
+      if (struct.isSetParameters()) {
+        {
+          oprot.writeI32(struct.parameters.size());
+          for (Map.Entry<String, String> _iter215 : struct.parameters.entrySet())
+          {
+            oprot.writeString(_iter215.getKey());
+            oprot.writeString(_iter215.getValue());
+          }
+        }
+      }
+      if (struct.isSetDeferredRebuild()) {
+        oprot.writeBool(struct.deferredRebuild);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Index struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(10);
+      if (incoming.get(0)) {
+        struct.indexName = iprot.readString();
+        struct.setIndexNameIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.indexHandlerClass = iprot.readString();
+        struct.setIndexHandlerClassIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.dbName = iprot.readString();
+        struct.setDbNameIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.origTableName = iprot.readString();
+        struct.setOrigTableNameIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.createTime = iprot.readI32();
+        struct.setCreateTimeIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.lastAccessTime = iprot.readI32();
+        struct.setLastAccessTimeIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.indexTableName = iprot.readString();
+        struct.setIndexTableNameIsSet(true);
+      }
+      if (incoming.get(7)) {
+        struct.sd = new StorageDescriptor();
+        struct.sd.read(iprot);
+        struct.setSdIsSet(true);
+      }
+      if (incoming.get(8)) {
+        {
+          org.apache.thrift.protocol.TMap _map216 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+          struct.parameters = new HashMap<String,String>(2*_map216.size);
+          for (int _i217 = 0; _i217 < _map216.size; ++_i217)
+          {
+            String _key218; // required
+            String _val219; // required
+            _key218 = iprot.readString();
+            _val219 = iprot.readString();
+            struct.parameters.put(_key218, _val219);
+          }
+        }
+        struct.setParametersIsSet(true);
+      }
+      if (incoming.get(9)) {
+        struct.deferredRebuild = iprot.readBool();
+        struct.setDeferredRebuildIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.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.metastore.api;
 
 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;
@@ -21,11 +31,17 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class IndexAlreadyExistsException extends Exception implements org.apache.thrift.TBase<IndexAlreadyExistsException, IndexAlreadyExistsException._Fields>, java.io.Serializable, Cloneable {
+public class IndexAlreadyExistsException extends TException implements org.apache.thrift.TBase<IndexAlreadyExistsException, IndexAlreadyExistsException._Fields>, java.io.Serializable, Cloneable {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IndexAlreadyExistsException");
 
   private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new IndexAlreadyExistsExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new IndexAlreadyExistsExceptionTupleSchemeFactory());
+  }
+
   private String message; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -87,7 +103,6 @@ public class IndexAlreadyExistsException
   }
 
   // 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);
@@ -246,42 +261,11 @@ public class IndexAlreadyExistsException
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // MESSAGE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.message = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        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.message != null) {
-      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
-      oprot.writeString(this.message);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -302,6 +286,7 @@ public class IndexAlreadyExistsException
 
   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 {
@@ -320,5 +305,87 @@ public class IndexAlreadyExistsException
     }
   }
 
+  private static class IndexAlreadyExistsExceptionStandardSchemeFactory implements SchemeFactory {
+    public IndexAlreadyExistsExceptionStandardScheme getScheme() {
+      return new IndexAlreadyExistsExceptionStandardScheme();
+    }
+  }
+
+  private static class IndexAlreadyExistsExceptionStandardScheme extends StandardScheme<IndexAlreadyExistsException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // MESSAGE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.message = iprot.readString();
+              struct.setMessageIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          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, IndexAlreadyExistsException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.message != null) {
+        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+        oprot.writeString(struct.message);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class IndexAlreadyExistsExceptionTupleSchemeFactory implements SchemeFactory {
+    public IndexAlreadyExistsExceptionTupleScheme getScheme() {
+      return new IndexAlreadyExistsExceptionTupleScheme();
+    }
+  }
+
+  private static class IndexAlreadyExistsExceptionTupleScheme extends TupleScheme<IndexAlreadyExistsException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetMessage()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetMessage()) {
+        oprot.writeString(struct.message);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, IndexAlreadyExistsException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.message = iprot.readString();
+        struct.setMessageIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.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.metastore.api;
 
 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;
@@ -21,11 +31,17 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class InvalidInputException extends Exception implements org.apache.thrift.TBase<InvalidInputException, InvalidInputException._Fields>, java.io.Serializable, Cloneable {
+public class InvalidInputException extends TException implements org.apache.thrift.TBase<InvalidInputException, InvalidInputException._Fields>, java.io.Serializable, Cloneable {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidInputException");
 
   private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new InvalidInputExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new InvalidInputExceptionTupleSchemeFactory());
+  }
+
   private String message; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -87,7 +103,6 @@ public class InvalidInputException exten
   }
 
   // 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);
@@ -246,42 +261,11 @@ public class InvalidInputException exten
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // MESSAGE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.message = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        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.message != null) {
-      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
-      oprot.writeString(this.message);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -302,6 +286,7 @@ public class InvalidInputException exten
 
   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 {
@@ -320,5 +305,87 @@ public class InvalidInputException exten
     }
   }
 
+  private static class InvalidInputExceptionStandardSchemeFactory implements SchemeFactory {
+    public InvalidInputExceptionStandardScheme getScheme() {
+      return new InvalidInputExceptionStandardScheme();
+    }
+  }
+
+  private static class InvalidInputExceptionStandardScheme extends StandardScheme<InvalidInputException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidInputException struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // MESSAGE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.message = iprot.readString();
+              struct.setMessageIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          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, InvalidInputException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.message != null) {
+        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+        oprot.writeString(struct.message);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class InvalidInputExceptionTupleSchemeFactory implements SchemeFactory {
+    public InvalidInputExceptionTupleScheme getScheme() {
+      return new InvalidInputExceptionTupleScheme();
+    }
+  }
+
+  private static class InvalidInputExceptionTupleScheme extends TupleScheme<InvalidInputException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, InvalidInputException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetMessage()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetMessage()) {
+        oprot.writeString(struct.message);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, InvalidInputException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.message = iprot.readString();
+        struct.setMessageIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.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.metastore.api;
 
 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;
@@ -21,11 +31,17 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class InvalidObjectException extends Exception implements org.apache.thrift.TBase<InvalidObjectException, InvalidObjectException._Fields>, java.io.Serializable, Cloneable {
+public class InvalidObjectException extends TException implements org.apache.thrift.TBase<InvalidObjectException, InvalidObjectException._Fields>, java.io.Serializable, Cloneable {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidObjectException");
 
   private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new InvalidObjectExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new InvalidObjectExceptionTupleSchemeFactory());
+  }
+
   private String message; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -87,7 +103,6 @@ public class InvalidObjectException exte
   }
 
   // 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);
@@ -246,42 +261,11 @@ public class InvalidObjectException exte
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // MESSAGE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.message = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        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.message != null) {
-      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
-      oprot.writeString(this.message);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -302,6 +286,7 @@ public class InvalidObjectException exte
 
   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 {
@@ -320,5 +305,87 @@ public class InvalidObjectException exte
     }
   }
 
+  private static class InvalidObjectExceptionStandardSchemeFactory implements SchemeFactory {
+    public InvalidObjectExceptionStandardScheme getScheme() {
+      return new InvalidObjectExceptionStandardScheme();
+    }
+  }
+
+  private static class InvalidObjectExceptionStandardScheme extends StandardScheme<InvalidObjectException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidObjectException struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // MESSAGE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.message = iprot.readString();
+              struct.setMessageIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          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, InvalidObjectException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.message != null) {
+        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+        oprot.writeString(struct.message);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class InvalidObjectExceptionTupleSchemeFactory implements SchemeFactory {
+    public InvalidObjectExceptionTupleScheme getScheme() {
+      return new InvalidObjectExceptionTupleScheme();
+    }
+  }
+
+  private static class InvalidObjectExceptionTupleScheme extends TupleScheme<InvalidObjectException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, InvalidObjectException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetMessage()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetMessage()) {
+        oprot.writeString(struct.message);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, InvalidObjectException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.message = iprot.readString();
+        struct.setMessageIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.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.metastore.api;
 
 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;
@@ -21,11 +31,17 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class InvalidOperationException extends Exception implements org.apache.thrift.TBase<InvalidOperationException, InvalidOperationException._Fields>, java.io.Serializable, Cloneable {
+public class InvalidOperationException extends TException implements org.apache.thrift.TBase<InvalidOperationException, InvalidOperationException._Fields>, java.io.Serializable, Cloneable {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidOperationException");
 
   private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new InvalidOperationExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new InvalidOperationExceptionTupleSchemeFactory());
+  }
+
   private String message; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -87,7 +103,6 @@ public class InvalidOperationException e
   }
 
   // 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);
@@ -246,42 +261,11 @@ public class InvalidOperationException e
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // MESSAGE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.message = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        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.message != null) {
-      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
-      oprot.writeString(this.message);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -302,6 +286,7 @@ public class InvalidOperationException e
 
   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 {
@@ -320,5 +305,87 @@ public class InvalidOperationException e
     }
   }
 
+  private static class InvalidOperationExceptionStandardSchemeFactory implements SchemeFactory {
+    public InvalidOperationExceptionStandardScheme getScheme() {
+      return new InvalidOperationExceptionStandardScheme();
+    }
+  }
+
+  private static class InvalidOperationExceptionStandardScheme extends StandardScheme<InvalidOperationException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidOperationException struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // MESSAGE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.message = iprot.readString();
+              struct.setMessageIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          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, InvalidOperationException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.message != null) {
+        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+        oprot.writeString(struct.message);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class InvalidOperationExceptionTupleSchemeFactory implements SchemeFactory {
+    public InvalidOperationExceptionTupleScheme getScheme() {
+      return new InvalidOperationExceptionTupleScheme();
+    }
+  }
+
+  private static class InvalidOperationExceptionTupleScheme extends TupleScheme<InvalidOperationException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, InvalidOperationException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetMessage()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetMessage()) {
+        oprot.writeString(struct.message);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, InvalidOperationException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.message = iprot.readString();
+        struct.setMessageIsSet(true);
+      }
+    }
+  }
+
 }
 

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidPartitionException.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.metastore.api;
 
 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;
@@ -21,11 +31,17 @@ import java.util.Arrays;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class InvalidPartitionException extends Exception implements org.apache.thrift.TBase<InvalidPartitionException, InvalidPartitionException._Fields>, java.io.Serializable, Cloneable {
+public class InvalidPartitionException extends TException implements org.apache.thrift.TBase<InvalidPartitionException, InvalidPartitionException._Fields>, java.io.Serializable, Cloneable {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidPartitionException");
 
   private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
 
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new InvalidPartitionExceptionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new InvalidPartitionExceptionTupleSchemeFactory());
+  }
+
   private String message; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -87,7 +103,6 @@ public class InvalidPartitionException e
   }
 
   // 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);
@@ -246,42 +261,11 @@ public class InvalidPartitionException e
   }
 
   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-    org.apache.thrift.protocol.TField field;
-    iprot.readStructBegin();
-    while (true)
-    {
-      field = iprot.readFieldBegin();
-      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-        break;
-      }
-      switch (field.id) {
-        case 1: // MESSAGE
-          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-            this.message = iprot.readString();
-          } else { 
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
-        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.message != null) {
-      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
-      oprot.writeString(this.message);
-      oprot.writeFieldEnd();
-    }
-    oprot.writeFieldStop();
-    oprot.writeStructEnd();
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
   }
 
   @Override
@@ -302,6 +286,7 @@ public class InvalidPartitionException e
 
   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 {
@@ -320,5 +305,87 @@ public class InvalidPartitionException e
     }
   }
 
+  private static class InvalidPartitionExceptionStandardSchemeFactory implements SchemeFactory {
+    public InvalidPartitionExceptionStandardScheme getScheme() {
+      return new InvalidPartitionExceptionStandardScheme();
+    }
+  }
+
+  private static class InvalidPartitionExceptionStandardScheme extends StandardScheme<InvalidPartitionException> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, InvalidPartitionException struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // MESSAGE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.message = iprot.readString();
+              struct.setMessageIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          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, InvalidPartitionException struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.message != null) {
+        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+        oprot.writeString(struct.message);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class InvalidPartitionExceptionTupleSchemeFactory implements SchemeFactory {
+    public InvalidPartitionExceptionTupleScheme getScheme() {
+      return new InvalidPartitionExceptionTupleScheme();
+    }
+  }
+
+  private static class InvalidPartitionExceptionTupleScheme extends TupleScheme<InvalidPartitionException> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, InvalidPartitionException struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetMessage()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetMessage()) {
+        oprot.writeString(struct.message);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, InvalidPartitionException struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.message = iprot.readString();
+        struct.setMessageIsSet(true);
+      }
+    }
+  }
+
 }