You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by vi...@apache.org on 2018/07/13 01:10:03 UTC

[28/51] [partial] hive git commit: HIVE-20097 : Convert standalone-metastore to a submodule (Alexander Kolbasov reviewed by Vihang Karajgaonkar)

http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java
new file mode 100644
index 0000000..2f2fcfa
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java
@@ -0,0 +1,814 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * 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.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 org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class ForeignKeysRequest implements org.apache.thrift.TBase<ForeignKeysRequest, ForeignKeysRequest._Fields>, java.io.Serializable, Cloneable, Comparable<ForeignKeysRequest> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysRequest");
+
+  private static final org.apache.thrift.protocol.TField PARENT_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_db_name", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PARENT_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField FOREIGN_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_db_name", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField FOREIGN_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", 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 ForeignKeysRequestStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ForeignKeysRequestTupleSchemeFactory());
+  }
+
+  private String parent_db_name; // required
+  private String parent_tbl_name; // required
+  private String foreign_db_name; // required
+  private String foreign_tbl_name; // required
+  private String catName; // optional
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    PARENT_DB_NAME((short)1, "parent_db_name"),
+    PARENT_TBL_NAME((short)2, "parent_tbl_name"),
+    FOREIGN_DB_NAME((short)3, "foreign_db_name"),
+    FOREIGN_TBL_NAME((short)4, "foreign_tbl_name"),
+    CAT_NAME((short)5, "catName");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // PARENT_DB_NAME
+          return PARENT_DB_NAME;
+        case 2: // PARENT_TBL_NAME
+          return PARENT_TBL_NAME;
+        case 3: // FOREIGN_DB_NAME
+          return FOREIGN_DB_NAME;
+        case 4: // FOREIGN_TBL_NAME
+          return FOREIGN_TBL_NAME;
+        case 5: // CAT_NAME
+          return CAT_NAME;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final _Fields optionals[] = {_Fields.CAT_NAME};
+  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);
+    tmpMap.put(_Fields.PARENT_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARENT_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.FOREIGN_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.FOREIGN_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysRequest.class, metaDataMap);
+  }
+
+  public ForeignKeysRequest() {
+  }
+
+  public ForeignKeysRequest(
+    String parent_db_name,
+    String parent_tbl_name,
+    String foreign_db_name,
+    String foreign_tbl_name)
+  {
+    this();
+    this.parent_db_name = parent_db_name;
+    this.parent_tbl_name = parent_tbl_name;
+    this.foreign_db_name = foreign_db_name;
+    this.foreign_tbl_name = foreign_tbl_name;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public ForeignKeysRequest(ForeignKeysRequest other) {
+    if (other.isSetParent_db_name()) {
+      this.parent_db_name = other.parent_db_name;
+    }
+    if (other.isSetParent_tbl_name()) {
+      this.parent_tbl_name = other.parent_tbl_name;
+    }
+    if (other.isSetForeign_db_name()) {
+      this.foreign_db_name = other.foreign_db_name;
+    }
+    if (other.isSetForeign_tbl_name()) {
+      this.foreign_tbl_name = other.foreign_tbl_name;
+    }
+    if (other.isSetCatName()) {
+      this.catName = other.catName;
+    }
+  }
+
+  public ForeignKeysRequest deepCopy() {
+    return new ForeignKeysRequest(this);
+  }
+
+  @Override
+  public void clear() {
+    this.parent_db_name = null;
+    this.parent_tbl_name = null;
+    this.foreign_db_name = null;
+    this.foreign_tbl_name = null;
+    this.catName = null;
+  }
+
+  public String getParent_db_name() {
+    return this.parent_db_name;
+  }
+
+  public void setParent_db_name(String parent_db_name) {
+    this.parent_db_name = parent_db_name;
+  }
+
+  public void unsetParent_db_name() {
+    this.parent_db_name = null;
+  }
+
+  /** Returns true if field parent_db_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetParent_db_name() {
+    return this.parent_db_name != null;
+  }
+
+  public void setParent_db_nameIsSet(boolean value) {
+    if (!value) {
+      this.parent_db_name = null;
+    }
+  }
+
+  public String getParent_tbl_name() {
+    return this.parent_tbl_name;
+  }
+
+  public void setParent_tbl_name(String parent_tbl_name) {
+    this.parent_tbl_name = parent_tbl_name;
+  }
+
+  public void unsetParent_tbl_name() {
+    this.parent_tbl_name = null;
+  }
+
+  /** Returns true if field parent_tbl_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetParent_tbl_name() {
+    return this.parent_tbl_name != null;
+  }
+
+  public void setParent_tbl_nameIsSet(boolean value) {
+    if (!value) {
+      this.parent_tbl_name = null;
+    }
+  }
+
+  public String getForeign_db_name() {
+    return this.foreign_db_name;
+  }
+
+  public void setForeign_db_name(String foreign_db_name) {
+    this.foreign_db_name = foreign_db_name;
+  }
+
+  public void unsetForeign_db_name() {
+    this.foreign_db_name = null;
+  }
+
+  /** Returns true if field foreign_db_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetForeign_db_name() {
+    return this.foreign_db_name != null;
+  }
+
+  public void setForeign_db_nameIsSet(boolean value) {
+    if (!value) {
+      this.foreign_db_name = null;
+    }
+  }
+
+  public String getForeign_tbl_name() {
+    return this.foreign_tbl_name;
+  }
+
+  public void setForeign_tbl_name(String foreign_tbl_name) {
+    this.foreign_tbl_name = foreign_tbl_name;
+  }
+
+  public void unsetForeign_tbl_name() {
+    this.foreign_tbl_name = null;
+  }
+
+  /** Returns true if field foreign_tbl_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetForeign_tbl_name() {
+    return this.foreign_tbl_name != null;
+  }
+
+  public void setForeign_tbl_nameIsSet(boolean value) {
+    if (!value) {
+      this.foreign_tbl_name = null;
+    }
+  }
+
+  public String getCatName() {
+    return this.catName;
+  }
+
+  public void setCatName(String catName) {
+    this.catName = catName;
+  }
+
+  public void unsetCatName() {
+    this.catName = null;
+  }
+
+  /** Returns true if field catName is set (has been assigned a value) and false otherwise */
+  public boolean isSetCatName() {
+    return this.catName != null;
+  }
+
+  public void setCatNameIsSet(boolean value) {
+    if (!value) {
+      this.catName = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case PARENT_DB_NAME:
+      if (value == null) {
+        unsetParent_db_name();
+      } else {
+        setParent_db_name((String)value);
+      }
+      break;
+
+    case PARENT_TBL_NAME:
+      if (value == null) {
+        unsetParent_tbl_name();
+      } else {
+        setParent_tbl_name((String)value);
+      }
+      break;
+
+    case FOREIGN_DB_NAME:
+      if (value == null) {
+        unsetForeign_db_name();
+      } else {
+        setForeign_db_name((String)value);
+      }
+      break;
+
+    case FOREIGN_TBL_NAME:
+      if (value == null) {
+        unsetForeign_tbl_name();
+      } else {
+        setForeign_tbl_name((String)value);
+      }
+      break;
+
+    case CAT_NAME:
+      if (value == null) {
+        unsetCatName();
+      } else {
+        setCatName((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case PARENT_DB_NAME:
+      return getParent_db_name();
+
+    case PARENT_TBL_NAME:
+      return getParent_tbl_name();
+
+    case FOREIGN_DB_NAME:
+      return getForeign_db_name();
+
+    case FOREIGN_TBL_NAME:
+      return getForeign_tbl_name();
+
+    case CAT_NAME:
+      return getCatName();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case PARENT_DB_NAME:
+      return isSetParent_db_name();
+    case PARENT_TBL_NAME:
+      return isSetParent_tbl_name();
+    case FOREIGN_DB_NAME:
+      return isSetForeign_db_name();
+    case FOREIGN_TBL_NAME:
+      return isSetForeign_tbl_name();
+    case CAT_NAME:
+      return isSetCatName();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof ForeignKeysRequest)
+      return this.equals((ForeignKeysRequest)that);
+    return false;
+  }
+
+  public boolean equals(ForeignKeysRequest that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_parent_db_name = true && this.isSetParent_db_name();
+    boolean that_present_parent_db_name = true && that.isSetParent_db_name();
+    if (this_present_parent_db_name || that_present_parent_db_name) {
+      if (!(this_present_parent_db_name && that_present_parent_db_name))
+        return false;
+      if (!this.parent_db_name.equals(that.parent_db_name))
+        return false;
+    }
+
+    boolean this_present_parent_tbl_name = true && this.isSetParent_tbl_name();
+    boolean that_present_parent_tbl_name = true && that.isSetParent_tbl_name();
+    if (this_present_parent_tbl_name || that_present_parent_tbl_name) {
+      if (!(this_present_parent_tbl_name && that_present_parent_tbl_name))
+        return false;
+      if (!this.parent_tbl_name.equals(that.parent_tbl_name))
+        return false;
+    }
+
+    boolean this_present_foreign_db_name = true && this.isSetForeign_db_name();
+    boolean that_present_foreign_db_name = true && that.isSetForeign_db_name();
+    if (this_present_foreign_db_name || that_present_foreign_db_name) {
+      if (!(this_present_foreign_db_name && that_present_foreign_db_name))
+        return false;
+      if (!this.foreign_db_name.equals(that.foreign_db_name))
+        return false;
+    }
+
+    boolean this_present_foreign_tbl_name = true && this.isSetForeign_tbl_name();
+    boolean that_present_foreign_tbl_name = true && that.isSetForeign_tbl_name();
+    if (this_present_foreign_tbl_name || that_present_foreign_tbl_name) {
+      if (!(this_present_foreign_tbl_name && that_present_foreign_tbl_name))
+        return false;
+      if (!this.foreign_tbl_name.equals(that.foreign_tbl_name))
+        return false;
+    }
+
+    boolean this_present_catName = true && this.isSetCatName();
+    boolean that_present_catName = true && that.isSetCatName();
+    if (this_present_catName || that_present_catName) {
+      if (!(this_present_catName && that_present_catName))
+        return false;
+      if (!this.catName.equals(that.catName))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_parent_db_name = true && (isSetParent_db_name());
+    list.add(present_parent_db_name);
+    if (present_parent_db_name)
+      list.add(parent_db_name);
+
+    boolean present_parent_tbl_name = true && (isSetParent_tbl_name());
+    list.add(present_parent_tbl_name);
+    if (present_parent_tbl_name)
+      list.add(parent_tbl_name);
+
+    boolean present_foreign_db_name = true && (isSetForeign_db_name());
+    list.add(present_foreign_db_name);
+    if (present_foreign_db_name)
+      list.add(foreign_db_name);
+
+    boolean present_foreign_tbl_name = true && (isSetForeign_tbl_name());
+    list.add(present_foreign_tbl_name);
+    if (present_foreign_tbl_name)
+      list.add(foreign_tbl_name);
+
+    boolean present_catName = true && (isSetCatName());
+    list.add(present_catName);
+    if (present_catName)
+      list.add(catName);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(ForeignKeysRequest other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetParent_db_name()).compareTo(other.isSetParent_db_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetParent_db_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_db_name, other.parent_db_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetParent_tbl_name()).compareTo(other.isSetParent_tbl_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetParent_tbl_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_tbl_name, other.parent_tbl_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetForeign_db_name()).compareTo(other.isSetForeign_db_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetForeign_db_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_db_name, other.foreign_db_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetForeign_tbl_name()).compareTo(other.isSetForeign_tbl_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetForeign_tbl_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_tbl_name, other.foreign_tbl_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCatName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("ForeignKeysRequest(");
+    boolean first = true;
+
+    sb.append("parent_db_name:");
+    if (this.parent_db_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.parent_db_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("parent_tbl_name:");
+    if (this.parent_tbl_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.parent_tbl_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("foreign_db_name:");
+    if (this.foreign_db_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.foreign_db_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("foreign_tbl_name:");
+    if (this.foreign_tbl_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.foreign_tbl_name);
+    }
+    first = false;
+    if (isSetCatName()) {
+      if (!first) sb.append(", ");
+      sb.append("catName:");
+      if (this.catName == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.catName);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  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 {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } 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 ForeignKeysRequestStandardSchemeFactory implements SchemeFactory {
+    public ForeignKeysRequestStandardScheme getScheme() {
+      return new ForeignKeysRequestStandardScheme();
+    }
+  }
+
+  private static class ForeignKeysRequestStandardScheme extends StandardScheme<ForeignKeysRequest> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysRequest 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: // PARENT_DB_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.parent_db_name = iprot.readString();
+              struct.setParent_db_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // PARENT_TBL_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.parent_tbl_name = iprot.readString();
+              struct.setParent_tbl_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // FOREIGN_DB_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.foreign_db_name = iprot.readString();
+              struct.setForeign_db_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // FOREIGN_TBL_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.foreign_tbl_name = iprot.readString();
+              struct.setForeign_tbl_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // CAT_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.catName = iprot.readString();
+              struct.setCatNameIsSet(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, ForeignKeysRequest struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.parent_db_name != null) {
+        oprot.writeFieldBegin(PARENT_DB_NAME_FIELD_DESC);
+        oprot.writeString(struct.parent_db_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.parent_tbl_name != null) {
+        oprot.writeFieldBegin(PARENT_TBL_NAME_FIELD_DESC);
+        oprot.writeString(struct.parent_tbl_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.foreign_db_name != null) {
+        oprot.writeFieldBegin(FOREIGN_DB_NAME_FIELD_DESC);
+        oprot.writeString(struct.foreign_db_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.foreign_tbl_name != null) {
+        oprot.writeFieldBegin(FOREIGN_TBL_NAME_FIELD_DESC);
+        oprot.writeString(struct.foreign_tbl_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.catName != null) {
+        if (struct.isSetCatName()) {
+          oprot.writeFieldBegin(CAT_NAME_FIELD_DESC);
+          oprot.writeString(struct.catName);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ForeignKeysRequestTupleSchemeFactory implements SchemeFactory {
+    public ForeignKeysRequestTupleScheme getScheme() {
+      return new ForeignKeysRequestTupleScheme();
+    }
+  }
+
+  private static class ForeignKeysRequestTupleScheme extends TupleScheme<ForeignKeysRequest> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetParent_db_name()) {
+        optionals.set(0);
+      }
+      if (struct.isSetParent_tbl_name()) {
+        optionals.set(1);
+      }
+      if (struct.isSetForeign_db_name()) {
+        optionals.set(2);
+      }
+      if (struct.isSetForeign_tbl_name()) {
+        optionals.set(3);
+      }
+      if (struct.isSetCatName()) {
+        optionals.set(4);
+      }
+      oprot.writeBitSet(optionals, 5);
+      if (struct.isSetParent_db_name()) {
+        oprot.writeString(struct.parent_db_name);
+      }
+      if (struct.isSetParent_tbl_name()) {
+        oprot.writeString(struct.parent_tbl_name);
+      }
+      if (struct.isSetForeign_db_name()) {
+        oprot.writeString(struct.foreign_db_name);
+      }
+      if (struct.isSetForeign_tbl_name()) {
+        oprot.writeString(struct.foreign_tbl_name);
+      }
+      if (struct.isSetCatName()) {
+        oprot.writeString(struct.catName);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(5);
+      if (incoming.get(0)) {
+        struct.parent_db_name = iprot.readString();
+        struct.setParent_db_nameIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.parent_tbl_name = iprot.readString();
+        struct.setParent_tbl_nameIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.foreign_db_name = iprot.readString();
+        struct.setForeign_db_nameIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.foreign_tbl_name = iprot.readString();
+        struct.setForeign_tbl_nameIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.catName = iprot.readString();
+        struct.setCatNameIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
new file mode 100644
index 0000000..2890506
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
@@ -0,0 +1,443 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * 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.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 org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class ForeignKeysResponse implements org.apache.thrift.TBase<ForeignKeysResponse, ForeignKeysResponse._Fields>, java.io.Serializable, Cloneable, Comparable<ForeignKeysResponse> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysResponse");
+
+  private static final org.apache.thrift.protocol.TField FOREIGN_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeys", org.apache.thrift.protocol.TType.LIST, (short)1);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ForeignKeysResponseStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ForeignKeysResponseTupleSchemeFactory());
+  }
+
+  private List<SQLForeignKey> foreignKeys; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    FOREIGN_KEYS((short)1, "foreignKeys");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // FOREIGN_KEYS
+          return FOREIGN_KEYS;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // 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);
+    tmpMap.put(_Fields.FOREIGN_KEYS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeys", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLForeignKey.class))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysResponse.class, metaDataMap);
+  }
+
+  public ForeignKeysResponse() {
+  }
+
+  public ForeignKeysResponse(
+    List<SQLForeignKey> foreignKeys)
+  {
+    this();
+    this.foreignKeys = foreignKeys;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public ForeignKeysResponse(ForeignKeysResponse other) {
+    if (other.isSetForeignKeys()) {
+      List<SQLForeignKey> __this__foreignKeys = new ArrayList<SQLForeignKey>(other.foreignKeys.size());
+      for (SQLForeignKey other_element : other.foreignKeys) {
+        __this__foreignKeys.add(new SQLForeignKey(other_element));
+      }
+      this.foreignKeys = __this__foreignKeys;
+    }
+  }
+
+  public ForeignKeysResponse deepCopy() {
+    return new ForeignKeysResponse(this);
+  }
+
+  @Override
+  public void clear() {
+    this.foreignKeys = null;
+  }
+
+  public int getForeignKeysSize() {
+    return (this.foreignKeys == null) ? 0 : this.foreignKeys.size();
+  }
+
+  public java.util.Iterator<SQLForeignKey> getForeignKeysIterator() {
+    return (this.foreignKeys == null) ? null : this.foreignKeys.iterator();
+  }
+
+  public void addToForeignKeys(SQLForeignKey elem) {
+    if (this.foreignKeys == null) {
+      this.foreignKeys = new ArrayList<SQLForeignKey>();
+    }
+    this.foreignKeys.add(elem);
+  }
+
+  public List<SQLForeignKey> getForeignKeys() {
+    return this.foreignKeys;
+  }
+
+  public void setForeignKeys(List<SQLForeignKey> foreignKeys) {
+    this.foreignKeys = foreignKeys;
+  }
+
+  public void unsetForeignKeys() {
+    this.foreignKeys = null;
+  }
+
+  /** Returns true if field foreignKeys is set (has been assigned a value) and false otherwise */
+  public boolean isSetForeignKeys() {
+    return this.foreignKeys != null;
+  }
+
+  public void setForeignKeysIsSet(boolean value) {
+    if (!value) {
+      this.foreignKeys = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case FOREIGN_KEYS:
+      if (value == null) {
+        unsetForeignKeys();
+      } else {
+        setForeignKeys((List<SQLForeignKey>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case FOREIGN_KEYS:
+      return getForeignKeys();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case FOREIGN_KEYS:
+      return isSetForeignKeys();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof ForeignKeysResponse)
+      return this.equals((ForeignKeysResponse)that);
+    return false;
+  }
+
+  public boolean equals(ForeignKeysResponse that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_foreignKeys = true && this.isSetForeignKeys();
+    boolean that_present_foreignKeys = true && that.isSetForeignKeys();
+    if (this_present_foreignKeys || that_present_foreignKeys) {
+      if (!(this_present_foreignKeys && that_present_foreignKeys))
+        return false;
+      if (!this.foreignKeys.equals(that.foreignKeys))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_foreignKeys = true && (isSetForeignKeys());
+    list.add(present_foreignKeys);
+    if (present_foreignKeys)
+      list.add(foreignKeys);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(ForeignKeysResponse other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetForeignKeys()).compareTo(other.isSetForeignKeys());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetForeignKeys()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeys, other.foreignKeys);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("ForeignKeysResponse(");
+    boolean first = true;
+
+    sb.append("foreignKeys:");
+    if (this.foreignKeys == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.foreignKeys);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetForeignKeys()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'foreignKeys' is unset! Struct:" + toString());
+    }
+
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } 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 ForeignKeysResponseStandardSchemeFactory implements SchemeFactory {
+    public ForeignKeysResponseStandardScheme getScheme() {
+      return new ForeignKeysResponseStandardScheme();
+    }
+  }
+
+  private static class ForeignKeysResponseStandardScheme extends StandardScheme<ForeignKeysResponse> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysResponse 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: // FOREIGN_KEYS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list328 = iprot.readListBegin();
+                struct.foreignKeys = new ArrayList<SQLForeignKey>(_list328.size);
+                SQLForeignKey _elem329;
+                for (int _i330 = 0; _i330 < _list328.size; ++_i330)
+                {
+                  _elem329 = new SQLForeignKey();
+                  _elem329.read(iprot);
+                  struct.foreignKeys.add(_elem329);
+                }
+                iprot.readListEnd();
+              }
+              struct.setForeignKeysIsSet(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, ForeignKeysResponse struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.foreignKeys != null) {
+        oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size()));
+          for (SQLForeignKey _iter331 : struct.foreignKeys)
+          {
+            _iter331.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ForeignKeysResponseTupleSchemeFactory implements SchemeFactory {
+    public ForeignKeysResponseTupleScheme getScheme() {
+      return new ForeignKeysResponseTupleScheme();
+    }
+  }
+
+  private static class ForeignKeysResponseTupleScheme extends TupleScheme<ForeignKeysResponse> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      {
+        oprot.writeI32(struct.foreignKeys.size());
+        for (SQLForeignKey _iter332 : struct.foreignKeys)
+        {
+          _iter332.write(oprot);
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      {
+        org.apache.thrift.protocol.TList _list333 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.foreignKeys = new ArrayList<SQLForeignKey>(_list333.size);
+        SQLForeignKey _elem334;
+        for (int _i335 = 0; _i335 < _list333.size; ++_i335)
+        {
+          _elem334 = new SQLForeignKey();
+          _elem334.read(iprot);
+          struct.foreignKeys.add(_elem334);
+        }
+      }
+      struct.setForeignKeysIsSet(true);
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
new file mode 100644
index 0000000..a1c0de9
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
@@ -0,0 +1,1306 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * 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.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 org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class Function implements org.apache.thrift.TBase<Function, Function._Fields>, java.io.Serializable, Cloneable, Comparable<Function> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Function");
+
+  private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("className", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField OWNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerType", org.apache.thrift.protocol.TType.I32, (short)5);
+  private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I32, (short)6);
+  private static final org.apache.thrift.protocol.TField FUNCTION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("functionType", org.apache.thrift.protocol.TType.I32, (short)7);
+  private static final org.apache.thrift.protocol.TField RESOURCE_URIS_FIELD_DESC = new org.apache.thrift.protocol.TField("resourceUris", org.apache.thrift.protocol.TType.LIST, (short)8);
+  private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)9);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new FunctionStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new FunctionTupleSchemeFactory());
+  }
+
+  private String functionName; // required
+  private String dbName; // required
+  private String className; // required
+  private String ownerName; // required
+  private PrincipalType ownerType; // required
+  private int createTime; // required
+  private FunctionType functionType; // required
+  private List<ResourceUri> resourceUris; // required
+  private String catName; // optional
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    FUNCTION_NAME((short)1, "functionName"),
+    DB_NAME((short)2, "dbName"),
+    CLASS_NAME((short)3, "className"),
+    OWNER_NAME((short)4, "ownerName"),
+    /**
+     * 
+     * @see PrincipalType
+     */
+    OWNER_TYPE((short)5, "ownerType"),
+    CREATE_TIME((short)6, "createTime"),
+    /**
+     * 
+     * @see FunctionType
+     */
+    FUNCTION_TYPE((short)7, "functionType"),
+    RESOURCE_URIS((short)8, "resourceUris"),
+    CAT_NAME((short)9, "catName");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // FUNCTION_NAME
+          return FUNCTION_NAME;
+        case 2: // DB_NAME
+          return DB_NAME;
+        case 3: // CLASS_NAME
+          return CLASS_NAME;
+        case 4: // OWNER_NAME
+          return OWNER_NAME;
+        case 5: // OWNER_TYPE
+          return OWNER_TYPE;
+        case 6: // CREATE_TIME
+          return CREATE_TIME;
+        case 7: // FUNCTION_TYPE
+          return FUNCTION_TYPE;
+        case 8: // RESOURCE_URIS
+          return RESOURCE_URIS;
+        case 9: // CAT_NAME
+          return CAT_NAME;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __CREATETIME_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  private static final _Fields optionals[] = {_Fields.CAT_NAME};
+  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);
+    tmpMap.put(_Fields.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("className", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.OWNER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("ownerType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class)));
+    tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.FUNCTION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("functionType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FunctionType.class)));
+    tmpMap.put(_Fields.RESOURCE_URIS, new org.apache.thrift.meta_data.FieldMetaData("resourceUris", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ResourceUri.class))));
+    tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Function.class, metaDataMap);
+  }
+
+  public Function() {
+  }
+
+  public Function(
+    String functionName,
+    String dbName,
+    String className,
+    String ownerName,
+    PrincipalType ownerType,
+    int createTime,
+    FunctionType functionType,
+    List<ResourceUri> resourceUris)
+  {
+    this();
+    this.functionName = functionName;
+    this.dbName = dbName;
+    this.className = className;
+    this.ownerName = ownerName;
+    this.ownerType = ownerType;
+    this.createTime = createTime;
+    setCreateTimeIsSet(true);
+    this.functionType = functionType;
+    this.resourceUris = resourceUris;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Function(Function other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetFunctionName()) {
+      this.functionName = other.functionName;
+    }
+    if (other.isSetDbName()) {
+      this.dbName = other.dbName;
+    }
+    if (other.isSetClassName()) {
+      this.className = other.className;
+    }
+    if (other.isSetOwnerName()) {
+      this.ownerName = other.ownerName;
+    }
+    if (other.isSetOwnerType()) {
+      this.ownerType = other.ownerType;
+    }
+    this.createTime = other.createTime;
+    if (other.isSetFunctionType()) {
+      this.functionType = other.functionType;
+    }
+    if (other.isSetResourceUris()) {
+      List<ResourceUri> __this__resourceUris = new ArrayList<ResourceUri>(other.resourceUris.size());
+      for (ResourceUri other_element : other.resourceUris) {
+        __this__resourceUris.add(new ResourceUri(other_element));
+      }
+      this.resourceUris = __this__resourceUris;
+    }
+    if (other.isSetCatName()) {
+      this.catName = other.catName;
+    }
+  }
+
+  public Function deepCopy() {
+    return new Function(this);
+  }
+
+  @Override
+  public void clear() {
+    this.functionName = null;
+    this.dbName = null;
+    this.className = null;
+    this.ownerName = null;
+    this.ownerType = null;
+    setCreateTimeIsSet(false);
+    this.createTime = 0;
+    this.functionType = null;
+    this.resourceUris = null;
+    this.catName = null;
+  }
+
+  public String getFunctionName() {
+    return this.functionName;
+  }
+
+  public void setFunctionName(String functionName) {
+    this.functionName = functionName;
+  }
+
+  public void unsetFunctionName() {
+    this.functionName = null;
+  }
+
+  /** Returns true if field functionName is set (has been assigned a value) and false otherwise */
+  public boolean isSetFunctionName() {
+    return this.functionName != null;
+  }
+
+  public void setFunctionNameIsSet(boolean value) {
+    if (!value) {
+      this.functionName = null;
+    }
+  }
+
+  public String getDbName() {
+    return this.dbName;
+  }
+
+  public void setDbName(String dbName) {
+    this.dbName = dbName;
+  }
+
+  public void unsetDbName() {
+    this.dbName = null;
+  }
+
+  /** Returns true if field dbName is set (has been assigned a value) and false otherwise */
+  public boolean isSetDbName() {
+    return this.dbName != null;
+  }
+
+  public void setDbNameIsSet(boolean value) {
+    if (!value) {
+      this.dbName = null;
+    }
+  }
+
+  public String getClassName() {
+    return this.className;
+  }
+
+  public void setClassName(String className) {
+    this.className = className;
+  }
+
+  public void unsetClassName() {
+    this.className = null;
+  }
+
+  /** Returns true if field className is set (has been assigned a value) and false otherwise */
+  public boolean isSetClassName() {
+    return this.className != null;
+  }
+
+  public void setClassNameIsSet(boolean value) {
+    if (!value) {
+      this.className = null;
+    }
+  }
+
+  public String getOwnerName() {
+    return this.ownerName;
+  }
+
+  public void setOwnerName(String ownerName) {
+    this.ownerName = ownerName;
+  }
+
+  public void unsetOwnerName() {
+    this.ownerName = null;
+  }
+
+  /** Returns true if field ownerName is set (has been assigned a value) and false otherwise */
+  public boolean isSetOwnerName() {
+    return this.ownerName != null;
+  }
+
+  public void setOwnerNameIsSet(boolean value) {
+    if (!value) {
+      this.ownerName = null;
+    }
+  }
+
+  /**
+   * 
+   * @see PrincipalType
+   */
+  public PrincipalType getOwnerType() {
+    return this.ownerType;
+  }
+
+  /**
+   * 
+   * @see PrincipalType
+   */
+  public void setOwnerType(PrincipalType ownerType) {
+    this.ownerType = ownerType;
+  }
+
+  public void unsetOwnerType() {
+    this.ownerType = null;
+  }
+
+  /** Returns true if field ownerType is set (has been assigned a value) and false otherwise */
+  public boolean isSetOwnerType() {
+    return this.ownerType != null;
+  }
+
+  public void setOwnerTypeIsSet(boolean value) {
+    if (!value) {
+      this.ownerType = null;
+    }
+  }
+
+  public int getCreateTime() {
+    return this.createTime;
+  }
+
+  public void setCreateTime(int createTime) {
+    this.createTime = createTime;
+    setCreateTimeIsSet(true);
+  }
+
+  public void unsetCreateTime() {
+    __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+  }
+
+  public void setCreateTimeIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+  }
+
+  /**
+   * 
+   * @see FunctionType
+   */
+  public FunctionType getFunctionType() {
+    return this.functionType;
+  }
+
+  /**
+   * 
+   * @see FunctionType
+   */
+  public void setFunctionType(FunctionType functionType) {
+    this.functionType = functionType;
+  }
+
+  public void unsetFunctionType() {
+    this.functionType = null;
+  }
+
+  /** Returns true if field functionType is set (has been assigned a value) and false otherwise */
+  public boolean isSetFunctionType() {
+    return this.functionType != null;
+  }
+
+  public void setFunctionTypeIsSet(boolean value) {
+    if (!value) {
+      this.functionType = null;
+    }
+  }
+
+  public int getResourceUrisSize() {
+    return (this.resourceUris == null) ? 0 : this.resourceUris.size();
+  }
+
+  public java.util.Iterator<ResourceUri> getResourceUrisIterator() {
+    return (this.resourceUris == null) ? null : this.resourceUris.iterator();
+  }
+
+  public void addToResourceUris(ResourceUri elem) {
+    if (this.resourceUris == null) {
+      this.resourceUris = new ArrayList<ResourceUri>();
+    }
+    this.resourceUris.add(elem);
+  }
+
+  public List<ResourceUri> getResourceUris() {
+    return this.resourceUris;
+  }
+
+  public void setResourceUris(List<ResourceUri> resourceUris) {
+    this.resourceUris = resourceUris;
+  }
+
+  public void unsetResourceUris() {
+    this.resourceUris = null;
+  }
+
+  /** Returns true if field resourceUris is set (has been assigned a value) and false otherwise */
+  public boolean isSetResourceUris() {
+    return this.resourceUris != null;
+  }
+
+  public void setResourceUrisIsSet(boolean value) {
+    if (!value) {
+      this.resourceUris = null;
+    }
+  }
+
+  public String getCatName() {
+    return this.catName;
+  }
+
+  public void setCatName(String catName) {
+    this.catName = catName;
+  }
+
+  public void unsetCatName() {
+    this.catName = null;
+  }
+
+  /** Returns true if field catName is set (has been assigned a value) and false otherwise */
+  public boolean isSetCatName() {
+    return this.catName != null;
+  }
+
+  public void setCatNameIsSet(boolean value) {
+    if (!value) {
+      this.catName = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case FUNCTION_NAME:
+      if (value == null) {
+        unsetFunctionName();
+      } else {
+        setFunctionName((String)value);
+      }
+      break;
+
+    case DB_NAME:
+      if (value == null) {
+        unsetDbName();
+      } else {
+        setDbName((String)value);
+      }
+      break;
+
+    case CLASS_NAME:
+      if (value == null) {
+        unsetClassName();
+      } else {
+        setClassName((String)value);
+      }
+      break;
+
+    case OWNER_NAME:
+      if (value == null) {
+        unsetOwnerName();
+      } else {
+        setOwnerName((String)value);
+      }
+      break;
+
+    case OWNER_TYPE:
+      if (value == null) {
+        unsetOwnerType();
+      } else {
+        setOwnerType((PrincipalType)value);
+      }
+      break;
+
+    case CREATE_TIME:
+      if (value == null) {
+        unsetCreateTime();
+      } else {
+        setCreateTime((Integer)value);
+      }
+      break;
+
+    case FUNCTION_TYPE:
+      if (value == null) {
+        unsetFunctionType();
+      } else {
+        setFunctionType((FunctionType)value);
+      }
+      break;
+
+    case RESOURCE_URIS:
+      if (value == null) {
+        unsetResourceUris();
+      } else {
+        setResourceUris((List<ResourceUri>)value);
+      }
+      break;
+
+    case CAT_NAME:
+      if (value == null) {
+        unsetCatName();
+      } else {
+        setCatName((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case FUNCTION_NAME:
+      return getFunctionName();
+
+    case DB_NAME:
+      return getDbName();
+
+    case CLASS_NAME:
+      return getClassName();
+
+    case OWNER_NAME:
+      return getOwnerName();
+
+    case OWNER_TYPE:
+      return getOwnerType();
+
+    case CREATE_TIME:
+      return getCreateTime();
+
+    case FUNCTION_TYPE:
+      return getFunctionType();
+
+    case RESOURCE_URIS:
+      return getResourceUris();
+
+    case CAT_NAME:
+      return getCatName();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case FUNCTION_NAME:
+      return isSetFunctionName();
+    case DB_NAME:
+      return isSetDbName();
+    case CLASS_NAME:
+      return isSetClassName();
+    case OWNER_NAME:
+      return isSetOwnerName();
+    case OWNER_TYPE:
+      return isSetOwnerType();
+    case CREATE_TIME:
+      return isSetCreateTime();
+    case FUNCTION_TYPE:
+      return isSetFunctionType();
+    case RESOURCE_URIS:
+      return isSetResourceUris();
+    case CAT_NAME:
+      return isSetCatName();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Function)
+      return this.equals((Function)that);
+    return false;
+  }
+
+  public boolean equals(Function that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_functionName = true && this.isSetFunctionName();
+    boolean that_present_functionName = true && that.isSetFunctionName();
+    if (this_present_functionName || that_present_functionName) {
+      if (!(this_present_functionName && that_present_functionName))
+        return false;
+      if (!this.functionName.equals(that.functionName))
+        return false;
+    }
+
+    boolean this_present_dbName = true && this.isSetDbName();
+    boolean that_present_dbName = true && that.isSetDbName();
+    if (this_present_dbName || that_present_dbName) {
+      if (!(this_present_dbName && that_present_dbName))
+        return false;
+      if (!this.dbName.equals(that.dbName))
+        return false;
+    }
+
+    boolean this_present_className = true && this.isSetClassName();
+    boolean that_present_className = true && that.isSetClassName();
+    if (this_present_className || that_present_className) {
+      if (!(this_present_className && that_present_className))
+        return false;
+      if (!this.className.equals(that.className))
+        return false;
+    }
+
+    boolean this_present_ownerName = true && this.isSetOwnerName();
+    boolean that_present_ownerName = true && that.isSetOwnerName();
+    if (this_present_ownerName || that_present_ownerName) {
+      if (!(this_present_ownerName && that_present_ownerName))
+        return false;
+      if (!this.ownerName.equals(that.ownerName))
+        return false;
+    }
+
+    boolean this_present_ownerType = true && this.isSetOwnerType();
+    boolean that_present_ownerType = true && that.isSetOwnerType();
+    if (this_present_ownerType || that_present_ownerType) {
+      if (!(this_present_ownerType && that_present_ownerType))
+        return false;
+      if (!this.ownerType.equals(that.ownerType))
+        return false;
+    }
+
+    boolean this_present_createTime = true;
+    boolean that_present_createTime = true;
+    if (this_present_createTime || that_present_createTime) {
+      if (!(this_present_createTime && that_present_createTime))
+        return false;
+      if (this.createTime != that.createTime)
+        return false;
+    }
+
+    boolean this_present_functionType = true && this.isSetFunctionType();
+    boolean that_present_functionType = true && that.isSetFunctionType();
+    if (this_present_functionType || that_present_functionType) {
+      if (!(this_present_functionType && that_present_functionType))
+        return false;
+      if (!this.functionType.equals(that.functionType))
+        return false;
+    }
+
+    boolean this_present_resourceUris = true && this.isSetResourceUris();
+    boolean that_present_resourceUris = true && that.isSetResourceUris();
+    if (this_present_resourceUris || that_present_resourceUris) {
+      if (!(this_present_resourceUris && that_present_resourceUris))
+        return false;
+      if (!this.resourceUris.equals(that.resourceUris))
+        return false;
+    }
+
+    boolean this_present_catName = true && this.isSetCatName();
+    boolean that_present_catName = true && that.isSetCatName();
+    if (this_present_catName || that_present_catName) {
+      if (!(this_present_catName && that_present_catName))
+        return false;
+      if (!this.catName.equals(that.catName))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_functionName = true && (isSetFunctionName());
+    list.add(present_functionName);
+    if (present_functionName)
+      list.add(functionName);
+
+    boolean present_dbName = true && (isSetDbName());
+    list.add(present_dbName);
+    if (present_dbName)
+      list.add(dbName);
+
+    boolean present_className = true && (isSetClassName());
+    list.add(present_className);
+    if (present_className)
+      list.add(className);
+
+    boolean present_ownerName = true && (isSetOwnerName());
+    list.add(present_ownerName);
+    if (present_ownerName)
+      list.add(ownerName);
+
+    boolean present_ownerType = true && (isSetOwnerType());
+    list.add(present_ownerType);
+    if (present_ownerType)
+      list.add(ownerType.getValue());
+
+    boolean present_createTime = true;
+    list.add(present_createTime);
+    if (present_createTime)
+      list.add(createTime);
+
+    boolean present_functionType = true && (isSetFunctionType());
+    list.add(present_functionType);
+    if (present_functionType)
+      list.add(functionType.getValue());
+
+    boolean present_resourceUris = true && (isSetResourceUris());
+    list.add(present_resourceUris);
+    if (present_resourceUris)
+      list.add(resourceUris);
+
+    boolean present_catName = true && (isSetCatName());
+    list.add(present_catName);
+    if (present_catName)
+      list.add(catName);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(Function other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(other.isSetFunctionName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFunctionName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, other.functionName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDbName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetClassName()).compareTo(other.isSetClassName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetClassName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.className, other.className);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(other.isSetOwnerName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOwnerName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, other.ownerName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOwnerType()).compareTo(other.isSetOwnerType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOwnerType()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerType, other.ownerType);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCreateTime()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetFunctionType()).compareTo(other.isSetFunctionType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetFunctionType()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionType, other.functionType);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetResourceUris()).compareTo(other.isSetResourceUris());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetResourceUris()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resourceUris, other.resourceUris);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCatName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Function(");
+    boolean first = true;
+
+    sb.append("functionName:");
+    if (this.functionName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.functionName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("dbName:");
+    if (this.dbName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.dbName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("className:");
+    if (this.className == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.className);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("ownerName:");
+    if (this.ownerName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.ownerName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("ownerType:");
+    if (this.ownerType == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.ownerType);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("createTime:");
+    sb.append(this.createTime);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("functionType:");
+    if (this.functionType == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.functionType);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("resourceUris:");
+    if (this.resourceUris == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.resourceUris);
+    }
+    first = false;
+    if (isSetCatName()) {
+      if (!first) sb.append(", ");
+      sb.append("catName:");
+      if (this.catName == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.catName);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  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 {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } 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 {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __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 FunctionStandardSchemeFactory implements SchemeFactory {
+    public FunctionStandardScheme getScheme() {
+      return new FunctionStandardScheme();
+    }
+  }
+
+  private static class FunctionStandardScheme extends StandardScheme<Function> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, Function 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: // FUNCTION_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.functionName = iprot.readString();
+              struct.setFunctionNameIsSet(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: // CLASS_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.className = iprot.readString();
+              struct.setClassNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // OWNER_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.ownerName = iprot.readString();
+              struct.setOwnerNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // OWNER_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32());
+              struct.setOwnerTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // 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 7: // FUNCTION_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.functionType = org.apache.hadoop.hive.metastore.api.FunctionType.findByValue(iprot.readI32());
+              struct.setFunctionTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // RESOURCE_URIS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list546 = iprot.readListBegin();
+                struct.resourceUris = new ArrayList<ResourceUri>(_list546.size);
+                ResourceUri _elem547;
+                for (int _i548 = 0; _i548 < _list546.size; ++_i548)
+                {
+                  _elem547 = new ResourceUri();
+                  _elem547.read(iprot);
+                  struct.resourceUris.add(_elem547);
+                }
+                iprot.readListEnd();
+              }
+              struct.setResourceUrisIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 9: // CAT_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.catName = iprot.readString();
+              struct.setCatNameIsSet(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, Function struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.functionName != null) {
+        oprot.writeFieldBegin(FUNCTION_NAME_FIELD_DESC);
+        oprot.writeString(struct.functionName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.dbName != null) {
+        oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+        oprot.writeString(struct.dbName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.className != null) {
+        oprot.writeFieldBegin(CLASS_NAME_FIELD_DESC);
+        oprot.writeString(struct.className);
+        oprot.writeFieldEnd();
+      }
+      if (struct.ownerName != null) {
+        oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC);
+        oprot.writeString(struct.ownerName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.ownerType != null) {
+        oprot.writeFieldBegin(OWNER_TYPE_FIELD_DESC);
+        oprot.writeI32(struct.ownerType.getValue());
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+      oprot.writeI32(struct.createTime);
+      oprot.writeFieldEnd();
+      if (struct.functionType != null) {
+        oprot.writeFieldBegin(FUNCTION_TYPE_FIELD_DESC);
+        oprot.writeI32(struct.functionType.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.resourceUris != null) {
+        oprot.writeFieldBegin(RESOURCE_URIS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.resourceUris.size()));
+          for (ResourceUri _iter549 : struct.resourceUris)
+          {
+            _iter549.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.catName != null) {
+        if (struct.isSetCatName()) {
+          oprot.writeFieldBegin(CAT_NAME_FIELD_DESC);
+          oprot.writeString(struct.catName);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class FunctionTupleSchemeFactory implements SchemeFactory {
+    public FunctionTupleScheme getScheme() {
+      return new FunctionTupleScheme();
+    }
+  }
+
+  private static class FunctionTupleScheme extends TupleScheme<Function> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetFunctionName()) {
+        optionals.set(0);
+      }
+      if (struct.isSetDbName()) {
+        optionals.set(1);
+      }
+      if (struct.isSetClassName()) {
+        optionals.set(2);
+      }
+      if (struct.isSetOwnerName()) {
+        optionals.set(3);
+      }
+      if (struct.isSetOwnerType()) {
+        optionals.set(4);
+      }
+      if (struct.isSetCreateTime()) {
+        optionals.set(5);
+      }
+      if (struct.isSetFunctionType()) {
+        optionals.set(6);
+      }
+      if (struct.isSetResourceUris()) {
+        optionals.set(7);
+      }
+      if (struct.isSetCatName()) {
+        optionals.set(8);
+      }
+      oprot.writeBitSet(optionals, 9);
+      if (struct.isSetFunctionName()) {
+        oprot.writeString(struct.functionName);
+      }
+      if (struct.isSetDbName()) {
+        oprot.writeString(struct.dbName);
+      }
+      if (struct.isSetClassName()) {
+        oprot.writeString(struct.className);
+      }
+      if (struct.isSetOwnerName()) {
+        oprot.writeString(struct.ownerName);
+      }
+      if (struct.isSetOwnerType()) {
+        oprot.writeI32(struct.ownerType.getValue());
+      }
+      if (struct.isSetCreateTime()) {
+        oprot.writeI32(struct.createTime);
+      }
+      if (struct.isSetFunctionType()) {
+        oprot.writeI32(struct.functionType.getValue());
+      }
+      if (struct.isSetResourceUris()) {
+        {
+          oprot.writeI32(struct.resourceUris.size());
+          for (ResourceUri _iter550 : struct.resourceUris)
+          {
+            _iter550.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetCatName()) {
+        oprot.writeString(struct.catName);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(9);
+      if (incoming.get(0)) {
+        struct.functionName = iprot.readString();
+        struct.setFunctionNameIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.dbName = iprot.readString();
+        struct.setDbNameIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.className = iprot.readString();
+        struct.setClassNameIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.ownerName = iprot.readString();
+        struct.setOwnerNameIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32());
+        struct.setOwnerTypeIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.createTime = iprot.readI32();
+        struct.setCreateTimeIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.functionType = org.apache.hadoop.hive.metastore.api.FunctionType.findByValue(iprot.readI32());
+        struct.setFunctionTypeIsSet(true);
+      }
+      if (incoming.get(7)) {
+        {
+          org.apache.thrift.protocol.TList _list551 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.resourceUris = new ArrayList<ResourceUri>(_list551.size);
+          ResourceUri _elem552;
+          for (int _i553 = 0; _i553 < _list551.size; ++_i553)
+          {
+            _elem552 = new ResourceUri();
+            _elem552.read(iprot);
+            struct.resourceUris.add(_elem552);
+          }
+        }
+        struct.setResourceUrisIsSet(true);
+      }
+      if (incoming.get(8)) {
+        struct.catName = iprot.readString();
+        struct.setCatNameIsSet(true);
+      }
+    }
+  }
+
+}
+