hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r1057999 [6/22] - in /hive/trunk: ./ common/src/java/org/apache/hadoop/hive/conf/ conf/ metastore/if/ metastore/src/gen/thrift/gen-cpp/ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ metastore/src/gen/thrift/gen...
Date Wed, 12 Jan 2011 06:58:10 GMT
Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java?rev=1057999&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeGrantInfo.java Wed Jan 12 06:58:04 2011
@@ -0,0 +1,663 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+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;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class PrivilegeGrantInfo implements TBase<PrivilegeGrantInfo, PrivilegeGrantInfo._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("PrivilegeGrantInfo");
+
+  private static final TField PRIVILEGE_FIELD_DESC = new TField("privilege", TType.STRING, (short)1);
+  private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)2);
+  private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)3);
+  private static final TField GRANTOR_TYPE_FIELD_DESC = new TField("grantorType", TType.I32, (short)4);
+  private static final TField GRANT_OPTION_FIELD_DESC = new TField("grantOption", TType.BOOL, (short)5);
+
+  private String privilege;
+  private int createTime;
+  private String grantor;
+  private PrincipalType grantorType;
+  private boolean grantOption;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    PRIVILEGE((short)1, "privilege"),
+    CREATE_TIME((short)2, "createTime"),
+    GRANTOR((short)3, "grantor"),
+    /**
+     * 
+     * @see PrincipalType
+     */
+    GRANTOR_TYPE((short)4, "grantorType"),
+    GRANT_OPTION((short)5, "grantOption");
+
+    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: // PRIVILEGE
+          return PRIVILEGE;
+        case 2: // CREATE_TIME
+          return CREATE_TIME;
+        case 3: // GRANTOR
+          return GRANTOR;
+        case 4: // GRANTOR_TYPE
+          return GRANTOR_TYPE;
+        case 5: // GRANT_OPTION
+          return GRANT_OPTION;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __CREATETIME_ISSET_ID = 0;
+  private static final int __GRANTOPTION_ISSET_ID = 1;
+  private BitSet __isset_bit_vector = new BitSet(2);
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.PRIVILEGE, new FieldMetaData("privilege", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.I32)));
+    tmpMap.put(_Fields.GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.GRANTOR_TYPE, new FieldMetaData("grantorType", TFieldRequirementType.DEFAULT, 
+        new EnumMetaData(TType.ENUM, PrincipalType.class)));
+    tmpMap.put(_Fields.GRANT_OPTION, new FieldMetaData("grantOption", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.BOOL)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(PrivilegeGrantInfo.class, metaDataMap);
+  }
+
+  public PrivilegeGrantInfo() {
+  }
+
+  public PrivilegeGrantInfo(
+    String privilege,
+    int createTime,
+    String grantor,
+    PrincipalType grantorType,
+    boolean grantOption)
+  {
+    this();
+    this.privilege = privilege;
+    this.createTime = createTime;
+    setCreateTimeIsSet(true);
+    this.grantor = grantor;
+    this.grantorType = grantorType;
+    this.grantOption = grantOption;
+    setGrantOptionIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public PrivilegeGrantInfo(PrivilegeGrantInfo other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    if (other.isSetPrivilege()) {
+      this.privilege = other.privilege;
+    }
+    this.createTime = other.createTime;
+    if (other.isSetGrantor()) {
+      this.grantor = other.grantor;
+    }
+    if (other.isSetGrantorType()) {
+      this.grantorType = other.grantorType;
+    }
+    this.grantOption = other.grantOption;
+  }
+
+  public PrivilegeGrantInfo deepCopy() {
+    return new PrivilegeGrantInfo(this);
+  }
+
+  @Override
+  public void clear() {
+    this.privilege = null;
+    setCreateTimeIsSet(false);
+    this.createTime = 0;
+    this.grantor = null;
+    this.grantorType = null;
+    setGrantOptionIsSet(false);
+    this.grantOption = false;
+  }
+
+  public String getPrivilege() {
+    return this.privilege;
+  }
+
+  public void setPrivilege(String privilege) {
+    this.privilege = privilege;
+  }
+
+  public void unsetPrivilege() {
+    this.privilege = null;
+  }
+
+  /** Returns true if field privilege is set (has been asigned a value) and false otherwise */
+  public boolean isSetPrivilege() {
+    return this.privilege != null;
+  }
+
+  public void setPrivilegeIsSet(boolean value) {
+    if (!value) {
+      this.privilege = null;
+    }
+  }
+
+  public int getCreateTime() {
+    return this.createTime;
+  }
+
+  public void setCreateTime(int createTime) {
+    this.createTime = createTime;
+    setCreateTimeIsSet(true);
+  }
+
+  public void unsetCreateTime() {
+    __isset_bit_vector.clear(__CREATETIME_ISSET_ID);
+  }
+
+  /** Returns true if field createTime is set (has been asigned a value) and false otherwise */
+  public boolean isSetCreateTime() {
+    return __isset_bit_vector.get(__CREATETIME_ISSET_ID);
+  }
+
+  public void setCreateTimeIsSet(boolean value) {
+    __isset_bit_vector.set(__CREATETIME_ISSET_ID, value);
+  }
+
+  public String getGrantor() {
+    return this.grantor;
+  }
+
+  public void setGrantor(String grantor) {
+    this.grantor = grantor;
+  }
+
+  public void unsetGrantor() {
+    this.grantor = null;
+  }
+
+  /** Returns true if field grantor is set (has been asigned a value) and false otherwise */
+  public boolean isSetGrantor() {
+    return this.grantor != null;
+  }
+
+  public void setGrantorIsSet(boolean value) {
+    if (!value) {
+      this.grantor = null;
+    }
+  }
+
+  /**
+   * 
+   * @see PrincipalType
+   */
+  public PrincipalType getGrantorType() {
+    return this.grantorType;
+  }
+
+  /**
+   * 
+   * @see PrincipalType
+   */
+  public void setGrantorType(PrincipalType grantorType) {
+    this.grantorType = grantorType;
+  }
+
+  public void unsetGrantorType() {
+    this.grantorType = null;
+  }
+
+  /** Returns true if field grantorType is set (has been asigned a value) and false otherwise */
+  public boolean isSetGrantorType() {
+    return this.grantorType != null;
+  }
+
+  public void setGrantorTypeIsSet(boolean value) {
+    if (!value) {
+      this.grantorType = null;
+    }
+  }
+
+  public boolean isGrantOption() {
+    return this.grantOption;
+  }
+
+  public void setGrantOption(boolean grantOption) {
+    this.grantOption = grantOption;
+    setGrantOptionIsSet(true);
+  }
+
+  public void unsetGrantOption() {
+    __isset_bit_vector.clear(__GRANTOPTION_ISSET_ID);
+  }
+
+  /** Returns true if field grantOption is set (has been asigned a value) and false otherwise */
+  public boolean isSetGrantOption() {
+    return __isset_bit_vector.get(__GRANTOPTION_ISSET_ID);
+  }
+
+  public void setGrantOptionIsSet(boolean value) {
+    __isset_bit_vector.set(__GRANTOPTION_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case PRIVILEGE:
+      if (value == null) {
+        unsetPrivilege();
+      } else {
+        setPrivilege((String)value);
+      }
+      break;
+
+    case CREATE_TIME:
+      if (value == null) {
+        unsetCreateTime();
+      } else {
+        setCreateTime((Integer)value);
+      }
+      break;
+
+    case GRANTOR:
+      if (value == null) {
+        unsetGrantor();
+      } else {
+        setGrantor((String)value);
+      }
+      break;
+
+    case GRANTOR_TYPE:
+      if (value == null) {
+        unsetGrantorType();
+      } else {
+        setGrantorType((PrincipalType)value);
+      }
+      break;
+
+    case GRANT_OPTION:
+      if (value == null) {
+        unsetGrantOption();
+      } else {
+        setGrantOption((Boolean)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case PRIVILEGE:
+      return getPrivilege();
+
+    case CREATE_TIME:
+      return new Integer(getCreateTime());
+
+    case GRANTOR:
+      return getGrantor();
+
+    case GRANTOR_TYPE:
+      return getGrantorType();
+
+    case GRANT_OPTION:
+      return new Boolean(isGrantOption());
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case PRIVILEGE:
+      return isSetPrivilege();
+    case CREATE_TIME:
+      return isSetCreateTime();
+    case GRANTOR:
+      return isSetGrantor();
+    case GRANTOR_TYPE:
+      return isSetGrantorType();
+    case GRANT_OPTION:
+      return isSetGrantOption();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof PrivilegeGrantInfo)
+      return this.equals((PrivilegeGrantInfo)that);
+    return false;
+  }
+
+  public boolean equals(PrivilegeGrantInfo that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_privilege = true && this.isSetPrivilege();
+    boolean that_present_privilege = true && that.isSetPrivilege();
+    if (this_present_privilege || that_present_privilege) {
+      if (!(this_present_privilege && that_present_privilege))
+        return false;
+      if (!this.privilege.equals(that.privilege))
+        return false;
+    }
+
+    boolean this_present_createTime = true;
+    boolean that_present_createTime = true;
+    if (this_present_createTime || that_present_createTime) {
+      if (!(this_present_createTime && that_present_createTime))
+        return false;
+      if (this.createTime != that.createTime)
+        return false;
+    }
+
+    boolean this_present_grantor = true && this.isSetGrantor();
+    boolean that_present_grantor = true && that.isSetGrantor();
+    if (this_present_grantor || that_present_grantor) {
+      if (!(this_present_grantor && that_present_grantor))
+        return false;
+      if (!this.grantor.equals(that.grantor))
+        return false;
+    }
+
+    boolean this_present_grantorType = true && this.isSetGrantorType();
+    boolean that_present_grantorType = true && that.isSetGrantorType();
+    if (this_present_grantorType || that_present_grantorType) {
+      if (!(this_present_grantorType && that_present_grantorType))
+        return false;
+      if (!this.grantorType.equals(that.grantorType))
+        return false;
+    }
+
+    boolean this_present_grantOption = true;
+    boolean that_present_grantOption = true;
+    if (this_present_grantOption || that_present_grantOption) {
+      if (!(this_present_grantOption && that_present_grantOption))
+        return false;
+      if (this.grantOption != that.grantOption)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(PrivilegeGrantInfo other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    PrivilegeGrantInfo typedOther = (PrivilegeGrantInfo)other;
+
+    lastComparison = Boolean.valueOf(isSetPrivilege()).compareTo(typedOther.isSetPrivilege());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPrivilege()) {
+      lastComparison = TBaseHelper.compareTo(this.privilege, typedOther.privilege);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCreateTime()) {
+      lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetGrantor()).compareTo(typedOther.isSetGrantor());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGrantor()) {
+      lastComparison = TBaseHelper.compareTo(this.grantor, typedOther.grantor);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetGrantorType()).compareTo(typedOther.isSetGrantorType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGrantorType()) {
+      lastComparison = TBaseHelper.compareTo(this.grantorType, typedOther.grantorType);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(typedOther.isSetGrantOption());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGrantOption()) {
+      lastComparison = TBaseHelper.compareTo(this.grantOption, typedOther.grantOption);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // PRIVILEGE
+          if (field.type == TType.STRING) {
+            this.privilege = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // CREATE_TIME
+          if (field.type == TType.I32) {
+            this.createTime = iprot.readI32();
+            setCreateTimeIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 3: // GRANTOR
+          if (field.type == TType.STRING) {
+            this.grantor = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 4: // GRANTOR_TYPE
+          if (field.type == TType.I32) {
+            this.grantorType = PrincipalType.findByValue(iprot.readI32());
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 5: // GRANT_OPTION
+          if (field.type == TType.BOOL) {
+            this.grantOption = iprot.readBool();
+            setGrantOptionIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.privilege != null) {
+      oprot.writeFieldBegin(PRIVILEGE_FIELD_DESC);
+      oprot.writeString(this.privilege);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+    oprot.writeI32(this.createTime);
+    oprot.writeFieldEnd();
+    if (this.grantor != null) {
+      oprot.writeFieldBegin(GRANTOR_FIELD_DESC);
+      oprot.writeString(this.grantor);
+      oprot.writeFieldEnd();
+    }
+    if (this.grantorType != null) {
+      oprot.writeFieldBegin(GRANTOR_TYPE_FIELD_DESC);
+      oprot.writeI32(this.grantorType.getValue());
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(GRANT_OPTION_FIELD_DESC);
+    oprot.writeBool(this.grantOption);
+    oprot.writeFieldEnd();
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("PrivilegeGrantInfo(");
+    boolean first = true;
+
+    sb.append("privilege:");
+    if (this.privilege == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.privilege);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("createTime:");
+    sb.append(this.createTime);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("grantor:");
+    if (this.grantor == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.grantor);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("grantorType:");
+    if (this.grantorType == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.grantorType);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("grantOption:");
+    sb.append(this.grantOption);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+  }
+
+}
+

Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java?rev=1057999&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java Wed Jan 12 06:58:04 2011
@@ -0,0 +1,480 @@
+/**
+ * Autogenerated by Thrift
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+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;
+
+import org.apache.thrift.*;
+import org.apache.thrift.async.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.protocol.*;
+
+public class Role implements TBase<Role, Role._Fields>, java.io.Serializable, Cloneable {
+  private static final TStruct STRUCT_DESC = new TStruct("Role");
+
+  private static final TField ROLE_NAME_FIELD_DESC = new TField("roleName", TType.STRING, (short)1);
+  private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)2);
+  private static final TField OWNER_NAME_FIELD_DESC = new TField("ownerName", TType.STRING, (short)3);
+
+  private String roleName;
+  private int createTime;
+  private String ownerName;
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  public enum _Fields implements TFieldIdEnum {
+    ROLE_NAME((short)1, "roleName"),
+    CREATE_TIME((short)2, "createTime"),
+    OWNER_NAME((short)3, "ownerName");
+
+    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;
+        case 2: // CREATE_TIME
+          return CREATE_TIME;
+        case 3: // OWNER_NAME
+          return OWNER_NAME;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __CREATETIME_ISSET_ID = 0;
+  private BitSet __isset_bit_vector = new BitSet(1);
+
+  public static final Map<_Fields, FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("roleName", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.I32)));
+    tmpMap.put(_Fields.OWNER_NAME, new FieldMetaData("ownerName", TFieldRequirementType.DEFAULT, 
+        new FieldValueMetaData(TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    FieldMetaData.addStructMetaDataMap(Role.class, metaDataMap);
+  }
+
+  public Role() {
+  }
+
+  public Role(
+    String roleName,
+    int createTime,
+    String ownerName)
+  {
+    this();
+    this.roleName = roleName;
+    this.createTime = createTime;
+    setCreateTimeIsSet(true);
+    this.ownerName = ownerName;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public Role(Role other) {
+    __isset_bit_vector.clear();
+    __isset_bit_vector.or(other.__isset_bit_vector);
+    if (other.isSetRoleName()) {
+      this.roleName = other.roleName;
+    }
+    this.createTime = other.createTime;
+    if (other.isSetOwnerName()) {
+      this.ownerName = other.ownerName;
+    }
+  }
+
+  public Role deepCopy() {
+    return new Role(this);
+  }
+
+  @Override
+  public void clear() {
+    this.roleName = null;
+    setCreateTimeIsSet(false);
+    this.createTime = 0;
+    this.ownerName = 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 asigned a value) and false otherwise */
+  public boolean isSetRoleName() {
+    return this.roleName != null;
+  }
+
+  public void setRoleNameIsSet(boolean value) {
+    if (!value) {
+      this.roleName = null;
+    }
+  }
+
+  public int getCreateTime() {
+    return this.createTime;
+  }
+
+  public void setCreateTime(int createTime) {
+    this.createTime = createTime;
+    setCreateTimeIsSet(true);
+  }
+
+  public void unsetCreateTime() {
+    __isset_bit_vector.clear(__CREATETIME_ISSET_ID);
+  }
+
+  /** Returns true if field createTime is set (has been asigned a value) and false otherwise */
+  public boolean isSetCreateTime() {
+    return __isset_bit_vector.get(__CREATETIME_ISSET_ID);
+  }
+
+  public void setCreateTimeIsSet(boolean value) {
+    __isset_bit_vector.set(__CREATETIME_ISSET_ID, value);
+  }
+
+  public String getOwnerName() {
+    return this.ownerName;
+  }
+
+  public void setOwnerName(String ownerName) {
+    this.ownerName = ownerName;
+  }
+
+  public void unsetOwnerName() {
+    this.ownerName = null;
+  }
+
+  /** Returns true if field ownerName is set (has been asigned a value) and false otherwise */
+  public boolean isSetOwnerName() {
+    return this.ownerName != null;
+  }
+
+  public void setOwnerNameIsSet(boolean value) {
+    if (!value) {
+      this.ownerName = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case ROLE_NAME:
+      if (value == null) {
+        unsetRoleName();
+      } else {
+        setRoleName((String)value);
+      }
+      break;
+
+    case CREATE_TIME:
+      if (value == null) {
+        unsetCreateTime();
+      } else {
+        setCreateTime((Integer)value);
+      }
+      break;
+
+    case OWNER_NAME:
+      if (value == null) {
+        unsetOwnerName();
+      } else {
+        setOwnerName((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case ROLE_NAME:
+      return getRoleName();
+
+    case CREATE_TIME:
+      return new Integer(getCreateTime());
+
+    case OWNER_NAME:
+      return getOwnerName();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case ROLE_NAME:
+      return isSetRoleName();
+    case CREATE_TIME:
+      return isSetCreateTime();
+    case OWNER_NAME:
+      return isSetOwnerName();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof Role)
+      return this.equals((Role)that);
+    return false;
+  }
+
+  public boolean equals(Role 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;
+    }
+
+    boolean this_present_createTime = true;
+    boolean that_present_createTime = true;
+    if (this_present_createTime || that_present_createTime) {
+      if (!(this_present_createTime && that_present_createTime))
+        return false;
+      if (this.createTime != that.createTime)
+        return false;
+    }
+
+    boolean this_present_ownerName = true && this.isSetOwnerName();
+    boolean that_present_ownerName = true && that.isSetOwnerName();
+    if (this_present_ownerName || that_present_ownerName) {
+      if (!(this_present_ownerName && that_present_ownerName))
+        return false;
+      if (!this.ownerName.equals(that.ownerName))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  public int compareTo(Role other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+    Role typedOther = (Role)other;
+
+    lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetRoleName()) {
+      lastComparison = TBaseHelper.compareTo(this.roleName, typedOther.roleName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetCreateTime()) {
+      lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(typedOther.isSetOwnerName());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOwnerName()) {
+      lastComparison = TBaseHelper.compareTo(this.ownerName, typedOther.ownerName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(TProtocol iprot) throws TException {
+    TField field;
+    iprot.readStructBegin();
+    while (true)
+    {
+      field = iprot.readFieldBegin();
+      if (field.type == TType.STOP) { 
+        break;
+      }
+      switch (field.id) {
+        case 1: // ROLE_NAME
+          if (field.type == TType.STRING) {
+            this.roleName = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 2: // CREATE_TIME
+          if (field.type == TType.I32) {
+            this.createTime = iprot.readI32();
+            setCreateTimeIsSet(true);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        case 3: // OWNER_NAME
+          if (field.type == TType.STRING) {
+            this.ownerName = iprot.readString();
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
+        default:
+          TProtocolUtil.skip(iprot, field.type);
+      }
+      iprot.readFieldEnd();
+    }
+    iprot.readStructEnd();
+    validate();
+  }
+
+  public void write(TProtocol oprot) throws TException {
+    validate();
+
+    oprot.writeStructBegin(STRUCT_DESC);
+    if (this.roleName != null) {
+      oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
+      oprot.writeString(this.roleName);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+    oprot.writeI32(this.createTime);
+    oprot.writeFieldEnd();
+    if (this.ownerName != null) {
+      oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC);
+      oprot.writeString(this.ownerName);
+      oprot.writeFieldEnd();
+    }
+    oprot.writeFieldStop();
+    oprot.writeStructEnd();
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("Role(");
+    boolean first = true;
+
+    sb.append("roleName:");
+    if (this.roleName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.roleName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("createTime:");
+    sb.append(this.createTime);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("ownerName:");
+    if (this.ownerName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.ownerName);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws TException {
+    // check for required fields
+  }
+
+}
+

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java?rev=1057999&r1=1057998&r2=1057999&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java Wed Jan 12 06:58:04 2011
@@ -369,14 +369,14 @@ public class Schema implements TBase<Sch
         case 1: // FIELD_SCHEMAS
           if (field.type == TType.LIST) {
             {
-              TList _list54 = iprot.readListBegin();
-              this.fieldSchemas = new ArrayList<FieldSchema>(_list54.size);
-              for (int _i55 = 0; _i55 < _list54.size; ++_i55)
+              TList _list89 = iprot.readListBegin();
+              this.fieldSchemas = new ArrayList<FieldSchema>(_list89.size);
+              for (int _i90 = 0; _i90 < _list89.size; ++_i90)
               {
-                FieldSchema _elem56;
-                _elem56 = new FieldSchema();
-                _elem56.read(iprot);
-                this.fieldSchemas.add(_elem56);
+                FieldSchema _elem91;
+                _elem91 = new FieldSchema();
+                _elem91.read(iprot);
+                this.fieldSchemas.add(_elem91);
               }
               iprot.readListEnd();
             }
@@ -387,15 +387,15 @@ public class Schema implements TBase<Sch
         case 2: // PROPERTIES
           if (field.type == TType.MAP) {
             {
-              TMap _map57 = iprot.readMapBegin();
-              this.properties = new HashMap<String,String>(2*_map57.size);
-              for (int _i58 = 0; _i58 < _map57.size; ++_i58)
+              TMap _map92 = iprot.readMapBegin();
+              this.properties = new HashMap<String,String>(2*_map92.size);
+              for (int _i93 = 0; _i93 < _map92.size; ++_i93)
               {
-                String _key59;
-                String _val60;
-                _key59 = iprot.readString();
-                _val60 = iprot.readString();
-                this.properties.put(_key59, _val60);
+                String _key94;
+                String _val95;
+                _key94 = iprot.readString();
+                _val95 = iprot.readString();
+                this.properties.put(_key94, _val95);
               }
               iprot.readMapEnd();
             }
@@ -420,9 +420,9 @@ public class Schema implements TBase<Sch
       oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRUCT, this.fieldSchemas.size()));
-        for (FieldSchema _iter61 : this.fieldSchemas)
+        for (FieldSchema _iter96 : this.fieldSchemas)
         {
-          _iter61.write(oprot);
+          _iter96.write(oprot);
         }
         oprot.writeListEnd();
       }
@@ -432,10 +432,10 @@ public class Schema implements TBase<Sch
       oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
       {
         oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.properties.size()));
-        for (Map.Entry<String, String> _iter62 : this.properties.entrySet())
+        for (Map.Entry<String, String> _iter97 : this.properties.entrySet())
         {
-          oprot.writeString(_iter62.getKey());
-          oprot.writeString(_iter62.getValue());
+          oprot.writeString(_iter97.getKey());
+          oprot.writeString(_iter97.getValue());
         }
         oprot.writeMapEnd();
       }

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java?rev=1057999&r1=1057998&r2=1057999&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java Wed Jan 12 06:58:04 2011
@@ -431,15 +431,15 @@ public class SerDeInfo implements TBase<
         case 3: // PARAMETERS
           if (field.type == TType.MAP) {
             {
-              TMap _map9 = iprot.readMapBegin();
-              this.parameters = new HashMap<String,String>(2*_map9.size);
-              for (int _i10 = 0; _i10 < _map9.size; ++_i10)
+              TMap _map44 = iprot.readMapBegin();
+              this.parameters = new HashMap<String,String>(2*_map44.size);
+              for (int _i45 = 0; _i45 < _map44.size; ++_i45)
               {
-                String _key11;
-                String _val12;
-                _key11 = iprot.readString();
-                _val12 = iprot.readString();
-                this.parameters.put(_key11, _val12);
+                String _key46;
+                String _val47;
+                _key46 = iprot.readString();
+                _val47 = iprot.readString();
+                this.parameters.put(_key46, _val47);
               }
               iprot.readMapEnd();
             }
@@ -474,10 +474,10 @@ public class SerDeInfo implements TBase<
       oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
       {
         oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size()));
-        for (Map.Entry<String, String> _iter13 : this.parameters.entrySet())
+        for (Map.Entry<String, String> _iter48 : this.parameters.entrySet())
         {
-          oprot.writeString(_iter13.getKey());
-          oprot.writeString(_iter13.getValue());
+          oprot.writeString(_iter48.getKey());
+          oprot.writeString(_iter48.getValue());
         }
         oprot.writeMapEnd();
       }

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java?rev=1057999&r1=1057998&r2=1057999&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java Wed Jan 12 06:58:04 2011
@@ -956,14 +956,14 @@ public class StorageDescriptor implement
         case 1: // COLS
           if (field.type == TType.LIST) {
             {
-              TList _list14 = iprot.readListBegin();
-              this.cols = new ArrayList<FieldSchema>(_list14.size);
-              for (int _i15 = 0; _i15 < _list14.size; ++_i15)
+              TList _list49 = iprot.readListBegin();
+              this.cols = new ArrayList<FieldSchema>(_list49.size);
+              for (int _i50 = 0; _i50 < _list49.size; ++_i50)
               {
-                FieldSchema _elem16;
-                _elem16 = new FieldSchema();
-                _elem16.read(iprot);
-                this.cols.add(_elem16);
+                FieldSchema _elem51;
+                _elem51 = new FieldSchema();
+                _elem51.read(iprot);
+                this.cols.add(_elem51);
               }
               iprot.readListEnd();
             }
@@ -1019,13 +1019,13 @@ public class StorageDescriptor implement
         case 8: // BUCKET_COLS
           if (field.type == TType.LIST) {
             {
-              TList _list17 = iprot.readListBegin();
-              this.bucketCols = new ArrayList<String>(_list17.size);
-              for (int _i18 = 0; _i18 < _list17.size; ++_i18)
+              TList _list52 = iprot.readListBegin();
+              this.bucketCols = new ArrayList<String>(_list52.size);
+              for (int _i53 = 0; _i53 < _list52.size; ++_i53)
               {
-                String _elem19;
-                _elem19 = iprot.readString();
-                this.bucketCols.add(_elem19);
+                String _elem54;
+                _elem54 = iprot.readString();
+                this.bucketCols.add(_elem54);
               }
               iprot.readListEnd();
             }
@@ -1036,14 +1036,14 @@ public class StorageDescriptor implement
         case 9: // SORT_COLS
           if (field.type == TType.LIST) {
             {
-              TList _list20 = iprot.readListBegin();
-              this.sortCols = new ArrayList<Order>(_list20.size);
-              for (int _i21 = 0; _i21 < _list20.size; ++_i21)
+              TList _list55 = iprot.readListBegin();
+              this.sortCols = new ArrayList<Order>(_list55.size);
+              for (int _i56 = 0; _i56 < _list55.size; ++_i56)
               {
-                Order _elem22;
-                _elem22 = new Order();
-                _elem22.read(iprot);
-                this.sortCols.add(_elem22);
+                Order _elem57;
+                _elem57 = new Order();
+                _elem57.read(iprot);
+                this.sortCols.add(_elem57);
               }
               iprot.readListEnd();
             }
@@ -1054,15 +1054,15 @@ public class StorageDescriptor implement
         case 10: // PARAMETERS
           if (field.type == TType.MAP) {
             {
-              TMap _map23 = iprot.readMapBegin();
-              this.parameters = new HashMap<String,String>(2*_map23.size);
-              for (int _i24 = 0; _i24 < _map23.size; ++_i24)
+              TMap _map58 = iprot.readMapBegin();
+              this.parameters = new HashMap<String,String>(2*_map58.size);
+              for (int _i59 = 0; _i59 < _map58.size; ++_i59)
               {
-                String _key25;
-                String _val26;
-                _key25 = iprot.readString();
-                _val26 = iprot.readString();
-                this.parameters.put(_key25, _val26);
+                String _key60;
+                String _val61;
+                _key60 = iprot.readString();
+                _val61 = iprot.readString();
+                this.parameters.put(_key60, _val61);
               }
               iprot.readMapEnd();
             }
@@ -1087,9 +1087,9 @@ public class StorageDescriptor implement
       oprot.writeFieldBegin(COLS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRUCT, this.cols.size()));
-        for (FieldSchema _iter27 : this.cols)
+        for (FieldSchema _iter62 : this.cols)
         {
-          _iter27.write(oprot);
+          _iter62.write(oprot);
         }
         oprot.writeListEnd();
       }
@@ -1125,9 +1125,9 @@ public class StorageDescriptor implement
       oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRING, this.bucketCols.size()));
-        for (String _iter28 : this.bucketCols)
+        for (String _iter63 : this.bucketCols)
         {
-          oprot.writeString(_iter28);
+          oprot.writeString(_iter63);
         }
         oprot.writeListEnd();
       }
@@ -1137,9 +1137,9 @@ public class StorageDescriptor implement
       oprot.writeFieldBegin(SORT_COLS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRUCT, this.sortCols.size()));
-        for (Order _iter29 : this.sortCols)
+        for (Order _iter64 : this.sortCols)
         {
-          _iter29.write(oprot);
+          _iter64.write(oprot);
         }
         oprot.writeListEnd();
       }
@@ -1149,10 +1149,10 @@ public class StorageDescriptor implement
       oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
       {
         oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size()));
-        for (Map.Entry<String, String> _iter30 : this.parameters.entrySet())
+        for (Map.Entry<String, String> _iter65 : this.parameters.entrySet())
         {
-          oprot.writeString(_iter30.getKey());
-          oprot.writeString(_iter30.getValue());
+          oprot.writeString(_iter65.getKey());
+          oprot.writeString(_iter65.getValue());
         }
         oprot.writeMapEnd();
       }

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java?rev=1057999&r1=1057998&r2=1057999&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java Wed Jan 12 06:58:04 2011
@@ -41,6 +41,7 @@ public class Table implements TBase<Tabl
   private static final TField VIEW_ORIGINAL_TEXT_FIELD_DESC = new TField("viewOriginalText", TType.STRING, (short)10);
   private static final TField VIEW_EXPANDED_TEXT_FIELD_DESC = new TField("viewExpandedText", TType.STRING, (short)11);
   private static final TField TABLE_TYPE_FIELD_DESC = new TField("tableType", TType.STRING, (short)12);
+  private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)13);
 
   private String tableName;
   private String dbName;
@@ -54,6 +55,7 @@ public class Table implements TBase<Tabl
   private String viewOriginalText;
   private String viewExpandedText;
   private String tableType;
+  private PrincipalPrivilegeSet privileges;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements TFieldIdEnum {
@@ -68,7 +70,8 @@ public class Table implements TBase<Tabl
     PARAMETERS((short)9, "parameters"),
     VIEW_ORIGINAL_TEXT((short)10, "viewOriginalText"),
     VIEW_EXPANDED_TEXT((short)11, "viewExpandedText"),
-    TABLE_TYPE((short)12, "tableType");
+    TABLE_TYPE((short)12, "tableType"),
+    PRIVILEGES((short)13, "privileges");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -107,6 +110,8 @@ public class Table implements TBase<Tabl
           return VIEW_EXPANDED_TEXT;
         case 12: // TABLE_TYPE
           return TABLE_TYPE;
+        case 13: // PRIVILEGES
+          return PRIVILEGES;
         default:
           return null;
       }
@@ -182,6 +187,8 @@ public class Table implements TBase<Tabl
         new FieldValueMetaData(TType.STRING)));
     tmpMap.put(_Fields.TABLE_TYPE, new FieldMetaData("tableType", TFieldRequirementType.DEFAULT, 
         new FieldValueMetaData(TType.STRING)));
+    tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.OPTIONAL, 
+        new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     FieldMetaData.addStructMetaDataMap(Table.class, metaDataMap);
   }
@@ -273,6 +280,9 @@ public class Table implements TBase<Tabl
     if (other.isSetTableType()) {
       this.tableType = other.tableType;
     }
+    if (other.isSetPrivileges()) {
+      this.privileges = new PrincipalPrivilegeSet(other.privileges);
+    }
   }
 
   public Table deepCopy() {
@@ -296,6 +306,7 @@ public class Table implements TBase<Tabl
     this.viewOriginalText = null;
     this.viewExpandedText = null;
     this.tableType = null;
+    this.privileges = null;
   }
 
   public String getTableName() {
@@ -597,6 +608,29 @@ public class Table implements TBase<Tabl
     }
   }
 
+  public PrincipalPrivilegeSet getPrivileges() {
+    return this.privileges;
+  }
+
+  public void setPrivileges(PrincipalPrivilegeSet privileges) {
+    this.privileges = privileges;
+  }
+
+  public void unsetPrivileges() {
+    this.privileges = null;
+  }
+
+  /** Returns true if field privileges is set (has been asigned a value) and false otherwise */
+  public boolean isSetPrivileges() {
+    return this.privileges != null;
+  }
+
+  public void setPrivilegesIsSet(boolean value) {
+    if (!value) {
+      this.privileges = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case TABLE_NAME:
@@ -695,6 +729,14 @@ public class Table implements TBase<Tabl
       }
       break;
 
+    case PRIVILEGES:
+      if (value == null) {
+        unsetPrivileges();
+      } else {
+        setPrivileges((PrincipalPrivilegeSet)value);
+      }
+      break;
+
     }
   }
 
@@ -736,6 +778,9 @@ public class Table implements TBase<Tabl
     case TABLE_TYPE:
       return getTableType();
 
+    case PRIVILEGES:
+      return getPrivileges();
+
     }
     throw new IllegalStateException();
   }
@@ -771,6 +816,8 @@ public class Table implements TBase<Tabl
       return isSetViewExpandedText();
     case TABLE_TYPE:
       return isSetTableType();
+    case PRIVILEGES:
+      return isSetPrivileges();
     }
     throw new IllegalStateException();
   }
@@ -896,6 +943,15 @@ public class Table implements TBase<Tabl
         return false;
     }
 
+    boolean this_present_privileges = true && this.isSetPrivileges();
+    boolean that_present_privileges = true && that.isSetPrivileges();
+    if (this_present_privileges || that_present_privileges) {
+      if (!(this_present_privileges && that_present_privileges))
+        return false;
+      if (!this.privileges.equals(that.privileges))
+        return false;
+    }
+
     return true;
   }
 
@@ -1032,6 +1088,16 @@ public class Table implements TBase<Tabl
         return lastComparison;
       }
     }
+    lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPrivileges()) {
+      lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
     return 0;
   }
 
@@ -1105,14 +1171,14 @@ public class Table implements TBase<Tabl
         case 8: // PARTITION_KEYS
           if (field.type == TType.LIST) {
             {
-              TList _list31 = iprot.readListBegin();
-              this.partitionKeys = new ArrayList<FieldSchema>(_list31.size);
-              for (int _i32 = 0; _i32 < _list31.size; ++_i32)
+              TList _list66 = iprot.readListBegin();
+              this.partitionKeys = new ArrayList<FieldSchema>(_list66.size);
+              for (int _i67 = 0; _i67 < _list66.size; ++_i67)
               {
-                FieldSchema _elem33;
-                _elem33 = new FieldSchema();
-                _elem33.read(iprot);
-                this.partitionKeys.add(_elem33);
+                FieldSchema _elem68;
+                _elem68 = new FieldSchema();
+                _elem68.read(iprot);
+                this.partitionKeys.add(_elem68);
               }
               iprot.readListEnd();
             }
@@ -1123,15 +1189,15 @@ public class Table implements TBase<Tabl
         case 9: // PARAMETERS
           if (field.type == TType.MAP) {
             {
-              TMap _map34 = iprot.readMapBegin();
-              this.parameters = new HashMap<String,String>(2*_map34.size);
-              for (int _i35 = 0; _i35 < _map34.size; ++_i35)
+              TMap _map69 = iprot.readMapBegin();
+              this.parameters = new HashMap<String,String>(2*_map69.size);
+              for (int _i70 = 0; _i70 < _map69.size; ++_i70)
               {
-                String _key36;
-                String _val37;
-                _key36 = iprot.readString();
-                _val37 = iprot.readString();
-                this.parameters.put(_key36, _val37);
+                String _key71;
+                String _val72;
+                _key71 = iprot.readString();
+                _val72 = iprot.readString();
+                this.parameters.put(_key71, _val72);
               }
               iprot.readMapEnd();
             }
@@ -1160,6 +1226,14 @@ public class Table implements TBase<Tabl
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
+        case 13: // PRIVILEGES
+          if (field.type == TType.STRUCT) {
+            this.privileges = new PrincipalPrivilegeSet();
+            this.privileges.read(iprot);
+          } else { 
+            TProtocolUtil.skip(iprot, field.type);
+          }
+          break;
         default:
           TProtocolUtil.skip(iprot, field.type);
       }
@@ -1206,9 +1280,9 @@ public class Table implements TBase<Tabl
       oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRUCT, this.partitionKeys.size()));
-        for (FieldSchema _iter38 : this.partitionKeys)
+        for (FieldSchema _iter73 : this.partitionKeys)
         {
-          _iter38.write(oprot);
+          _iter73.write(oprot);
         }
         oprot.writeListEnd();
       }
@@ -1218,10 +1292,10 @@ public class Table implements TBase<Tabl
       oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
       {
         oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size()));
-        for (Map.Entry<String, String> _iter39 : this.parameters.entrySet())
+        for (Map.Entry<String, String> _iter74 : this.parameters.entrySet())
         {
-          oprot.writeString(_iter39.getKey());
-          oprot.writeString(_iter39.getValue());
+          oprot.writeString(_iter74.getKey());
+          oprot.writeString(_iter74.getValue());
         }
         oprot.writeMapEnd();
       }
@@ -1242,6 +1316,13 @@ public class Table implements TBase<Tabl
       oprot.writeString(this.tableType);
       oprot.writeFieldEnd();
     }
+    if (this.privileges != null) {
+      if (isSetPrivileges()) {
+        oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC);
+        this.privileges.write(oprot);
+        oprot.writeFieldEnd();
+      }
+    }
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
@@ -1334,6 +1415,16 @@ public class Table implements TBase<Tabl
       sb.append(this.tableType);
     }
     first = false;
+    if (isSetPrivileges()) {
+      if (!first) sb.append(", ");
+      sb.append("privileges:");
+      if (this.privileges == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.privileges);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }



Mime
View raw message