diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift index a0c1c1e..4625801 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -630,12 +630,12 @@ struct ShowCompactRequest { struct ShowCompactResponseElement { 1: required string dbname, 2: required string tablename, - 3: required string partitionname, + 3: optional string partitionname, 4: required CompactionType type, 5: required string state, - 6: required string workerid, - 7: required i64 start, - 8: required string runAs, + 6: optional string workerid, + 7: optional i64 start, + 8: optional string runAs, } struct ShowCompactResponse { diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp index 71d1762..df75a50 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -9027,8 +9027,8 @@ void swap(ShowCompactRequest &a, ShowCompactRequest &b) { (void) b; } -const char* ShowCompactResponseElement::ascii_fingerprint = "42464F3A97707F984FDE462104223A69"; -const uint8_t ShowCompactResponseElement::binary_fingerprint[16] = {0x42,0x46,0x4F,0x3A,0x97,0x70,0x7F,0x98,0x4F,0xDE,0x46,0x21,0x04,0x22,0x3A,0x69}; +const char* ShowCompactResponseElement::ascii_fingerprint = "2F338C265DC4FD82DD13F4966FE43F13"; +const uint8_t ShowCompactResponseElement::binary_fingerprint[16] = {0x2F,0x33,0x8C,0x26,0x5D,0xC4,0xFD,0x82,0xDD,0x13,0xF4,0x96,0x6F,0xE4,0x3F,0x13}; uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) { @@ -9043,12 +9043,8 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* bool isset_dbname = false; bool isset_tablename = false; - bool isset_partitionname = false; bool isset_type = false; bool isset_state = false; - bool isset_workerid = false; - bool isset_start = false; - bool isset_runAs = false; while (true) { @@ -9077,7 +9073,7 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* case 3: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->partitionname); - isset_partitionname = true; + this->__isset.partitionname = true; } else { xfer += iprot->skip(ftype); } @@ -9103,7 +9099,7 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* case 6: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->workerid); - isset_workerid = true; + this->__isset.workerid = true; } else { xfer += iprot->skip(ftype); } @@ -9111,7 +9107,7 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* case 7: if (ftype == ::apache::thrift::protocol::T_I64) { xfer += iprot->readI64(this->start); - isset_start = true; + this->__isset.start = true; } else { xfer += iprot->skip(ftype); } @@ -9119,7 +9115,7 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* case 8: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->runAs); - isset_runAs = true; + this->__isset.runAs = true; } else { xfer += iprot->skip(ftype); } @@ -9137,18 +9133,10 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* throw TProtocolException(TProtocolException::INVALID_DATA); if (!isset_tablename) throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_partitionname) - throw TProtocolException(TProtocolException::INVALID_DATA); if (!isset_type) throw TProtocolException(TProtocolException::INVALID_DATA); if (!isset_state) throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_workerid) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_start) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_runAs) - throw TProtocolException(TProtocolException::INVALID_DATA); return xfer; } @@ -9164,10 +9152,11 @@ uint32_t ShowCompactResponseElement::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeString(this->tablename); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->partitionname); - xfer += oprot->writeFieldEnd(); - + if (this->__isset.partitionname) { + xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->partitionname); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->type); xfer += oprot->writeFieldEnd(); @@ -9176,18 +9165,21 @@ uint32_t ShowCompactResponseElement::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeString(this->state); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("workerid", ::apache::thrift::protocol::T_STRING, 6); - xfer += oprot->writeString(this->workerid); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->start); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("runAs", ::apache::thrift::protocol::T_STRING, 8); - xfer += oprot->writeString(this->runAs); - xfer += oprot->writeFieldEnd(); - + if (this->__isset.workerid) { + xfer += oprot->writeFieldBegin("workerid", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->workerid); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.start) { + xfer += oprot->writeFieldBegin("start", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->start); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.runAs) { + xfer += oprot->writeFieldBegin("runAs", ::apache::thrift::protocol::T_STRING, 8); + xfer += oprot->writeString(this->runAs); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -9203,10 +9195,11 @@ void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b) { swap(a.workerid, b.workerid); swap(a.start, b.start); swap(a.runAs, b.runAs); + swap(a.__isset, b.__isset); } -const char* ShowCompactResponse::ascii_fingerprint = "3CCBC4D398CA25527272FE78625DE88A"; -const uint8_t ShowCompactResponse::binary_fingerprint[16] = {0x3C,0xCB,0xC4,0xD3,0x98,0xCA,0x25,0x52,0x72,0x72,0xFE,0x78,0x62,0x5D,0xE8,0x8A}; +const char* ShowCompactResponse::ascii_fingerprint = "915B7B8DB8966D65769C0F98707BBAE3"; +const uint8_t ShowCompactResponse::binary_fingerprint[16] = {0x91,0x5B,0x7B,0x8D,0xB8,0x96,0x6D,0x65,0x76,0x9C,0x0F,0x98,0x70,0x7B,0xBA,0xE3}; uint32_t ShowCompactResponse::read(::apache::thrift::protocol::TProtocol* iprot) { diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h index f999dbe..5c93826 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -4934,12 +4934,19 @@ class ShowCompactRequest { void swap(ShowCompactRequest &a, ShowCompactRequest &b); +typedef struct _ShowCompactResponseElement__isset { + _ShowCompactResponseElement__isset() : partitionname(false), workerid(false), start(false), runAs(false) {} + bool partitionname; + bool workerid; + bool start; + bool runAs; +} _ShowCompactResponseElement__isset; class ShowCompactResponseElement { public: - static const char* ascii_fingerprint; // = "42464F3A97707F984FDE462104223A69"; - static const uint8_t binary_fingerprint[16]; // = {0x42,0x46,0x4F,0x3A,0x97,0x70,0x7F,0x98,0x4F,0xDE,0x46,0x21,0x04,0x22,0x3A,0x69}; + static const char* ascii_fingerprint; // = "2F338C265DC4FD82DD13F4966FE43F13"; + static const uint8_t binary_fingerprint[16]; // = {0x2F,0x33,0x8C,0x26,0x5D,0xC4,0xFD,0x82,0xDD,0x13,0xF4,0x96,0x6F,0xE4,0x3F,0x13}; ShowCompactResponseElement() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), state(), workerid(), start(0), runAs() { } @@ -4955,6 +4962,8 @@ class ShowCompactResponseElement { int64_t start; std::string runAs; + _ShowCompactResponseElement__isset __isset; + void __set_dbname(const std::string& val) { dbname = val; } @@ -4965,6 +4974,7 @@ class ShowCompactResponseElement { void __set_partitionname(const std::string& val) { partitionname = val; + __isset.partitionname = true; } void __set_type(const CompactionType::type val) { @@ -4977,14 +4987,17 @@ class ShowCompactResponseElement { void __set_workerid(const std::string& val) { workerid = val; + __isset.workerid = true; } void __set_start(const int64_t val) { start = val; + __isset.start = true; } void __set_runAs(const std::string& val) { runAs = val; + __isset.runAs = true; } bool operator == (const ShowCompactResponseElement & rhs) const @@ -4993,17 +5006,25 @@ class ShowCompactResponseElement { return false; if (!(tablename == rhs.tablename)) return false; - if (!(partitionname == rhs.partitionname)) + if (__isset.partitionname != rhs.__isset.partitionname) + return false; + else if (__isset.partitionname && !(partitionname == rhs.partitionname)) return false; if (!(type == rhs.type)) return false; if (!(state == rhs.state)) return false; - if (!(workerid == rhs.workerid)) + if (__isset.workerid != rhs.__isset.workerid) + return false; + else if (__isset.workerid && !(workerid == rhs.workerid)) + return false; + if (__isset.start != rhs.__isset.start) + return false; + else if (__isset.start && !(start == rhs.start)) return false; - if (!(start == rhs.start)) + if (__isset.runAs != rhs.__isset.runAs) return false; - if (!(runAs == rhs.runAs)) + else if (__isset.runAs && !(runAs == rhs.runAs)) return false; return true; } @@ -5024,8 +5045,8 @@ void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b); class ShowCompactResponse { public: - static const char* ascii_fingerprint; // = "3CCBC4D398CA25527272FE78625DE88A"; - static const uint8_t binary_fingerprint[16]; // = {0x3C,0xCB,0xC4,0xD3,0x98,0xCA,0x25,0x52,0x72,0x72,0xFE,0x78,0x62,0x5D,0xE8,0x8A}; + static const char* ascii_fingerprint; // = "915B7B8DB8966D65769C0F98707BBAE3"; + static const uint8_t binary_fingerprint[16]; // = {0x91,0x5B,0x7B,0x8D,0xB8,0x96,0x6D,0x65,0x76,0x9C,0x0F,0x98,0x70,0x7B,0xBA,0xE3}; ShowCompactResponse() { } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java index c84fa29..a993810 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java @@ -135,9 +135,9 @@ public FieldSchema( String comment) { this(); - this.name = org.apache.hive.common.util.HiveStringUtils.intern(name); - this.type = org.apache.hive.common.util.HiveStringUtils.intern(type); - this.comment = org.apache.hive.common.util.HiveStringUtils.intern(comment); + this.name = name; + this.type = type; + this.comment = comment; } /** @@ -145,13 +145,13 @@ public FieldSchema( */ public FieldSchema(FieldSchema other) { if (other.isSetName()) { - this.name = org.apache.hive.common.util.HiveStringUtils.intern(other.name); + this.name = other.name; } if (other.isSetType()) { - this.type = org.apache.hive.common.util.HiveStringUtils.intern(other.type); + this.type = other.type; } if (other.isSetComment()) { - this.comment = org.apache.hive.common.util.HiveStringUtils.intern(other.comment); + this.comment = other.comment; } } @@ -171,7 +171,7 @@ public String getName() { } public void setName(String name) { - this.name = org.apache.hive.common.util.HiveStringUtils.intern(name); + this.name = name; } public void unsetName() { @@ -194,7 +194,7 @@ public String getType() { } public void setType(String type) { - this.type = org.apache.hive.common.util.HiveStringUtils.intern(type); + this.type = type; } public void unsetType() { @@ -217,7 +217,7 @@ public String getComment() { } public void setComment(String comment) { - this.comment = org.apache.hive.common.util.HiveStringUtils.intern(comment); + this.comment = comment; } public void unsetComment() { diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java index 242d54d..312807e 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java @@ -182,14 +182,14 @@ public Partition( { this(); this.values = values; - this.dbName = org.apache.hive.common.util.HiveStringUtils.intern(dbName); - this.tableName = org.apache.hive.common.util.HiveStringUtils.intern(tableName); + this.dbName = dbName; + this.tableName = tableName; this.createTime = createTime; setCreateTimeIsSet(true); this.lastAccessTime = lastAccessTime; setLastAccessTimeIsSet(true); this.sd = sd; - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); + this.parameters = parameters; } /** @@ -205,10 +205,10 @@ public Partition(Partition other) { this.values = __this__values; } if (other.isSetDbName()) { - this.dbName = org.apache.hive.common.util.HiveStringUtils.intern(other.dbName); + this.dbName = other.dbName; } if (other.isSetTableName()) { - this.tableName = org.apache.hive.common.util.HiveStringUtils.intern(other.tableName); + this.tableName = other.tableName; } this.createTime = other.createTime; this.lastAccessTime = other.lastAccessTime; @@ -222,9 +222,9 @@ public Partition(Partition other) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); - String __this__parameters_copy_key = org.apache.hive.common.util.HiveStringUtils.intern(other_element_key); + String __this__parameters_copy_key = other_element_key; - String __this__parameters_copy_value = org.apache.hive.common.util.HiveStringUtils.intern(other_element_value); + String __this__parameters_copy_value = other_element_value; __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); } @@ -296,7 +296,7 @@ public String getDbName() { } public void setDbName(String dbName) { - this.dbName = org.apache.hive.common.util.HiveStringUtils.intern(dbName); + this.dbName = dbName; } public void unsetDbName() { @@ -319,7 +319,7 @@ public String getTableName() { } public void setTableName(String tableName) { - this.tableName = org.apache.hive.common.util.HiveStringUtils.intern(tableName); + this.tableName = tableName; } public void unsetTableName() { @@ -420,7 +420,7 @@ public void putToParameters(String key, String val) { } public void setParameters(Map parameters) { - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); + this.parameters = parameters; } public void unsetParameters() { diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java index 2466d8f..24d65bb 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java @@ -137,9 +137,9 @@ public SerDeInfo( Map parameters) { this(); - this.name = org.apache.hive.common.util.HiveStringUtils.intern(name); - this.serializationLib = org.apache.hive.common.util.HiveStringUtils.intern(serializationLib); - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); + this.name = name; + this.serializationLib = serializationLib; + this.parameters = parameters; } /** @@ -147,10 +147,10 @@ public SerDeInfo( */ public SerDeInfo(SerDeInfo other) { if (other.isSetName()) { - this.name = org.apache.hive.common.util.HiveStringUtils.intern(other.name); + this.name = other.name; } if (other.isSetSerializationLib()) { - this.serializationLib = org.apache.hive.common.util.HiveStringUtils.intern(other.serializationLib); + this.serializationLib = other.serializationLib; } if (other.isSetParameters()) { Map __this__parameters = new HashMap(); @@ -159,9 +159,9 @@ public SerDeInfo(SerDeInfo other) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); - String __this__parameters_copy_key = org.apache.hive.common.util.HiveStringUtils.intern(other_element_key); + String __this__parameters_copy_key = other_element_key; - String __this__parameters_copy_value = org.apache.hive.common.util.HiveStringUtils.intern(other_element_value); + String __this__parameters_copy_value = other_element_value; __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); } @@ -185,7 +185,7 @@ public String getName() { } public void setName(String name) { - this.name = org.apache.hive.common.util.HiveStringUtils.intern(name); + this.name = name; } public void unsetName() { @@ -208,7 +208,7 @@ public String getSerializationLib() { } public void setSerializationLib(String serializationLib) { - this.serializationLib = org.apache.hive.common.util.HiveStringUtils.intern(serializationLib); + this.serializationLib = serializationLib; } public void unsetSerializationLib() { @@ -242,7 +242,7 @@ public void putToParameters(String key, String val) { } public void setParameters(Map parameters) { - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); + this.parameters = parameters; } public void unsetParameters() { diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java index 47da9b3..365a401 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java @@ -51,12 +51,12 @@ private String dbname; // required private String tablename; // required - private String partitionname; // required + private String partitionname; // optional private CompactionType type; // required private String state; // required - private String workerid; // required - private long start; // required - private String runAs; // required + private String workerid; // optional + private long start; // optional + private String runAs; // 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 { @@ -144,6 +144,7 @@ public String getFieldName() { // isset id assignments private static final int __START_ISSET_ID = 0; private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.WORKERID,_Fields.START,_Fields.RUN_AS}; 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); @@ -151,17 +152,17 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.PARTITIONNAME, new org.apache.thrift.meta_data.FieldMetaData("partitionname", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CompactionType.class))); tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.WORKERID, new org.apache.thrift.meta_data.FieldMetaData("workerid", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.WORKERID, new org.apache.thrift.meta_data.FieldMetaData("workerid", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.START, new org.apache.thrift.meta_data.FieldMetaData("start", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.RUN_AS, new org.apache.thrift.meta_data.FieldMetaData("runAs", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.RUN_AS, new org.apache.thrift.meta_data.FieldMetaData("runAs", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactResponseElement.class, metaDataMap); @@ -173,23 +174,14 @@ public ShowCompactResponseElement() { public ShowCompactResponseElement( String dbname, String tablename, - String partitionname, CompactionType type, - String state, - String workerid, - long start, - String runAs) + String state) { this(); this.dbname = dbname; this.tablename = tablename; - this.partitionname = partitionname; this.type = type; this.state = state; - this.workerid = workerid; - this.start = start; - setStartIsSet(true); - this.runAs = runAs; } /** @@ -622,8 +614,8 @@ public boolean equals(ShowCompactResponseElement that) { return false; } - boolean this_present_start = true; - boolean that_present_start = true; + boolean this_present_start = true && this.isSetStart(); + boolean that_present_start = true && that.isSetStart(); if (this_present_start || that_present_start) { if (!(this_present_start && that_present_start)) return false; @@ -677,7 +669,7 @@ public int hashCode() { if (present_workerid) builder.append(workerid); - boolean present_start = true; + boolean present_start = true && (isSetStart()); builder.append(present_start); if (present_start) builder.append(start); @@ -813,14 +805,16 @@ public String toString() { sb.append(this.tablename); } first = false; - if (!first) sb.append(", "); - sb.append("partitionname:"); - if (this.partitionname == null) { - sb.append("null"); - } else { - sb.append(this.partitionname); + if (isSetPartitionname()) { + if (!first) sb.append(", "); + sb.append("partitionname:"); + if (this.partitionname == null) { + sb.append("null"); + } else { + sb.append(this.partitionname); + } + first = false; } - first = false; if (!first) sb.append(", "); sb.append("type:"); if (this.type == null) { @@ -837,26 +831,32 @@ public String toString() { sb.append(this.state); } first = false; - if (!first) sb.append(", "); - sb.append("workerid:"); - if (this.workerid == null) { - sb.append("null"); - } else { - sb.append(this.workerid); + if (isSetWorkerid()) { + if (!first) sb.append(", "); + sb.append("workerid:"); + if (this.workerid == null) { + sb.append("null"); + } else { + sb.append(this.workerid); + } + first = false; } - first = false; - if (!first) sb.append(", "); - sb.append("start:"); - sb.append(this.start); - first = false; - if (!first) sb.append(", "); - sb.append("runAs:"); - if (this.runAs == null) { - sb.append("null"); - } else { - sb.append(this.runAs); + if (isSetStart()) { + if (!first) sb.append(", "); + sb.append("start:"); + sb.append(this.start); + first = false; + } + if (isSetRunAs()) { + if (!first) sb.append(", "); + sb.append("runAs:"); + if (this.runAs == null) { + sb.append("null"); + } else { + sb.append(this.runAs); + } + first = false; } - first = false; sb.append(")"); return sb.toString(); } @@ -871,10 +871,6 @@ public void validate() throws org.apache.thrift.TException { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); } - if (!isSetPartitionname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'partitionname' is unset! Struct:" + toString()); - } - if (!isSetType()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); } @@ -883,18 +879,6 @@ public void validate() throws org.apache.thrift.TException { throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); } - if (!isSetWorkerid()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'workerid' is unset! Struct:" + toString()); - } - - if (!isSetStart()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'start' is unset! Struct:" + toString()); - } - - if (!isSetRunAs()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'runAs' is unset! Struct:" + toString()); - } - // check for sub-struct validity } @@ -1022,9 +1006,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ShowCompactRespons oprot.writeFieldEnd(); } if (struct.partitionname != null) { - oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); - oprot.writeString(struct.partitionname); - oprot.writeFieldEnd(); + if (struct.isSetPartitionname()) { + oprot.writeFieldBegin(PARTITIONNAME_FIELD_DESC); + oprot.writeString(struct.partitionname); + oprot.writeFieldEnd(); + } } if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); @@ -1037,17 +1023,23 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ShowCompactRespons oprot.writeFieldEnd(); } if (struct.workerid != null) { - oprot.writeFieldBegin(WORKERID_FIELD_DESC); - oprot.writeString(struct.workerid); + if (struct.isSetWorkerid()) { + oprot.writeFieldBegin(WORKERID_FIELD_DESC); + oprot.writeString(struct.workerid); + oprot.writeFieldEnd(); + } + } + if (struct.isSetStart()) { + oprot.writeFieldBegin(START_FIELD_DESC); + oprot.writeI64(struct.start); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(START_FIELD_DESC); - oprot.writeI64(struct.start); - oprot.writeFieldEnd(); if (struct.runAs != null) { - oprot.writeFieldBegin(RUN_AS_FIELD_DESC); - oprot.writeString(struct.runAs); - oprot.writeFieldEnd(); + if (struct.isSetRunAs()) { + oprot.writeFieldBegin(RUN_AS_FIELD_DESC); + oprot.writeString(struct.runAs); + oprot.writeFieldEnd(); + } } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -1068,12 +1060,34 @@ public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.dbname); oprot.writeString(struct.tablename); - oprot.writeString(struct.partitionname); oprot.writeI32(struct.type.getValue()); oprot.writeString(struct.state); - oprot.writeString(struct.workerid); - oprot.writeI64(struct.start); - oprot.writeString(struct.runAs); + BitSet optionals = new BitSet(); + if (struct.isSetPartitionname()) { + optionals.set(0); + } + if (struct.isSetWorkerid()) { + optionals.set(1); + } + if (struct.isSetStart()) { + optionals.set(2); + } + if (struct.isSetRunAs()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetPartitionname()) { + oprot.writeString(struct.partitionname); + } + if (struct.isSetWorkerid()) { + oprot.writeString(struct.workerid); + } + if (struct.isSetStart()) { + oprot.writeI64(struct.start); + } + if (struct.isSetRunAs()) { + oprot.writeString(struct.runAs); + } } @Override @@ -1083,18 +1097,27 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponseE struct.setDbnameIsSet(true); struct.tablename = iprot.readString(); struct.setTablenameIsSet(true); - struct.partitionname = iprot.readString(); - struct.setPartitionnameIsSet(true); struct.type = CompactionType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); struct.state = iprot.readString(); struct.setStateIsSet(true); - struct.workerid = iprot.readString(); - struct.setWorkeridIsSet(true); - struct.start = iprot.readI64(); - struct.setStartIsSet(true); - struct.runAs = iprot.readString(); - struct.setRunAsIsSet(true); + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.partitionname = iprot.readString(); + struct.setPartitionnameIsSet(true); + } + if (incoming.get(1)) { + struct.workerid = iprot.readString(); + struct.setWorkeridIsSet(true); + } + if (incoming.get(2)) { + struct.start = iprot.readI64(); + struct.setStartIsSet(true); + } + if (incoming.get(3)) { + struct.runAs = iprot.readString(); + struct.setRunAsIsSet(true); + } } } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java index b91cc1c..d0b9843 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java @@ -216,17 +216,17 @@ public StorageDescriptor( { this(); this.cols = cols; - this.location = org.apache.hive.common.util.HiveStringUtils.intern(location); - this.inputFormat = org.apache.hive.common.util.HiveStringUtils.intern(inputFormat); - this.outputFormat = org.apache.hive.common.util.HiveStringUtils.intern(outputFormat); + this.location = location; + this.inputFormat = inputFormat; + this.outputFormat = outputFormat; this.compressed = compressed; setCompressedIsSet(true); this.numBuckets = numBuckets; setNumBucketsIsSet(true); this.serdeInfo = serdeInfo; - this.bucketCols = org.apache.hive.common.util.HiveStringUtils.intern(bucketCols); + this.bucketCols = bucketCols; this.sortCols = sortCols; - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); + this.parameters = parameters; } /** @@ -242,13 +242,13 @@ public StorageDescriptor(StorageDescriptor other) { this.cols = __this__cols; } if (other.isSetLocation()) { - this.location = org.apache.hive.common.util.HiveStringUtils.intern(other.location); + this.location = other.location; } if (other.isSetInputFormat()) { - this.inputFormat = org.apache.hive.common.util.HiveStringUtils.intern(other.inputFormat); + this.inputFormat = other.inputFormat; } if (other.isSetOutputFormat()) { - this.outputFormat = org.apache.hive.common.util.HiveStringUtils.intern(other.outputFormat); + this.outputFormat = other.outputFormat; } this.compressed = other.compressed; this.numBuckets = other.numBuckets; @@ -276,9 +276,9 @@ public StorageDescriptor(StorageDescriptor other) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); - String __this__parameters_copy_key = org.apache.hive.common.util.HiveStringUtils.intern(other_element_key); + String __this__parameters_copy_key = other_element_key; - String __this__parameters_copy_value = org.apache.hive.common.util.HiveStringUtils.intern(other_element_value); + String __this__parameters_copy_value = other_element_value; __this__parameters.put(__this__parameters_copy_key, __this__parameters_copy_value); } @@ -356,7 +356,7 @@ public String getLocation() { } public void setLocation(String location) { - this.location = org.apache.hive.common.util.HiveStringUtils.intern(location); + this.location = location; } public void unsetLocation() { @@ -379,7 +379,7 @@ public String getInputFormat() { } public void setInputFormat(String inputFormat) { - this.inputFormat = org.apache.hive.common.util.HiveStringUtils.intern(inputFormat); + this.inputFormat = inputFormat; } public void unsetInputFormat() { @@ -402,7 +402,7 @@ public String getOutputFormat() { } public void setOutputFormat(String outputFormat) { - this.outputFormat = org.apache.hive.common.util.HiveStringUtils.intern(outputFormat); + this.outputFormat = outputFormat; } public void unsetOutputFormat() { @@ -507,7 +507,7 @@ public void addToBucketCols(String elem) { } public void setBucketCols(List bucketCols) { - this.bucketCols = org.apache.hive.common.util.HiveStringUtils.intern(bucketCols); + this.bucketCols = bucketCols; } public void unsetBucketCols() { @@ -579,7 +579,7 @@ public void putToParameters(String key, String val) { } public void setParameters(Map parameters) { - this.parameters = org.apache.hive.common.util.HiveStringUtils.intern(parameters); + this.parameters = parameters; } public void unsetParameters() { diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote old mode 100644 new mode 100755 diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py index 76f9826..533caa2 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -8054,18 +8054,10 @@ def validate(self): raise TProtocol.TProtocolException(message='Required field dbname is unset!') if self.tablename is None: raise TProtocol.TProtocolException(message='Required field tablename is unset!') - if self.partitionname is None: - raise TProtocol.TProtocolException(message='Required field partitionname is unset!') if self.type is None: raise TProtocol.TProtocolException(message='Required field type is unset!') if self.state is None: raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.workerid is None: - raise TProtocol.TProtocolException(message='Required field workerid is unset!') - if self.start is None: - raise TProtocol.TProtocolException(message='Required field start is unset!') - if self.runAs is None: - raise TProtocol.TProtocolException(message='Required field runAs is unset!') return diff --git metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb index 1581d94..abda32f 100644 --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -1946,12 +1946,12 @@ class ShowCompactResponseElement FIELDS = { DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, - PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname'}, + PARTITIONNAME => {:type => ::Thrift::Types::STRING, :name => 'partitionname', :optional => true}, TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CompactionType}, STATE => {:type => ::Thrift::Types::STRING, :name => 'state'}, - WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerid'}, - START => {:type => ::Thrift::Types::I64, :name => 'start'}, - RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runAs'} + WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerid', :optional => true}, + START => {:type => ::Thrift::Types::I64, :name => 'start', :optional => true}, + RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runAs', :optional => true} } def struct_fields; FIELDS; end @@ -1959,12 +1959,8 @@ class ShowCompactResponseElement def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbname is unset!') unless @dbname raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tablename is unset!') unless @tablename - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field partitionname is unset!') unless @partitionname raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field workerid is unset!') unless @workerid - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start is unset!') unless @start - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field runAs is unset!') unless @runAs unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') end