This is an automated email from the ASF dual-hosted git repository. dkuzmenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push: new 2fb969c6c6c HIVE-26764: Show compaction request should have all filds optional (Kirti Ruge, reviewed by Denys Kuzmenko) 2fb969c6c6c is described below commit 2fb969c6c6c7ebc9d2c34e27152c147aa34d7ff9 Author: rkirtir <111496669+rkir...@users.noreply.github.com> AuthorDate: Sat Nov 26 16:29:06 2022 +0530 HIVE-26764: Show compaction request should have all filds optional (Kirti Ruge, reviewed by Denys Kuzmenko) Closes #3791 --- .../compact/AlterTableCompactOperation.java | 4 +- .../gen/thrift/gen-cpp/hive_metastore_types.cpp | 68 +++---- .../src/gen/thrift/gen-cpp/hive_metastore_types.h | 22 ++- .../hive/metastore/api/ShowCompactRequest.java | 214 +++++++++++---------- .../gen-php/metastore/ShowCompactRequest.php | 8 +- .../src/gen/thrift/gen-py/hive_metastore/ttypes.py | 8 - .../src/gen/thrift/gen-rb/hive_metastore_types.rb | 12 +- .../src/main/thrift/hive_metastore.thrift | 8 +- 8 files changed, 176 insertions(+), 168 deletions(-) diff --git a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java index 2aa1128d0b6..784c6724085 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/compact/AlterTableCompactOperation.java @@ -127,7 +127,9 @@ public class AlterTableCompactOperation extends DDLOperation<AlterTableCompactDe context.getConsole().printInfo("Interrupted while waiting for compaction with id=" + resp.getId()); break; } - ShowCompactRequest request = new ShowCompactRequest(resp.getId()); + ShowCompactRequest request = new ShowCompactRequest(); + request.setId(resp.getId()); + ShowCompactResponse compaction = context.getDb().showCompactions(request); if (compaction.getCompactsSize() == 1) { ShowCompactResponseElement comp = compaction.getCompacts().get(0); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/hive_metastore_types.cpp b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/hive_metastore_types.cpp index b731fd8bd36..b963b22c607 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -28131,10 +28131,12 @@ __isset.poolName = true; void ShowCompactRequest::__set_dbname(const std::string& val) { this->dbname = val; +__isset.dbname = true; } void ShowCompactRequest::__set_tablename(const std::string& val) { this->tablename = val; +__isset.tablename = true; } void ShowCompactRequest::__set_partitionname(const std::string& val) { @@ -28144,10 +28146,12 @@ __isset.partitionname = true; void ShowCompactRequest::__set_type(const CompactionType::type val) { this->type = val; +__isset.type = true; } void ShowCompactRequest::__set_state(const std::string& val) { this->state = val; +__isset.state = true; } std::ostream& operator<<(std::ostream& out, const ShowCompactRequest& obj) { @@ -28168,10 +28172,6 @@ uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) using ::apache::thrift::protocol::TProtocolException; - bool isset_dbname = false; - bool isset_tablename = false; - bool isset_type = false; - bool isset_state = false; while (true) { @@ -28200,7 +28200,7 @@ uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) case 3: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->dbname); - isset_dbname = true; + this->__isset.dbname = true; } else { xfer += iprot->skip(ftype); } @@ -28208,7 +28208,7 @@ uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) case 4: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tablename); - isset_tablename = true; + this->__isset.tablename = true; } else { xfer += iprot->skip(ftype); } @@ -28226,7 +28226,7 @@ uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) int32_t ecast995; xfer += iprot->readI32(ecast995); this->type = static_cast<CompactionType::type>(ecast995); - isset_type = true; + this->__isset.type = true; } else { xfer += iprot->skip(ftype); } @@ -28234,7 +28234,7 @@ uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) case 7: if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->state); - isset_state = true; + this->__isset.state = true; } else { xfer += iprot->skip(ftype); } @@ -28248,14 +28248,6 @@ uint32_t ShowCompactRequest::read(::apache::thrift::protocol::TProtocol* iprot) xfer += iprot->readStructEnd(); - if (!isset_dbname) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_tablename) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_type) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_state) - throw TProtocolException(TProtocolException::INVALID_DATA); return xfer; } @@ -28274,27 +28266,31 @@ uint32_t ShowCompactRequest::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeString(this->poolName); xfer += oprot->writeFieldEnd(); } - xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->dbname); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->tablename); - xfer += oprot->writeFieldEnd(); - + if (this->__isset.dbname) { + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->dbname); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.tablename) { + xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->tablename); + xfer += oprot->writeFieldEnd(); + } if (this->__isset.partitionname) { xfer += oprot->writeFieldBegin("partitionname", ::apache::thrift::protocol::T_STRING, 5); xfer += oprot->writeString(this->partitionname); xfer += oprot->writeFieldEnd(); } - xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 6); - xfer += oprot->writeI32(static_cast<int32_t>(this->type)); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRING, 7); - xfer += oprot->writeString(this->state); - xfer += oprot->writeFieldEnd(); - + if (this->__isset.type) { + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32(static_cast<int32_t>(this->type)); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.state) { + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->state); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -28338,11 +28334,11 @@ void ShowCompactRequest::printTo(std::ostream& out) const { out << "ShowCompactRequest("; out << "id="; (__isset.id ? (out << to_string(id)) : (out << "<null>")); out << ", " << "poolName="; (__isset.poolName ? (out << to_string(poolName)) : (out << "<null>")); - out << ", " << "dbname=" << to_string(dbname); - out << ", " << "tablename=" << to_string(tablename); + out << ", " << "dbname="; (__isset.dbname ? (out << to_string(dbname)) : (out << "<null>")); + out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "<null>")); out << ", " << "partitionname="; (__isset.partitionname ? (out << to_string(partitionname)) : (out << "<null>")); - out << ", " << "type=" << to_string(type); - out << ", " << "state=" << to_string(state); + out << ", " << "type="; (__isset.type ? (out << to_string(type)) : (out << "<null>")); + out << ", " << "state="; (__isset.state ? (out << to_string(state)) : (out << "<null>")); out << ")"; } diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/hive_metastore_types.h b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/hive_metastore_types.h index 08694038d04..9fada9c3723 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -11155,10 +11155,14 @@ void swap(CompactionResponse &a, CompactionResponse &b); std::ostream& operator<<(std::ostream& out, const CompactionResponse& obj); typedef struct _ShowCompactRequest__isset { - _ShowCompactRequest__isset() : id(false), poolName(false), partitionname(false) {} + _ShowCompactRequest__isset() : id(false), poolName(false), dbname(false), tablename(false), partitionname(false), type(false), state(false) {} bool id :1; bool poolName :1; + bool dbname :1; + bool tablename :1; bool partitionname :1; + bool type :1; + bool state :1; } _ShowCompactRequest__isset; class ShowCompactRequest : public virtual ::apache::thrift::TBase { @@ -11215,17 +11219,25 @@ class ShowCompactRequest : public virtual ::apache::thrift::TBase { return false; else if (__isset.poolName && !(poolName == rhs.poolName)) return false; - if (!(dbname == rhs.dbname)) + if (__isset.dbname != rhs.__isset.dbname) return false; - if (!(tablename == rhs.tablename)) + else if (__isset.dbname && !(dbname == rhs.dbname)) + return false; + if (__isset.tablename != rhs.__isset.tablename) + return false; + else if (__isset.tablename && !(tablename == rhs.tablename)) return false; if (__isset.partitionname != rhs.__isset.partitionname) return false; else if (__isset.partitionname && !(partitionname == rhs.partitionname)) return false; - if (!(type == rhs.type)) + if (__isset.type != rhs.__isset.type) return false; - if (!(state == rhs.state)) + else if (__isset.type && !(type == rhs.type)) + return false; + if (__isset.state != rhs.__isset.state) + return false; + else if (__isset.state && !(state == rhs.state)) return false; return true; } diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java index 271d01eb6e4..cb99c591db0 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactRequest.java @@ -24,11 +24,11 @@ package org.apache.hadoop.hive.metastore.api; private long id; // optional private @org.apache.thrift.annotation.Nullable java.lang.String poolName; // optional - private @org.apache.thrift.annotation.Nullable java.lang.String dbname; // required - private @org.apache.thrift.annotation.Nullable java.lang.String tablename; // required + private @org.apache.thrift.annotation.Nullable java.lang.String dbname; // optional + private @org.apache.thrift.annotation.Nullable java.lang.String tablename; // optional private @org.apache.thrift.annotation.Nullable java.lang.String partitionname; // optional - private @org.apache.thrift.annotation.Nullable CompactionType type; // required - private @org.apache.thrift.annotation.Nullable java.lang.String state; // required + private @org.apache.thrift.annotation.Nullable CompactionType type; // optional + private @org.apache.thrift.annotation.Nullable java.lang.String state; // 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 { @@ -115,7 +115,7 @@ package org.apache.hadoop.hive.metastore.api; // isset id assignments private static final int __ID_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.ID,_Fields.POOL_NAME,_Fields.PARTITIONNAME}; + private static final _Fields optionals[] = {_Fields.ID,_Fields.POOL_NAME,_Fields.DBNAME,_Fields.TABLENAME,_Fields.PARTITIONNAME,_Fields.TYPE,_Fields.STATE}; public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -123,41 +123,23 @@ package org.apache.hadoop.hive.metastore.api; new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.POOL_NAME, new org.apache.thrift.meta_data.FieldMetaData("poolName", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.OPTIONAL, 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, + tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.OPTIONAL, 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.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, + tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 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, + tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactRequest.class, metaDataMap); } - public ShowCompactRequest(long id) { - this.id = id; - setIdIsSet(true); - } - public ShowCompactRequest() { } - public ShowCompactRequest( - java.lang.String dbname, - java.lang.String tablename, - CompactionType type, - java.lang.String state) - { - this(); - this.dbname = dbname; - this.tablename = tablename; - this.type = type; - this.state = state; - } - /** * Performs a deep copy on <i>other</i>. */ @@ -716,22 +698,26 @@ package org.apache.hadoop.hive.metastore.api; } first = false; } - if (!first) sb.append(", "); - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("tablename:"); - if (this.tablename == null) { - sb.append("null"); - } else { - sb.append(this.tablename); - } - first = false; + if (isSetDbname()) { + if (!first) sb.append(", "); + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + } + if (isSetTablename()) { + if (!first) sb.append(", "); + sb.append("tablename:"); + if (this.tablename == null) { + sb.append("null"); + } else { + sb.append(this.tablename); + } + first = false; + } if (isSetPartitionname()) { if (!first) sb.append(", "); sb.append("partitionname:"); @@ -742,44 +728,32 @@ package org.apache.hadoop.hive.metastore.api; } first = false; } - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (!first) sb.append(", "); - sb.append("state:"); - if (this.state == null) { - sb.append("null"); - } else { - sb.append(this.state); - } - first = false; + if (isSetType()) { + if (!first) sb.append(", "); + sb.append("type:"); + if (this.type == null) { + sb.append("null"); + } else { + sb.append(this.type); + } + first = false; + } + if (isSetState()) { + if (!first) sb.append(", "); + sb.append("state:"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); + } + first = false; + } sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetDbname()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbname' is unset! Struct:" + toString()); - } - - if (!isSetTablename()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablename' is unset! Struct:" + toString()); - } - - if (!isSetType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); - } - - if (!isSetState()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' is unset! Struct:" + toString()); - } - // check for sub-struct validity } @@ -901,14 +875,18 @@ package org.apache.hadoop.hive.metastore.api; } } if (struct.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(struct.dbname); - oprot.writeFieldEnd(); + if (struct.isSetDbname()) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(struct.dbname); + oprot.writeFieldEnd(); + } } if (struct.tablename != null) { - oprot.writeFieldBegin(TABLENAME_FIELD_DESC); - oprot.writeString(struct.tablename); - oprot.writeFieldEnd(); + if (struct.isSetTablename()) { + oprot.writeFieldBegin(TABLENAME_FIELD_DESC); + oprot.writeString(struct.tablename); + oprot.writeFieldEnd(); + } } if (struct.partitionname != null) { if (struct.isSetPartitionname()) { @@ -918,14 +896,18 @@ package org.apache.hadoop.hive.metastore.api; } } if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); + if (struct.isSetType()) { + oprot.writeFieldBegin(TYPE_FIELD_DESC); + oprot.writeI32(struct.type.getValue()); + oprot.writeFieldEnd(); + } } if (struct.state != null) { - oprot.writeFieldBegin(STATE_FIELD_DESC); - oprot.writeString(struct.state); - oprot.writeFieldEnd(); + if (struct.isSetState()) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeString(struct.state); + oprot.writeFieldEnd(); + } } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -944,10 +926,6 @@ package org.apache.hadoop.hive.metastore.api; @Override public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactRequest struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - oprot.writeString(struct.dbname); - oprot.writeString(struct.tablename); - oprot.writeI32(struct.type.getValue()); - oprot.writeString(struct.state); java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetId()) { optionals.set(0); @@ -955,33 +933,49 @@ package org.apache.hadoop.hive.metastore.api; if (struct.isSetPoolName()) { optionals.set(1); } - if (struct.isSetPartitionname()) { + if (struct.isSetDbname()) { optionals.set(2); } - oprot.writeBitSet(optionals, 3); + if (struct.isSetTablename()) { + optionals.set(3); + } + if (struct.isSetPartitionname()) { + optionals.set(4); + } + if (struct.isSetType()) { + optionals.set(5); + } + if (struct.isSetState()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); if (struct.isSetId()) { oprot.writeI64(struct.id); } if (struct.isSetPoolName()) { oprot.writeString(struct.poolName); } + if (struct.isSetDbname()) { + oprot.writeString(struct.dbname); + } + if (struct.isSetTablename()) { + oprot.writeString(struct.tablename); + } if (struct.isSetPartitionname()) { oprot.writeString(struct.partitionname); } + if (struct.isSetType()) { + oprot.writeI32(struct.type.getValue()); + } + if (struct.isSetState()) { + oprot.writeString(struct.state); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactRequest struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; - struct.dbname = iprot.readString(); - struct.setDbnameIsSet(true); - struct.tablename = iprot.readString(); - struct.setTablenameIsSet(true); - struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - struct.state = iprot.readString(); - struct.setStateIsSet(true); - java.util.BitSet incoming = iprot.readBitSet(3); + java.util.BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.id = iprot.readI64(); struct.setIdIsSet(true); @@ -991,9 +985,25 @@ package org.apache.hadoop.hive.metastore.api; struct.setPoolNameIsSet(true); } if (incoming.get(2)) { + struct.dbname = iprot.readString(); + struct.setDbnameIsSet(true); + } + if (incoming.get(3)) { + struct.tablename = iprot.readString(); + struct.setTablenameIsSet(true); + } + if (incoming.get(4)) { struct.partitionname = iprot.readString(); struct.setPartitionnameIsSet(true); } + if (incoming.get(5)) { + struct.type = org.apache.hadoop.hive.metastore.api.CompactionType.findByValue(iprot.readI32()); + struct.setTypeIsSet(true); + } + if (incoming.get(6)) { + struct.state = iprot.readString(); + struct.setStateIsSet(true); + } } } diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ShowCompactRequest.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ShowCompactRequest.php index 200b23e3647..8e4571f6cfd 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ShowCompactRequest.php +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ShowCompactRequest.php @@ -33,12 +33,12 @@ class ShowCompactRequest ), 3 => array( 'var' => 'dbname', - 'isRequired' => true, + 'isRequired' => false, 'type' => TType::STRING, ), 4 => array( 'var' => 'tablename', - 'isRequired' => true, + 'isRequired' => false, 'type' => TType::STRING, ), 5 => array( @@ -48,13 +48,13 @@ class ShowCompactRequest ), 6 => array( 'var' => 'type', - 'isRequired' => true, + 'isRequired' => false, 'type' => TType::I32, 'class' => '\metastore\CompactionType', ), 7 => array( 'var' => 'state', - 'isRequired' => true, + 'isRequired' => false, 'type' => TType::STRING, ), ); diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py index 62fb28a27fe..cec613e5273 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -16205,14 +16205,6 @@ class ShowCompactRequest(object): oprot.writeStructEnd() def validate(self): - if self.dbname is None: - raise TProtocolException(message='Required field dbname is unset!') - if self.tablename is None: - raise TProtocolException(message='Required field tablename is unset!') - if self.type is None: - raise TProtocolException(message='Required field type is unset!') - if self.state is None: - raise TProtocolException(message='Required field state is unset!') return def __repr__(self): diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb index d7c9f19e3c4..11ec76c2d3a 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -4670,20 +4670,16 @@ class ShowCompactRequest FIELDS = { ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true}, POOLNAME => {:type => ::Thrift::Types::STRING, :name => 'poolName', :optional => true}, - DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname', :optional => true}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true}, 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'} + TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :optional => true, :enum_class => ::CompactionType}, + STATE => {:type => ::Thrift::Types::STRING, :name => 'state', :optional => true} } def struct_fields; FIELDS; end 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 type is unset!') unless @type - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state is unset!') unless @state unless @type.nil? || ::CompactionType::VALID_VALUES.include?(@type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') end diff --git a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift index b0133ac7ef0..131f86ac1da 100644 --- a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift +++ b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift @@ -1347,11 +1347,11 @@ struct CompactionResponse { struct ShowCompactRequest { 1: optional i64 id, 2: optional string poolName, - 3: required string dbname, - 4: required string tablename, + 3: optional string dbname, + 4: optional string tablename, 5: optional string partitionname, - 6: required CompactionType type, - 7: required string state + 6: optional CompactionType type, + 7: optional string state } struct ShowCompactResponseElement {