http://git-wip-us.apache.org/repos/asf/hive/blob/774a8ef7/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h index 5c6495e..756f954 100644 --- a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -8644,8 +8644,9 @@ inline std::ostream& operator<<(std::ostream& out, const BasicTxnInfo& obj) } typedef struct _CreationMetadata__isset { - _CreationMetadata__isset() : validTxnList(false) {} + _CreationMetadata__isset() : validTxnList(false), materializationTime(false) {} bool validTxnList :1; + bool materializationTime :1; } _CreationMetadata__isset; class CreationMetadata { @@ -8653,7 +8654,7 @@ class CreationMetadata { CreationMetadata(const CreationMetadata&); CreationMetadata& operator=(const CreationMetadata&); - CreationMetadata() : catName(), dbName(), tblName(), validTxnList() { + CreationMetadata() : catName(), dbName(), tblName(), validTxnList(), materializationTime(0) { } virtual ~CreationMetadata() throw(); @@ -8662,6 +8663,7 @@ class CreationMetadata { std::string tblName; std::set<std::string> tablesUsed; std::string validTxnList; + int64_t materializationTime; _CreationMetadata__isset __isset; @@ -8675,6 +8677,8 @@ class CreationMetadata { void __set_validTxnList(const std::string& val); + void __set_materializationTime(const int64_t val); + bool operator == (const CreationMetadata & rhs) const { if (!(catName == rhs.catName)) @@ -8689,6 +8693,10 @@ class CreationMetadata { return false; else if (__isset.validTxnList && !(validTxnList == rhs.validTxnList)) return false; + if (__isset.materializationTime != rhs.__isset.materializationTime) + return false; + else if (__isset.materializationTime && !(materializationTime == rhs.materializationTime)) + return false; return true; } bool operator != (const CreationMetadata &rhs) const { @@ -10238,52 +10246,23 @@ inline std::ostream& operator<<(std::ostream& out, const TableMeta& obj) return out; } -typedef struct _Materialization__isset { - _Materialization__isset() : validTxnList(false), invalidationTime(false), sourceTablesUpdateDeleteModified(false) {} - bool validTxnList :1; - bool invalidationTime :1; - bool sourceTablesUpdateDeleteModified :1; -} _Materialization__isset; class Materialization { public: Materialization(const Materialization&); Materialization& operator=(const Materialization&); - Materialization() : validTxnList(), invalidationTime(0), sourceTablesUpdateDeleteModified(0) { + Materialization() : sourceTablesUpdateDeleteModified(0) { } virtual ~Materialization() throw(); - std::set<std::string> tablesUsed; - std::string validTxnList; - int64_t invalidationTime; bool sourceTablesUpdateDeleteModified; - _Materialization__isset __isset; - - void __set_tablesUsed(const std::set<std::string> & val); - - void __set_validTxnList(const std::string& val); - - void __set_invalidationTime(const int64_t val); - void __set_sourceTablesUpdateDeleteModified(const bool val); bool operator == (const Materialization & rhs) const { - if (!(tablesUsed == rhs.tablesUsed)) - return false; - if (__isset.validTxnList != rhs.__isset.validTxnList) - return false; - else if (__isset.validTxnList && !(validTxnList == rhs.validTxnList)) - return false; - if (__isset.invalidationTime != rhs.__isset.invalidationTime) - return false; - else if (__isset.invalidationTime && !(invalidationTime == rhs.invalidationTime)) - return false; - if (__isset.sourceTablesUpdateDeleteModified != rhs.__isset.sourceTablesUpdateDeleteModified) - return false; - else if (__isset.sourceTablesUpdateDeleteModified && !(sourceTablesUpdateDeleteModified == rhs.sourceTablesUpdateDeleteModified)) + if (!(sourceTablesUpdateDeleteModified == rhs.sourceTablesUpdateDeleteModified)) return false; return true; }
http://git-wip-us.apache.org/repos/asf/hive/blob/774a8ef7/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java index ab7b059..684a0bc 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CreationMetadata.java @@ -43,6 +43,7 @@ import org.slf4j.LoggerFactory; private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tblName", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField TABLES_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("tablesUsed", org.apache.thrift.protocol.TType.SET, (short)4); private static final org.apache.thrift.protocol.TField VALID_TXN_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validTxnList", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField MATERIALIZATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("materializationTime", org.apache.thrift.protocol.TType.I64, (short)6); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -55,6 +56,7 @@ import org.slf4j.LoggerFactory; private String tblName; // required private Set<String> tablesUsed; // required private String validTxnList; // optional + private long materializationTime; // 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 { @@ -62,7 +64,8 @@ import org.slf4j.LoggerFactory; DB_NAME((short)2, "dbName"), TBL_NAME((short)3, "tblName"), TABLES_USED((short)4, "tablesUsed"), - VALID_TXN_LIST((short)5, "validTxnList"); + VALID_TXN_LIST((short)5, "validTxnList"), + MATERIALIZATION_TIME((short)6, "materializationTime"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -87,6 +90,8 @@ import org.slf4j.LoggerFactory; return TABLES_USED; case 5: // VALID_TXN_LIST return VALID_TXN_LIST; + case 6: // MATERIALIZATION_TIME + return MATERIALIZATION_TIME; default: return null; } @@ -127,7 +132,9 @@ import org.slf4j.LoggerFactory; } // isset id assignments - private static final _Fields optionals[] = {_Fields.VALID_TXN_LIST}; + private static final int __MATERIALIZATIONTIME_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.VALID_TXN_LIST,_Fields.MATERIALIZATION_TIME}; 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); @@ -142,6 +149,8 @@ import org.slf4j.LoggerFactory; new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.VALID_TXN_LIST, new org.apache.thrift.meta_data.FieldMetaData("validTxnList", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MATERIALIZATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("materializationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CreationMetadata.class, metaDataMap); } @@ -166,6 +175,7 @@ import org.slf4j.LoggerFactory; * Performs a deep copy on <i>other</i>. */ public CreationMetadata(CreationMetadata other) { + __isset_bitfield = other.__isset_bitfield; if (other.isSetCatName()) { this.catName = other.catName; } @@ -182,6 +192,7 @@ import org.slf4j.LoggerFactory; if (other.isSetValidTxnList()) { this.validTxnList = other.validTxnList; } + this.materializationTime = other.materializationTime; } public CreationMetadata deepCopy() { @@ -195,6 +206,8 @@ import org.slf4j.LoggerFactory; this.tblName = null; this.tablesUsed = null; this.validTxnList = null; + setMaterializationTimeIsSet(false); + this.materializationTime = 0; } public String getCatName() { @@ -327,6 +340,28 @@ import org.slf4j.LoggerFactory; } } + public long getMaterializationTime() { + return this.materializationTime; + } + + public void setMaterializationTime(long materializationTime) { + this.materializationTime = materializationTime; + setMaterializationTimeIsSet(true); + } + + public void unsetMaterializationTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MATERIALIZATIONTIME_ISSET_ID); + } + + /** Returns true if field materializationTime is set (has been assigned a value) and false otherwise */ + public boolean isSetMaterializationTime() { + return EncodingUtils.testBit(__isset_bitfield, __MATERIALIZATIONTIME_ISSET_ID); + } + + public void setMaterializationTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MATERIALIZATIONTIME_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case CAT_NAME: @@ -369,6 +404,14 @@ import org.slf4j.LoggerFactory; } break; + case MATERIALIZATION_TIME: + if (value == null) { + unsetMaterializationTime(); + } else { + setMaterializationTime((Long)value); + } + break; + } } @@ -389,6 +432,9 @@ import org.slf4j.LoggerFactory; case VALID_TXN_LIST: return getValidTxnList(); + case MATERIALIZATION_TIME: + return getMaterializationTime(); + } throw new IllegalStateException(); } @@ -410,6 +456,8 @@ import org.slf4j.LoggerFactory; return isSetTablesUsed(); case VALID_TXN_LIST: return isSetValidTxnList(); + case MATERIALIZATION_TIME: + return isSetMaterializationTime(); } throw new IllegalStateException(); } @@ -472,6 +520,15 @@ import org.slf4j.LoggerFactory; return false; } + boolean this_present_materializationTime = true && this.isSetMaterializationTime(); + boolean that_present_materializationTime = true && that.isSetMaterializationTime(); + if (this_present_materializationTime || that_present_materializationTime) { + if (!(this_present_materializationTime && that_present_materializationTime)) + return false; + if (this.materializationTime != that.materializationTime) + return false; + } + return true; } @@ -504,6 +561,11 @@ import org.slf4j.LoggerFactory; if (present_validTxnList) list.add(validTxnList); + boolean present_materializationTime = true && (isSetMaterializationTime()); + list.add(present_materializationTime); + if (present_materializationTime) + list.add(materializationTime); + return list.hashCode(); } @@ -565,6 +627,16 @@ import org.slf4j.LoggerFactory; return lastComparison; } } + lastComparison = Boolean.valueOf(isSetMaterializationTime()).compareTo(other.isSetMaterializationTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaterializationTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.materializationTime, other.materializationTime); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -626,6 +698,12 @@ import org.slf4j.LoggerFactory; } first = false; } + if (isSetMaterializationTime()) { + if (!first) sb.append(", "); + sb.append("materializationTime:"); + sb.append(this.materializationTime); + first = false; + } sb.append(")"); return sb.toString(); } @@ -661,6 +739,8 @@ import org.slf4j.LoggerFactory; 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); @@ -735,6 +815,14 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 6: // MATERIALIZATION_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.materializationTime = iprot.readI64(); + struct.setMaterializationTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -782,6 +870,11 @@ import org.slf4j.LoggerFactory; oprot.writeFieldEnd(); } } + if (struct.isSetMaterializationTime()) { + oprot.writeFieldBegin(MATERIALIZATION_TIME_FIELD_DESC); + oprot.writeI64(struct.materializationTime); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -813,10 +906,16 @@ import org.slf4j.LoggerFactory; if (struct.isSetValidTxnList()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetMaterializationTime()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetValidTxnList()) { oprot.writeString(struct.validTxnList); } + if (struct.isSetMaterializationTime()) { + oprot.writeI64(struct.materializationTime); + } } @Override @@ -839,11 +938,15 @@ import org.slf4j.LoggerFactory; } } struct.setTablesUsedIsSet(true); - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.validTxnList = iprot.readString(); struct.setValidTxnListIsSet(true); } + if (incoming.get(1)) { + struct.materializationTime = iprot.readI64(); + struct.setMaterializationTimeIsSet(true); + } } } http://git-wip-us.apache.org/repos/asf/hive/blob/774a8ef7/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java index e43493e..bb64086 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FindSchemasByColsResp.java @@ -350,14 +350,14 @@ import org.slf4j.LoggerFactory; case 1: // SCHEMA_VERSIONS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list920 = iprot.readListBegin(); - struct.schemaVersions = new ArrayList<SchemaVersionDescriptor>(_list920.size); - SchemaVersionDescriptor _elem921; - for (int _i922 = 0; _i922 < _list920.size; ++_i922) + org.apache.thrift.protocol.TList _list912 = iprot.readListBegin(); + struct.schemaVersions = new ArrayList<SchemaVersionDescriptor>(_list912.size); + SchemaVersionDescriptor _elem913; + for (int _i914 = 0; _i914 < _list912.size; ++_i914) { - _elem921 = new SchemaVersionDescriptor(); - _elem921.read(iprot); - struct.schemaVersions.add(_elem921); + _elem913 = new SchemaVersionDescriptor(); + _elem913.read(iprot); + struct.schemaVersions.add(_elem913); } iprot.readListEnd(); } @@ -383,9 +383,9 @@ import org.slf4j.LoggerFactory; oprot.writeFieldBegin(SCHEMA_VERSIONS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.schemaVersions.size())); - for (SchemaVersionDescriptor _iter923 : struct.schemaVersions) + for (SchemaVersionDescriptor _iter915 : struct.schemaVersions) { - _iter923.write(oprot); + _iter915.write(oprot); } oprot.writeListEnd(); } @@ -416,9 +416,9 @@ import org.slf4j.LoggerFactory; if (struct.isSetSchemaVersions()) { { oprot.writeI32(struct.schemaVersions.size()); - for (SchemaVersionDescriptor _iter924 : struct.schemaVersions) + for (SchemaVersionDescriptor _iter916 : struct.schemaVersions) { - _iter924.write(oprot); + _iter916.write(oprot); } } } @@ -430,14 +430,14 @@ import org.slf4j.LoggerFactory; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list925 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.schemaVersions = new ArrayList<SchemaVersionDescriptor>(_list925.size); - SchemaVersionDescriptor _elem926; - for (int _i927 = 0; _i927 < _list925.size; ++_i927) + org.apache.thrift.protocol.TList _list917 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.schemaVersions = new ArrayList<SchemaVersionDescriptor>(_list917.size); + SchemaVersionDescriptor _elem918; + for (int _i919 = 0; _i919 < _list917.size; ++_i919) { - _elem926 = new SchemaVersionDescriptor(); - _elem926.read(iprot); - struct.schemaVersions.add(_elem926); + _elem918 = new SchemaVersionDescriptor(); + _elem918.read(iprot); + struct.schemaVersions.add(_elem918); } } struct.setSchemaVersionsIsSet(true); http://git-wip-us.apache.org/repos/asf/hive/blob/774a8ef7/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java index 4e792bc..0972c5e 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java @@ -38,10 +38,7 @@ import org.slf4j.LoggerFactory; @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class Materialization implements org.apache.thrift.TBase<Materialization, Materialization._Fields>, java.io.Serializable, Cloneable, Comparable<Materialization> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Materialization"); - private static final org.apache.thrift.protocol.TField TABLES_USED_FIELD_DESC = new org.apache.thrift.protocol.TField("tablesUsed", org.apache.thrift.protocol.TType.SET, (short)1); - private static final org.apache.thrift.protocol.TField VALID_TXN_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validTxnList", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField INVALIDATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("invalidationTime", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField SOURCE_TABLES_UPDATE_DELETE_MODIFIED_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceTablesUpdateDeleteModified", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final org.apache.thrift.protocol.TField SOURCE_TABLES_UPDATE_DELETE_MODIFIED_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceTablesUpdateDeleteModified", org.apache.thrift.protocol.TType.BOOL, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -49,17 +46,11 @@ import org.slf4j.LoggerFactory; schemes.put(TupleScheme.class, new MaterializationTupleSchemeFactory()); } - private Set<String> tablesUsed; // required - private String validTxnList; // optional - private long invalidationTime; // optional - private boolean sourceTablesUpdateDeleteModified; // optional + private boolean sourceTablesUpdateDeleteModified; // 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 { - TABLES_USED((short)1, "tablesUsed"), - VALID_TXN_LIST((short)2, "validTxnList"), - INVALIDATION_TIME((short)3, "invalidationTime"), - SOURCE_TABLES_UPDATE_DELETE_MODIFIED((short)4, "sourceTablesUpdateDeleteModified"); + SOURCE_TABLES_UPDATE_DELETE_MODIFIED((short)1, "sourceTablesUpdateDeleteModified"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -74,13 +65,7 @@ import org.slf4j.LoggerFactory; */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLES_USED - return TABLES_USED; - case 2: // VALID_TXN_LIST - return VALID_TXN_LIST; - case 3: // INVALIDATION_TIME - return INVALIDATION_TIME; - case 4: // SOURCE_TABLES_UPDATE_DELETE_MODIFIED + case 1: // SOURCE_TABLES_UPDATE_DELETE_MODIFIED return SOURCE_TABLES_UPDATE_DELETE_MODIFIED; default: return null; @@ -122,21 +107,12 @@ import org.slf4j.LoggerFactory; } // isset id assignments - private static final int __INVALIDATIONTIME_ISSET_ID = 0; - private static final int __SOURCETABLESUPDATEDELETEMODIFIED_ISSET_ID = 1; + private static final int __SOURCETABLESUPDATEDELETEMODIFIED_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.VALID_TXN_LIST,_Fields.INVALIDATION_TIME,_Fields.SOURCE_TABLES_UPDATE_DELETE_MODIFIED}; 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.TABLES_USED, new org.apache.thrift.meta_data.FieldMetaData("tablesUsed", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.VALID_TXN_LIST, new org.apache.thrift.meta_data.FieldMetaData("validTxnList", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.INVALIDATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("invalidationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SOURCE_TABLES_UPDATE_DELETE_MODIFIED, new org.apache.thrift.meta_data.FieldMetaData("sourceTablesUpdateDeleteModified", org.apache.thrift.TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.SOURCE_TABLES_UPDATE_DELETE_MODIFIED, new org.apache.thrift.meta_data.FieldMetaData("sourceTablesUpdateDeleteModified", 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(Materialization.class, metaDataMap); @@ -146,10 +122,11 @@ import org.slf4j.LoggerFactory; } public Materialization( - Set<String> tablesUsed) + boolean sourceTablesUpdateDeleteModified) { this(); - this.tablesUsed = tablesUsed; + this.sourceTablesUpdateDeleteModified = sourceTablesUpdateDeleteModified; + setSourceTablesUpdateDeleteModifiedIsSet(true); } /** @@ -157,14 +134,6 @@ import org.slf4j.LoggerFactory; */ public Materialization(Materialization other) { __isset_bitfield = other.__isset_bitfield; - if (other.isSetTablesUsed()) { - Set<String> __this__tablesUsed = new HashSet<String>(other.tablesUsed); - this.tablesUsed = __this__tablesUsed; - } - if (other.isSetValidTxnList()) { - this.validTxnList = other.validTxnList; - } - this.invalidationTime = other.invalidationTime; this.sourceTablesUpdateDeleteModified = other.sourceTablesUpdateDeleteModified; } @@ -174,97 +143,10 @@ import org.slf4j.LoggerFactory; @Override public void clear() { - this.tablesUsed = null; - this.validTxnList = null; - setInvalidationTimeIsSet(false); - this.invalidationTime = 0; setSourceTablesUpdateDeleteModifiedIsSet(false); this.sourceTablesUpdateDeleteModified = false; } - public int getTablesUsedSize() { - return (this.tablesUsed == null) ? 0 : this.tablesUsed.size(); - } - - public java.util.Iterator<String> getTablesUsedIterator() { - return (this.tablesUsed == null) ? null : this.tablesUsed.iterator(); - } - - public void addToTablesUsed(String elem) { - if (this.tablesUsed == null) { - this.tablesUsed = new HashSet<String>(); - } - this.tablesUsed.add(elem); - } - - public Set<String> getTablesUsed() { - return this.tablesUsed; - } - - public void setTablesUsed(Set<String> tablesUsed) { - this.tablesUsed = tablesUsed; - } - - public void unsetTablesUsed() { - this.tablesUsed = null; - } - - /** Returns true if field tablesUsed is set (has been assigned a value) and false otherwise */ - public boolean isSetTablesUsed() { - return this.tablesUsed != null; - } - - public void setTablesUsedIsSet(boolean value) { - if (!value) { - this.tablesUsed = null; - } - } - - public String getValidTxnList() { - return this.validTxnList; - } - - public void setValidTxnList(String validTxnList) { - this.validTxnList = validTxnList; - } - - public void unsetValidTxnList() { - this.validTxnList = null; - } - - /** Returns true if field validTxnList is set (has been assigned a value) and false otherwise */ - public boolean isSetValidTxnList() { - return this.validTxnList != null; - } - - public void setValidTxnListIsSet(boolean value) { - if (!value) { - this.validTxnList = null; - } - } - - public long getInvalidationTime() { - return this.invalidationTime; - } - - public void setInvalidationTime(long invalidationTime) { - this.invalidationTime = invalidationTime; - setInvalidationTimeIsSet(true); - } - - public void unsetInvalidationTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INVALIDATIONTIME_ISSET_ID); - } - - /** Returns true if field invalidationTime is set (has been assigned a value) and false otherwise */ - public boolean isSetInvalidationTime() { - return EncodingUtils.testBit(__isset_bitfield, __INVALIDATIONTIME_ISSET_ID); - } - - public void setInvalidationTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INVALIDATIONTIME_ISSET_ID, value); - } - public boolean isSourceTablesUpdateDeleteModified() { return this.sourceTablesUpdateDeleteModified; } @@ -289,30 +171,6 @@ import org.slf4j.LoggerFactory; public void setFieldValue(_Fields field, Object value) { switch (field) { - case TABLES_USED: - if (value == null) { - unsetTablesUsed(); - } else { - setTablesUsed((Set<String>)value); - } - break; - - case VALID_TXN_LIST: - if (value == null) { - unsetValidTxnList(); - } else { - setValidTxnList((String)value); - } - break; - - case INVALIDATION_TIME: - if (value == null) { - unsetInvalidationTime(); - } else { - setInvalidationTime((Long)value); - } - break; - case SOURCE_TABLES_UPDATE_DELETE_MODIFIED: if (value == null) { unsetSourceTablesUpdateDeleteModified(); @@ -326,15 +184,6 @@ import org.slf4j.LoggerFactory; public Object getFieldValue(_Fields field) { switch (field) { - case TABLES_USED: - return getTablesUsed(); - - case VALID_TXN_LIST: - return getValidTxnList(); - - case INVALIDATION_TIME: - return getInvalidationTime(); - case SOURCE_TABLES_UPDATE_DELETE_MODIFIED: return isSourceTablesUpdateDeleteModified(); @@ -349,12 +198,6 @@ import org.slf4j.LoggerFactory; } switch (field) { - case TABLES_USED: - return isSetTablesUsed(); - case VALID_TXN_LIST: - return isSetValidTxnList(); - case INVALIDATION_TIME: - return isSetInvalidationTime(); case SOURCE_TABLES_UPDATE_DELETE_MODIFIED: return isSetSourceTablesUpdateDeleteModified(); } @@ -374,35 +217,8 @@ import org.slf4j.LoggerFactory; if (that == null) return false; - boolean this_present_tablesUsed = true && this.isSetTablesUsed(); - boolean that_present_tablesUsed = true && that.isSetTablesUsed(); - if (this_present_tablesUsed || that_present_tablesUsed) { - if (!(this_present_tablesUsed && that_present_tablesUsed)) - return false; - if (!this.tablesUsed.equals(that.tablesUsed)) - return false; - } - - boolean this_present_validTxnList = true && this.isSetValidTxnList(); - boolean that_present_validTxnList = true && that.isSetValidTxnList(); - if (this_present_validTxnList || that_present_validTxnList) { - if (!(this_present_validTxnList && that_present_validTxnList)) - return false; - if (!this.validTxnList.equals(that.validTxnList)) - return false; - } - - boolean this_present_invalidationTime = true && this.isSetInvalidationTime(); - boolean that_present_invalidationTime = true && that.isSetInvalidationTime(); - if (this_present_invalidationTime || that_present_invalidationTime) { - if (!(this_present_invalidationTime && that_present_invalidationTime)) - return false; - if (this.invalidationTime != that.invalidationTime) - return false; - } - - boolean this_present_sourceTablesUpdateDeleteModified = true && this.isSetSourceTablesUpdateDeleteModified(); - boolean that_present_sourceTablesUpdateDeleteModified = true && that.isSetSourceTablesUpdateDeleteModified(); + boolean this_present_sourceTablesUpdateDeleteModified = true; + boolean that_present_sourceTablesUpdateDeleteModified = true; if (this_present_sourceTablesUpdateDeleteModified || that_present_sourceTablesUpdateDeleteModified) { if (!(this_present_sourceTablesUpdateDeleteModified && that_present_sourceTablesUpdateDeleteModified)) return false; @@ -417,22 +233,7 @@ import org.slf4j.LoggerFactory; public int hashCode() { List<Object> list = new ArrayList<Object>(); - boolean present_tablesUsed = true && (isSetTablesUsed()); - list.add(present_tablesUsed); - if (present_tablesUsed) - list.add(tablesUsed); - - boolean present_validTxnList = true && (isSetValidTxnList()); - list.add(present_validTxnList); - if (present_validTxnList) - list.add(validTxnList); - - boolean present_invalidationTime = true && (isSetInvalidationTime()); - list.add(present_invalidationTime); - if (present_invalidationTime) - list.add(invalidationTime); - - boolean present_sourceTablesUpdateDeleteModified = true && (isSetSourceTablesUpdateDeleteModified()); + boolean present_sourceTablesUpdateDeleteModified = true; list.add(present_sourceTablesUpdateDeleteModified); if (present_sourceTablesUpdateDeleteModified) list.add(sourceTablesUpdateDeleteModified); @@ -448,36 +249,6 @@ import org.slf4j.LoggerFactory; int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTablesUsed()).compareTo(other.isSetTablesUsed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTablesUsed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablesUsed, other.tablesUsed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetValidTxnList()).compareTo(other.isSetValidTxnList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetValidTxnList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validTxnList, other.validTxnList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetInvalidationTime()).compareTo(other.isSetInvalidationTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInvalidationTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invalidationTime, other.invalidationTime); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetSourceTablesUpdateDeleteModified()).compareTo(other.isSetSourceTablesUpdateDeleteModified()); if (lastComparison != 0) { return lastComparison; @@ -508,43 +279,17 @@ import org.slf4j.LoggerFactory; StringBuilder sb = new StringBuilder("Materialization("); boolean first = true; - sb.append("tablesUsed:"); - if (this.tablesUsed == null) { - sb.append("null"); - } else { - sb.append(this.tablesUsed); - } + sb.append("sourceTablesUpdateDeleteModified:"); + sb.append(this.sourceTablesUpdateDeleteModified); first = false; - if (isSetValidTxnList()) { - if (!first) sb.append(", "); - sb.append("validTxnList:"); - if (this.validTxnList == null) { - sb.append("null"); - } else { - sb.append(this.validTxnList); - } - first = false; - } - if (isSetInvalidationTime()) { - if (!first) sb.append(", "); - sb.append("invalidationTime:"); - sb.append(this.invalidationTime); - first = false; - } - if (isSetSourceTablesUpdateDeleteModified()) { - if (!first) sb.append(", "); - sb.append("sourceTablesUpdateDeleteModified:"); - sb.append(this.sourceTablesUpdateDeleteModified); - first = false; - } sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetTablesUsed()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablesUsed' is unset! Struct:" + toString()); + if (!isSetSourceTablesUpdateDeleteModified()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sourceTablesUpdateDeleteModified' is unset! Struct:" + toString()); } // check for sub-struct validity @@ -586,41 +331,7 @@ import org.slf4j.LoggerFactory; break; } switch (schemeField.id) { - case 1: // TABLES_USED - if (schemeField.type == org.apache.thrift.protocol.TType.SET) { - { - org.apache.thrift.protocol.TSet _set840 = iprot.readSetBegin(); - struct.tablesUsed = new HashSet<String>(2*_set840.size); - String _elem841; - for (int _i842 = 0; _i842 < _set840.size; ++_i842) - { - _elem841 = iprot.readString(); - struct.tablesUsed.add(_elem841); - } - iprot.readSetEnd(); - } - struct.setTablesUsedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // VALID_TXN_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.validTxnList = iprot.readString(); - struct.setValidTxnListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // INVALIDATION_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.invalidationTime = iprot.readI64(); - struct.setInvalidationTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // SOURCE_TABLES_UPDATE_DELETE_MODIFIED + case 1: // SOURCE_TABLES_UPDATE_DELETE_MODIFIED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.sourceTablesUpdateDeleteModified = iprot.readBool(); struct.setSourceTablesUpdateDeleteModifiedIsSet(true); @@ -641,35 +352,9 @@ import org.slf4j.LoggerFactory; struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.tablesUsed != null) { - oprot.writeFieldBegin(TABLES_USED_FIELD_DESC); - { - oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.tablesUsed.size())); - for (String _iter843 : struct.tablesUsed) - { - oprot.writeString(_iter843); - } - oprot.writeSetEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.validTxnList != null) { - if (struct.isSetValidTxnList()) { - oprot.writeFieldBegin(VALID_TXN_LIST_FIELD_DESC); - oprot.writeString(struct.validTxnList); - oprot.writeFieldEnd(); - } - } - if (struct.isSetInvalidationTime()) { - oprot.writeFieldBegin(INVALIDATION_TIME_FIELD_DESC); - oprot.writeI64(struct.invalidationTime); - oprot.writeFieldEnd(); - } - if (struct.isSetSourceTablesUpdateDeleteModified()) { - oprot.writeFieldBegin(SOURCE_TABLES_UPDATE_DELETE_MODIFIED_FIELD_DESC); - oprot.writeBool(struct.sourceTablesUpdateDeleteModified); - oprot.writeFieldEnd(); - } + oprot.writeFieldBegin(SOURCE_TABLES_UPDATE_DELETE_MODIFIED_FIELD_DESC); + oprot.writeBool(struct.sourceTablesUpdateDeleteModified); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -687,62 +372,14 @@ import org.slf4j.LoggerFactory; @Override public void write(org.apache.thrift.protocol.TProtocol prot, Materialization struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - { - oprot.writeI32(struct.tablesUsed.size()); - for (String _iter844 : struct.tablesUsed) - { - oprot.writeString(_iter844); - } - } - BitSet optionals = new BitSet(); - if (struct.isSetValidTxnList()) { - optionals.set(0); - } - if (struct.isSetInvalidationTime()) { - optionals.set(1); - } - if (struct.isSetSourceTablesUpdateDeleteModified()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetValidTxnList()) { - oprot.writeString(struct.validTxnList); - } - if (struct.isSetInvalidationTime()) { - oprot.writeI64(struct.invalidationTime); - } - if (struct.isSetSourceTablesUpdateDeleteModified()) { - oprot.writeBool(struct.sourceTablesUpdateDeleteModified); - } + oprot.writeBool(struct.sourceTablesUpdateDeleteModified); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, Materialization struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - { - org.apache.thrift.protocol.TSet _set845 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tablesUsed = new HashSet<String>(2*_set845.size); - String _elem846; - for (int _i847 = 0; _i847 < _set845.size; ++_i847) - { - _elem846 = iprot.readString(); - struct.tablesUsed.add(_elem846); - } - } - struct.setTablesUsedIsSet(true); - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.validTxnList = iprot.readString(); - struct.setValidTxnListIsSet(true); - } - if (incoming.get(1)) { - struct.invalidationTime = iprot.readI64(); - struct.setInvalidationTimeIsSet(true); - } - if (incoming.get(2)) { - struct.sourceTablesUpdateDeleteModified = iprot.readBool(); - struct.setSourceTablesUpdateDeleteModifiedIsSet(true); - } + struct.sourceTablesUpdateDeleteModified = iprot.readBool(); + struct.setSourceTablesUpdateDeleteModifiedIsSet(true); } } http://git-wip-us.apache.org/repos/asf/hive/blob/774a8ef7/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java index 76dfe17..62bc3b4 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java @@ -1119,14 +1119,14 @@ import org.slf4j.LoggerFactory; case 4: // COLS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list912 = iprot.readListBegin(); - struct.cols = new ArrayList<FieldSchema>(_list912.size); - FieldSchema _elem913; - for (int _i914 = 0; _i914 < _list912.size; ++_i914) + org.apache.thrift.protocol.TList _list904 = iprot.readListBegin(); + struct.cols = new ArrayList<FieldSchema>(_list904.size); + FieldSchema _elem905; + for (int _i906 = 0; _i906 < _list904.size; ++_i906) { - _elem913 = new FieldSchema(); - _elem913.read(iprot); - struct.cols.add(_elem913); + _elem905 = new FieldSchema(); + _elem905.read(iprot); + struct.cols.add(_elem905); } iprot.readListEnd(); } @@ -1212,9 +1212,9 @@ import org.slf4j.LoggerFactory; oprot.writeFieldBegin(COLS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cols.size())); - for (FieldSchema _iter915 : struct.cols) + for (FieldSchema _iter907 : struct.cols) { - _iter915.write(oprot); + _iter907.write(oprot); } oprot.writeListEnd(); } @@ -1323,9 +1323,9 @@ import org.slf4j.LoggerFactory; if (struct.isSetCols()) { { oprot.writeI32(struct.cols.size()); - for (FieldSchema _iter916 : struct.cols) + for (FieldSchema _iter908 : struct.cols) { - _iter916.write(oprot); + _iter908.write(oprot); } } } @@ -1368,14 +1368,14 @@ import org.slf4j.LoggerFactory; } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list917 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.cols = new ArrayList<FieldSchema>(_list917.size); - FieldSchema _elem918; - for (int _i919 = 0; _i919 < _list917.size; ++_i919) + org.apache.thrift.protocol.TList _list909 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.cols = new ArrayList<FieldSchema>(_list909.size); + FieldSchema _elem910; + for (int _i911 = 0; _i911 < _list909.size; ++_i911) { - _elem918 = new FieldSchema(); - _elem918.read(iprot); - struct.cols.add(_elem918); + _elem910 = new FieldSchema(); + _elem910.read(iprot); + struct.cols.add(_elem910); } } struct.setColsIsSet(true);
