You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2018/07/13 01:40:38 UTC
[36/91] [abbrv] [partial] hive git commit: HIVE-20097 : Convert
standalone-metastore to a submodule (Alexander Kolbasov reviewed by Vihang
Karajgaonkar)
http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java
new file mode 100644
index 0000000..44a57f2
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java
@@ -0,0 +1,904 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class ColumnStatisticsDesc implements org.apache.thrift.TBase<ColumnStatisticsDesc, ColumnStatisticsDesc._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnStatisticsDesc> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsDesc");
+
+ private static final org.apache.thrift.protocol.TField IS_TBL_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("isTblLevel", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partName", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField LAST_ANALYZED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAnalyzed", org.apache.thrift.protocol.TType.I64, (short)5);
+ private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)6);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ColumnStatisticsDescStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ColumnStatisticsDescTupleSchemeFactory());
+ }
+
+ private boolean isTblLevel; // required
+ private String dbName; // required
+ private String tableName; // required
+ private String partName; // optional
+ private long lastAnalyzed; // optional
+ private String catName; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IS_TBL_LEVEL((short)1, "isTblLevel"),
+ DB_NAME((short)2, "dbName"),
+ TABLE_NAME((short)3, "tableName"),
+ PART_NAME((short)4, "partName"),
+ LAST_ANALYZED((short)5, "lastAnalyzed"),
+ CAT_NAME((short)6, "catName");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IS_TBL_LEVEL
+ return IS_TBL_LEVEL;
+ case 2: // DB_NAME
+ return DB_NAME;
+ case 3: // TABLE_NAME
+ return TABLE_NAME;
+ case 4: // PART_NAME
+ return PART_NAME;
+ case 5: // LAST_ANALYZED
+ return LAST_ANALYZED;
+ case 6: // CAT_NAME
+ return CAT_NAME;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __ISTBLLEVEL_ISSET_ID = 0;
+ private static final int __LASTANALYZED_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.PART_NAME,_Fields.LAST_ANALYZED,_Fields.CAT_NAME};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IS_TBL_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("isTblLevel", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.DB_NAME, 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.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("partName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.LAST_ANALYZED, new org.apache.thrift.meta_data.FieldMetaData("lastAnalyzed", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsDesc.class, metaDataMap);
+ }
+
+ public ColumnStatisticsDesc() {
+ }
+
+ public ColumnStatisticsDesc(
+ boolean isTblLevel,
+ String dbName,
+ String tableName)
+ {
+ this();
+ this.isTblLevel = isTblLevel;
+ setIsTblLevelIsSet(true);
+ this.dbName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(dbName);
+ this.tableName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(tableName);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ColumnStatisticsDesc(ColumnStatisticsDesc other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.isTblLevel = other.isTblLevel;
+ if (other.isSetDbName()) {
+ this.dbName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.dbName);
+ }
+ if (other.isSetTableName()) {
+ this.tableName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.tableName);
+ }
+ if (other.isSetPartName()) {
+ this.partName = other.partName;
+ }
+ this.lastAnalyzed = other.lastAnalyzed;
+ if (other.isSetCatName()) {
+ this.catName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.catName);
+ }
+ }
+
+ public ColumnStatisticsDesc deepCopy() {
+ return new ColumnStatisticsDesc(this);
+ }
+
+ @Override
+ public void clear() {
+ setIsTblLevelIsSet(false);
+ this.isTblLevel = false;
+ this.dbName = null;
+ this.tableName = null;
+ this.partName = null;
+ setLastAnalyzedIsSet(false);
+ this.lastAnalyzed = 0;
+ this.catName = null;
+ }
+
+ public boolean isIsTblLevel() {
+ return this.isTblLevel;
+ }
+
+ public void setIsTblLevel(boolean isTblLevel) {
+ this.isTblLevel = isTblLevel;
+ setIsTblLevelIsSet(true);
+ }
+
+ public void unsetIsTblLevel() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID);
+ }
+
+ /** Returns true if field isTblLevel is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsTblLevel() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID);
+ }
+
+ public void setIsTblLevelIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTBLLEVEL_ISSET_ID, value);
+ }
+
+ public String getDbName() {
+ return this.dbName;
+ }
+
+ public void setDbName(String dbName) {
+ this.dbName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(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 = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(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 getPartName() {
+ return this.partName;
+ }
+
+ public void setPartName(String partName) {
+ this.partName = partName;
+ }
+
+ public void unsetPartName() {
+ this.partName = null;
+ }
+
+ /** Returns true if field partName is set (has been assigned a value) and false otherwise */
+ public boolean isSetPartName() {
+ return this.partName != null;
+ }
+
+ public void setPartNameIsSet(boolean value) {
+ if (!value) {
+ this.partName = null;
+ }
+ }
+
+ public long getLastAnalyzed() {
+ return this.lastAnalyzed;
+ }
+
+ public void setLastAnalyzed(long lastAnalyzed) {
+ this.lastAnalyzed = lastAnalyzed;
+ setLastAnalyzedIsSet(true);
+ }
+
+ public void unsetLastAnalyzed() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTANALYZED_ISSET_ID);
+ }
+
+ /** Returns true if field lastAnalyzed is set (has been assigned a value) and false otherwise */
+ public boolean isSetLastAnalyzed() {
+ return EncodingUtils.testBit(__isset_bitfield, __LASTANALYZED_ISSET_ID);
+ }
+
+ public void setLastAnalyzedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTANALYZED_ISSET_ID, value);
+ }
+
+ public String getCatName() {
+ return this.catName;
+ }
+
+ public void setCatName(String catName) {
+ this.catName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(catName);
+ }
+
+ public void unsetCatName() {
+ this.catName = null;
+ }
+
+ /** Returns true if field catName is set (has been assigned a value) and false otherwise */
+ public boolean isSetCatName() {
+ return this.catName != null;
+ }
+
+ public void setCatNameIsSet(boolean value) {
+ if (!value) {
+ this.catName = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case IS_TBL_LEVEL:
+ if (value == null) {
+ unsetIsTblLevel();
+ } else {
+ setIsTblLevel((Boolean)value);
+ }
+ break;
+
+ case DB_NAME:
+ if (value == null) {
+ unsetDbName();
+ } else {
+ setDbName((String)value);
+ }
+ break;
+
+ case TABLE_NAME:
+ if (value == null) {
+ unsetTableName();
+ } else {
+ setTableName((String)value);
+ }
+ break;
+
+ case PART_NAME:
+ if (value == null) {
+ unsetPartName();
+ } else {
+ setPartName((String)value);
+ }
+ break;
+
+ case LAST_ANALYZED:
+ if (value == null) {
+ unsetLastAnalyzed();
+ } else {
+ setLastAnalyzed((Long)value);
+ }
+ break;
+
+ case CAT_NAME:
+ if (value == null) {
+ unsetCatName();
+ } else {
+ setCatName((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case IS_TBL_LEVEL:
+ return isIsTblLevel();
+
+ case DB_NAME:
+ return getDbName();
+
+ case TABLE_NAME:
+ return getTableName();
+
+ case PART_NAME:
+ return getPartName();
+
+ case LAST_ANALYZED:
+ return getLastAnalyzed();
+
+ case CAT_NAME:
+ return getCatName();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case IS_TBL_LEVEL:
+ return isSetIsTblLevel();
+ case DB_NAME:
+ return isSetDbName();
+ case TABLE_NAME:
+ return isSetTableName();
+ case PART_NAME:
+ return isSetPartName();
+ case LAST_ANALYZED:
+ return isSetLastAnalyzed();
+ case CAT_NAME:
+ return isSetCatName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ColumnStatisticsDesc)
+ return this.equals((ColumnStatisticsDesc)that);
+ return false;
+ }
+
+ public boolean equals(ColumnStatisticsDesc that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_isTblLevel = true;
+ boolean that_present_isTblLevel = true;
+ if (this_present_isTblLevel || that_present_isTblLevel) {
+ if (!(this_present_isTblLevel && that_present_isTblLevel))
+ return false;
+ if (this.isTblLevel != that.isTblLevel)
+ 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_partName = true && this.isSetPartName();
+ boolean that_present_partName = true && that.isSetPartName();
+ if (this_present_partName || that_present_partName) {
+ if (!(this_present_partName && that_present_partName))
+ return false;
+ if (!this.partName.equals(that.partName))
+ return false;
+ }
+
+ boolean this_present_lastAnalyzed = true && this.isSetLastAnalyzed();
+ boolean that_present_lastAnalyzed = true && that.isSetLastAnalyzed();
+ if (this_present_lastAnalyzed || that_present_lastAnalyzed) {
+ if (!(this_present_lastAnalyzed && that_present_lastAnalyzed))
+ return false;
+ if (this.lastAnalyzed != that.lastAnalyzed)
+ return false;
+ }
+
+ boolean this_present_catName = true && this.isSetCatName();
+ boolean that_present_catName = true && that.isSetCatName();
+ if (this_present_catName || that_present_catName) {
+ if (!(this_present_catName && that_present_catName))
+ return false;
+ if (!this.catName.equals(that.catName))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_isTblLevel = true;
+ list.add(present_isTblLevel);
+ if (present_isTblLevel)
+ list.add(isTblLevel);
+
+ boolean present_dbName = true && (isSetDbName());
+ list.add(present_dbName);
+ if (present_dbName)
+ list.add(dbName);
+
+ boolean present_tableName = true && (isSetTableName());
+ list.add(present_tableName);
+ if (present_tableName)
+ list.add(tableName);
+
+ boolean present_partName = true && (isSetPartName());
+ list.add(present_partName);
+ if (present_partName)
+ list.add(partName);
+
+ boolean present_lastAnalyzed = true && (isSetLastAnalyzed());
+ list.add(present_lastAnalyzed);
+ if (present_lastAnalyzed)
+ list.add(lastAnalyzed);
+
+ boolean present_catName = true && (isSetCatName());
+ list.add(present_catName);
+ if (present_catName)
+ list.add(catName);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(ColumnStatisticsDesc other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetIsTblLevel()).compareTo(other.isSetIsTblLevel());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsTblLevel()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTblLevel, other.isTblLevel);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDbName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTableName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPartName()).compareTo(other.isSetPartName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPartName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partName, other.partName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetLastAnalyzed()).compareTo(other.isSetLastAnalyzed());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetLastAnalyzed()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAnalyzed, other.lastAnalyzed);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCatName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("ColumnStatisticsDesc(");
+ boolean first = true;
+
+ sb.append("isTblLevel:");
+ sb.append(this.isTblLevel);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("dbName:");
+ if (this.dbName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dbName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("tableName:");
+ if (this.tableName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tableName);
+ }
+ first = false;
+ if (isSetPartName()) {
+ if (!first) sb.append(", ");
+ sb.append("partName:");
+ if (this.partName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.partName);
+ }
+ first = false;
+ }
+ if (isSetLastAnalyzed()) {
+ if (!first) sb.append(", ");
+ sb.append("lastAnalyzed:");
+ sb.append(this.lastAnalyzed);
+ first = false;
+ }
+ if (isSetCatName()) {
+ if (!first) sb.append(", ");
+ sb.append("catName:");
+ if (this.catName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.catName);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetIsTblLevel()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'isTblLevel' is unset! Struct:" + toString());
+ }
+
+ if (!isSetDbName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString());
+ }
+
+ if (!isSetTableName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' 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 ColumnStatisticsDescStandardSchemeFactory implements SchemeFactory {
+ public ColumnStatisticsDescStandardScheme getScheme() {
+ return new ColumnStatisticsDescStandardScheme();
+ }
+ }
+
+ private static class ColumnStatisticsDescStandardScheme extends StandardScheme<ColumnStatisticsDesc> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatisticsDesc 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: // IS_TBL_LEVEL
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isTblLevel = iprot.readBool();
+ struct.setIsTblLevelIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DB_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dbName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setDbNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TABLE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tableName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setTableNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // PART_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.partName = iprot.readString();
+ struct.setPartNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // LAST_ANALYZED
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.lastAnalyzed = iprot.readI64();
+ struct.setLastAnalyzedIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // CAT_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.catName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setCatNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(IS_TBL_LEVEL_FIELD_DESC);
+ oprot.writeBool(struct.isTblLevel);
+ oprot.writeFieldEnd();
+ if (struct.dbName != null) {
+ oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+ oprot.writeString(struct.dbName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tableName != null) {
+ oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+ oprot.writeString(struct.tableName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.partName != null) {
+ if (struct.isSetPartName()) {
+ oprot.writeFieldBegin(PART_NAME_FIELD_DESC);
+ oprot.writeString(struct.partName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetLastAnalyzed()) {
+ oprot.writeFieldBegin(LAST_ANALYZED_FIELD_DESC);
+ oprot.writeI64(struct.lastAnalyzed);
+ oprot.writeFieldEnd();
+ }
+ if (struct.catName != null) {
+ if (struct.isSetCatName()) {
+ oprot.writeFieldBegin(CAT_NAME_FIELD_DESC);
+ oprot.writeString(struct.catName);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ColumnStatisticsDescTupleSchemeFactory implements SchemeFactory {
+ public ColumnStatisticsDescTupleScheme getScheme() {
+ return new ColumnStatisticsDescTupleScheme();
+ }
+ }
+
+ private static class ColumnStatisticsDescTupleScheme extends TupleScheme<ColumnStatisticsDesc> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeBool(struct.isTblLevel);
+ oprot.writeString(struct.dbName);
+ oprot.writeString(struct.tableName);
+ BitSet optionals = new BitSet();
+ if (struct.isSetPartName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetLastAnalyzed()) {
+ optionals.set(1);
+ }
+ if (struct.isSetCatName()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetPartName()) {
+ oprot.writeString(struct.partName);
+ }
+ if (struct.isSetLastAnalyzed()) {
+ oprot.writeI64(struct.lastAnalyzed);
+ }
+ if (struct.isSetCatName()) {
+ oprot.writeString(struct.catName);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsDesc struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.isTblLevel = iprot.readBool();
+ struct.setIsTblLevelIsSet(true);
+ struct.dbName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setDbNameIsSet(true);
+ struct.tableName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setTableNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.partName = iprot.readString();
+ struct.setPartNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.lastAnalyzed = iprot.readI64();
+ struct.setLastAnalyzedIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.catName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setCatNameIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java
new file mode 100644
index 0000000..6f9a57f
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java
@@ -0,0 +1,593 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class ColumnStatisticsObj implements org.apache.thrift.TBase<ColumnStatisticsObj, ColumnStatisticsObj._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnStatisticsObj> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsObj");
+
+ private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("colName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField COL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("colType", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField STATS_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("statsData", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ColumnStatisticsObjStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ColumnStatisticsObjTupleSchemeFactory());
+ }
+
+ private String colName; // required
+ private String colType; // required
+ private ColumnStatisticsData statsData; // 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 {
+ COL_NAME((short)1, "colName"),
+ COL_TYPE((short)2, "colType"),
+ STATS_DATA((short)3, "statsData");
+
+ 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: // COL_NAME
+ return COL_NAME;
+ case 2: // COL_TYPE
+ return COL_TYPE;
+ case 3: // STATS_DATA
+ return STATS_DATA;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("colName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.COL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("colType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.STATS_DATA, new org.apache.thrift.meta_data.FieldMetaData("statsData", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsData.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsObj.class, metaDataMap);
+ }
+
+ public ColumnStatisticsObj() {
+ }
+
+ public ColumnStatisticsObj(
+ String colName,
+ String colType,
+ ColumnStatisticsData statsData)
+ {
+ this();
+ this.colName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colName);
+ this.colType = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colType);
+ this.statsData = statsData;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ColumnStatisticsObj(ColumnStatisticsObj other) {
+ if (other.isSetColName()) {
+ this.colName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.colName);
+ }
+ if (other.isSetColType()) {
+ this.colType = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(other.colType);
+ }
+ if (other.isSetStatsData()) {
+ this.statsData = new ColumnStatisticsData(other.statsData);
+ }
+ }
+
+ public ColumnStatisticsObj deepCopy() {
+ return new ColumnStatisticsObj(this);
+ }
+
+ @Override
+ public void clear() {
+ this.colName = null;
+ this.colType = null;
+ this.statsData = null;
+ }
+
+ public String getColName() {
+ return this.colName;
+ }
+
+ public void setColName(String colName) {
+ this.colName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colName);
+ }
+
+ public void unsetColName() {
+ this.colName = null;
+ }
+
+ /** Returns true if field colName is set (has been assigned a value) and false otherwise */
+ public boolean isSetColName() {
+ return this.colName != null;
+ }
+
+ public void setColNameIsSet(boolean value) {
+ if (!value) {
+ this.colName = null;
+ }
+ }
+
+ public String getColType() {
+ return this.colType;
+ }
+
+ public void setColType(String colType) {
+ this.colType = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(colType);
+ }
+
+ public void unsetColType() {
+ this.colType = null;
+ }
+
+ /** Returns true if field colType is set (has been assigned a value) and false otherwise */
+ public boolean isSetColType() {
+ return this.colType != null;
+ }
+
+ public void setColTypeIsSet(boolean value) {
+ if (!value) {
+ this.colType = null;
+ }
+ }
+
+ public ColumnStatisticsData getStatsData() {
+ return this.statsData;
+ }
+
+ public void setStatsData(ColumnStatisticsData statsData) {
+ this.statsData = statsData;
+ }
+
+ public void unsetStatsData() {
+ this.statsData = null;
+ }
+
+ /** Returns true if field statsData is set (has been assigned a value) and false otherwise */
+ public boolean isSetStatsData() {
+ return this.statsData != null;
+ }
+
+ public void setStatsDataIsSet(boolean value) {
+ if (!value) {
+ this.statsData = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case COL_NAME:
+ if (value == null) {
+ unsetColName();
+ } else {
+ setColName((String)value);
+ }
+ break;
+
+ case COL_TYPE:
+ if (value == null) {
+ unsetColType();
+ } else {
+ setColType((String)value);
+ }
+ break;
+
+ case STATS_DATA:
+ if (value == null) {
+ unsetStatsData();
+ } else {
+ setStatsData((ColumnStatisticsData)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case COL_NAME:
+ return getColName();
+
+ case COL_TYPE:
+ return getColType();
+
+ case STATS_DATA:
+ return getStatsData();
+
+ }
+ 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 COL_NAME:
+ return isSetColName();
+ case COL_TYPE:
+ return isSetColType();
+ case STATS_DATA:
+ return isSetStatsData();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ColumnStatisticsObj)
+ return this.equals((ColumnStatisticsObj)that);
+ return false;
+ }
+
+ public boolean equals(ColumnStatisticsObj that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_colName = true && this.isSetColName();
+ boolean that_present_colName = true && that.isSetColName();
+ if (this_present_colName || that_present_colName) {
+ if (!(this_present_colName && that_present_colName))
+ return false;
+ if (!this.colName.equals(that.colName))
+ return false;
+ }
+
+ boolean this_present_colType = true && this.isSetColType();
+ boolean that_present_colType = true && that.isSetColType();
+ if (this_present_colType || that_present_colType) {
+ if (!(this_present_colType && that_present_colType))
+ return false;
+ if (!this.colType.equals(that.colType))
+ return false;
+ }
+
+ boolean this_present_statsData = true && this.isSetStatsData();
+ boolean that_present_statsData = true && that.isSetStatsData();
+ if (this_present_statsData || that_present_statsData) {
+ if (!(this_present_statsData && that_present_statsData))
+ return false;
+ if (!this.statsData.equals(that.statsData))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_colName = true && (isSetColName());
+ list.add(present_colName);
+ if (present_colName)
+ list.add(colName);
+
+ boolean present_colType = true && (isSetColType());
+ list.add(present_colType);
+ if (present_colType)
+ list.add(colType);
+
+ boolean present_statsData = true && (isSetStatsData());
+ list.add(present_statsData);
+ if (present_statsData)
+ list.add(statsData);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(ColumnStatisticsObj other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetColName()).compareTo(other.isSetColName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetColName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colName, other.colName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetColType()).compareTo(other.isSetColType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetColType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colType, other.colType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStatsData()).compareTo(other.isSetStatsData());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStatsData()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsData, other.statsData);
+ 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("ColumnStatisticsObj(");
+ boolean first = true;
+
+ sb.append("colName:");
+ if (this.colName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.colName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("colType:");
+ if (this.colType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.colType);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("statsData:");
+ if (this.statsData == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.statsData);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetColName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'colName' is unset! Struct:" + toString());
+ }
+
+ if (!isSetColType()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'colType' is unset! Struct:" + toString());
+ }
+
+ if (!isSetStatsData()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsData' 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 ColumnStatisticsObjStandardSchemeFactory implements SchemeFactory {
+ public ColumnStatisticsObjStandardScheme getScheme() {
+ return new ColumnStatisticsObjStandardScheme();
+ }
+ }
+
+ private static class ColumnStatisticsObjStandardScheme extends StandardScheme<ColumnStatisticsObj> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatisticsObj 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: // COL_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.colName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setColNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // COL_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.colType = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setColTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // STATS_DATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.statsData = new ColumnStatisticsData();
+ struct.statsData.read(iprot);
+ struct.setStatsDataIsSet(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, ColumnStatisticsObj struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.colName != null) {
+ oprot.writeFieldBegin(COL_NAME_FIELD_DESC);
+ oprot.writeString(struct.colName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.colType != null) {
+ oprot.writeFieldBegin(COL_TYPE_FIELD_DESC);
+ oprot.writeString(struct.colType);
+ oprot.writeFieldEnd();
+ }
+ if (struct.statsData != null) {
+ oprot.writeFieldBegin(STATS_DATA_FIELD_DESC);
+ struct.statsData.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ColumnStatisticsObjTupleSchemeFactory implements SchemeFactory {
+ public ColumnStatisticsObjTupleScheme getScheme() {
+ return new ColumnStatisticsObjTupleScheme();
+ }
+ }
+
+ private static class ColumnStatisticsObjTupleScheme extends TupleScheme<ColumnStatisticsObj> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsObj struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.colName);
+ oprot.writeString(struct.colType);
+ struct.statsData.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatisticsObj struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.colName = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setColNameIsSet(true);
+ struct.colType = org.apache.hadoop.hive.metastore.utils.StringUtils.intern(iprot.readString());
+ struct.setColTypeIsSet(true);
+ struct.statsData = new ColumnStatisticsData();
+ struct.statsData.read(iprot);
+ struct.setStatsDataIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/20eb7b51/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java
new file mode 100644
index 0000000..f295958
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CommitTxnRequest.java
@@ -0,0 +1,657 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class CommitTxnRequest implements org.apache.thrift.TBase<CommitTxnRequest, CommitTxnRequest._Fields>, java.io.Serializable, Cloneable, Comparable<CommitTxnRequest> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CommitTxnRequest");
+
+ 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)1);
+ private static final org.apache.thrift.protocol.TField REPL_POLICY_FIELD_DESC = new org.apache.thrift.protocol.TField("replPolicy", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField WRITE_EVENT_INFOS_FIELD_DESC = new org.apache.thrift.protocol.TField("writeEventInfos", org.apache.thrift.protocol.TType.LIST, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new CommitTxnRequestStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new CommitTxnRequestTupleSchemeFactory());
+ }
+
+ private long txnid; // required
+ private String replPolicy; // optional
+ private List<WriteEventInfo> writeEventInfos; // 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 {
+ TXNID((short)1, "txnid"),
+ REPL_POLICY((short)2, "replPolicy"),
+ WRITE_EVENT_INFOS((short)3, "writeEventInfos");
+
+ 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: // TXNID
+ return TXNID;
+ case 2: // REPL_POLICY
+ return REPL_POLICY;
+ case 3: // WRITE_EVENT_INFOS
+ return WRITE_EVENT_INFOS;
+ 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 static final _Fields optionals[] = {_Fields.REPL_POLICY,_Fields.WRITE_EVENT_INFOS};
+ 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.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.REPL_POLICY, new org.apache.thrift.meta_data.FieldMetaData("replPolicy", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WRITE_EVENT_INFOS, new org.apache.thrift.meta_data.FieldMetaData("writeEventInfos", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "WriteEventInfo"))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CommitTxnRequest.class, metaDataMap);
+ }
+
+ public CommitTxnRequest() {
+ }
+
+ public CommitTxnRequest(
+ long txnid)
+ {
+ this();
+ this.txnid = txnid;
+ setTxnidIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public CommitTxnRequest(CommitTxnRequest other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.txnid = other.txnid;
+ if (other.isSetReplPolicy()) {
+ this.replPolicy = other.replPolicy;
+ }
+ if (other.isSetWriteEventInfos()) {
+ List<WriteEventInfo> __this__writeEventInfos = new ArrayList<WriteEventInfo>(other.writeEventInfos.size());
+ for (WriteEventInfo other_element : other.writeEventInfos) {
+ __this__writeEventInfos.add(other_element);
+ }
+ this.writeEventInfos = __this__writeEventInfos;
+ }
+ }
+
+ public CommitTxnRequest deepCopy() {
+ return new CommitTxnRequest(this);
+ }
+
+ @Override
+ public void clear() {
+ setTxnidIsSet(false);
+ this.txnid = 0;
+ this.replPolicy = null;
+ this.writeEventInfos = 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 getReplPolicy() {
+ return this.replPolicy;
+ }
+
+ public void setReplPolicy(String replPolicy) {
+ this.replPolicy = replPolicy;
+ }
+
+ public void unsetReplPolicy() {
+ this.replPolicy = null;
+ }
+
+ /** Returns true if field replPolicy is set (has been assigned a value) and false otherwise */
+ public boolean isSetReplPolicy() {
+ return this.replPolicy != null;
+ }
+
+ public void setReplPolicyIsSet(boolean value) {
+ if (!value) {
+ this.replPolicy = null;
+ }
+ }
+
+ public int getWriteEventInfosSize() {
+ return (this.writeEventInfos == null) ? 0 : this.writeEventInfos.size();
+ }
+
+ public java.util.Iterator<WriteEventInfo> getWriteEventInfosIterator() {
+ return (this.writeEventInfos == null) ? null : this.writeEventInfos.iterator();
+ }
+
+ public void addToWriteEventInfos(WriteEventInfo elem) {
+ if (this.writeEventInfos == null) {
+ this.writeEventInfos = new ArrayList<WriteEventInfo>();
+ }
+ this.writeEventInfos.add(elem);
+ }
+
+ public List<WriteEventInfo> getWriteEventInfos() {
+ return this.writeEventInfos;
+ }
+
+ public void setWriteEventInfos(List<WriteEventInfo> writeEventInfos) {
+ this.writeEventInfos = writeEventInfos;
+ }
+
+ public void unsetWriteEventInfos() {
+ this.writeEventInfos = null;
+ }
+
+ /** Returns true if field writeEventInfos is set (has been assigned a value) and false otherwise */
+ public boolean isSetWriteEventInfos() {
+ return this.writeEventInfos != null;
+ }
+
+ public void setWriteEventInfosIsSet(boolean value) {
+ if (!value) {
+ this.writeEventInfos = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TXNID:
+ if (value == null) {
+ unsetTxnid();
+ } else {
+ setTxnid((Long)value);
+ }
+ break;
+
+ case REPL_POLICY:
+ if (value == null) {
+ unsetReplPolicy();
+ } else {
+ setReplPolicy((String)value);
+ }
+ break;
+
+ case WRITE_EVENT_INFOS:
+ if (value == null) {
+ unsetWriteEventInfos();
+ } else {
+ setWriteEventInfos((List<WriteEventInfo>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TXNID:
+ return getTxnid();
+
+ case REPL_POLICY:
+ return getReplPolicy();
+
+ case WRITE_EVENT_INFOS:
+ return getWriteEventInfos();
+
+ }
+ 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 TXNID:
+ return isSetTxnid();
+ case REPL_POLICY:
+ return isSetReplPolicy();
+ case WRITE_EVENT_INFOS:
+ return isSetWriteEventInfos();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof CommitTxnRequest)
+ return this.equals((CommitTxnRequest)that);
+ return false;
+ }
+
+ public boolean equals(CommitTxnRequest that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_txnid = true;
+ boolean that_present_txnid = true;
+ 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_replPolicy = true && this.isSetReplPolicy();
+ boolean that_present_replPolicy = true && that.isSetReplPolicy();
+ if (this_present_replPolicy || that_present_replPolicy) {
+ if (!(this_present_replPolicy && that_present_replPolicy))
+ return false;
+ if (!this.replPolicy.equals(that.replPolicy))
+ return false;
+ }
+
+ boolean this_present_writeEventInfos = true && this.isSetWriteEventInfos();
+ boolean that_present_writeEventInfos = true && that.isSetWriteEventInfos();
+ if (this_present_writeEventInfos || that_present_writeEventInfos) {
+ if (!(this_present_writeEventInfos && that_present_writeEventInfos))
+ return false;
+ if (!this.writeEventInfos.equals(that.writeEventInfos))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_txnid = true;
+ list.add(present_txnid);
+ if (present_txnid)
+ list.add(txnid);
+
+ boolean present_replPolicy = true && (isSetReplPolicy());
+ list.add(present_replPolicy);
+ if (present_replPolicy)
+ list.add(replPolicy);
+
+ boolean present_writeEventInfos = true && (isSetWriteEventInfos());
+ list.add(present_writeEventInfos);
+ if (present_writeEventInfos)
+ list.add(writeEventInfos);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(CommitTxnRequest other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTxnid()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetReplPolicy()).compareTo(other.isSetReplPolicy());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetReplPolicy()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replPolicy, other.replPolicy);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWriteEventInfos()).compareTo(other.isSetWriteEventInfos());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWriteEventInfos()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeEventInfos, other.writeEventInfos);
+ 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("CommitTxnRequest(");
+ boolean first = true;
+
+ sb.append("txnid:");
+ sb.append(this.txnid);
+ first = false;
+ if (isSetReplPolicy()) {
+ if (!first) sb.append(", ");
+ sb.append("replPolicy:");
+ if (this.replPolicy == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.replPolicy);
+ }
+ first = false;
+ }
+ if (isSetWriteEventInfos()) {
+ if (!first) sb.append(", ");
+ sb.append("writeEventInfos:");
+ if (this.writeEventInfos == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.writeEventInfos);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetTxnid()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'txnid' 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 CommitTxnRequestStandardSchemeFactory implements SchemeFactory {
+ public CommitTxnRequestStandardScheme getScheme() {
+ return new CommitTxnRequestStandardScheme();
+ }
+ }
+
+ private static class CommitTxnRequestStandardScheme extends StandardScheme<CommitTxnRequest> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, CommitTxnRequest 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: // 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 2: // REPL_POLICY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.replPolicy = iprot.readString();
+ struct.setReplPolicyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // WRITE_EVENT_INFOS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list594 = iprot.readListBegin();
+ struct.writeEventInfos = new ArrayList<WriteEventInfo>(_list594.size);
+ WriteEventInfo _elem595;
+ for (int _i596 = 0; _i596 < _list594.size; ++_i596)
+ {
+ _elem595 = new WriteEventInfo();
+ _elem595.read(iprot);
+ struct.writeEventInfos.add(_elem595);
+ }
+ iprot.readListEnd();
+ }
+ struct.setWriteEventInfosIsSet(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, CommitTxnRequest struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(TXNID_FIELD_DESC);
+ oprot.writeI64(struct.txnid);
+ oprot.writeFieldEnd();
+ if (struct.replPolicy != null) {
+ if (struct.isSetReplPolicy()) {
+ oprot.writeFieldBegin(REPL_POLICY_FIELD_DESC);
+ oprot.writeString(struct.replPolicy);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.writeEventInfos != null) {
+ if (struct.isSetWriteEventInfos()) {
+ oprot.writeFieldBegin(WRITE_EVENT_INFOS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.writeEventInfos.size()));
+ for (WriteEventInfo _iter597 : struct.writeEventInfos)
+ {
+ _iter597.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class CommitTxnRequestTupleSchemeFactory implements SchemeFactory {
+ public CommitTxnRequestTupleScheme getScheme() {
+ return new CommitTxnRequestTupleScheme();
+ }
+ }
+
+ private static class CommitTxnRequestTupleScheme extends TupleScheme<CommitTxnRequest> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, CommitTxnRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI64(struct.txnid);
+ BitSet optionals = new BitSet();
+ if (struct.isSetReplPolicy()) {
+ optionals.set(0);
+ }
+ if (struct.isSetWriteEventInfos()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetReplPolicy()) {
+ oprot.writeString(struct.replPolicy);
+ }
+ if (struct.isSetWriteEventInfos()) {
+ {
+ oprot.writeI32(struct.writeEventInfos.size());
+ for (WriteEventInfo _iter598 : struct.writeEventInfos)
+ {
+ _iter598.write(oprot);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, CommitTxnRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.txnid = iprot.readI64();
+ struct.setTxnidIsSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.replPolicy = iprot.readString();
+ struct.setReplPolicyIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TList _list599 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.writeEventInfos = new ArrayList<WriteEventInfo>(_list599.size);
+ WriteEventInfo _elem600;
+ for (int _i601 = 0; _i601 < _list599.size; ++_i601)
+ {
+ _elem600 = new WriteEventInfo();
+ _elem600.read(iprot);
+ struct.writeEventInfos.add(_elem600);
+ }
+ }
+ struct.setWriteEventInfosIsSet(true);
+ }
+ }
+ }
+
+}
+