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

[25/91] [abbrv] [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/GetOpenTxnsResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java
new file mode 100644
index 0000000..9688297
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java
@@ -0,0 +1,750 @@
+/**
+ * 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 GetOpenTxnsResponse implements org.apache.thrift.TBase<GetOpenTxnsResponse, GetOpenTxnsResponse._Fields>, java.io.Serializable, Cloneable, Comparable<GetOpenTxnsResponse> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOpenTxnsResponse");
+
+  private static final org.apache.thrift.protocol.TField TXN_HIGH_WATER_MARK_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_high_water_mark", org.apache.thrift.protocol.TType.I64, (short)1);
+  private static final org.apache.thrift.protocol.TField OPEN_TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("open_txns", org.apache.thrift.protocol.TType.LIST, (short)2);
+  private static final org.apache.thrift.protocol.TField MIN_OPEN_TXN_FIELD_DESC = new org.apache.thrift.protocol.TField("min_open_txn", org.apache.thrift.protocol.TType.I64, (short)3);
+  private static final org.apache.thrift.protocol.TField ABORTED_BITS_FIELD_DESC = new org.apache.thrift.protocol.TField("abortedBits", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new GetOpenTxnsResponseStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new GetOpenTxnsResponseTupleSchemeFactory());
+  }
+
+  private long txn_high_water_mark; // required
+  private List<Long> open_txns; // required
+  private long min_open_txn; // optional
+  private ByteBuffer abortedBits; // 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 {
+    TXN_HIGH_WATER_MARK((short)1, "txn_high_water_mark"),
+    OPEN_TXNS((short)2, "open_txns"),
+    MIN_OPEN_TXN((short)3, "min_open_txn"),
+    ABORTED_BITS((short)4, "abortedBits");
+
+    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: // TXN_HIGH_WATER_MARK
+          return TXN_HIGH_WATER_MARK;
+        case 2: // OPEN_TXNS
+          return OPEN_TXNS;
+        case 3: // MIN_OPEN_TXN
+          return MIN_OPEN_TXN;
+        case 4: // ABORTED_BITS
+          return ABORTED_BITS;
+        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 __TXN_HIGH_WATER_MARK_ISSET_ID = 0;
+  private static final int __MIN_OPEN_TXN_ISSET_ID = 1;
+  private byte __isset_bitfield = 0;
+  private static final _Fields optionals[] = {_Fields.MIN_OPEN_TXN};
+  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.TXN_HIGH_WATER_MARK, new org.apache.thrift.meta_data.FieldMetaData("txn_high_water_mark", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.OPEN_TXNS, new org.apache.thrift.meta_data.FieldMetaData("open_txns", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
+    tmpMap.put(_Fields.MIN_OPEN_TXN, new org.apache.thrift.meta_data.FieldMetaData("min_open_txn", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.ABORTED_BITS, new org.apache.thrift.meta_data.FieldMetaData("abortedBits", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetOpenTxnsResponse.class, metaDataMap);
+  }
+
+  public GetOpenTxnsResponse() {
+  }
+
+  public GetOpenTxnsResponse(
+    long txn_high_water_mark,
+    List<Long> open_txns,
+    ByteBuffer abortedBits)
+  {
+    this();
+    this.txn_high_water_mark = txn_high_water_mark;
+    setTxn_high_water_markIsSet(true);
+    this.open_txns = open_txns;
+    this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public GetOpenTxnsResponse(GetOpenTxnsResponse other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.txn_high_water_mark = other.txn_high_water_mark;
+    if (other.isSetOpen_txns()) {
+      List<Long> __this__open_txns = new ArrayList<Long>(other.open_txns);
+      this.open_txns = __this__open_txns;
+    }
+    this.min_open_txn = other.min_open_txn;
+    if (other.isSetAbortedBits()) {
+      this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(other.abortedBits);
+    }
+  }
+
+  public GetOpenTxnsResponse deepCopy() {
+    return new GetOpenTxnsResponse(this);
+  }
+
+  @Override
+  public void clear() {
+    setTxn_high_water_markIsSet(false);
+    this.txn_high_water_mark = 0;
+    this.open_txns = null;
+    setMin_open_txnIsSet(false);
+    this.min_open_txn = 0;
+    this.abortedBits = null;
+  }
+
+  public long getTxn_high_water_mark() {
+    return this.txn_high_water_mark;
+  }
+
+  public void setTxn_high_water_mark(long txn_high_water_mark) {
+    this.txn_high_water_mark = txn_high_water_mark;
+    setTxn_high_water_markIsSet(true);
+  }
+
+  public void unsetTxn_high_water_mark() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID);
+  }
+
+  /** Returns true if field txn_high_water_mark is set (has been assigned a value) and false otherwise */
+  public boolean isSetTxn_high_water_mark() {
+    return EncodingUtils.testBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID);
+  }
+
+  public void setTxn_high_water_markIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXN_HIGH_WATER_MARK_ISSET_ID, value);
+  }
+
+  public int getOpen_txnsSize() {
+    return (this.open_txns == null) ? 0 : this.open_txns.size();
+  }
+
+  public java.util.Iterator<Long> getOpen_txnsIterator() {
+    return (this.open_txns == null) ? null : this.open_txns.iterator();
+  }
+
+  public void addToOpen_txns(long elem) {
+    if (this.open_txns == null) {
+      this.open_txns = new ArrayList<Long>();
+    }
+    this.open_txns.add(elem);
+  }
+
+  public List<Long> getOpen_txns() {
+    return this.open_txns;
+  }
+
+  public void setOpen_txns(List<Long> open_txns) {
+    this.open_txns = open_txns;
+  }
+
+  public void unsetOpen_txns() {
+    this.open_txns = null;
+  }
+
+  /** Returns true if field open_txns is set (has been assigned a value) and false otherwise */
+  public boolean isSetOpen_txns() {
+    return this.open_txns != null;
+  }
+
+  public void setOpen_txnsIsSet(boolean value) {
+    if (!value) {
+      this.open_txns = null;
+    }
+  }
+
+  public long getMin_open_txn() {
+    return this.min_open_txn;
+  }
+
+  public void setMin_open_txn(long min_open_txn) {
+    this.min_open_txn = min_open_txn;
+    setMin_open_txnIsSet(true);
+  }
+
+  public void unsetMin_open_txn() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MIN_OPEN_TXN_ISSET_ID);
+  }
+
+  /** Returns true if field min_open_txn is set (has been assigned a value) and false otherwise */
+  public boolean isSetMin_open_txn() {
+    return EncodingUtils.testBit(__isset_bitfield, __MIN_OPEN_TXN_ISSET_ID);
+  }
+
+  public void setMin_open_txnIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MIN_OPEN_TXN_ISSET_ID, value);
+  }
+
+  public byte[] getAbortedBits() {
+    setAbortedBits(org.apache.thrift.TBaseHelper.rightSize(abortedBits));
+    return abortedBits == null ? null : abortedBits.array();
+  }
+
+  public ByteBuffer bufferForAbortedBits() {
+    return org.apache.thrift.TBaseHelper.copyBinary(abortedBits);
+  }
+
+  public void setAbortedBits(byte[] abortedBits) {
+    this.abortedBits = abortedBits == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(abortedBits, abortedBits.length));
+  }
+
+  public void setAbortedBits(ByteBuffer abortedBits) {
+    this.abortedBits = org.apache.thrift.TBaseHelper.copyBinary(abortedBits);
+  }
+
+  public void unsetAbortedBits() {
+    this.abortedBits = null;
+  }
+
+  /** Returns true if field abortedBits is set (has been assigned a value) and false otherwise */
+  public boolean isSetAbortedBits() {
+    return this.abortedBits != null;
+  }
+
+  public void setAbortedBitsIsSet(boolean value) {
+    if (!value) {
+      this.abortedBits = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case TXN_HIGH_WATER_MARK:
+      if (value == null) {
+        unsetTxn_high_water_mark();
+      } else {
+        setTxn_high_water_mark((Long)value);
+      }
+      break;
+
+    case OPEN_TXNS:
+      if (value == null) {
+        unsetOpen_txns();
+      } else {
+        setOpen_txns((List<Long>)value);
+      }
+      break;
+
+    case MIN_OPEN_TXN:
+      if (value == null) {
+        unsetMin_open_txn();
+      } else {
+        setMin_open_txn((Long)value);
+      }
+      break;
+
+    case ABORTED_BITS:
+      if (value == null) {
+        unsetAbortedBits();
+      } else {
+        setAbortedBits((ByteBuffer)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case TXN_HIGH_WATER_MARK:
+      return getTxn_high_water_mark();
+
+    case OPEN_TXNS:
+      return getOpen_txns();
+
+    case MIN_OPEN_TXN:
+      return getMin_open_txn();
+
+    case ABORTED_BITS:
+      return getAbortedBits();
+
+    }
+    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 TXN_HIGH_WATER_MARK:
+      return isSetTxn_high_water_mark();
+    case OPEN_TXNS:
+      return isSetOpen_txns();
+    case MIN_OPEN_TXN:
+      return isSetMin_open_txn();
+    case ABORTED_BITS:
+      return isSetAbortedBits();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof GetOpenTxnsResponse)
+      return this.equals((GetOpenTxnsResponse)that);
+    return false;
+  }
+
+  public boolean equals(GetOpenTxnsResponse that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_txn_high_water_mark = true;
+    boolean that_present_txn_high_water_mark = true;
+    if (this_present_txn_high_water_mark || that_present_txn_high_water_mark) {
+      if (!(this_present_txn_high_water_mark && that_present_txn_high_water_mark))
+        return false;
+      if (this.txn_high_water_mark != that.txn_high_water_mark)
+        return false;
+    }
+
+    boolean this_present_open_txns = true && this.isSetOpen_txns();
+    boolean that_present_open_txns = true && that.isSetOpen_txns();
+    if (this_present_open_txns || that_present_open_txns) {
+      if (!(this_present_open_txns && that_present_open_txns))
+        return false;
+      if (!this.open_txns.equals(that.open_txns))
+        return false;
+    }
+
+    boolean this_present_min_open_txn = true && this.isSetMin_open_txn();
+    boolean that_present_min_open_txn = true && that.isSetMin_open_txn();
+    if (this_present_min_open_txn || that_present_min_open_txn) {
+      if (!(this_present_min_open_txn && that_present_min_open_txn))
+        return false;
+      if (this.min_open_txn != that.min_open_txn)
+        return false;
+    }
+
+    boolean this_present_abortedBits = true && this.isSetAbortedBits();
+    boolean that_present_abortedBits = true && that.isSetAbortedBits();
+    if (this_present_abortedBits || that_present_abortedBits) {
+      if (!(this_present_abortedBits && that_present_abortedBits))
+        return false;
+      if (!this.abortedBits.equals(that.abortedBits))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_txn_high_water_mark = true;
+    list.add(present_txn_high_water_mark);
+    if (present_txn_high_water_mark)
+      list.add(txn_high_water_mark);
+
+    boolean present_open_txns = true && (isSetOpen_txns());
+    list.add(present_open_txns);
+    if (present_open_txns)
+      list.add(open_txns);
+
+    boolean present_min_open_txn = true && (isSetMin_open_txn());
+    list.add(present_min_open_txn);
+    if (present_min_open_txn)
+      list.add(min_open_txn);
+
+    boolean present_abortedBits = true && (isSetAbortedBits());
+    list.add(present_abortedBits);
+    if (present_abortedBits)
+      list.add(abortedBits);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(GetOpenTxnsResponse other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetTxn_high_water_mark()).compareTo(other.isSetTxn_high_water_mark());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTxn_high_water_mark()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_high_water_mark, other.txn_high_water_mark);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOpen_txns()).compareTo(other.isSetOpen_txns());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOpen_txns()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.open_txns, other.open_txns);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetMin_open_txn()).compareTo(other.isSetMin_open_txn());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetMin_open_txn()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min_open_txn, other.min_open_txn);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetAbortedBits()).compareTo(other.isSetAbortedBits());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAbortedBits()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.abortedBits, other.abortedBits);
+      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("GetOpenTxnsResponse(");
+    boolean first = true;
+
+    sb.append("txn_high_water_mark:");
+    sb.append(this.txn_high_water_mark);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("open_txns:");
+    if (this.open_txns == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.open_txns);
+    }
+    first = false;
+    if (isSetMin_open_txn()) {
+      if (!first) sb.append(", ");
+      sb.append("min_open_txn:");
+      sb.append(this.min_open_txn);
+      first = false;
+    }
+    if (!first) sb.append(", ");
+    sb.append("abortedBits:");
+    if (this.abortedBits == null) {
+      sb.append("null");
+    } else {
+      org.apache.thrift.TBaseHelper.toString(this.abortedBits, sb);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetTxn_high_water_mark()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'txn_high_water_mark' is unset! Struct:" + toString());
+    }
+
+    if (!isSetOpen_txns()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'open_txns' is unset! Struct:" + toString());
+    }
+
+    if (!isSetAbortedBits()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'abortedBits' 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 {
+      // 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 GetOpenTxnsResponseStandardSchemeFactory implements SchemeFactory {
+    public GetOpenTxnsResponseStandardScheme getScheme() {
+      return new GetOpenTxnsResponseStandardScheme();
+    }
+  }
+
+  private static class GetOpenTxnsResponseStandardScheme extends StandardScheme<GetOpenTxnsResponse> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, GetOpenTxnsResponse 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: // TXN_HIGH_WATER_MARK
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.txn_high_water_mark = iprot.readI64();
+              struct.setTxn_high_water_markIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // OPEN_TXNS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list562 = iprot.readListBegin();
+                struct.open_txns = new ArrayList<Long>(_list562.size);
+                long _elem563;
+                for (int _i564 = 0; _i564 < _list562.size; ++_i564)
+                {
+                  _elem563 = iprot.readI64();
+                  struct.open_txns.add(_elem563);
+                }
+                iprot.readListEnd();
+              }
+              struct.setOpen_txnsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // MIN_OPEN_TXN
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.min_open_txn = iprot.readI64();
+              struct.setMin_open_txnIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // ABORTED_BITS
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.abortedBits = iprot.readBinary();
+              struct.setAbortedBitsIsSet(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, GetOpenTxnsResponse struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(TXN_HIGH_WATER_MARK_FIELD_DESC);
+      oprot.writeI64(struct.txn_high_water_mark);
+      oprot.writeFieldEnd();
+      if (struct.open_txns != null) {
+        oprot.writeFieldBegin(OPEN_TXNS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.open_txns.size()));
+          for (long _iter565 : struct.open_txns)
+          {
+            oprot.writeI64(_iter565);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetMin_open_txn()) {
+        oprot.writeFieldBegin(MIN_OPEN_TXN_FIELD_DESC);
+        oprot.writeI64(struct.min_open_txn);
+        oprot.writeFieldEnd();
+      }
+      if (struct.abortedBits != null) {
+        oprot.writeFieldBegin(ABORTED_BITS_FIELD_DESC);
+        oprot.writeBinary(struct.abortedBits);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class GetOpenTxnsResponseTupleSchemeFactory implements SchemeFactory {
+    public GetOpenTxnsResponseTupleScheme getScheme() {
+      return new GetOpenTxnsResponseTupleScheme();
+    }
+  }
+
+  private static class GetOpenTxnsResponseTupleScheme extends TupleScheme<GetOpenTxnsResponse> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeI64(struct.txn_high_water_mark);
+      {
+        oprot.writeI32(struct.open_txns.size());
+        for (long _iter566 : struct.open_txns)
+        {
+          oprot.writeI64(_iter566);
+        }
+      }
+      oprot.writeBinary(struct.abortedBits);
+      BitSet optionals = new BitSet();
+      if (struct.isSetMin_open_txn()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetMin_open_txn()) {
+        oprot.writeI64(struct.min_open_txn);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, GetOpenTxnsResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.txn_high_water_mark = iprot.readI64();
+      struct.setTxn_high_water_markIsSet(true);
+      {
+        org.apache.thrift.protocol.TList _list567 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+        struct.open_txns = new ArrayList<Long>(_list567.size);
+        long _elem568;
+        for (int _i569 = 0; _i569 < _list567.size; ++_i569)
+        {
+          _elem568 = iprot.readI64();
+          struct.open_txns.add(_elem568);
+        }
+      }
+      struct.setOpen_txnsIsSet(true);
+      struct.abortedBits = iprot.readBinary();
+      struct.setAbortedBitsIsSet(true);
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.min_open_txn = iprot.readI64();
+        struct.setMin_open_txnIsSet(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/GetPrincipalsInRoleRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java
new file mode 100644
index 0000000..cdb1db8
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java
@@ -0,0 +1,389 @@
+/**
+ * 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 GetPrincipalsInRoleRequest implements org.apache.thrift.TBase<GetPrincipalsInRoleRequest, GetPrincipalsInRoleRequest._Fields>, java.io.Serializable, Cloneable, Comparable<GetPrincipalsInRoleRequest> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrincipalsInRoleRequest");
+
+  private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", 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 GetPrincipalsInRoleRequestStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new GetPrincipalsInRoleRequestTupleSchemeFactory());
+  }
+
+  private String roleName; // 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 {
+    ROLE_NAME((short)1, "roleName");
+
+    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: // ROLE_NAME
+          return ROLE_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
+  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.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPrincipalsInRoleRequest.class, metaDataMap);
+  }
+
+  public GetPrincipalsInRoleRequest() {
+  }
+
+  public GetPrincipalsInRoleRequest(
+    String roleName)
+  {
+    this();
+    this.roleName = roleName;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public GetPrincipalsInRoleRequest(GetPrincipalsInRoleRequest other) {
+    if (other.isSetRoleName()) {
+      this.roleName = other.roleName;
+    }
+  }
+
+  public GetPrincipalsInRoleRequest deepCopy() {
+    return new GetPrincipalsInRoleRequest(this);
+  }
+
+  @Override
+  public void clear() {
+    this.roleName = null;
+  }
+
+  public String getRoleName() {
+    return this.roleName;
+  }
+
+  public void setRoleName(String roleName) {
+    this.roleName = roleName;
+  }
+
+  public void unsetRoleName() {
+    this.roleName = null;
+  }
+
+  /** Returns true if field roleName is set (has been assigned a value) and false otherwise */
+  public boolean isSetRoleName() {
+    return this.roleName != null;
+  }
+
+  public void setRoleNameIsSet(boolean value) {
+    if (!value) {
+      this.roleName = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case ROLE_NAME:
+      if (value == null) {
+        unsetRoleName();
+      } else {
+        setRoleName((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case ROLE_NAME:
+      return getRoleName();
+
+    }
+    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 ROLE_NAME:
+      return isSetRoleName();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof GetPrincipalsInRoleRequest)
+      return this.equals((GetPrincipalsInRoleRequest)that);
+    return false;
+  }
+
+  public boolean equals(GetPrincipalsInRoleRequest that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_roleName = true && this.isSetRoleName();
+    boolean that_present_roleName = true && that.isSetRoleName();
+    if (this_present_roleName || that_present_roleName) {
+      if (!(this_present_roleName && that_present_roleName))
+        return false;
+      if (!this.roleName.equals(that.roleName))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_roleName = true && (isSetRoleName());
+    list.add(present_roleName);
+    if (present_roleName)
+      list.add(roleName);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(GetPrincipalsInRoleRequest other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetRoleName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName);
+      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("GetPrincipalsInRoleRequest(");
+    boolean first = true;
+
+    sb.append("roleName:");
+    if (this.roleName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.roleName);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetRoleName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' 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 GetPrincipalsInRoleRequestStandardSchemeFactory implements SchemeFactory {
+    public GetPrincipalsInRoleRequestStandardScheme getScheme() {
+      return new GetPrincipalsInRoleRequestStandardScheme();
+    }
+  }
+
+  private static class GetPrincipalsInRoleRequestStandardScheme extends StandardScheme<GetPrincipalsInRoleRequest> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrincipalsInRoleRequest 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: // ROLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.roleName = iprot.readString();
+              struct.setRoleNameIsSet(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, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.roleName != null) {
+        oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.roleName);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class GetPrincipalsInRoleRequestTupleSchemeFactory implements SchemeFactory {
+    public GetPrincipalsInRoleRequestTupleScheme getScheme() {
+      return new GetPrincipalsInRoleRequestTupleScheme();
+    }
+  }
+
+  private static class GetPrincipalsInRoleRequestTupleScheme extends TupleScheme<GetPrincipalsInRoleRequest> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeString(struct.roleName);
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.roleName = iprot.readString();
+      struct.setRoleNameIsSet(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/GetPrincipalsInRoleResponse.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java
new file mode 100644
index 0000000..f116fd9
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.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 GetPrincipalsInRoleResponse implements org.apache.thrift.TBase<GetPrincipalsInRoleResponse, GetPrincipalsInRoleResponse._Fields>, java.io.Serializable, Cloneable, Comparable<GetPrincipalsInRoleResponse> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrincipalsInRoleResponse");
+
+  private static final org.apache.thrift.protocol.TField PRINCIPAL_GRANTS_FIELD_DESC = new org.apache.thrift.protocol.TField("principalGrants", 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 GetPrincipalsInRoleResponseStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new GetPrincipalsInRoleResponseTupleSchemeFactory());
+  }
+
+  private List<RolePrincipalGrant> principalGrants; // 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 {
+    PRINCIPAL_GRANTS((short)1, "principalGrants");
+
+    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: // PRINCIPAL_GRANTS
+          return PRINCIPAL_GRANTS;
+        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.PRINCIPAL_GRANTS, new org.apache.thrift.meta_data.FieldMetaData("principalGrants", 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, RolePrincipalGrant.class))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPrincipalsInRoleResponse.class, metaDataMap);
+  }
+
+  public GetPrincipalsInRoleResponse() {
+  }
+
+  public GetPrincipalsInRoleResponse(
+    List<RolePrincipalGrant> principalGrants)
+  {
+    this();
+    this.principalGrants = principalGrants;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public GetPrincipalsInRoleResponse(GetPrincipalsInRoleResponse other) {
+    if (other.isSetPrincipalGrants()) {
+      List<RolePrincipalGrant> __this__principalGrants = new ArrayList<RolePrincipalGrant>(other.principalGrants.size());
+      for (RolePrincipalGrant other_element : other.principalGrants) {
+        __this__principalGrants.add(new RolePrincipalGrant(other_element));
+      }
+      this.principalGrants = __this__principalGrants;
+    }
+  }
+
+  public GetPrincipalsInRoleResponse deepCopy() {
+    return new GetPrincipalsInRoleResponse(this);
+  }
+
+  @Override
+  public void clear() {
+    this.principalGrants = null;
+  }
+
+  public int getPrincipalGrantsSize() {
+    return (this.principalGrants == null) ? 0 : this.principalGrants.size();
+  }
+
+  public java.util.Iterator<RolePrincipalGrant> getPrincipalGrantsIterator() {
+    return (this.principalGrants == null) ? null : this.principalGrants.iterator();
+  }
+
+  public void addToPrincipalGrants(RolePrincipalGrant elem) {
+    if (this.principalGrants == null) {
+      this.principalGrants = new ArrayList<RolePrincipalGrant>();
+    }
+    this.principalGrants.add(elem);
+  }
+
+  public List<RolePrincipalGrant> getPrincipalGrants() {
+    return this.principalGrants;
+  }
+
+  public void setPrincipalGrants(List<RolePrincipalGrant> principalGrants) {
+    this.principalGrants = principalGrants;
+  }
+
+  public void unsetPrincipalGrants() {
+    this.principalGrants = null;
+  }
+
+  /** Returns true if field principalGrants is set (has been assigned a value) and false otherwise */
+  public boolean isSetPrincipalGrants() {
+    return this.principalGrants != null;
+  }
+
+  public void setPrincipalGrantsIsSet(boolean value) {
+    if (!value) {
+      this.principalGrants = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case PRINCIPAL_GRANTS:
+      if (value == null) {
+        unsetPrincipalGrants();
+      } else {
+        setPrincipalGrants((List<RolePrincipalGrant>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case PRINCIPAL_GRANTS:
+      return getPrincipalGrants();
+
+    }
+    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 PRINCIPAL_GRANTS:
+      return isSetPrincipalGrants();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof GetPrincipalsInRoleResponse)
+      return this.equals((GetPrincipalsInRoleResponse)that);
+    return false;
+  }
+
+  public boolean equals(GetPrincipalsInRoleResponse that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_principalGrants = true && this.isSetPrincipalGrants();
+    boolean that_present_principalGrants = true && that.isSetPrincipalGrants();
+    if (this_present_principalGrants || that_present_principalGrants) {
+      if (!(this_present_principalGrants && that_present_principalGrants))
+        return false;
+      if (!this.principalGrants.equals(that.principalGrants))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_principalGrants = true && (isSetPrincipalGrants());
+    list.add(present_principalGrants);
+    if (present_principalGrants)
+      list.add(principalGrants);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(GetPrincipalsInRoleResponse other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetPrincipalGrants()).compareTo(other.isSetPrincipalGrants());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPrincipalGrants()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalGrants, other.principalGrants);
+      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("GetPrincipalsInRoleResponse(");
+    boolean first = true;
+
+    sb.append("principalGrants:");
+    if (this.principalGrants == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.principalGrants);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetPrincipalGrants()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'principalGrants' 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 GetPrincipalsInRoleResponseStandardSchemeFactory implements SchemeFactory {
+    public GetPrincipalsInRoleResponseStandardScheme getScheme() {
+      return new GetPrincipalsInRoleResponseStandardScheme();
+    }
+  }
+
+  private static class GetPrincipalsInRoleResponseStandardScheme extends StandardScheme<GetPrincipalsInRoleResponse> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrincipalsInRoleResponse 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: // PRINCIPAL_GRANTS
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list86 = iprot.readListBegin();
+                struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list86.size);
+                RolePrincipalGrant _elem87;
+                for (int _i88 = 0; _i88 < _list86.size; ++_i88)
+                {
+                  _elem87 = new RolePrincipalGrant();
+                  _elem87.read(iprot);
+                  struct.principalGrants.add(_elem87);
+                }
+                iprot.readListEnd();
+              }
+              struct.setPrincipalGrantsIsSet(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, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.principalGrants != null) {
+        oprot.writeFieldBegin(PRINCIPAL_GRANTS_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.principalGrants.size()));
+          for (RolePrincipalGrant _iter89 : struct.principalGrants)
+          {
+            _iter89.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class GetPrincipalsInRoleResponseTupleSchemeFactory implements SchemeFactory {
+    public GetPrincipalsInRoleResponseTupleScheme getScheme() {
+      return new GetPrincipalsInRoleResponseTupleScheme();
+    }
+  }
+
+  private static class GetPrincipalsInRoleResponseTupleScheme extends TupleScheme<GetPrincipalsInRoleResponse> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      {
+        oprot.writeI32(struct.principalGrants.size());
+        for (RolePrincipalGrant _iter90 : struct.principalGrants)
+        {
+          _iter90.write(oprot);
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      {
+        org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list91.size);
+        RolePrincipalGrant _elem92;
+        for (int _i93 = 0; _i93 < _list91.size; ++_i93)
+        {
+          _elem92 = new RolePrincipalGrant();
+          _elem92.read(iprot);
+          struct.principalGrants.add(_elem92);
+        }
+      }
+      struct.setPrincipalGrantsIsSet(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/GetRoleGrantsForPrincipalRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java
new file mode 100644
index 0000000..a740ab9
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java
@@ -0,0 +1,502 @@
+/**
+ * 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 GetRoleGrantsForPrincipalRequest implements org.apache.thrift.TBase<GetRoleGrantsForPrincipalRequest, GetRoleGrantsForPrincipalRequest._Fields>, java.io.Serializable, Cloneable, Comparable<GetRoleGrantsForPrincipalRequest> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetRoleGrantsForPrincipalRequest");
+
+  private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new GetRoleGrantsForPrincipalRequestStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new GetRoleGrantsForPrincipalRequestTupleSchemeFactory());
+  }
+
+  private String principal_name; // required
+  private PrincipalType principal_type; // 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 {
+    PRINCIPAL_NAME((short)1, "principal_name"),
+    /**
+     * 
+     * @see PrincipalType
+     */
+    PRINCIPAL_TYPE((short)2, "principal_type");
+
+    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: // PRINCIPAL_NAME
+          return PRINCIPAL_NAME;
+        case 2: // PRINCIPAL_TYPE
+          return PRINCIPAL_TYPE;
+        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.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetRoleGrantsForPrincipalRequest.class, metaDataMap);
+  }
+
+  public GetRoleGrantsForPrincipalRequest() {
+  }
+
+  public GetRoleGrantsForPrincipalRequest(
+    String principal_name,
+    PrincipalType principal_type)
+  {
+    this();
+    this.principal_name = principal_name;
+    this.principal_type = principal_type;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public GetRoleGrantsForPrincipalRequest(GetRoleGrantsForPrincipalRequest other) {
+    if (other.isSetPrincipal_name()) {
+      this.principal_name = other.principal_name;
+    }
+    if (other.isSetPrincipal_type()) {
+      this.principal_type = other.principal_type;
+    }
+  }
+
+  public GetRoleGrantsForPrincipalRequest deepCopy() {
+    return new GetRoleGrantsForPrincipalRequest(this);
+  }
+
+  @Override
+  public void clear() {
+    this.principal_name = null;
+    this.principal_type = null;
+  }
+
+  public String getPrincipal_name() {
+    return this.principal_name;
+  }
+
+  public void setPrincipal_name(String principal_name) {
+    this.principal_name = principal_name;
+  }
+
+  public void unsetPrincipal_name() {
+    this.principal_name = null;
+  }
+
+  /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */
+  public boolean isSetPrincipal_name() {
+    return this.principal_name != null;
+  }
+
+  public void setPrincipal_nameIsSet(boolean value) {
+    if (!value) {
+      this.principal_name = null;
+    }
+  }
+
+  /**
+   * 
+   * @see PrincipalType
+   */
+  public PrincipalType getPrincipal_type() {
+    return this.principal_type;
+  }
+
+  /**
+   * 
+   * @see PrincipalType
+   */
+  public void setPrincipal_type(PrincipalType principal_type) {
+    this.principal_type = principal_type;
+  }
+
+  public void unsetPrincipal_type() {
+    this.principal_type = null;
+  }
+
+  /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */
+  public boolean isSetPrincipal_type() {
+    return this.principal_type != null;
+  }
+
+  public void setPrincipal_typeIsSet(boolean value) {
+    if (!value) {
+      this.principal_type = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case PRINCIPAL_NAME:
+      if (value == null) {
+        unsetPrincipal_name();
+      } else {
+        setPrincipal_name((String)value);
+      }
+      break;
+
+    case PRINCIPAL_TYPE:
+      if (value == null) {
+        unsetPrincipal_type();
+      } else {
+        setPrincipal_type((PrincipalType)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case PRINCIPAL_NAME:
+      return getPrincipal_name();
+
+    case PRINCIPAL_TYPE:
+      return getPrincipal_type();
+
+    }
+    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 PRINCIPAL_NAME:
+      return isSetPrincipal_name();
+    case PRINCIPAL_TYPE:
+      return isSetPrincipal_type();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof GetRoleGrantsForPrincipalRequest)
+      return this.equals((GetRoleGrantsForPrincipalRequest)that);
+    return false;
+  }
+
+  public boolean equals(GetRoleGrantsForPrincipalRequest that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_principal_name = true && this.isSetPrincipal_name();
+    boolean that_present_principal_name = true && that.isSetPrincipal_name();
+    if (this_present_principal_name || that_present_principal_name) {
+      if (!(this_present_principal_name && that_present_principal_name))
+        return false;
+      if (!this.principal_name.equals(that.principal_name))
+        return false;
+    }
+
+    boolean this_present_principal_type = true && this.isSetPrincipal_type();
+    boolean that_present_principal_type = true && that.isSetPrincipal_type();
+    if (this_present_principal_type || that_present_principal_type) {
+      if (!(this_present_principal_type && that_present_principal_type))
+        return false;
+      if (!this.principal_type.equals(that.principal_type))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_principal_name = true && (isSetPrincipal_name());
+    list.add(present_principal_name);
+    if (present_principal_name)
+      list.add(principal_name);
+
+    boolean present_principal_type = true && (isSetPrincipal_type());
+    list.add(present_principal_type);
+    if (present_principal_type)
+      list.add(principal_type.getValue());
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(GetRoleGrantsForPrincipalRequest other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(other.isSetPrincipal_name());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPrincipal_name()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, other.principal_name);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(other.isSetPrincipal_type());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPrincipal_type()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, other.principal_type);
+      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("GetRoleGrantsForPrincipalRequest(");
+    boolean first = true;
+
+    sb.append("principal_name:");
+    if (this.principal_name == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.principal_name);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("principal_type:");
+    if (this.principal_type == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.principal_type);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetPrincipal_name()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'principal_name' is unset! Struct:" + toString());
+    }
+
+    if (!isSetPrincipal_type()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'principal_type' 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 GetRoleGrantsForPrincipalRequestStandardSchemeFactory implements SchemeFactory {
+    public GetRoleGrantsForPrincipalRequestStandardScheme getScheme() {
+      return new GetRoleGrantsForPrincipalRequestStandardScheme();
+    }
+  }
+
+  private static class GetRoleGrantsForPrincipalRequestStandardScheme extends StandardScheme<GetRoleGrantsForPrincipalRequest> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, GetRoleGrantsForPrincipalRequest 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: // PRINCIPAL_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.principal_name = iprot.readString();
+              struct.setPrincipal_nameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // PRINCIPAL_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.principal_type = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32());
+              struct.setPrincipal_typeIsSet(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, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.principal_name != null) {
+        oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC);
+        oprot.writeString(struct.principal_name);
+        oprot.writeFieldEnd();
+      }
+      if (struct.principal_type != null) {
+        oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC);
+        oprot.writeI32(struct.principal_type.getValue());
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class GetRoleGrantsForPrincipalRequestTupleSchemeFactory implements SchemeFactory {
+    public GetRoleGrantsForPrincipalRequestTupleScheme getScheme() {
+      return new GetRoleGrantsForPrincipalRequestTupleScheme();
+    }
+  }
+
+  private static class GetRoleGrantsForPrincipalRequestTupleScheme extends TupleScheme<GetRoleGrantsForPrincipalRequest> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeString(struct.principal_name);
+      oprot.writeI32(struct.principal_type.getValue());
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.principal_name = iprot.readString();
+      struct.setPrincipal_nameIsSet(true);
+      struct.principal_type = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32());
+      struct.setPrincipal_typeIsSet(true);
+    }
+  }
+
+}
+