commit 3668dd15998c4686a11d4866b5590375b2b9f9df Author: Alan Gates Date: Fri Jan 8 14:07:35 2016 -0800 HIVE-12814 Schema and Thrift changes for HIVE-11444 diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift index ef49ff3..4ec44af 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -658,6 +658,8 @@ struct ShowCompactResponseElement { 7: optional i64 start, 8: optional string runAs, 9: optional i64 hightestTxnId, // Highest Txn ID handled by this compaction + 10: optional string metaInfo, + 11: optional i64 endTime, } struct ShowCompactResponse { diff --git metastore/scripts/upgrade/derby/024-HIVE-12814.derby.sql metastore/scripts/upgrade/derby/024-HIVE-12814.derby.sql new file mode 100644 index 0000000..a451846 --- /dev/null +++ metastore/scripts/upgrade/derby/024-HIVE-12814.derby.sql @@ -0,0 +1 @@ +ALTER TABLE "COMPACTION_QUEUE" ADD "CQ_META_INFO" varchar(2048) for bit data; diff --git metastore/scripts/upgrade/derby/hive-txn-schema-1.3.0.derby.sql metastore/scripts/upgrade/derby/hive-txn-schema-1.3.0.derby.sql index de16db8..085bddc 100644 --- metastore/scripts/upgrade/derby/hive-txn-schema-1.3.0.derby.sql +++ metastore/scripts/upgrade/derby/hive-txn-schema-1.3.0.derby.sql @@ -77,7 +77,8 @@ CREATE TABLE COMPACTION_QUEUE ( CQ_WORKER_ID varchar(128), CQ_START bigint, CQ_RUN_AS varchar(128), - CQ_HIGHEST_TXN_ID bigint + CQ_HIGHEST_TXN_ID bigint, + CQ_META_INFO varchar(2048) for bit data ); CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( diff --git metastore/scripts/upgrade/derby/hive-txn-schema-2.0.0.derby.sql metastore/scripts/upgrade/derby/hive-txn-schema-2.0.0.derby.sql index de16db8..085bddc 100644 --- metastore/scripts/upgrade/derby/hive-txn-schema-2.0.0.derby.sql +++ metastore/scripts/upgrade/derby/hive-txn-schema-2.0.0.derby.sql @@ -77,7 +77,8 @@ CREATE TABLE COMPACTION_QUEUE ( CQ_WORKER_ID varchar(128), CQ_START bigint, CQ_RUN_AS varchar(128), - CQ_HIGHEST_TXN_ID bigint + CQ_HIGHEST_TXN_ID bigint, + CQ_META_INFO varchar(2048) for bit data ); CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( diff --git metastore/scripts/upgrade/derby/upgrade-1.2.0-to-1.3.0.derby.sql metastore/scripts/upgrade/derby/upgrade-1.2.0-to-1.3.0.derby.sql index 2447ea3..f199d23 100644 --- metastore/scripts/upgrade/derby/upgrade-1.2.0-to-1.3.0.derby.sql +++ metastore/scripts/upgrade/derby/upgrade-1.2.0-to-1.3.0.derby.sql @@ -1,5 +1,6 @@ -- Upgrade MetaStore schema from 1.2.0 to 1.3.0 RUN '021-HIVE-11970.derby.sql'; RUN '023-HIVE-12807.derby.sql'; +RUN '024-HIVE-12814.derby.sql'; UPDATE "APP".VERSION SET SCHEMA_VERSION='1.3.0', VERSION_COMMENT='Hive release version 1.3.0' where VER_ID=1; diff --git metastore/scripts/upgrade/derby/upgrade-1.2.0-to-2.0.0.derby.sql metastore/scripts/upgrade/derby/upgrade-1.2.0-to-2.0.0.derby.sql index 8030dee..17a116e 100644 --- metastore/scripts/upgrade/derby/upgrade-1.2.0-to-2.0.0.derby.sql +++ metastore/scripts/upgrade/derby/upgrade-1.2.0-to-2.0.0.derby.sql @@ -1,5 +1,6 @@ -- Upgrade MetaStore schema from 1.2.0 to 2.0.0 RUN '021-HIVE-11970.derby.sql'; RUN '023-HIVE-12807.derby.sql'; +RUN '024-HIVE-12814.derby.sql'; UPDATE "APP".VERSION SET SCHEMA_VERSION='2.0.0', VERSION_COMMENT='Hive release version 2.0.0' where VER_ID=1; diff --git metastore/scripts/upgrade/mssql/009-HIVE-12814.mssql.sql metastore/scripts/upgrade/mssql/009-HIVE-12814.mssql.sql new file mode 100644 index 0000000..0088290 --- /dev/null +++ metastore/scripts/upgrade/mssql/009-HIVE-12814.mssql.sql @@ -0,0 +1 @@ +ALTER TABLE COMPACTION_QUEUE ADD CQ_META_INFO varbinary(2048) NULL; diff --git metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql index c773aa4..787bfec 100644 --- metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql +++ metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql @@ -867,6 +867,7 @@ CREATE TABLE COMPACTION_QUEUE( CQ_START bigint NULL, CQ_RUN_AS nvarchar(128) NULL, CQ_HIGHEST_TXN_ID bigint NULL, + CQ_META_INFO varbinary(2048) NULL, PRIMARY KEY CLUSTERED ( CQ_ID ASC diff --git metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql index 11c3674..46ba0a4 100644 --- metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql +++ metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql @@ -867,6 +867,7 @@ CREATE TABLE COMPACTION_QUEUE( CQ_START bigint NULL, CQ_RUN_AS nvarchar(128) NULL, CQ_HIGHEST_TXN_ID bigint NULL, + CQ_META_INFO varbinary(2048) NULL, PRIMARY KEY CLUSTERED ( CQ_ID ASC diff --git metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-1.3.0.mssql.sql metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-1.3.0.mssql.sql index f019a2c..c3ebd98 100644 --- metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-1.3.0.mssql.sql +++ metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-1.3.0.mssql.sql @@ -2,6 +2,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS MESSAGE; :r 007-HIVE-11970.mssql.sql; :r 008-HIVE-12807.mssql.sql; +:r 009-HIVE-12814.mssql.sql; UPDATE VERSION SET SCHEMA_VERSION='1.3.0', VERSION_COMMENT='Hive release version 1.3.0' where VER_ID=1; SELECT 'Finished upgrading MetaStore schema from 1.2.0 to 1.3.0' AS MESSAGE; diff --git metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-2.0.0.mssql.sql metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-2.0.0.mssql.sql index 86b20f3..9956839 100644 --- metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-2.0.0.mssql.sql +++ metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-2.0.0.mssql.sql @@ -2,6 +2,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS MESSAGE; :r 007-HIVE-11970.mssql.sql; :r 008-HIVE-12807.mssql.sql; +:r 009-HIVE-12814.mssql.sql; UPDATE VERSION SET SCHEMA_VERSION='2.0.0', VERSION_COMMENT='Hive release version 2.0.0' where VER_ID=1; SELECT 'Finished upgrading MetaStore schema from 1.2.0 to 2.0.0' AS MESSAGE; diff --git metastore/scripts/upgrade/mysql/024-HIVE-12814.mysql.sql metastore/scripts/upgrade/mysql/024-HIVE-12814.mysql.sql new file mode 100644 index 0000000..5d5f3ca --- /dev/null +++ metastore/scripts/upgrade/mysql/024-HIVE-12814.mysql.sql @@ -0,0 +1 @@ +ALTER TABLE `COMPACTION_QUEUE` ADD `CQ_META_INFO` varbinary(2048); diff --git metastore/scripts/upgrade/mysql/hive-txn-schema-1.3.0.mysql.sql metastore/scripts/upgrade/mysql/hive-txn-schema-1.3.0.mysql.sql index 3a530fc..73d2a91 100644 --- metastore/scripts/upgrade/mysql/hive-txn-schema-1.3.0.mysql.sql +++ metastore/scripts/upgrade/mysql/hive-txn-schema-1.3.0.mysql.sql @@ -81,6 +81,7 @@ CREATE TABLE COMPACTION_QUEUE ( CQ_START bigint, CQ_RUN_AS varchar(128), CQ_HIGHEST_TXN_ID bigint, + CQ_META_INFO varbinary(2048), ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( diff --git metastore/scripts/upgrade/mysql/hive-txn-schema-2.0.0.mysql.sql metastore/scripts/upgrade/mysql/hive-txn-schema-2.0.0.mysql.sql index 3a530fc..73d2a91 100644 --- metastore/scripts/upgrade/mysql/hive-txn-schema-2.0.0.mysql.sql +++ metastore/scripts/upgrade/mysql/hive-txn-schema-2.0.0.mysql.sql @@ -81,6 +81,7 @@ CREATE TABLE COMPACTION_QUEUE ( CQ_START bigint, CQ_RUN_AS varchar(128), CQ_HIGHEST_TXN_ID bigint, + CQ_META_INFO varbinary(2048), ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( diff --git metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-1.3.0.mysql.sql metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-1.3.0.mysql.sql index 09941a1..697cf1d 100644 --- metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-1.3.0.mysql.sql +++ metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-1.3.0.mysql.sql @@ -1,6 +1,8 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS ' '; SOURCE 021-HIVE-7018.mysql.sql; SOURCE 022-HIVE-11970.mysql.sql; -SOURCE 023-HIVE-12807.mysql.sql +SOURCE 023-HIVE-12807.mysql.sql; +SOURCE 024-HIVE-12814.mysql.sql; + UPDATE VERSION SET SCHEMA_VERSION='1.3.0', VERSION_COMMENT='Hive release version 1.3.0' where VER_ID=1; SELECT 'Finished upgrading MetaStore schema from 1.2.0 to 1.3.0' AS ' '; diff --git metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-2.0.0.mysql.sql metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-2.0.0.mysql.sql index 53c3ef3..29c923d 100644 --- metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-2.0.0.mysql.sql +++ metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-2.0.0.mysql.sql @@ -1,7 +1,8 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS ' '; SOURCE 021-HIVE-7018.mysql.sql; SOURCE 022-HIVE-11970.mysql.sql; -SOURCE 023-HIVE-12807.mysql.sql +SOURCE 023-HIVE-12807.mysql.sql; +SOURCE 024-HIVE-12814.mysql.sql; UPDATE VERSION SET SCHEMA_VERSION='2.0.0', VERSION_COMMENT='Hive release version 2.0.0' where VER_ID=1; SELECT 'Finished upgrading MetaStore schema from 1.2.0 to 2.0.0' AS ' '; diff --git metastore/scripts/upgrade/oracle/024-HIVE-12814.oracle.sql metastore/scripts/upgrade/oracle/024-HIVE-12814.oracle.sql new file mode 100644 index 0000000..d9a5575 --- /dev/null +++ metastore/scripts/upgrade/oracle/024-HIVE-12814.oracle.sql @@ -0,0 +1 @@ +ALTER TABLE COMPACTION_QUEUE ADD CQ_META_INFO BLOB; diff --git metastore/scripts/upgrade/oracle/hive-txn-schema-1.3.0.oracle.sql metastore/scripts/upgrade/oracle/hive-txn-schema-1.3.0.oracle.sql index 3e7a8e5..d32dce3 100644 --- metastore/scripts/upgrade/oracle/hive-txn-schema-1.3.0.oracle.sql +++ metastore/scripts/upgrade/oracle/hive-txn-schema-1.3.0.oracle.sql @@ -79,6 +79,7 @@ CREATE TABLE COMPACTION_QUEUE ( CQ_START NUMBER(19), CQ_RUN_AS varchar(128), CQ_HIGHEST_TXN_ID NUMBER(19), + CQ_META_INFO BLOB, ) ROWDEPENDENCIES; CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( diff --git metastore/scripts/upgrade/oracle/hive-txn-schema-2.0.0.oracle.sql metastore/scripts/upgrade/oracle/hive-txn-schema-2.0.0.oracle.sql index 3e7a8e5..d32dce3 100644 --- metastore/scripts/upgrade/oracle/hive-txn-schema-2.0.0.oracle.sql +++ metastore/scripts/upgrade/oracle/hive-txn-schema-2.0.0.oracle.sql @@ -79,6 +79,7 @@ CREATE TABLE COMPACTION_QUEUE ( CQ_START NUMBER(19), CQ_RUN_AS varchar(128), CQ_HIGHEST_TXN_ID NUMBER(19), + CQ_META_INFO BLOB, ) ROWDEPENDENCIES; CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( diff --git metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-1.3.0.oracle.sql metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-1.3.0.oracle.sql index 4554219..4161b3b 100644 --- metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-1.3.0.oracle.sql +++ metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-1.3.0.oracle.sql @@ -2,6 +2,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS Status from dual; @022-HIVE-11970.oracle.sql; @023-HIVE-12807.oracle.sql; +@024-HIVE-12814.oracle.sql; UPDATE VERSION SET SCHEMA_VERSION='1.3.0', VERSION_COMMENT='Hive release version 1.3.0' where VER_ID=1; SELECT 'Finished upgrading MetaStore schema from 1.2.0 to 1.3.0' AS Status from dual; diff --git metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-2.0.0.oracle.sql metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-2.0.0.oracle.sql index 495500f..0b835d0 100644 --- metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-2.0.0.oracle.sql +++ metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-2.0.0.oracle.sql @@ -2,6 +2,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS Status from dual; @022-HIVE-11970.oracle.sql; @023-HIVE-12807.oracle.sql; +@024-HIVE-12814.oracle.sql; UPDATE VERSION SET SCHEMA_VERSION='2.0.0', VERSION_COMMENT='Hive release version 2.0.0' where VER_ID=1; SELECT 'Finished upgrading MetaStore schema from 1.2.0 to 2.0.0' AS Status from dual; diff --git metastore/scripts/upgrade/postgres/023-HIVE-12814.postgres.sql metastore/scripts/upgrade/postgres/023-HIVE-12814.postgres.sql new file mode 100644 index 0000000..2753bbf --- /dev/null +++ metastore/scripts/upgrade/postgres/023-HIVE-12814.postgres.sql @@ -0,0 +1 @@ +ALTER TABLE "COMPACTION_QUEUE" ADD COLUMN "CQ_META_INFO" bytea; diff --git metastore/scripts/upgrade/postgres/hive-txn-schema-1.3.0.postgres.sql metastore/scripts/upgrade/postgres/hive-txn-schema-1.3.0.postgres.sql index 8bf151c..33ffaf1 100644 --- metastore/scripts/upgrade/postgres/hive-txn-schema-1.3.0.postgres.sql +++ metastore/scripts/upgrade/postgres/hive-txn-schema-1.3.0.postgres.sql @@ -78,7 +78,8 @@ CREATE TABLE COMPACTION_QUEUE ( CQ_WORKER_ID varchar(128), CQ_START bigint, CQ_RUN_AS varchar(128), - CQ_HIGHEST_TXN_ID bigint + CQ_HIGHEST_TXN_ID bigint, + CQ_META_INFO bytea ); CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( diff --git metastore/scripts/upgrade/postgres/hive-txn-schema-2.0.0.postgres.sql metastore/scripts/upgrade/postgres/hive-txn-schema-2.0.0.postgres.sql index 8bf151c..33ffaf1 100644 --- metastore/scripts/upgrade/postgres/hive-txn-schema-2.0.0.postgres.sql +++ metastore/scripts/upgrade/postgres/hive-txn-schema-2.0.0.postgres.sql @@ -78,7 +78,8 @@ CREATE TABLE COMPACTION_QUEUE ( CQ_WORKER_ID varchar(128), CQ_START bigint, CQ_RUN_AS varchar(128), - CQ_HIGHEST_TXN_ID bigint + CQ_HIGHEST_TXN_ID bigint, + CQ_META_INFO bytea ); CREATE TABLE NEXT_COMPACTION_QUEUE_ID ( diff --git metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-1.3.0.postgres.sql metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-1.3.0.postgres.sql index 32c5505..85b4e78 100644 --- metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-1.3.0.postgres.sql +++ metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-1.3.0.postgres.sql @@ -2,6 +2,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0'; \i 021-HIVE-11970.postgres.sql; \i 022-HIVE-12807.postgres.sql; +\i 023-HIVE-12814.postgres.sql; UPDATE "VERSION" SET "SCHEMA_VERSION"='1.3.0', "VERSION_COMMENT"='Hive release version 1.3.0' where "VER_ID"=1; SELECT 'Finished upgrading MetaStore schema from 1.2.0 to 1.3.0'; diff --git metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-2.0.0.postgres.sql metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-2.0.0.postgres.sql index d66549b..895505d 100644 --- metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-2.0.0.postgres.sql +++ metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-2.0.0.postgres.sql @@ -2,6 +2,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0'; \i 021-HIVE-11970.postgres.sql; \i 022-HIVE-12807.postgres.sql; +\i 023-HIVE-12814.postgres.sql; UPDATE "VERSION" SET "SCHEMA_VERSION"='2.0.0', "VERSION_COMMENT"='Hive release version 2.0.0' where "VER_ID"=1; SELECT 'Finished upgrading MetaStore schema from 1.2.0 to 2.0.0'; diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp index e31516e..188c3ab 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -12569,6 +12569,16 @@ void ShowCompactResponseElement::__set_hightestTxnId(const int64_t val) { __isset.hightestTxnId = true; } +void ShowCompactResponseElement::__set_metaInfo(const std::string& val) { + this->metaInfo = val; +__isset.metaInfo = true; +} + +void ShowCompactResponseElement::__set_endTime(const int64_t val) { + this->endTime = val; +__isset.endTime = true; +} + uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); @@ -12668,6 +12678,22 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* xfer += iprot->skip(ftype); } break; + case 10: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->metaInfo); + this->__isset.metaInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->endTime); + this->__isset.endTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -12734,6 +12760,16 @@ uint32_t ShowCompactResponseElement::write(::apache::thrift::protocol::TProtocol xfer += oprot->writeI64(this->hightestTxnId); xfer += oprot->writeFieldEnd(); } + if (this->__isset.metaInfo) { + xfer += oprot->writeFieldBegin("metaInfo", ::apache::thrift::protocol::T_STRING, 10); + xfer += oprot->writeString(this->metaInfo); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.endTime) { + xfer += oprot->writeFieldBegin("endTime", ::apache::thrift::protocol::T_I64, 11); + xfer += oprot->writeI64(this->endTime); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12750,6 +12786,8 @@ void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b) { swap(a.start, b.start); swap(a.runAs, b.runAs); swap(a.hightestTxnId, b.hightestTxnId); + swap(a.metaInfo, b.metaInfo); + swap(a.endTime, b.endTime); swap(a.__isset, b.__isset); } @@ -12763,6 +12801,8 @@ ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponse start = other557.start; runAs = other557.runAs; hightestTxnId = other557.hightestTxnId; + metaInfo = other557.metaInfo; + endTime = other557.endTime; __isset = other557.__isset; } ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other558) { @@ -12775,6 +12815,8 @@ ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowComp start = other558.start; runAs = other558.runAs; hightestTxnId = other558.hightestTxnId; + metaInfo = other558.metaInfo; + endTime = other558.endTime; __isset = other558.__isset; return *this; } @@ -12790,6 +12832,8 @@ void ShowCompactResponseElement::printTo(std::ostream& out) const { out << ", " << "start="; (__isset.start ? (out << to_string(start)) : (out << "")); out << ", " << "runAs="; (__isset.runAs ? (out << to_string(runAs)) : (out << "")); out << ", " << "hightestTxnId="; (__isset.hightestTxnId ? (out << to_string(hightestTxnId)) : (out << "")); + out << ", " << "metaInfo="; (__isset.metaInfo ? (out << to_string(metaInfo)) : (out << "")); + out << ", " << "endTime="; (__isset.endTime ? (out << to_string(endTime)) : (out << "")); out << ")"; } diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h index c3b8d5c..d11cca9 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -5119,12 +5119,14 @@ inline std::ostream& operator<<(std::ostream& out, const ShowCompactRequest& obj } typedef struct _ShowCompactResponseElement__isset { - _ShowCompactResponseElement__isset() : partitionname(false), workerid(false), start(false), runAs(false), hightestTxnId(false) {} + _ShowCompactResponseElement__isset() : partitionname(false), workerid(false), start(false), runAs(false), hightestTxnId(false), metaInfo(false), endTime(false) {} bool partitionname :1; bool workerid :1; bool start :1; bool runAs :1; bool hightestTxnId :1; + bool metaInfo :1; + bool endTime :1; } _ShowCompactResponseElement__isset; class ShowCompactResponseElement { @@ -5132,7 +5134,7 @@ class ShowCompactResponseElement { ShowCompactResponseElement(const ShowCompactResponseElement&); ShowCompactResponseElement& operator=(const ShowCompactResponseElement&); - ShowCompactResponseElement() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), state(), workerid(), start(0), runAs(), hightestTxnId(0) { + ShowCompactResponseElement() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), state(), workerid(), start(0), runAs(), hightestTxnId(0), metaInfo(), endTime(0) { } virtual ~ShowCompactResponseElement() throw(); @@ -5145,6 +5147,8 @@ class ShowCompactResponseElement { int64_t start; std::string runAs; int64_t hightestTxnId; + std::string metaInfo; + int64_t endTime; _ShowCompactResponseElement__isset __isset; @@ -5166,6 +5170,10 @@ class ShowCompactResponseElement { void __set_hightestTxnId(const int64_t val); + void __set_metaInfo(const std::string& val); + + void __set_endTime(const int64_t val); + bool operator == (const ShowCompactResponseElement & rhs) const { if (!(dbname == rhs.dbname)) @@ -5196,6 +5204,14 @@ class ShowCompactResponseElement { return false; else if (__isset.hightestTxnId && !(hightestTxnId == rhs.hightestTxnId)) return false; + if (__isset.metaInfo != rhs.__isset.metaInfo) + return false; + else if (__isset.metaInfo && !(metaInfo == rhs.metaInfo)) + return false; + if (__isset.endTime != rhs.__isset.endTime) + return false; + else if (__isset.endTime && !(endTime == rhs.endTime)) + return false; return true; } bool operator != (const ShowCompactResponseElement &rhs) const { 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 50ef764..91918fd 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 @@ -47,6 +47,8 @@ private static final org.apache.thrift.protocol.TField START_FIELD_DESC = new org.apache.thrift.protocol.TField("start", org.apache.thrift.protocol.TType.I64, (short)7); private static final org.apache.thrift.protocol.TField RUN_AS_FIELD_DESC = new org.apache.thrift.protocol.TField("runAs", org.apache.thrift.protocol.TType.STRING, (short)8); private static final org.apache.thrift.protocol.TField HIGHTEST_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hightestTxnId", org.apache.thrift.protocol.TType.I64, (short)9); + private static final org.apache.thrift.protocol.TField META_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("metaInfo", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)11); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -63,6 +65,8 @@ private long start; // optional private String runAs; // optional private long hightestTxnId; // optional + private String metaInfo; // optional + private long endTime; // 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 { @@ -78,7 +82,9 @@ WORKERID((short)6, "workerid"), START((short)7, "start"), RUN_AS((short)8, "runAs"), - HIGHTEST_TXN_ID((short)9, "hightestTxnId"); + HIGHTEST_TXN_ID((short)9, "hightestTxnId"), + META_INFO((short)10, "metaInfo"), + END_TIME((short)11, "endTime"); private static final Map byName = new HashMap(); @@ -111,6 +117,10 @@ public static _Fields findByThriftId(int fieldId) { return RUN_AS; case 9: // HIGHTEST_TXN_ID return HIGHTEST_TXN_ID; + case 10: // META_INFO + return META_INFO; + case 11: // END_TIME + return END_TIME; default: return null; } @@ -153,8 +163,9 @@ public String getFieldName() { // isset id assignments private static final int __START_ISSET_ID = 0; private static final int __HIGHTESTTXNID_ISSET_ID = 1; + private static final int __ENDTIME_ISSET_ID = 2; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.WORKERID,_Fields.START,_Fields.RUN_AS,_Fields.HIGHTEST_TXN_ID}; + private static final _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.WORKERID,_Fields.START,_Fields.RUN_AS,_Fields.HIGHTEST_TXN_ID,_Fields.META_INFO,_Fields.END_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); @@ -176,6 +187,10 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.HIGHTEST_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("hightestTxnId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.META_INFO, new org.apache.thrift.meta_data.FieldMetaData("metaInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", 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(ShowCompactResponseElement.class, metaDataMap); } @@ -224,6 +239,10 @@ public ShowCompactResponseElement(ShowCompactResponseElement other) { this.runAs = other.runAs; } this.hightestTxnId = other.hightestTxnId; + if (other.isSetMetaInfo()) { + this.metaInfo = other.metaInfo; + } + this.endTime = other.endTime; } public ShowCompactResponseElement deepCopy() { @@ -243,6 +262,9 @@ public void clear() { this.runAs = null; setHightestTxnIdIsSet(false); this.hightestTxnId = 0; + this.metaInfo = null; + setEndTimeIsSet(false); + this.endTime = 0; } public String getDbname() { @@ -458,6 +480,51 @@ public void setHightestTxnIdIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID, value); } + public String getMetaInfo() { + return this.metaInfo; + } + + public void setMetaInfo(String metaInfo) { + this.metaInfo = metaInfo; + } + + public void unsetMetaInfo() { + this.metaInfo = null; + } + + /** Returns true if field metaInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetMetaInfo() { + return this.metaInfo != null; + } + + public void setMetaInfoIsSet(boolean value) { + if (!value) { + this.metaInfo = null; + } + } + + public long getEndTime() { + return this.endTime; + } + + public void setEndTime(long endTime) { + this.endTime = endTime; + setEndTimeIsSet(true); + } + + public void unsetEndTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + /** Returns true if field endTime is set (has been assigned a value) and false otherwise */ + public boolean isSetEndTime() { + return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID); + } + + public void setEndTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case DBNAME: @@ -532,6 +599,22 @@ public void setFieldValue(_Fields field, Object value) { } break; + case META_INFO: + if (value == null) { + unsetMetaInfo(); + } else { + setMetaInfo((String)value); + } + break; + + case END_TIME: + if (value == null) { + unsetEndTime(); + } else { + setEndTime((Long)value); + } + break; + } } @@ -564,6 +647,12 @@ public Object getFieldValue(_Fields field) { case HIGHTEST_TXN_ID: return getHightestTxnId(); + case META_INFO: + return getMetaInfo(); + + case END_TIME: + return getEndTime(); + } throw new IllegalStateException(); } @@ -593,6 +682,10 @@ public boolean isSet(_Fields field) { return isSetRunAs(); case HIGHTEST_TXN_ID: return isSetHightestTxnId(); + case META_INFO: + return isSetMetaInfo(); + case END_TIME: + return isSetEndTime(); } throw new IllegalStateException(); } @@ -691,6 +784,24 @@ public boolean equals(ShowCompactResponseElement that) { return false; } + boolean this_present_metaInfo = true && this.isSetMetaInfo(); + boolean that_present_metaInfo = true && that.isSetMetaInfo(); + if (this_present_metaInfo || that_present_metaInfo) { + if (!(this_present_metaInfo && that_present_metaInfo)) + return false; + if (!this.metaInfo.equals(that.metaInfo)) + return false; + } + + boolean this_present_endTime = true && this.isSetEndTime(); + boolean that_present_endTime = true && that.isSetEndTime(); + if (this_present_endTime || that_present_endTime) { + if (!(this_present_endTime && that_present_endTime)) + return false; + if (this.endTime != that.endTime) + return false; + } + return true; } @@ -743,6 +854,16 @@ public int hashCode() { if (present_hightestTxnId) list.add(hightestTxnId); + boolean present_metaInfo = true && (isSetMetaInfo()); + list.add(present_metaInfo); + if (present_metaInfo) + list.add(metaInfo); + + boolean present_endTime = true && (isSetEndTime()); + list.add(present_endTime); + if (present_endTime) + list.add(endTime); + return list.hashCode(); } @@ -844,6 +965,26 @@ public int compareTo(ShowCompactResponseElement other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetMetaInfo()).compareTo(other.isSetMetaInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMetaInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaInfo, other.metaInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -937,6 +1078,22 @@ public String toString() { sb.append(this.hightestTxnId); first = false; } + if (isSetMetaInfo()) { + if (!first) sb.append(", "); + sb.append("metaInfo:"); + if (this.metaInfo == null) { + sb.append("null"); + } else { + sb.append(this.metaInfo); + } + first = false; + } + if (isSetEndTime()) { + if (!first) sb.append(", "); + sb.append("endTime:"); + sb.append(this.endTime); + first = false; + } sb.append(")"); return sb.toString(); } @@ -1070,6 +1227,22 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ShowCompactResponse org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 10: // META_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.metaInfo = iprot.readString(); + struct.setMetaInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // END_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1134,6 +1307,18 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ShowCompactRespons oprot.writeI64(struct.hightestTxnId); oprot.writeFieldEnd(); } + if (struct.metaInfo != null) { + if (struct.isSetMetaInfo()) { + oprot.writeFieldBegin(META_INFO_FIELD_DESC); + oprot.writeString(struct.metaInfo); + oprot.writeFieldEnd(); + } + } + if (struct.isSetEndTime()) { + oprot.writeFieldBegin(END_TIME_FIELD_DESC); + oprot.writeI64(struct.endTime); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1171,7 +1356,13 @@ public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse if (struct.isSetHightestTxnId()) { optionals.set(4); } - oprot.writeBitSet(optionals, 5); + if (struct.isSetMetaInfo()) { + optionals.set(5); + } + if (struct.isSetEndTime()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); if (struct.isSetPartitionname()) { oprot.writeString(struct.partitionname); } @@ -1187,6 +1378,12 @@ public void write(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponse if (struct.isSetHightestTxnId()) { oprot.writeI64(struct.hightestTxnId); } + if (struct.isSetMetaInfo()) { + oprot.writeString(struct.metaInfo); + } + if (struct.isSetEndTime()) { + oprot.writeI64(struct.endTime); + } } @Override @@ -1200,7 +1397,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponseE struct.setTypeIsSet(true); struct.state = iprot.readString(); struct.setStateIsSet(true); - BitSet incoming = iprot.readBitSet(5); + BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.partitionname = iprot.readString(); struct.setPartitionnameIsSet(true); @@ -1221,6 +1418,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ShowCompactResponseE struct.hightestTxnId = iprot.readI64(); struct.setHightestTxnIdIsSet(true); } + if (incoming.get(5)) { + struct.metaInfo = iprot.readString(); + struct.setMetaInfoIsSet(true); + } + if (incoming.get(6)) { + struct.endTime = iprot.readI64(); + struct.setEndTimeIsSet(true); + } } } diff --git metastore/src/gen/thrift/gen-php/metastore/Types.php metastore/src/gen/thrift/gen-php/metastore/Types.php index dbe0a2b..5873ba8 100644 --- metastore/src/gen/thrift/gen-php/metastore/Types.php +++ metastore/src/gen/thrift/gen-php/metastore/Types.php @@ -12503,6 +12503,14 @@ class ShowCompactResponseElement { * @var int */ public $hightestTxnId = null; + /** + * @var string + */ + public $metaInfo = null; + /** + * @var int + */ + public $endTime = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -12543,6 +12551,14 @@ class ShowCompactResponseElement { 'var' => 'hightestTxnId', 'type' => TType::I64, ), + 10 => array( + 'var' => 'metaInfo', + 'type' => TType::STRING, + ), + 11 => array( + 'var' => 'endTime', + 'type' => TType::I64, + ), ); } if (is_array($vals)) { @@ -12573,6 +12589,12 @@ class ShowCompactResponseElement { if (isset($vals['hightestTxnId'])) { $this->hightestTxnId = $vals['hightestTxnId']; } + if (isset($vals['metaInfo'])) { + $this->metaInfo = $vals['metaInfo']; + } + if (isset($vals['endTime'])) { + $this->endTime = $vals['endTime']; + } } } @@ -12658,6 +12680,20 @@ class ShowCompactResponseElement { $xfer += $input->skip($ftype); } break; + case 10: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->metaInfo); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->endTime); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -12716,6 +12752,16 @@ class ShowCompactResponseElement { $xfer += $output->writeI64($this->hightestTxnId); $xfer += $output->writeFieldEnd(); } + if ($this->metaInfo !== null) { + $xfer += $output->writeFieldBegin('metaInfo', TType::STRING, 10); + $xfer += $output->writeString($this->metaInfo); + $xfer += $output->writeFieldEnd(); + } + if ($this->endTime !== null) { + $xfer += $output->writeFieldBegin('endTime', TType::I64, 11); + $xfer += $output->writeI64($this->endTime); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py index 6f20716..479bf92 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -8735,6 +8735,8 @@ class ShowCompactResponseElement: - start - runAs - hightestTxnId + - metaInfo + - endTime """ thrift_spec = ( @@ -8748,9 +8750,11 @@ class ShowCompactResponseElement: (7, TType.I64, 'start', None, None, ), # 7 (8, TType.STRING, 'runAs', None, None, ), # 8 (9, TType.I64, 'hightestTxnId', None, None, ), # 9 + (10, TType.STRING, 'metaInfo', None, None, ), # 10 + (11, TType.I64, 'endTime', None, None, ), # 11 ) - def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, state=None, workerid=None, start=None, runAs=None, hightestTxnId=None,): + def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, state=None, workerid=None, start=None, runAs=None, hightestTxnId=None, metaInfo=None, endTime=None,): self.dbname = dbname self.tablename = tablename self.partitionname = partitionname @@ -8760,6 +8764,8 @@ def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, s self.start = start self.runAs = runAs self.hightestTxnId = hightestTxnId + self.metaInfo = metaInfo + self.endTime = endTime def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -8815,6 +8821,16 @@ def read(self, iprot): self.hightestTxnId = iprot.readI64() else: iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.metaInfo = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I64: + self.endTime = iprot.readI64() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -8861,6 +8877,14 @@ def write(self, oprot): oprot.writeFieldBegin('hightestTxnId', TType.I64, 9) oprot.writeI64(self.hightestTxnId) oprot.writeFieldEnd() + if self.metaInfo is not None: + oprot.writeFieldBegin('metaInfo', TType.STRING, 10) + oprot.writeString(self.metaInfo) + oprot.writeFieldEnd() + if self.endTime is not None: + oprot.writeFieldBegin('endTime', TType.I64, 11) + oprot.writeI64(self.endTime) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8887,6 +8911,8 @@ def __hash__(self): value = (value * 31) ^ hash(self.start) value = (value * 31) ^ hash(self.runAs) value = (value * 31) ^ hash(self.hightestTxnId) + value = (value * 31) ^ hash(self.metaInfo) + value = (value * 31) ^ hash(self.endTime) return value def __repr__(self): diff --git metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb index 23c31e6..0e041c5 100644 --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -2004,6 +2004,8 @@ class ShowCompactResponseElement START = 7 RUNAS = 8 HIGHTESTTXNID = 9 + METAINFO = 10 + ENDTIME = 11 FIELDS = { DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, @@ -2014,7 +2016,9 @@ class ShowCompactResponseElement 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}, - HIGHTESTTXNID => {:type => ::Thrift::Types::I64, :name => 'hightestTxnId', :optional => true} + HIGHTESTTXNID => {:type => ::Thrift::Types::I64, :name => 'hightestTxnId', :optional => true}, + METAINFO => {:type => ::Thrift::Types::STRING, :name => 'metaInfo', :optional => true}, + ENDTIME => {:type => ::Thrift::Types::I64, :name => 'endTime', :optional => true} } def struct_fields; FIELDS; end