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/ClientCapabilities.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java new file mode 100644 index 0000000..4cd04f1 --- /dev/null +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapabilities.java @@ -0,0 +1,441 @@ +/** + * 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 ClientCapabilities implements org.apache.thrift.TBase<ClientCapabilities, ClientCapabilities._Fields>, java.io.Serializable, Cloneable, Comparable<ClientCapabilities> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClientCapabilities"); + + private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ClientCapabilitiesStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ClientCapabilitiesTupleSchemeFactory()); + } + + private List<ClientCapability> values; // 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 { + VALUES((short)1, "values"); + + 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: // VALUES + return VALUES; + 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.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ClientCapability.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClientCapabilities.class, metaDataMap); + } + + public ClientCapabilities() { + } + + public ClientCapabilities( + List<ClientCapability> values) + { + this(); + this.values = values; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public ClientCapabilities(ClientCapabilities other) { + if (other.isSetValues()) { + List<ClientCapability> __this__values = new ArrayList<ClientCapability>(other.values.size()); + for (ClientCapability other_element : other.values) { + __this__values.add(other_element); + } + this.values = __this__values; + } + } + + public ClientCapabilities deepCopy() { + return new ClientCapabilities(this); + } + + @Override + public void clear() { + this.values = null; + } + + public int getValuesSize() { + return (this.values == null) ? 0 : this.values.size(); + } + + public java.util.Iterator<ClientCapability> getValuesIterator() { + return (this.values == null) ? null : this.values.iterator(); + } + + public void addToValues(ClientCapability elem) { + if (this.values == null) { + this.values = new ArrayList<ClientCapability>(); + } + this.values.add(elem); + } + + public List<ClientCapability> getValues() { + return this.values; + } + + public void setValues(List<ClientCapability> values) { + this.values = values; + } + + public void unsetValues() { + this.values = null; + } + + /** Returns true if field values is set (has been assigned a value) and false otherwise */ + public boolean isSetValues() { + return this.values != null; + } + + public void setValuesIsSet(boolean value) { + if (!value) { + this.values = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case VALUES: + if (value == null) { + unsetValues(); + } else { + setValues((List<ClientCapability>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case VALUES: + return getValues(); + + } + 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 VALUES: + return isSetValues(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ClientCapabilities) + return this.equals((ClientCapabilities)that); + return false; + } + + public boolean equals(ClientCapabilities that) { + if (that == null) + return false; + + boolean this_present_values = true && this.isSetValues(); + boolean that_present_values = true && that.isSetValues(); + if (this_present_values || that_present_values) { + if (!(this_present_values && that_present_values)) + return false; + if (!this.values.equals(that.values)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_values = true && (isSetValues()); + list.add(present_values); + if (present_values) + list.add(values); + + return list.hashCode(); + } + + @Override + public int compareTo(ClientCapabilities other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + 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("ClientCapabilities("); + boolean first = true; + + sb.append("values:"); + if (this.values == null) { + sb.append("null"); + } else { + sb.append(this.values); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetValues()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' 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 ClientCapabilitiesStandardSchemeFactory implements SchemeFactory { + public ClientCapabilitiesStandardScheme getScheme() { + return new ClientCapabilitiesStandardScheme(); + } + } + + private static class ClientCapabilitiesStandardScheme extends StandardScheme<ClientCapabilities> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ClientCapabilities 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: // VALUES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list840 = iprot.readListBegin(); + struct.values = new ArrayList<ClientCapability>(_list840.size); + ClientCapability _elem841; + for (int _i842 = 0; _i842 < _list840.size; ++_i842) + { + _elem841 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32()); + struct.values.add(_elem841); + } + iprot.readListEnd(); + } + struct.setValuesIsSet(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, ClientCapabilities struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.values != null) { + oprot.writeFieldBegin(VALUES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.values.size())); + for (ClientCapability _iter843 : struct.values) + { + oprot.writeI32(_iter843.getValue()); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ClientCapabilitiesTupleSchemeFactory implements SchemeFactory { + public ClientCapabilitiesTupleScheme getScheme() { + return new ClientCapabilitiesTupleScheme(); + } + } + + private static class ClientCapabilitiesTupleScheme extends TupleScheme<ClientCapabilities> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ClientCapabilities struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + { + oprot.writeI32(struct.values.size()); + for (ClientCapability _iter844 : struct.values) + { + oprot.writeI32(_iter844.getValue()); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ClientCapabilities struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + { + org.apache.thrift.protocol.TList _list845 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.values = new ArrayList<ClientCapability>(_list845.size); + ClientCapability _elem846; + for (int _i847 = 0; _i847 < _list845.size; ++_i847) + { + _elem846 = org.apache.hadoop.hive.metastore.api.ClientCapability.findByValue(iprot.readI32()); + struct.values.add(_elem846); + } + } + struct.setValuesIsSet(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/ClientCapability.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapability.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapability.java new file mode 100644 index 0000000..8fc8311 --- /dev/null +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClientCapability.java @@ -0,0 +1,45 @@ +/** + * 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 java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum ClientCapability implements org.apache.thrift.TEnum { + TEST_CAPABILITY(1), + INSERT_ONLY_TABLES(2); + + private final int value; + + private ClientCapability(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static ClientCapability findByValue(int value) { + switch (value) { + case 1: + return TEST_CAPABILITY; + case 2: + return INSERT_ONLY_TABLES; + default: + return null; + } + } +} 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/CmRecycleRequest.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleRequest.java new file mode 100644 index 0000000..77d8876 --- /dev/null +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleRequest.java @@ -0,0 +1,488 @@ +/** + * 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 CmRecycleRequest implements org.apache.thrift.TBase<CmRecycleRequest, CmRecycleRequest._Fields>, java.io.Serializable, Cloneable, Comparable<CmRecycleRequest> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CmRecycleRequest"); + + private static final org.apache.thrift.protocol.TField DATA_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("dataPath", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField PURGE_FIELD_DESC = new org.apache.thrift.protocol.TField("purge", org.apache.thrift.protocol.TType.BOOL, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CmRecycleRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CmRecycleRequestTupleSchemeFactory()); + } + + private String dataPath; // required + private boolean purge; // 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 { + DATA_PATH((short)1, "dataPath"), + PURGE((short)2, "purge"); + + 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: // DATA_PATH + return DATA_PATH; + case 2: // PURGE + return PURGE; + 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 __PURGE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DATA_PATH, new org.apache.thrift.meta_data.FieldMetaData("dataPath", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PURGE, new org.apache.thrift.meta_data.FieldMetaData("purge", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CmRecycleRequest.class, metaDataMap); + } + + public CmRecycleRequest() { + } + + public CmRecycleRequest( + String dataPath, + boolean purge) + { + this(); + this.dataPath = dataPath; + this.purge = purge; + setPurgeIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public CmRecycleRequest(CmRecycleRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDataPath()) { + this.dataPath = other.dataPath; + } + this.purge = other.purge; + } + + public CmRecycleRequest deepCopy() { + return new CmRecycleRequest(this); + } + + @Override + public void clear() { + this.dataPath = null; + setPurgeIsSet(false); + this.purge = false; + } + + public String getDataPath() { + return this.dataPath; + } + + public void setDataPath(String dataPath) { + this.dataPath = dataPath; + } + + public void unsetDataPath() { + this.dataPath = null; + } + + /** Returns true if field dataPath is set (has been assigned a value) and false otherwise */ + public boolean isSetDataPath() { + return this.dataPath != null; + } + + public void setDataPathIsSet(boolean value) { + if (!value) { + this.dataPath = null; + } + } + + public boolean isPurge() { + return this.purge; + } + + public void setPurge(boolean purge) { + this.purge = purge; + setPurgeIsSet(true); + } + + public void unsetPurge() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PURGE_ISSET_ID); + } + + /** Returns true if field purge is set (has been assigned a value) and false otherwise */ + public boolean isSetPurge() { + return EncodingUtils.testBit(__isset_bitfield, __PURGE_ISSET_ID); + } + + public void setPurgeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PURGE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DATA_PATH: + if (value == null) { + unsetDataPath(); + } else { + setDataPath((String)value); + } + break; + + case PURGE: + if (value == null) { + unsetPurge(); + } else { + setPurge((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DATA_PATH: + return getDataPath(); + + case PURGE: + return isPurge(); + + } + 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 DATA_PATH: + return isSetDataPath(); + case PURGE: + return isSetPurge(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CmRecycleRequest) + return this.equals((CmRecycleRequest)that); + return false; + } + + public boolean equals(CmRecycleRequest that) { + if (that == null) + return false; + + boolean this_present_dataPath = true && this.isSetDataPath(); + boolean that_present_dataPath = true && that.isSetDataPath(); + if (this_present_dataPath || that_present_dataPath) { + if (!(this_present_dataPath && that_present_dataPath)) + return false; + if (!this.dataPath.equals(that.dataPath)) + return false; + } + + boolean this_present_purge = true; + boolean that_present_purge = true; + if (this_present_purge || that_present_purge) { + if (!(this_present_purge && that_present_purge)) + return false; + if (this.purge != that.purge) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_dataPath = true && (isSetDataPath()); + list.add(present_dataPath); + if (present_dataPath) + list.add(dataPath); + + boolean present_purge = true; + list.add(present_purge); + if (present_purge) + list.add(purge); + + return list.hashCode(); + } + + @Override + public int compareTo(CmRecycleRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDataPath()).compareTo(other.isSetDataPath()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDataPath()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataPath, other.dataPath); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPurge()).compareTo(other.isSetPurge()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPurge()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purge, other.purge); + 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("CmRecycleRequest("); + boolean first = true; + + sb.append("dataPath:"); + if (this.dataPath == null) { + sb.append("null"); + } else { + sb.append(this.dataPath); + } + first = false; + if (!first) sb.append(", "); + sb.append("purge:"); + sb.append(this.purge); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDataPath()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataPath' is unset! Struct:" + toString()); + } + + if (!isSetPurge()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'purge' 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 CmRecycleRequestStandardSchemeFactory implements SchemeFactory { + public CmRecycleRequestStandardScheme getScheme() { + return new CmRecycleRequestStandardScheme(); + } + } + + private static class CmRecycleRequestStandardScheme extends StandardScheme<CmRecycleRequest> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CmRecycleRequest 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: // DATA_PATH + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dataPath = iprot.readString(); + struct.setDataPathIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // PURGE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.purge = iprot.readBool(); + struct.setPurgeIsSet(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, CmRecycleRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dataPath != null) { + oprot.writeFieldBegin(DATA_PATH_FIELD_DESC); + oprot.writeString(struct.dataPath); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(PURGE_FIELD_DESC); + oprot.writeBool(struct.purge); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CmRecycleRequestTupleSchemeFactory implements SchemeFactory { + public CmRecycleRequestTupleScheme getScheme() { + return new CmRecycleRequestTupleScheme(); + } + } + + private static class CmRecycleRequestTupleScheme extends TupleScheme<CmRecycleRequest> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CmRecycleRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dataPath); + oprot.writeBool(struct.purge); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CmRecycleRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dataPath = iprot.readString(); + struct.setDataPathIsSet(true); + struct.purge = iprot.readBool(); + struct.setPurgeIsSet(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/CmRecycleResponse.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleResponse.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleResponse.java new file mode 100644 index 0000000..15ea318 --- /dev/null +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CmRecycleResponse.java @@ -0,0 +1,283 @@ +/** + * 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 CmRecycleResponse implements org.apache.thrift.TBase<CmRecycleResponse, CmRecycleResponse._Fields>, java.io.Serializable, Cloneable, Comparable<CmRecycleResponse> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CmRecycleResponse"); + + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CmRecycleResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CmRecycleResponseTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + 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) { + 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; + } + } + 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); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CmRecycleResponse.class, metaDataMap); + } + + public CmRecycleResponse() { + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public CmRecycleResponse(CmRecycleResponse other) { + } + + public CmRecycleResponse deepCopy() { + return new CmRecycleResponse(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + 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) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CmRecycleResponse) + return this.equals((CmRecycleResponse)that); + return false; + } + + public boolean equals(CmRecycleResponse that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + return list.hashCode(); + } + + @Override + public int compareTo(CmRecycleResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + 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("CmRecycleResponse("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class CmRecycleResponseStandardSchemeFactory implements SchemeFactory { + public CmRecycleResponseStandardScheme getScheme() { + return new CmRecycleResponseStandardScheme(); + } + } + + private static class CmRecycleResponseStandardScheme extends StandardScheme<CmRecycleResponse> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CmRecycleResponse 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) { + 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, CmRecycleResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CmRecycleResponseTupleSchemeFactory implements SchemeFactory { + public CmRecycleResponseTupleScheme getScheme() { + return new CmRecycleResponseTupleScheme(); + } + } + + private static class CmRecycleResponseTupleScheme extends TupleScheme<CmRecycleResponse> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CmRecycleResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CmRecycleResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + +} + 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/ColumnStatistics.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java new file mode 100644 index 0000000..6ce7214 --- /dev/null +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java @@ -0,0 +1,549 @@ +/** + * 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 ColumnStatistics implements org.apache.thrift.TBase<ColumnStatistics, ColumnStatistics._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnStatistics> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatistics"); + + private static final org.apache.thrift.protocol.TField STATS_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("statsDesc", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("statsObj", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ColumnStatisticsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ColumnStatisticsTupleSchemeFactory()); + } + + private ColumnStatisticsDesc statsDesc; // required + private List<ColumnStatisticsObj> statsObj; // 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 { + STATS_DESC((short)1, "statsDesc"), + STATS_OBJ((short)2, "statsObj"); + + 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: // STATS_DESC + return STATS_DESC; + case 2: // STATS_OBJ + return STATS_OBJ; + 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.STATS_DESC, new org.apache.thrift.meta_data.FieldMetaData("statsDesc", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsDesc.class))); + tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("statsObj", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatistics.class, metaDataMap); + } + + public ColumnStatistics() { + } + + public ColumnStatistics( + ColumnStatisticsDesc statsDesc, + List<ColumnStatisticsObj> statsObj) + { + this(); + this.statsDesc = statsDesc; + this.statsObj = statsObj; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public ColumnStatistics(ColumnStatistics other) { + if (other.isSetStatsDesc()) { + this.statsDesc = new ColumnStatisticsDesc(other.statsDesc); + } + if (other.isSetStatsObj()) { + List<ColumnStatisticsObj> __this__statsObj = new ArrayList<ColumnStatisticsObj>(other.statsObj.size()); + for (ColumnStatisticsObj other_element : other.statsObj) { + __this__statsObj.add(new ColumnStatisticsObj(other_element)); + } + this.statsObj = __this__statsObj; + } + } + + public ColumnStatistics deepCopy() { + return new ColumnStatistics(this); + } + + @Override + public void clear() { + this.statsDesc = null; + this.statsObj = null; + } + + public ColumnStatisticsDesc getStatsDesc() { + return this.statsDesc; + } + + public void setStatsDesc(ColumnStatisticsDesc statsDesc) { + this.statsDesc = statsDesc; + } + + public void unsetStatsDesc() { + this.statsDesc = null; + } + + /** Returns true if field statsDesc is set (has been assigned a value) and false otherwise */ + public boolean isSetStatsDesc() { + return this.statsDesc != null; + } + + public void setStatsDescIsSet(boolean value) { + if (!value) { + this.statsDesc = null; + } + } + + public int getStatsObjSize() { + return (this.statsObj == null) ? 0 : this.statsObj.size(); + } + + public java.util.Iterator<ColumnStatisticsObj> getStatsObjIterator() { + return (this.statsObj == null) ? null : this.statsObj.iterator(); + } + + public void addToStatsObj(ColumnStatisticsObj elem) { + if (this.statsObj == null) { + this.statsObj = new ArrayList<ColumnStatisticsObj>(); + } + this.statsObj.add(elem); + } + + public List<ColumnStatisticsObj> getStatsObj() { + return this.statsObj; + } + + public void setStatsObj(List<ColumnStatisticsObj> statsObj) { + this.statsObj = statsObj; + } + + public void unsetStatsObj() { + this.statsObj = null; + } + + /** Returns true if field statsObj is set (has been assigned a value) and false otherwise */ + public boolean isSetStatsObj() { + return this.statsObj != null; + } + + public void setStatsObjIsSet(boolean value) { + if (!value) { + this.statsObj = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATS_DESC: + if (value == null) { + unsetStatsDesc(); + } else { + setStatsDesc((ColumnStatisticsDesc)value); + } + break; + + case STATS_OBJ: + if (value == null) { + unsetStatsObj(); + } else { + setStatsObj((List<ColumnStatisticsObj>)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATS_DESC: + return getStatsDesc(); + + case STATS_OBJ: + return getStatsObj(); + + } + 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 STATS_DESC: + return isSetStatsDesc(); + case STATS_OBJ: + return isSetStatsObj(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnStatistics) + return this.equals((ColumnStatistics)that); + return false; + } + + public boolean equals(ColumnStatistics that) { + if (that == null) + return false; + + boolean this_present_statsDesc = true && this.isSetStatsDesc(); + boolean that_present_statsDesc = true && that.isSetStatsDesc(); + if (this_present_statsDesc || that_present_statsDesc) { + if (!(this_present_statsDesc && that_present_statsDesc)) + return false; + if (!this.statsDesc.equals(that.statsDesc)) + return false; + } + + boolean this_present_statsObj = true && this.isSetStatsObj(); + boolean that_present_statsObj = true && that.isSetStatsObj(); + if (this_present_statsObj || that_present_statsObj) { + if (!(this_present_statsObj && that_present_statsObj)) + return false; + if (!this.statsObj.equals(that.statsObj)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_statsDesc = true && (isSetStatsDesc()); + list.add(present_statsDesc); + if (present_statsDesc) + list.add(statsDesc); + + boolean present_statsObj = true && (isSetStatsObj()); + list.add(present_statsObj); + if (present_statsObj) + list.add(statsObj); + + return list.hashCode(); + } + + @Override + public int compareTo(ColumnStatistics other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetStatsDesc()).compareTo(other.isSetStatsDesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatsDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsDesc, other.statsDesc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStatsObj()).compareTo(other.isSetStatsObj()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatsObj()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsObj, other.statsObj); + 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("ColumnStatistics("); + boolean first = true; + + sb.append("statsDesc:"); + if (this.statsDesc == null) { + sb.append("null"); + } else { + sb.append(this.statsDesc); + } + first = false; + if (!first) sb.append(", "); + sb.append("statsObj:"); + if (this.statsObj == null) { + sb.append("null"); + } else { + sb.append(this.statsObj); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetStatsDesc()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsDesc' is unset! Struct:" + toString()); + } + + if (!isSetStatsObj()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsObj' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + if (statsDesc != null) { + statsDesc.validate(); + } + } + + 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 ColumnStatisticsStandardSchemeFactory implements SchemeFactory { + public ColumnStatisticsStandardScheme getScheme() { + return new ColumnStatisticsStandardScheme(); + } + } + + private static class ColumnStatisticsStandardScheme extends StandardScheme<ColumnStatistics> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnStatistics 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: // STATS_DESC + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.statsDesc = new ColumnStatisticsDesc(); + struct.statsDesc.read(iprot); + struct.setStatsDescIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STATS_OBJ + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list268 = iprot.readListBegin(); + struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list268.size); + ColumnStatisticsObj _elem269; + for (int _i270 = 0; _i270 < _list268.size; ++_i270) + { + _elem269 = new ColumnStatisticsObj(); + _elem269.read(iprot); + struct.statsObj.add(_elem269); + } + iprot.readListEnd(); + } + struct.setStatsObjIsSet(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, ColumnStatistics struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.statsDesc != null) { + oprot.writeFieldBegin(STATS_DESC_FIELD_DESC); + struct.statsDesc.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.statsObj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.statsObj.size())); + for (ColumnStatisticsObj _iter271 : struct.statsObj) + { + _iter271.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ColumnStatisticsTupleSchemeFactory implements SchemeFactory { + public ColumnStatisticsTupleScheme getScheme() { + return new ColumnStatisticsTupleScheme(); + } + } + + private static class ColumnStatisticsTupleScheme extends TupleScheme<ColumnStatistics> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + struct.statsDesc.write(oprot); + { + oprot.writeI32(struct.statsObj.size()); + for (ColumnStatisticsObj _iter272 : struct.statsObj) + { + _iter272.write(oprot); + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.statsDesc = new ColumnStatisticsDesc(); + struct.statsDesc.read(iprot); + struct.setStatsDescIsSet(true); + { + org.apache.thrift.protocol.TList _list273 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list273.size); + ColumnStatisticsObj _elem274; + for (int _i275 = 0; _i275 < _list273.size; ++_i275) + { + _elem274 = new ColumnStatisticsObj(); + _elem274.read(iprot); + struct.statsObj.add(_elem274); + } + } + struct.setStatsObjIsSet(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/ColumnStatisticsData.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java new file mode 100644 index 0000000..9a2e4f4 --- /dev/null +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java @@ -0,0 +1,675 @@ +/** + * 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"}) +@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class ColumnStatisticsData extends org.apache.thrift.TUnion<ColumnStatisticsData, ColumnStatisticsData._Fields> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsData"); + private static final org.apache.thrift.protocol.TField BOOLEAN_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("booleanStats", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField LONG_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("longStats", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField DOUBLE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleStats", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField STRING_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stringStats", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final org.apache.thrift.protocol.TField BINARY_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryStats", org.apache.thrift.protocol.TType.STRUCT, (short)5); + private static final org.apache.thrift.protocol.TField DECIMAL_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("decimalStats", org.apache.thrift.protocol.TType.STRUCT, (short)6); + private static final org.apache.thrift.protocol.TField DATE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("dateStats", org.apache.thrift.protocol.TType.STRUCT, (short)7); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + BOOLEAN_STATS((short)1, "booleanStats"), + LONG_STATS((short)2, "longStats"), + DOUBLE_STATS((short)3, "doubleStats"), + STRING_STATS((short)4, "stringStats"), + BINARY_STATS((short)5, "binaryStats"), + DECIMAL_STATS((short)6, "decimalStats"), + DATE_STATS((short)7, "dateStats"); + + 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: // BOOLEAN_STATS + return BOOLEAN_STATS; + case 2: // LONG_STATS + return LONG_STATS; + case 3: // DOUBLE_STATS + return DOUBLE_STATS; + case 4: // STRING_STATS + return STRING_STATS; + case 5: // BINARY_STATS + return BINARY_STATS; + case 6: // DECIMAL_STATS + return DECIMAL_STATS; + case 7: // DATE_STATS + return DATE_STATS; + 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; + } + } + + 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.BOOLEAN_STATS, new org.apache.thrift.meta_data.FieldMetaData("booleanStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BooleanColumnStatsData.class))); + tmpMap.put(_Fields.LONG_STATS, new org.apache.thrift.meta_data.FieldMetaData("longStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LongColumnStatsData.class))); + tmpMap.put(_Fields.DOUBLE_STATS, new org.apache.thrift.meta_data.FieldMetaData("doubleStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DoubleColumnStatsData.class))); + tmpMap.put(_Fields.STRING_STATS, new org.apache.thrift.meta_data.FieldMetaData("stringStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StringColumnStatsData.class))); + tmpMap.put(_Fields.BINARY_STATS, new org.apache.thrift.meta_data.FieldMetaData("binaryStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BinaryColumnStatsData.class))); + tmpMap.put(_Fields.DECIMAL_STATS, new org.apache.thrift.meta_data.FieldMetaData("decimalStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DecimalColumnStatsData.class))); + tmpMap.put(_Fields.DATE_STATS, new org.apache.thrift.meta_data.FieldMetaData("dateStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DateColumnStatsData.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsData.class, metaDataMap); + } + + public ColumnStatisticsData() { + super(); + } + + public ColumnStatisticsData(_Fields setField, Object value) { + super(setField, value); + } + + public ColumnStatisticsData(ColumnStatisticsData other) { + super(other); + } + public ColumnStatisticsData deepCopy() { + return new ColumnStatisticsData(this); + } + + public static ColumnStatisticsData booleanStats(BooleanColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setBooleanStats(value); + return x; + } + + public static ColumnStatisticsData longStats(LongColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setLongStats(value); + return x; + } + + public static ColumnStatisticsData doubleStats(DoubleColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setDoubleStats(value); + return x; + } + + public static ColumnStatisticsData stringStats(StringColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setStringStats(value); + return x; + } + + public static ColumnStatisticsData binaryStats(BinaryColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setBinaryStats(value); + return x; + } + + public static ColumnStatisticsData decimalStats(DecimalColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setDecimalStats(value); + return x; + } + + public static ColumnStatisticsData dateStats(DateColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setDateStats(value); + return x; + } + + + @Override + protected void checkType(_Fields setField, Object value) throws ClassCastException { + switch (setField) { + case BOOLEAN_STATS: + if (value instanceof BooleanColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type BooleanColumnStatsData for field 'booleanStats', but got " + value.getClass().getSimpleName()); + case LONG_STATS: + if (value instanceof LongColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type LongColumnStatsData for field 'longStats', but got " + value.getClass().getSimpleName()); + case DOUBLE_STATS: + if (value instanceof DoubleColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type DoubleColumnStatsData for field 'doubleStats', but got " + value.getClass().getSimpleName()); + case STRING_STATS: + if (value instanceof StringColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type StringColumnStatsData for field 'stringStats', but got " + value.getClass().getSimpleName()); + case BINARY_STATS: + if (value instanceof BinaryColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type BinaryColumnStatsData for field 'binaryStats', but got " + value.getClass().getSimpleName()); + case DECIMAL_STATS: + if (value instanceof DecimalColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type DecimalColumnStatsData for field 'decimalStats', but got " + value.getClass().getSimpleName()); + case DATE_STATS: + if (value instanceof DateColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type DateColumnStatsData for field 'dateStats', but got " + value.getClass().getSimpleName()); + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(field.id); + if (setField != null) { + switch (setField) { + case BOOLEAN_STATS: + if (field.type == BOOLEAN_STATS_FIELD_DESC.type) { + BooleanColumnStatsData booleanStats; + booleanStats = new BooleanColumnStatsData(); + booleanStats.read(iprot); + return booleanStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case LONG_STATS: + if (field.type == LONG_STATS_FIELD_DESC.type) { + LongColumnStatsData longStats; + longStats = new LongColumnStatsData(); + longStats.read(iprot); + return longStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case DOUBLE_STATS: + if (field.type == DOUBLE_STATS_FIELD_DESC.type) { + DoubleColumnStatsData doubleStats; + doubleStats = new DoubleColumnStatsData(); + doubleStats.read(iprot); + return doubleStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case STRING_STATS: + if (field.type == STRING_STATS_FIELD_DESC.type) { + StringColumnStatsData stringStats; + stringStats = new StringColumnStatsData(); + stringStats.read(iprot); + return stringStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case BINARY_STATS: + if (field.type == BINARY_STATS_FIELD_DESC.type) { + BinaryColumnStatsData binaryStats; + binaryStats = new BinaryColumnStatsData(); + binaryStats.read(iprot); + return binaryStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case DECIMAL_STATS: + if (field.type == DECIMAL_STATS_FIELD_DESC.type) { + DecimalColumnStatsData decimalStats; + decimalStats = new DecimalColumnStatsData(); + decimalStats.read(iprot); + return decimalStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case DATE_STATS: + if (field.type == DATE_STATS_FIELD_DESC.type) { + DateColumnStatsData dateStats; + dateStats = new DateColumnStatsData(); + dateStats.read(iprot); + return dateStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + } + + @Override + protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case BOOLEAN_STATS: + BooleanColumnStatsData booleanStats = (BooleanColumnStatsData)value_; + booleanStats.write(oprot); + return; + case LONG_STATS: + LongColumnStatsData longStats = (LongColumnStatsData)value_; + longStats.write(oprot); + return; + case DOUBLE_STATS: + DoubleColumnStatsData doubleStats = (DoubleColumnStatsData)value_; + doubleStats.write(oprot); + return; + case STRING_STATS: + StringColumnStatsData stringStats = (StringColumnStatsData)value_; + stringStats.write(oprot); + return; + case BINARY_STATS: + BinaryColumnStatsData binaryStats = (BinaryColumnStatsData)value_; + binaryStats.write(oprot); + return; + case DECIMAL_STATS: + DecimalColumnStatsData decimalStats = (DecimalColumnStatsData)value_; + decimalStats.write(oprot); + return; + case DATE_STATS: + DateColumnStatsData dateStats = (DateColumnStatsData)value_; + dateStats.write(oprot); + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override + protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(fieldID); + if (setField != null) { + switch (setField) { + case BOOLEAN_STATS: + BooleanColumnStatsData booleanStats; + booleanStats = new BooleanColumnStatsData(); + booleanStats.read(iprot); + return booleanStats; + case LONG_STATS: + LongColumnStatsData longStats; + longStats = new LongColumnStatsData(); + longStats.read(iprot); + return longStats; + case DOUBLE_STATS: + DoubleColumnStatsData doubleStats; + doubleStats = new DoubleColumnStatsData(); + doubleStats.read(iprot); + return doubleStats; + case STRING_STATS: + StringColumnStatsData stringStats; + stringStats = new StringColumnStatsData(); + stringStats.read(iprot); + return stringStats; + case BINARY_STATS: + BinaryColumnStatsData binaryStats; + binaryStats = new BinaryColumnStatsData(); + binaryStats.read(iprot); + return binaryStats; + case DECIMAL_STATS: + DecimalColumnStatsData decimalStats; + decimalStats = new DecimalColumnStatsData(); + decimalStats.read(iprot); + return decimalStats; + case DATE_STATS: + DateColumnStatsData dateStats; + dateStats = new DateColumnStatsData(); + dateStats.read(iprot); + return dateStats; + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + throw new TProtocolException("Couldn't find a field with field id " + fieldID); + } + } + + @Override + protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case BOOLEAN_STATS: + BooleanColumnStatsData booleanStats = (BooleanColumnStatsData)value_; + booleanStats.write(oprot); + return; + case LONG_STATS: + LongColumnStatsData longStats = (LongColumnStatsData)value_; + longStats.write(oprot); + return; + case DOUBLE_STATS: + DoubleColumnStatsData doubleStats = (DoubleColumnStatsData)value_; + doubleStats.write(oprot); + return; + case STRING_STATS: + StringColumnStatsData stringStats = (StringColumnStatsData)value_; + stringStats.write(oprot); + return; + case BINARY_STATS: + BinaryColumnStatsData binaryStats = (BinaryColumnStatsData)value_; + binaryStats.write(oprot); + return; + case DECIMAL_STATS: + DecimalColumnStatsData decimalStats = (DecimalColumnStatsData)value_; + decimalStats.write(oprot); + return; + case DATE_STATS: + DateColumnStatsData dateStats = (DateColumnStatsData)value_; + dateStats.write(oprot); + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override + protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { + switch (setField) { + case BOOLEAN_STATS: + return BOOLEAN_STATS_FIELD_DESC; + case LONG_STATS: + return LONG_STATS_FIELD_DESC; + case DOUBLE_STATS: + return DOUBLE_STATS_FIELD_DESC; + case STRING_STATS: + return STRING_STATS_FIELD_DESC; + case BINARY_STATS: + return BINARY_STATS_FIELD_DESC; + case DECIMAL_STATS: + return DECIMAL_STATS_FIELD_DESC; + case DATE_STATS: + return DATE_STATS_FIELD_DESC; + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected org.apache.thrift.protocol.TStruct getStructDesc() { + return STRUCT_DESC; + } + + @Override + protected _Fields enumForId(short id) { + return _Fields.findByThriftIdOrThrow(id); + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + + public BooleanColumnStatsData getBooleanStats() { + if (getSetField() == _Fields.BOOLEAN_STATS) { + return (BooleanColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'booleanStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setBooleanStats(BooleanColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.BOOLEAN_STATS; + value_ = value; + } + + public LongColumnStatsData getLongStats() { + if (getSetField() == _Fields.LONG_STATS) { + return (LongColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'longStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setLongStats(LongColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.LONG_STATS; + value_ = value; + } + + public DoubleColumnStatsData getDoubleStats() { + if (getSetField() == _Fields.DOUBLE_STATS) { + return (DoubleColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'doubleStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setDoubleStats(DoubleColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.DOUBLE_STATS; + value_ = value; + } + + public StringColumnStatsData getStringStats() { + if (getSetField() == _Fields.STRING_STATS) { + return (StringColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'stringStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setStringStats(StringColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.STRING_STATS; + value_ = value; + } + + public BinaryColumnStatsData getBinaryStats() { + if (getSetField() == _Fields.BINARY_STATS) { + return (BinaryColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'binaryStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setBinaryStats(BinaryColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.BINARY_STATS; + value_ = value; + } + + public DecimalColumnStatsData getDecimalStats() { + if (getSetField() == _Fields.DECIMAL_STATS) { + return (DecimalColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'decimalStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setDecimalStats(DecimalColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.DECIMAL_STATS; + value_ = value; + } + + public DateColumnStatsData getDateStats() { + if (getSetField() == _Fields.DATE_STATS) { + return (DateColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'dateStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setDateStats(DateColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.DATE_STATS; + value_ = value; + } + + public boolean isSetBooleanStats() { + return setField_ == _Fields.BOOLEAN_STATS; + } + + + public boolean isSetLongStats() { + return setField_ == _Fields.LONG_STATS; + } + + + public boolean isSetDoubleStats() { + return setField_ == _Fields.DOUBLE_STATS; + } + + + public boolean isSetStringStats() { + return setField_ == _Fields.STRING_STATS; + } + + + public boolean isSetBinaryStats() { + return setField_ == _Fields.BINARY_STATS; + } + + + public boolean isSetDecimalStats() { + return setField_ == _Fields.DECIMAL_STATS; + } + + + public boolean isSetDateStats() { + return setField_ == _Fields.DATE_STATS; + } + + + public boolean equals(Object other) { + if (other instanceof ColumnStatisticsData) { + return equals((ColumnStatisticsData)other); + } else { + return false; + } + } + + public boolean equals(ColumnStatisticsData other) { + return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); + } + + @Override + public int compareTo(ColumnStatisticsData other) { + int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); + if (lastComparison == 0) { + return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); + } + return lastComparison; + } + + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + list.add(this.getClass().getName()); + org.apache.thrift.TFieldIdEnum setField = getSetField(); + if (setField != null) { + list.add(setField.getThriftFieldId()); + Object value = getFieldValue(); + if (value instanceof org.apache.thrift.TEnum) { + list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + } else { + list.add(value); + } + } + return list.hashCode(); + } + 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); + } + } + + +}