hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1574266 [8/23] - in /hive/trunk: common/src/java/org/apache/hadoop/hive/conf/ itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/ metastore/ metastore/if/ metastore/scripts/upgrade/derby/ metastore/scripts/upgrade/mysql/ metas...
Date Wed, 05 Mar 2014 00:20:57 GMT
Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java?rev=1574266&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HeartbeatRequest.java Wed Mar  5 00:20:53 2014
@@ -0,0 +1,485 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class HeartbeatRequest implements org.apache.thrift.TBase<HeartbeatRequest, HeartbeatRequest._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HeartbeatRequest");
+
+  private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1);
+  private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new HeartbeatRequestStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new HeartbeatRequestTupleSchemeFactory());
+  }
+
+  private long lockid; // optional
+  private long txnid; // 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 {
+    LOCKID((short)1, "lockid"),
+    TXNID((short)2, "txnid");
+
+    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: // LOCKID
+          return LOCKID;
+        case 2: // TXNID
+          return TXNID;
+        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 __LOCKID_ISSET_ID = 0;
+  private static final int __TXNID_ISSET_ID = 1;
+  private byte __isset_bitfield = 0;
+  private _Fields optionals[] = {_Fields.LOCKID,_Fields.TXNID};
+  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.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HeartbeatRequest.class, metaDataMap);
+  }
+
+  public HeartbeatRequest() {
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public HeartbeatRequest(HeartbeatRequest other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.lockid = other.lockid;
+    this.txnid = other.txnid;
+  }
+
+  public HeartbeatRequest deepCopy() {
+    return new HeartbeatRequest(this);
+  }
+
+  @Override
+  public void clear() {
+    setLockidIsSet(false);
+    this.lockid = 0;
+    setTxnidIsSet(false);
+    this.txnid = 0;
+  }
+
+  public long getLockid() {
+    return this.lockid;
+  }
+
+  public void setLockid(long lockid) {
+    this.lockid = lockid;
+    setLockidIsSet(true);
+  }
+
+  public void unsetLockid() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID);
+  }
+
+  /** Returns true if field lockid is set (has been assigned a value) and false otherwise */
+  public boolean isSetLockid() {
+    return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID);
+  }
+
+  public void setLockidIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value);
+  }
+
+  public long getTxnid() {
+    return this.txnid;
+  }
+
+  public void setTxnid(long txnid) {
+    this.txnid = txnid;
+    setTxnidIsSet(true);
+  }
+
+  public void unsetTxnid() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID);
+  }
+
+  /** Returns true if field txnid is set (has been assigned a value) and false otherwise */
+  public boolean isSetTxnid() {
+    return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID);
+  }
+
+  public void setTxnidIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case LOCKID:
+      if (value == null) {
+        unsetLockid();
+      } else {
+        setLockid((Long)value);
+      }
+      break;
+
+    case TXNID:
+      if (value == null) {
+        unsetTxnid();
+      } else {
+        setTxnid((Long)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case LOCKID:
+      return Long.valueOf(getLockid());
+
+    case TXNID:
+      return Long.valueOf(getTxnid());
+
+    }
+    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 LOCKID:
+      return isSetLockid();
+    case TXNID:
+      return isSetTxnid();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof HeartbeatRequest)
+      return this.equals((HeartbeatRequest)that);
+    return false;
+  }
+
+  public boolean equals(HeartbeatRequest that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_lockid = true && this.isSetLockid();
+    boolean that_present_lockid = true && that.isSetLockid();
+    if (this_present_lockid || that_present_lockid) {
+      if (!(this_present_lockid && that_present_lockid))
+        return false;
+      if (this.lockid != that.lockid)
+        return false;
+    }
+
+    boolean this_present_txnid = true && this.isSetTxnid();
+    boolean that_present_txnid = true && that.isSetTxnid();
+    if (this_present_txnid || that_present_txnid) {
+      if (!(this_present_txnid && that_present_txnid))
+        return false;
+      if (this.txnid != that.txnid)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+
+    boolean present_lockid = true && (isSetLockid());
+    builder.append(present_lockid);
+    if (present_lockid)
+      builder.append(lockid);
+
+    boolean present_txnid = true && (isSetTxnid());
+    builder.append(present_txnid);
+    if (present_txnid)
+      builder.append(txnid);
+
+    return builder.toHashCode();
+  }
+
+  public int compareTo(HeartbeatRequest other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    HeartbeatRequest typedOther = (HeartbeatRequest)other;
+
+    lastComparison = Boolean.valueOf(isSetLockid()).compareTo(typedOther.isSetLockid());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetLockid()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, typedOther.lockid);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(typedOther.isSetTxnid());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTxnid()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, typedOther.txnid);
+      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("HeartbeatRequest(");
+    boolean first = true;
+
+    if (isSetLockid()) {
+      sb.append("lockid:");
+      sb.append(this.lockid);
+      first = false;
+    }
+    if (isSetTxnid()) {
+      if (!first) sb.append(", ");
+      sb.append("txnid:");
+      sb.append(this.txnid);
+      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 HeartbeatRequestStandardSchemeFactory implements SchemeFactory {
+    public HeartbeatRequestStandardScheme getScheme() {
+      return new HeartbeatRequestStandardScheme();
+    }
+  }
+
+  private static class HeartbeatRequestStandardScheme extends StandardScheme<HeartbeatRequest> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, HeartbeatRequest 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: // LOCKID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.lockid = iprot.readI64();
+              struct.setLockidIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // TXNID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.txnid = iprot.readI64();
+              struct.setTxnidIsSet(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, HeartbeatRequest struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.isSetLockid()) {
+        oprot.writeFieldBegin(LOCKID_FIELD_DESC);
+        oprot.writeI64(struct.lockid);
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetTxnid()) {
+        oprot.writeFieldBegin(TXNID_FIELD_DESC);
+        oprot.writeI64(struct.txnid);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class HeartbeatRequestTupleSchemeFactory implements SchemeFactory {
+    public HeartbeatRequestTupleScheme getScheme() {
+      return new HeartbeatRequestTupleScheme();
+    }
+  }
+
+  private static class HeartbeatRequestTupleScheme extends TupleScheme<HeartbeatRequest> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, HeartbeatRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetLockid()) {
+        optionals.set(0);
+      }
+      if (struct.isSetTxnid()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetLockid()) {
+        oprot.writeI64(struct.lockid);
+      }
+      if (struct.isSetTxnid()) {
+        oprot.writeI64(struct.txnid);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, HeartbeatRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.lockid = iprot.readI64();
+        struct.setLockidIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.txnid = iprot.readI64();
+        struct.setTxnidIsSet(true);
+      }
+    }
+  }
+
+}
+

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java?rev=1574266&r1=1574265&r2=1574266&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/HiveObjectRef.java Wed Mar  5 00:20:53 2014
@@ -710,7 +710,7 @@ public class HiveObjectRef implements or
                 struct.partValues = new ArrayList<String>(_list8.size);
                 for (int _i9 = 0; _i9 < _list8.size; ++_i9)
                 {
-                  String _elem10; // optional
+                  String _elem10; // required
                   _elem10 = iprot.readString();
                   struct.partValues.add(_elem10);
                 }
@@ -853,7 +853,7 @@ public class HiveObjectRef implements or
           struct.partValues = new ArrayList<String>(_list13.size);
           for (int _i14 = 0; _i14 < _list13.size; ++_i14)
           {
-            String _elem15; // optional
+            String _elem15; // required
             _elem15 = iprot.readString();
             struct.partValues.add(_elem15);
           }

Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java?rev=1574266&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockComponent.java Wed Mar  5 00:20:53 2014
@@ -0,0 +1,827 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LockComponent implements org.apache.thrift.TBase<LockComponent, LockComponent._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockComponent");
+
+  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
+  private static final org.apache.thrift.protocol.TField LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("level", org.apache.thrift.protocol.TType.I32, (short)2);
+  private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField PARTITIONNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionname", 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 LockComponentStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new LockComponentTupleSchemeFactory());
+  }
+
+  private LockType type; // required
+  private LockLevel level; // required
+  private String dbname; // required
+  private String tablename; // optional
+  private String partitionname; // 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 {
+    /**
+     * 
+     * @see LockType
+     */
+    TYPE((short)1, "type"),
+    /**
+     * 
+     * @see LockLevel
+     */
+    LEVEL((short)2, "level"),
+    DBNAME((short)3, "dbname"),
+    TABLENAME((short)4, "tablename"),
+    PARTITIONNAME((short)5, "partitionname");
+
+    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: // TYPE
+          return TYPE;
+        case 2: // LEVEL
+          return LEVEL;
+        case 3: // DBNAME
+          return DBNAME;
+        case 4: // TABLENAME
+          return TABLENAME;
+        case 5: // PARTITIONNAME
+          return PARTITIONNAME;
+        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 _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTITIONNAME};
+  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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockType.class)));
+    tmpMap.put(_Fields.LEVEL, new org.apache.thrift.meta_data.FieldMetaData("level", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockLevel.class)));
+    tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", 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(LockComponent.class, metaDataMap);
+  }
+
+  public LockComponent() {
+  }
+
+  public LockComponent(
+    LockType type,
+    LockLevel level,
+    String dbname)
+  {
+    this();
+    this.type = type;
+    this.level = level;
+    this.dbname = dbname;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public LockComponent(LockComponent other) {
+    if (other.isSetType()) {
+      this.type = other.type;
+    }
+    if (other.isSetLevel()) {
+      this.level = other.level;
+    }
+    if (other.isSetDbname()) {
+      this.dbname = other.dbname;
+    }
+    if (other.isSetTablename()) {
+      this.tablename = other.tablename;
+    }
+    if (other.isSetPartitionname()) {
+      this.partitionname = other.partitionname;
+    }
+  }
+
+  public LockComponent deepCopy() {
+    return new LockComponent(this);
+  }
+
+  @Override
+  public void clear() {
+    this.type = null;
+    this.level = null;
+    this.dbname = null;
+    this.tablename = null;
+    this.partitionname = null;
+  }
+
+  /**
+   * 
+   * @see LockType
+   */
+  public LockType getType() {
+    return this.type;
+  }
+
+  /**
+   * 
+   * @see LockType
+   */
+  public void setType(LockType type) {
+    this.type = type;
+  }
+
+  public void unsetType() {
+    this.type = null;
+  }
+
+  /** Returns true if field type is set (has been assigned a value) and false otherwise */
+  public boolean isSetType() {
+    return this.type != null;
+  }
+
+  public void setTypeIsSet(boolean value) {
+    if (!value) {
+      this.type = null;
+    }
+  }
+
+  /**
+   * 
+   * @see LockLevel
+   */
+  public LockLevel getLevel() {
+    return this.level;
+  }
+
+  /**
+   * 
+   * @see LockLevel
+   */
+  public void setLevel(LockLevel level) {
+    this.level = level;
+  }
+
+  public void unsetLevel() {
+    this.level = null;
+  }
+
+  /** Returns true if field level is set (has been assigned a value) and false otherwise */
+  public boolean isSetLevel() {
+    return this.level != null;
+  }
+
+  public void setLevelIsSet(boolean value) {
+    if (!value) {
+      this.level = 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 getTablename() {
+    return this.tablename;
+  }
+
+  public void setTablename(String tablename) {
+    this.tablename = tablename;
+  }
+
+  public void unsetTablename() {
+    this.tablename = null;
+  }
+
+  /** Returns true if field tablename is set (has been assigned a value) and false otherwise */
+  public boolean isSetTablename() {
+    return this.tablename != null;
+  }
+
+  public void setTablenameIsSet(boolean value) {
+    if (!value) {
+      this.tablename = null;
+    }
+  }
+
+  public String getPartitionname() {
+    return this.partitionname;
+  }
+
+  public void setPartitionname(String partitionname) {
+    this.partitionname = partitionname;
+  }
+
+  public void unsetPartitionname() {
+    this.partitionname = null;
+  }
+
+  /** Returns true if field partitionname is set (has been assigned a value) and false otherwise */
+  public boolean isSetPartitionname() {
+    return this.partitionname != null;
+  }
+
+  public void setPartitionnameIsSet(boolean value) {
+    if (!value) {
+      this.partitionname = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case TYPE:
+      if (value == null) {
+        unsetType();
+      } else {
+        setType((LockType)value);
+      }
+      break;
+
+    case LEVEL:
+      if (value == null) {
+        unsetLevel();
+      } else {
+        setLevel((LockLevel)value);
+      }
+      break;
+
+    case DBNAME:
+      if (value == null) {
+        unsetDbname();
+      } else {
+        setDbname((String)value);
+      }
+      break;
+
+    case TABLENAME:
+      if (value == null) {
+        unsetTablename();
+      } else {
+        setTablename((String)value);
+      }
+      break;
+
+    case PARTITIONNAME:
+      if (value == null) {
+        unsetPartitionname();
+      } else {
+        setPartitionname((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case TYPE:
+      return getType();
+
+    case LEVEL:
+      return getLevel();
+
+    case DBNAME:
+      return getDbname();
+
+    case TABLENAME:
+      return getTablename();
+
+    case PARTITIONNAME:
+      return getPartitionname();
+
+    }
+    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 TYPE:
+      return isSetType();
+    case LEVEL:
+      return isSetLevel();
+    case DBNAME:
+      return isSetDbname();
+    case TABLENAME:
+      return isSetTablename();
+    case PARTITIONNAME:
+      return isSetPartitionname();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof LockComponent)
+      return this.equals((LockComponent)that);
+    return false;
+  }
+
+  public boolean equals(LockComponent that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_type = true && this.isSetType();
+    boolean that_present_type = true && that.isSetType();
+    if (this_present_type || that_present_type) {
+      if (!(this_present_type && that_present_type))
+        return false;
+      if (!this.type.equals(that.type))
+        return false;
+    }
+
+    boolean this_present_level = true && this.isSetLevel();
+    boolean that_present_level = true && that.isSetLevel();
+    if (this_present_level || that_present_level) {
+      if (!(this_present_level && that_present_level))
+        return false;
+      if (!this.level.equals(that.level))
+        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_tablename = true && this.isSetTablename();
+    boolean that_present_tablename = true && that.isSetTablename();
+    if (this_present_tablename || that_present_tablename) {
+      if (!(this_present_tablename && that_present_tablename))
+        return false;
+      if (!this.tablename.equals(that.tablename))
+        return false;
+    }
+
+    boolean this_present_partitionname = true && this.isSetPartitionname();
+    boolean that_present_partitionname = true && that.isSetPartitionname();
+    if (this_present_partitionname || that_present_partitionname) {
+      if (!(this_present_partitionname && that_present_partitionname))
+        return false;
+      if (!this.partitionname.equals(that.partitionname))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+
+    boolean present_type = true && (isSetType());
+    builder.append(present_type);
+    if (present_type)
+      builder.append(type.getValue());
+
+    boolean present_level = true && (isSetLevel());
+    builder.append(present_level);
+    if (present_level)
+      builder.append(level.getValue());
+
+    boolean present_dbname = true && (isSetDbname());
+    builder.append(present_dbname);
+    if (present_dbname)
+      builder.append(dbname);
+
+    boolean present_tablename = true && (isSetTablename());
+    builder.append(present_tablename);
+    if (present_tablename)
+      builder.append(tablename);
+
+    boolean present_partitionname = true && (isSetPartitionname());
+    builder.append(present_partitionname);
+    if (present_partitionname)
+      builder.append(partitionname);
+
+    return builder.toHashCode();
+  }
+
+  public int compareTo(LockComponent other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    LockComponent typedOther = (LockComponent)other;
+
+    lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetType()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetLevel()).compareTo(typedOther.isSetLevel());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetLevel()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.level, typedOther.level);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDbname()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, typedOther.dbname);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTablename()).compareTo(typedOther.isSetTablename());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTablename()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, typedOther.tablename);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(typedOther.isSetPartitionname());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPartitionname()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitionname, typedOther.partitionname);
+      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("LockComponent(");
+    boolean first = true;
+
+    sb.append("type:");
+    if (this.type == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.type);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("level:");
+    if (this.level == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.level);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("dbname:");
+    if (this.dbname == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.dbname);
+    }
+    first = false;
+    if (isSetTablename()) {
+      if (!first) sb.append(", ");
+      sb.append("tablename:");
+      if (this.tablename == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.tablename);
+      }
+      first = false;
+    }
+    if (isSetPartitionname()) {
+      if (!first) sb.append(", ");
+      sb.append("partitionname:");
+      if (this.partitionname == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.partitionname);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetType()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString());
+    }
+
+    if (!isSetLevel()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'level' is unset! Struct:" + toString());
+    }
+
+    if (!isSetDbname()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' 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 LockComponentStandardSchemeFactory implements SchemeFactory {
+    public LockComponentStandardScheme getScheme() {
+      return new LockComponentStandardScheme();
+    }
+  }
+
+  private static class LockComponentStandardScheme extends StandardScheme<LockComponent> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, LockComponent 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: // TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.type = LockType.findByValue(iprot.readI32());
+              struct.setTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // LEVEL
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.level = LockLevel.findByValue(iprot.readI32());
+              struct.setLevelIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // DBNAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.dbname = iprot.readString();
+              struct.setDbnameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // TABLENAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tablename = iprot.readString();
+              struct.setTablenameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // PARTITIONNAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.partitionname = iprot.readString();
+              struct.setPartitionnameIsSet(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, LockComponent struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.type != null) {
+        oprot.writeFieldBegin(TYPE_FIELD_DESC);
+        oprot.writeI32(struct.type.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.level != null) {
+        oprot.writeFieldBegin(LEVEL_FIELD_DESC);
+        oprot.writeI32(struct.level.getValue());
+        oprot.writeFieldEnd();
+      }
+      if (struct.dbname != null) {
+        oprot.writeFieldBegin(DBNAME_FIELD_DESC);
+        oprot.writeString(struct.dbname);
+        oprot.writeFieldEnd();
+      }
+      if (struct.tablename != null) {
+        if (struct.isSetTablename()) {
+          oprot.writeFieldBegin(TABLENAME_FIELD_DESC);
+          oprot.writeString(struct.tablename);
+          oprot.writeFieldEnd();
+        }
+      }
+      if (struct.partitionname != null) {
+        if (struct.isSetPartitionname()) {
+          oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC);
+          oprot.writeString(struct.partitionname);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class LockComponentTupleSchemeFactory implements SchemeFactory {
+    public LockComponentTupleScheme getScheme() {
+      return new LockComponentTupleScheme();
+    }
+  }
+
+  private static class LockComponentTupleScheme extends TupleScheme<LockComponent> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, LockComponent struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeI32(struct.type.getValue());
+      oprot.writeI32(struct.level.getValue());
+      oprot.writeString(struct.dbname);
+      BitSet optionals = new BitSet();
+      if (struct.isSetTablename()) {
+        optionals.set(0);
+      }
+      if (struct.isSetPartitionname()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetTablename()) {
+        oprot.writeString(struct.tablename);
+      }
+      if (struct.isSetPartitionname()) {
+        oprot.writeString(struct.partitionname);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, LockComponent struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.type = LockType.findByValue(iprot.readI32());
+      struct.setTypeIsSet(true);
+      struct.level = LockLevel.findByValue(iprot.readI32());
+      struct.setLevelIsSet(true);
+      struct.dbname = iprot.readString();
+      struct.setDbnameIsSet(true);
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.tablename = iprot.readString();
+        struct.setTablenameIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.partitionname = iprot.readString();
+        struct.setPartitionnameIsSet(true);
+      }
+    }
+  }
+
+}
+

Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java?rev=1574266&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockLevel.java Wed Mar  5 00:20:53 2014
@@ -0,0 +1,48 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum LockLevel implements org.apache.thrift.TEnum {
+  DB(1),
+  TABLE(2),
+  PARTITION(3);
+
+  private final int value;
+
+  private LockLevel(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static LockLevel findByValue(int value) { 
+    switch (value) {
+      case 1:
+        return DB;
+      case 2:
+        return TABLE;
+      case 3:
+        return PARTITION;
+      default:
+        return null;
+    }
+  }
+}

Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java?rev=1574266&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java Wed Mar  5 00:20:53 2014
@@ -0,0 +1,748 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockRequest._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockRequest");
+
+  private static final org.apache.thrift.protocol.TField COMPONENT_FIELD_DESC = new org.apache.thrift.protocol.TField("component", org.apache.thrift.protocol.TType.LIST, (short)1);
+  private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)2);
+  private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", 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 LockRequestStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new LockRequestTupleSchemeFactory());
+  }
+
+  private List<LockComponent> component; // required
+  private long txnid; // optional
+  private String user; // required
+  private String hostname; // 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 {
+    COMPONENT((short)1, "component"),
+    TXNID((short)2, "txnid"),
+    USER((short)3, "user"),
+    HOSTNAME((short)4, "hostname");
+
+    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: // COMPONENT
+          return COMPONENT;
+        case 2: // TXNID
+          return TXNID;
+        case 3: // USER
+          return USER;
+        case 4: // HOSTNAME
+          return HOSTNAME;
+        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 __TXNID_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  private _Fields optionals[] = {_Fields.TXNID};
+  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.COMPONENT, new org.apache.thrift.meta_data.FieldMetaData("component", 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, LockComponent.class))));
+    tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", 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(LockRequest.class, metaDataMap);
+  }
+
+  public LockRequest() {
+  }
+
+  public LockRequest(
+    List<LockComponent> component,
+    String user,
+    String hostname)
+  {
+    this();
+    this.component = component;
+    this.user = user;
+    this.hostname = hostname;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public LockRequest(LockRequest other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetComponent()) {
+      List<LockComponent> __this__component = new ArrayList<LockComponent>();
+      for (LockComponent other_element : other.component) {
+        __this__component.add(new LockComponent(other_element));
+      }
+      this.component = __this__component;
+    }
+    this.txnid = other.txnid;
+    if (other.isSetUser()) {
+      this.user = other.user;
+    }
+    if (other.isSetHostname()) {
+      this.hostname = other.hostname;
+    }
+  }
+
+  public LockRequest deepCopy() {
+    return new LockRequest(this);
+  }
+
+  @Override
+  public void clear() {
+    this.component = null;
+    setTxnidIsSet(false);
+    this.txnid = 0;
+    this.user = null;
+    this.hostname = null;
+  }
+
+  public int getComponentSize() {
+    return (this.component == null) ? 0 : this.component.size();
+  }
+
+  public java.util.Iterator<LockComponent> getComponentIterator() {
+    return (this.component == null) ? null : this.component.iterator();
+  }
+
+  public void addToComponent(LockComponent elem) {
+    if (this.component == null) {
+      this.component = new ArrayList<LockComponent>();
+    }
+    this.component.add(elem);
+  }
+
+  public List<LockComponent> getComponent() {
+    return this.component;
+  }
+
+  public void setComponent(List<LockComponent> component) {
+    this.component = component;
+  }
+
+  public void unsetComponent() {
+    this.component = null;
+  }
+
+  /** Returns true if field component is set (has been assigned a value) and false otherwise */
+  public boolean isSetComponent() {
+    return this.component != null;
+  }
+
+  public void setComponentIsSet(boolean value) {
+    if (!value) {
+      this.component = null;
+    }
+  }
+
+  public long getTxnid() {
+    return this.txnid;
+  }
+
+  public void setTxnid(long txnid) {
+    this.txnid = txnid;
+    setTxnidIsSet(true);
+  }
+
+  public void unsetTxnid() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID);
+  }
+
+  /** Returns true if field txnid is set (has been assigned a value) and false otherwise */
+  public boolean isSetTxnid() {
+    return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID);
+  }
+
+  public void setTxnidIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value);
+  }
+
+  public String getUser() {
+    return this.user;
+  }
+
+  public void setUser(String user) {
+    this.user = user;
+  }
+
+  public void unsetUser() {
+    this.user = null;
+  }
+
+  /** Returns true if field user is set (has been assigned a value) and false otherwise */
+  public boolean isSetUser() {
+    return this.user != null;
+  }
+
+  public void setUserIsSet(boolean value) {
+    if (!value) {
+      this.user = null;
+    }
+  }
+
+  public String getHostname() {
+    return this.hostname;
+  }
+
+  public void setHostname(String hostname) {
+    this.hostname = hostname;
+  }
+
+  public void unsetHostname() {
+    this.hostname = null;
+  }
+
+  /** Returns true if field hostname is set (has been assigned a value) and false otherwise */
+  public boolean isSetHostname() {
+    return this.hostname != null;
+  }
+
+  public void setHostnameIsSet(boolean value) {
+    if (!value) {
+      this.hostname = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case COMPONENT:
+      if (value == null) {
+        unsetComponent();
+      } else {
+        setComponent((List<LockComponent>)value);
+      }
+      break;
+
+    case TXNID:
+      if (value == null) {
+        unsetTxnid();
+      } else {
+        setTxnid((Long)value);
+      }
+      break;
+
+    case USER:
+      if (value == null) {
+        unsetUser();
+      } else {
+        setUser((String)value);
+      }
+      break;
+
+    case HOSTNAME:
+      if (value == null) {
+        unsetHostname();
+      } else {
+        setHostname((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case COMPONENT:
+      return getComponent();
+
+    case TXNID:
+      return Long.valueOf(getTxnid());
+
+    case USER:
+      return getUser();
+
+    case HOSTNAME:
+      return getHostname();
+
+    }
+    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 COMPONENT:
+      return isSetComponent();
+    case TXNID:
+      return isSetTxnid();
+    case USER:
+      return isSetUser();
+    case HOSTNAME:
+      return isSetHostname();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof LockRequest)
+      return this.equals((LockRequest)that);
+    return false;
+  }
+
+  public boolean equals(LockRequest that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_component = true && this.isSetComponent();
+    boolean that_present_component = true && that.isSetComponent();
+    if (this_present_component || that_present_component) {
+      if (!(this_present_component && that_present_component))
+        return false;
+      if (!this.component.equals(that.component))
+        return false;
+    }
+
+    boolean this_present_txnid = true && this.isSetTxnid();
+    boolean that_present_txnid = true && that.isSetTxnid();
+    if (this_present_txnid || that_present_txnid) {
+      if (!(this_present_txnid && that_present_txnid))
+        return false;
+      if (this.txnid != that.txnid)
+        return false;
+    }
+
+    boolean this_present_user = true && this.isSetUser();
+    boolean that_present_user = true && that.isSetUser();
+    if (this_present_user || that_present_user) {
+      if (!(this_present_user && that_present_user))
+        return false;
+      if (!this.user.equals(that.user))
+        return false;
+    }
+
+    boolean this_present_hostname = true && this.isSetHostname();
+    boolean that_present_hostname = true && that.isSetHostname();
+    if (this_present_hostname || that_present_hostname) {
+      if (!(this_present_hostname && that_present_hostname))
+        return false;
+      if (!this.hostname.equals(that.hostname))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+
+    boolean present_component = true && (isSetComponent());
+    builder.append(present_component);
+    if (present_component)
+      builder.append(component);
+
+    boolean present_txnid = true && (isSetTxnid());
+    builder.append(present_txnid);
+    if (present_txnid)
+      builder.append(txnid);
+
+    boolean present_user = true && (isSetUser());
+    builder.append(present_user);
+    if (present_user)
+      builder.append(user);
+
+    boolean present_hostname = true && (isSetHostname());
+    builder.append(present_hostname);
+    if (present_hostname)
+      builder.append(hostname);
+
+    return builder.toHashCode();
+  }
+
+  public int compareTo(LockRequest other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    LockRequest typedOther = (LockRequest)other;
+
+    lastComparison = Boolean.valueOf(isSetComponent()).compareTo(typedOther.isSetComponent());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetComponent()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.component, typedOther.component);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(typedOther.isSetTxnid());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTxnid()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, typedOther.txnid);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUser()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetHostname()).compareTo(typedOther.isSetHostname());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetHostname()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, typedOther.hostname);
+      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("LockRequest(");
+    boolean first = true;
+
+    sb.append("component:");
+    if (this.component == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.component);
+    }
+    first = false;
+    if (isSetTxnid()) {
+      if (!first) sb.append(", ");
+      sb.append("txnid:");
+      sb.append(this.txnid);
+      first = false;
+    }
+    if (!first) sb.append(", ");
+    sb.append("user:");
+    if (this.user == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.user);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("hostname:");
+    if (this.hostname == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.hostname);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetComponent()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'component' is unset! Struct:" + toString());
+    }
+
+    if (!isSetUser()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' is unset! Struct:" + toString());
+    }
+
+    if (!isSetHostname()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'hostname' 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 LockRequestStandardSchemeFactory implements SchemeFactory {
+    public LockRequestStandardScheme getScheme() {
+      return new LockRequestStandardScheme();
+    }
+  }
+
+  private static class LockRequestStandardScheme extends StandardScheme<LockRequest> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, LockRequest 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: // COMPONENT
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list386 = iprot.readListBegin();
+                struct.component = new ArrayList<LockComponent>(_list386.size);
+                for (int _i387 = 0; _i387 < _list386.size; ++_i387)
+                {
+                  LockComponent _elem388; // required
+                  _elem388 = new LockComponent();
+                  _elem388.read(iprot);
+                  struct.component.add(_elem388);
+                }
+                iprot.readListEnd();
+              }
+              struct.setComponentIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // TXNID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.txnid = iprot.readI64();
+              struct.setTxnidIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // USER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.user = iprot.readString();
+              struct.setUserIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // HOSTNAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.hostname = iprot.readString();
+              struct.setHostnameIsSet(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, LockRequest struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.component != null) {
+        oprot.writeFieldBegin(COMPONENT_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.component.size()));
+          for (LockComponent _iter389 : struct.component)
+          {
+            _iter389.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.isSetTxnid()) {
+        oprot.writeFieldBegin(TXNID_FIELD_DESC);
+        oprot.writeI64(struct.txnid);
+        oprot.writeFieldEnd();
+      }
+      if (struct.user != null) {
+        oprot.writeFieldBegin(USER_FIELD_DESC);
+        oprot.writeString(struct.user);
+        oprot.writeFieldEnd();
+      }
+      if (struct.hostname != null) {
+        oprot.writeFieldBegin(HOSTNAME_FIELD_DESC);
+        oprot.writeString(struct.hostname);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class LockRequestTupleSchemeFactory implements SchemeFactory {
+    public LockRequestTupleScheme getScheme() {
+      return new LockRequestTupleScheme();
+    }
+  }
+
+  private static class LockRequestTupleScheme extends TupleScheme<LockRequest> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, LockRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      {
+        oprot.writeI32(struct.component.size());
+        for (LockComponent _iter390 : struct.component)
+        {
+          _iter390.write(oprot);
+        }
+      }
+      oprot.writeString(struct.user);
+      oprot.writeString(struct.hostname);
+      BitSet optionals = new BitSet();
+      if (struct.isSetTxnid()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetTxnid()) {
+        oprot.writeI64(struct.txnid);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, LockRequest struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      {
+        org.apache.thrift.protocol.TList _list391 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.component = new ArrayList<LockComponent>(_list391.size);
+        for (int _i392 = 0; _i392 < _list391.size; ++_i392)
+        {
+          LockComponent _elem393; // required
+          _elem393 = new LockComponent();
+          _elem393.read(iprot);
+          struct.component.add(_elem393);
+        }
+      }
+      struct.setComponentIsSet(true);
+      struct.user = iprot.readString();
+      struct.setUserIsSet(true);
+      struct.hostname = iprot.readString();
+      struct.setHostnameIsSet(true);
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.txnid = iprot.readI64();
+        struct.setTxnidIsSet(true);
+      }
+    }
+  }
+
+}
+

Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java?rev=1574266&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockResponse.java Wed Mar  5 00:20:53 2014
@@ -0,0 +1,496 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LockResponse implements org.apache.thrift.TBase<LockResponse, LockResponse._Fields>, java.io.Serializable, Cloneable {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockResponse");
+
+  private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1);
+  private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", 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 LockResponseStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new LockResponseTupleSchemeFactory());
+  }
+
+  private long lockid; // required
+  private LockState state; // 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 {
+    LOCKID((short)1, "lockid"),
+    /**
+     * 
+     * @see LockState
+     */
+    STATE((short)2, "state");
+
+    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: // LOCKID
+          return LOCKID;
+        case 2: // STATE
+          return STATE;
+        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 __LOCKID_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+    tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, LockState.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockResponse.class, metaDataMap);
+  }
+
+  public LockResponse() {
+  }
+
+  public LockResponse(
+    long lockid,
+    LockState state)
+  {
+    this();
+    this.lockid = lockid;
+    setLockidIsSet(true);
+    this.state = state;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public LockResponse(LockResponse other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.lockid = other.lockid;
+    if (other.isSetState()) {
+      this.state = other.state;
+    }
+  }
+
+  public LockResponse deepCopy() {
+    return new LockResponse(this);
+  }
+
+  @Override
+  public void clear() {
+    setLockidIsSet(false);
+    this.lockid = 0;
+    this.state = null;
+  }
+
+  public long getLockid() {
+    return this.lockid;
+  }
+
+  public void setLockid(long lockid) {
+    this.lockid = lockid;
+    setLockidIsSet(true);
+  }
+
+  public void unsetLockid() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKID_ISSET_ID);
+  }
+
+  /** Returns true if field lockid is set (has been assigned a value) and false otherwise */
+  public boolean isSetLockid() {
+    return EncodingUtils.testBit(__isset_bitfield, __LOCKID_ISSET_ID);
+  }
+
+  public void setLockidIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value);
+  }
+
+  /**
+   * 
+   * @see LockState
+   */
+  public LockState getState() {
+    return this.state;
+  }
+
+  /**
+   * 
+   * @see LockState
+   */
+  public void setState(LockState state) {
+    this.state = state;
+  }
+
+  public void unsetState() {
+    this.state = null;
+  }
+
+  /** Returns true if field state is set (has been assigned a value) and false otherwise */
+  public boolean isSetState() {
+    return this.state != null;
+  }
+
+  public void setStateIsSet(boolean value) {
+    if (!value) {
+      this.state = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case LOCKID:
+      if (value == null) {
+        unsetLockid();
+      } else {
+        setLockid((Long)value);
+      }
+      break;
+
+    case STATE:
+      if (value == null) {
+        unsetState();
+      } else {
+        setState((LockState)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case LOCKID:
+      return Long.valueOf(getLockid());
+
+    case STATE:
+      return getState();
+
+    }
+    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 LOCKID:
+      return isSetLockid();
+    case STATE:
+      return isSetState();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof LockResponse)
+      return this.equals((LockResponse)that);
+    return false;
+  }
+
+  public boolean equals(LockResponse that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_lockid = true;
+    boolean that_present_lockid = true;
+    if (this_present_lockid || that_present_lockid) {
+      if (!(this_present_lockid && that_present_lockid))
+        return false;
+      if (this.lockid != that.lockid)
+        return false;
+    }
+
+    boolean this_present_state = true && this.isSetState();
+    boolean that_present_state = true && that.isSetState();
+    if (this_present_state || that_present_state) {
+      if (!(this_present_state && that_present_state))
+        return false;
+      if (!this.state.equals(that.state))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+
+    boolean present_lockid = true;
+    builder.append(present_lockid);
+    if (present_lockid)
+      builder.append(lockid);
+
+    boolean present_state = true && (isSetState());
+    builder.append(present_state);
+    if (present_state)
+      builder.append(state.getValue());
+
+    return builder.toHashCode();
+  }
+
+  public int compareTo(LockResponse other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    LockResponse typedOther = (LockResponse)other;
+
+    lastComparison = Boolean.valueOf(isSetLockid()).compareTo(typedOther.isSetLockid());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetLockid()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, typedOther.lockid);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetState()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
+      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("LockResponse(");
+    boolean first = true;
+
+    sb.append("lockid:");
+    sb.append(this.lockid);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("state:");
+    if (this.state == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.state);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetLockid()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'lockid' is unset! Struct:" + toString());
+    }
+
+    if (!isSetState()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' 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 LockResponseStandardSchemeFactory implements SchemeFactory {
+    public LockResponseStandardScheme getScheme() {
+      return new LockResponseStandardScheme();
+    }
+  }
+
+  private static class LockResponseStandardScheme extends StandardScheme<LockResponse> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, LockResponse 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: // LOCKID
+            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+              struct.lockid = iprot.readI64();
+              struct.setLockidIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // STATE
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.state = LockState.findByValue(iprot.readI32());
+              struct.setStateIsSet(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, LockResponse struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(LOCKID_FIELD_DESC);
+      oprot.writeI64(struct.lockid);
+      oprot.writeFieldEnd();
+      if (struct.state != null) {
+        oprot.writeFieldBegin(STATE_FIELD_DESC);
+        oprot.writeI32(struct.state.getValue());
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class LockResponseTupleSchemeFactory implements SchemeFactory {
+    public LockResponseTupleScheme getScheme() {
+      return new LockResponseTupleScheme();
+    }
+  }
+
+  private static class LockResponseTupleScheme extends TupleScheme<LockResponse> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, LockResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeI64(struct.lockid);
+      oprot.writeI32(struct.state.getValue());
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, LockResponse struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.lockid = iprot.readI64();
+      struct.setLockidIsSet(true);
+      struct.state = LockState.findByValue(iprot.readI32());
+      struct.setStateIsSet(true);
+    }
+  }
+
+}
+

Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java?rev=1574266&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java Wed Mar  5 00:20:53 2014
@@ -0,0 +1,51 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum LockState implements org.apache.thrift.TEnum {
+  ACQUIRED(1),
+  WAITING(2),
+  ABORT(3),
+  NOT_ACQUIRED(4);
+
+  private final int value;
+
+  private LockState(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static LockState findByValue(int value) { 
+    switch (value) {
+      case 1:
+        return ACQUIRED;
+      case 2:
+        return WAITING;
+      case 3:
+        return ABORT;
+      case 4:
+        return NOT_ACQUIRED;
+      default:
+        return null;
+    }
+  }
+}



Mime
View raw message