commit 423e2e6b64de9d527f8b1c2069766f333c166908 Author: Alan Gates Date: Fri Jan 8 16:03:29 2016 -0800 HIVE-12819 Thrift and RDBMS schema changes for HIVE-11957 diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift index c5d4c0a..9aadc7e 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -543,6 +543,7 @@ struct TxnInfo { 2: required TxnState state, 3: required string user, // used in 'show transactions' to help admins find who has open transactions 4: required string hostname, // used in 'show transactions' to help admins find who has open transactions + 5: optional string agentInfo = "Unknown", } struct GetOpenTxnsInfoResponse { @@ -559,6 +560,7 @@ struct OpenTxnRequest { 1: required i32 num_txns, 2: required string user, 3: required string hostname, + 4: optional string agentInfo = "Unknown", } struct OpenTxnsResponse { diff --git metastore/scripts/upgrade/derby/027-HIVE-12819.derby.sql metastore/scripts/upgrade/derby/027-HIVE-12819.derby.sql new file mode 100644 index 0000000..69b8a3a --- /dev/null +++ metastore/scripts/upgrade/derby/027-HIVE-12819.derby.sql @@ -0,0 +1 @@ +ALTER TABLE "TXNS" ADD "TXN_AGENT_INFO" varchar(128); 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 4ab351a..5ad606e 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 @@ -22,7 +22,8 @@ CREATE TABLE TXNS ( TXN_STARTED bigint NOT NULL, TXN_LAST_HEARTBEAT bigint NOT NULL, TXN_USER varchar(128) NOT NULL, - TXN_HOST varchar(128) NOT NULL + TXN_HOST varchar(128) NOT NULL, + TXN_AGENT_INFO varchar(128) ); CREATE TABLE TXN_COMPONENTS ( 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 f8172ed..b2308a6 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 @@ -22,7 +22,8 @@ CREATE TABLE TXNS ( TXN_STARTED bigint NOT NULL, TXN_LAST_HEARTBEAT bigint NOT NULL, TXN_USER varchar(128) NOT NULL, - TXN_HOST varchar(128) NOT NULL + TXN_HOST varchar(128) NOT NULL, + TXN_AGENT_INFO varchar(128) ); CREATE TABLE TXN_COMPONENTS ( 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 22c98ad..cd4901b 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 @@ -4,5 +4,6 @@ RUN '023-HIVE-12807.derby.sql'; RUN '024-HIVE-12814.derby.sql'; RUN '025-HIVE-12816.derby.sql'; RUN '026-HIVE-12818.derby.sql'; +RUN '027-HIVE-12819.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 0867260..03be845 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 @@ -4,5 +4,6 @@ RUN '023-HIVE-12807.derby.sql'; RUN '024-HIVE-12814.derby.sql'; RUN '025-HIVE-12816.derby.sql'; RUN '026-HIVE-12818.derby.sql'; +RUN '027-HIVE-12819.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/012-HIVE-12819.mssql.sql metastore/scripts/upgrade/mssql/012-HIVE-12819.mssql.sql new file mode 100644 index 0000000..778cbd5 --- /dev/null +++ metastore/scripts/upgrade/mssql/012-HIVE-12819.mssql.sql @@ -0,0 +1 @@ +ALTER TABLE TXNS ADD TXN_AGENT_INFO nvarchar(128) 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 04f81fd..035cdcf 100644 --- metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql +++ metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql @@ -947,6 +947,7 @@ CREATE TABLE TXNS( TXN_LAST_HEARTBEAT bigint NOT NULL, TXN_USER nvarchar(128) NOT NULL, TXN_HOST nvarchar(128) NOT NULL, + TXN_AGENT_INFO nvarchar(128) NULL, PRIMARY KEY CLUSTERED ( TXN_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 45ed3b9..431878a 100644 --- metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql +++ metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql @@ -947,6 +947,7 @@ CREATE TABLE TXNS( TXN_LAST_HEARTBEAT bigint NOT NULL, TXN_USER nvarchar(128) NOT NULL, TXN_HOST nvarchar(128) NOT NULL, + TXN_AGENT_INFO nvarchar(128) NULL, PRIMARY KEY CLUSTERED ( TXN_ID ASC diff --git metastore/scripts/upgrade/mssql/hive-schema-2.1.0.mssql.sql metastore/scripts/upgrade/mssql/hive-schema-2.1.0.mssql.sql index 326417f..8992dac 100644 --- metastore/scripts/upgrade/mssql/hive-schema-2.1.0.mssql.sql +++ metastore/scripts/upgrade/mssql/hive-schema-2.1.0.mssql.sql @@ -947,6 +947,7 @@ CREATE TABLE TXNS( TXN_LAST_HEARTBEAT bigint NOT NULL, TXN_USER nvarchar(128) NOT NULL, TXN_HOST nvarchar(128) NOT NULL, + TXN_AGENT_INFO nvarchar(128) NULL, PRIMARY KEY CLUSTERED ( TXN_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 0e2cdb5..40435e5 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 @@ -5,6 +5,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS MESSAGE; :r 009-HIVE-12814.mssql.sql; :r 010-HIVE-12816.mssql.sql; :r 011-HIVE-12818.mssql.sql; +:r 012-HIVE-12819.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 553d170..e148a7c 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 @@ -5,6 +5,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS MESSAGE; :r 009-HIVE-12814.mssql.sql; :r 010-HIVE-12816.mssql.sql; :r 011-HIVE-12818.mssql.sql; +:r 012-HIVE-12819.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/027-HIVE-12819.mysql.sql metastore/scripts/upgrade/mysql/027-HIVE-12819.mysql.sql new file mode 100644 index 0000000..f1e25d5 --- /dev/null +++ metastore/scripts/upgrade/mysql/027-HIVE-12819.mysql.sql @@ -0,0 +1 @@ +ALTER TABLE `TXNS` ADD `TXN_AGENT_INFO` varchar(128); 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 cfb2d19..289cd37 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 @@ -23,7 +23,8 @@ CREATE TABLE TXNS ( TXN_STARTED bigint NOT NULL, TXN_LAST_HEARTBEAT bigint NOT NULL, TXN_USER varchar(128) NOT NULL, - TXN_HOST varchar(128) NOT NULL + TXN_HOST varchar(128) NOT NULL, + TXN_AGENT_INFO varchar(128) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE TXN_COMPONENTS ( 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 cfb2d19..289cd37 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 @@ -23,7 +23,8 @@ CREATE TABLE TXNS ( TXN_STARTED bigint NOT NULL, TXN_LAST_HEARTBEAT bigint NOT NULL, TXN_USER varchar(128) NOT NULL, - TXN_HOST varchar(128) NOT NULL + TXN_HOST varchar(128) NOT NULL, + TXN_AGENT_INFO varchar(128) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE TXN_COMPONENTS ( 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 1ba5109..22a8489 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 @@ -5,6 +5,7 @@ SOURCE 023-HIVE-12807.mysql.sql; SOURCE 024-HIVE-12814.mysql.sql; SOURCE 025-HIVE-12816.mysql.sql; SOURCE 026-HIVE-12818.mysql.sql; +SOURCE 027-HIVE-12819.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 e0319df..b85041c 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 @@ -5,6 +5,7 @@ SOURCE 023-HIVE-12807.mysql.sql; SOURCE 024-HIVE-12814.mysql.sql; SOURCE 025-HIVE-12816.mysql.sql; SOURCE 026-HIVE-12818.mysql.sql; +SOURCE 027-HIVE-12819.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/027-HIVE-12819.oracle.sql metastore/scripts/upgrade/oracle/027-HIVE-12819.oracle.sql new file mode 100644 index 0000000..0d74a98 --- /dev/null +++ metastore/scripts/upgrade/oracle/027-HIVE-12819.oracle.sql @@ -0,0 +1 @@ +ALTER TABLE TXNS ADD TXN_AGENT_INFO varchar2(128); 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 2d4c91a..b7ebc6e 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 @@ -23,7 +23,8 @@ CREATE TABLE TXNS ( TXN_STARTED NUMBER(19) NOT NULL, TXN_LAST_HEARTBEAT NUMBER(19) NOT NULL, TXN_USER varchar(128) NOT NULL, - TXN_HOST varchar(128) NOT NULL + TXN_HOST varchar(128) NOT NULL, + TXN_AGENT_INFO varchar2(128) ) ROWDEPENDENCIES; CREATE TABLE TXN_COMPONENTS ( 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 2d4c91a..b7ebc6e 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 @@ -23,7 +23,8 @@ CREATE TABLE TXNS ( TXN_STARTED NUMBER(19) NOT NULL, TXN_LAST_HEARTBEAT NUMBER(19) NOT NULL, TXN_USER varchar(128) NOT NULL, - TXN_HOST varchar(128) NOT NULL + TXN_HOST varchar(128) NOT NULL, + TXN_AGENT_INFO varchar2(128) ) ROWDEPENDENCIES; CREATE TABLE TXN_COMPONENTS ( 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 93f8e11..f7e84ec 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 @@ -5,6 +5,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS Status from dual; @024-HIVE-12814.oracle.sql; @025-HIVE-12816.oracle.sql; @026-HIVE-12818.oracle.sql; +@027-HIVE-12819.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 11d0028..7ecf8ac 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 @@ -5,6 +5,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS Status from dual; @024-HIVE-12814.oracle.sql; @025-HIVE-12816.oracle.sql; @026-HIVE-12818.oracle.sql; +@027-HIVE-12819.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/026-HIVE-12819.postgres.sql metastore/scripts/upgrade/postgres/026-HIVE-12819.postgres.sql new file mode 100644 index 0000000..594ff39 --- /dev/null +++ metastore/scripts/upgrade/postgres/026-HIVE-12819.postgres.sql @@ -0,0 +1 @@ +ALTER TABLE "TXNS" ADD COLUMN "TXN_AGENT_INFO" varchar(128); 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 e03b27a..221e6c8 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 @@ -23,7 +23,8 @@ CREATE TABLE TXNS ( TXN_STARTED bigint NOT NULL, TXN_LAST_HEARTBEAT bigint NOT NULL, TXN_USER varchar(128) NOT NULL, - TXN_HOST varchar(128) NOT NULL + TXN_HOST varchar(128) NOT NULL, + TXN_AGENT_INFO varchar(128) ); CREATE TABLE TXN_COMPONENTS ( 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 e03b27a..221e6c8 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 @@ -23,7 +23,8 @@ CREATE TABLE TXNS ( TXN_STARTED bigint NOT NULL, TXN_LAST_HEARTBEAT bigint NOT NULL, TXN_USER varchar(128) NOT NULL, - TXN_HOST varchar(128) NOT NULL + TXN_HOST varchar(128) NOT NULL, + TXN_AGENT_INFO varchar(128) ); CREATE TABLE TXN_COMPONENTS ( 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 72d408a..ad7871c 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 @@ -5,6 +5,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0'; \i 023-HIVE-12814.postgres.sql; \i 024-HIVE-12816.postgres.sql; \i 025-HIVE-12818.postgres.sql; +\i 026-HIVE-12819.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 588259c..7ee5745 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 @@ -5,6 +5,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0'; \i 023-HIVE-12814.postgres.sql; \i 024-HIVE-12816.postgres.sql; \i 025-HIVE-12818.postgres.sql; +\i 026-HIVE-12819.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 0edc951..0f0d1dc 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -9975,6 +9975,11 @@ void TxnInfo::__set_hostname(const std::string& val) { this->hostname = val; } +void TxnInfo::__set_agentInfo(const std::string& val) { + this->agentInfo = val; +__isset.agentInfo = true; +} + uint32_t TxnInfo::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); @@ -10034,6 +10039,14 @@ uint32_t TxnInfo::read(::apache::thrift::protocol::TProtocol* iprot) { xfer += iprot->skip(ftype); } break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->agentInfo); + this->__isset.agentInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -10075,6 +10088,11 @@ uint32_t TxnInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeString(this->hostname); xfer += oprot->writeFieldEnd(); + if (this->__isset.agentInfo) { + xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->agentInfo); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10086,6 +10104,8 @@ void swap(TxnInfo &a, TxnInfo &b) { swap(a.state, b.state); swap(a.user, b.user); swap(a.hostname, b.hostname); + swap(a.agentInfo, b.agentInfo); + swap(a.__isset, b.__isset); } TxnInfo::TxnInfo(const TxnInfo& other465) { @@ -10093,12 +10113,16 @@ TxnInfo::TxnInfo(const TxnInfo& other465) { state = other465.state; user = other465.user; hostname = other465.hostname; + agentInfo = other465.agentInfo; + __isset = other465.__isset; } TxnInfo& TxnInfo::operator=(const TxnInfo& other466) { id = other466.id; state = other466.state; user = other466.user; hostname = other466.hostname; + agentInfo = other466.agentInfo; + __isset = other466.__isset; return *this; } void TxnInfo::printTo(std::ostream& out) const { @@ -10108,6 +10132,7 @@ void TxnInfo::printTo(std::ostream& out) const { out << ", " << "state=" << to_string(state); out << ", " << "user=" << to_string(user); out << ", " << "hostname=" << to_string(hostname); + out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); out << ")"; } @@ -10387,6 +10412,11 @@ void OpenTxnRequest::__set_hostname(const std::string& val) { this->hostname = val; } +void OpenTxnRequest::__set_agentInfo(const std::string& val) { + this->agentInfo = val; +__isset.agentInfo = true; +} + uint32_t OpenTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); @@ -10435,6 +10465,14 @@ uint32_t OpenTxnRequest::read(::apache::thrift::protocol::TProtocol* iprot) { xfer += iprot->skip(ftype); } break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->agentInfo); + this->__isset.agentInfo = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -10470,6 +10508,11 @@ uint32_t OpenTxnRequest::write(::apache::thrift::protocol::TProtocol* oprot) con xfer += oprot->writeString(this->hostname); xfer += oprot->writeFieldEnd(); + if (this->__isset.agentInfo) { + xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->agentInfo); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -10480,17 +10523,23 @@ void swap(OpenTxnRequest &a, OpenTxnRequest &b) { swap(a.num_txns, b.num_txns); swap(a.user, b.user); swap(a.hostname, b.hostname); + swap(a.agentInfo, b.agentInfo); + swap(a.__isset, b.__isset); } OpenTxnRequest::OpenTxnRequest(const OpenTxnRequest& other484) { num_txns = other484.num_txns; user = other484.user; hostname = other484.hostname; + agentInfo = other484.agentInfo; + __isset = other484.__isset; } OpenTxnRequest& OpenTxnRequest::operator=(const OpenTxnRequest& other485) { num_txns = other485.num_txns; user = other485.user; hostname = other485.hostname; + agentInfo = other485.agentInfo; + __isset = other485.__isset; return *this; } void OpenTxnRequest::printTo(std::ostream& out) const { @@ -10499,6 +10548,7 @@ void OpenTxnRequest::printTo(std::ostream& out) const { out << "num_txns=" << to_string(num_txns); out << ", " << "user=" << to_string(user); out << ", " << "hostname=" << to_string(hostname); + out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (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 45209f0..5897b95 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -4104,13 +4104,17 @@ inline std::ostream& operator<<(std::ostream& out, const Function& obj) return out; } +typedef struct _TxnInfo__isset { + _TxnInfo__isset() : agentInfo(true) {} + bool agentInfo :1; +} _TxnInfo__isset; class TxnInfo { public: TxnInfo(const TxnInfo&); TxnInfo& operator=(const TxnInfo&); - TxnInfo() : id(0), state((TxnState::type)0), user(), hostname() { + TxnInfo() : id(0), state((TxnState::type)0), user(), hostname(), agentInfo("Unknown") { } virtual ~TxnInfo() throw(); @@ -4118,6 +4122,9 @@ class TxnInfo { TxnState::type state; std::string user; std::string hostname; + std::string agentInfo; + + _TxnInfo__isset __isset; void __set_id(const int64_t val); @@ -4127,6 +4134,8 @@ class TxnInfo { void __set_hostname(const std::string& val); + void __set_agentInfo(const std::string& val); + bool operator == (const TxnInfo & rhs) const { if (!(id == rhs.id)) @@ -4137,6 +4146,10 @@ class TxnInfo { return false; if (!(hostname == rhs.hostname)) return false; + if (__isset.agentInfo != rhs.__isset.agentInfo) + return false; + else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) + return false; return true; } bool operator != (const TxnInfo &rhs) const { @@ -4249,19 +4262,26 @@ inline std::ostream& operator<<(std::ostream& out, const GetOpenTxnsResponse& ob return out; } +typedef struct _OpenTxnRequest__isset { + _OpenTxnRequest__isset() : agentInfo(true) {} + bool agentInfo :1; +} _OpenTxnRequest__isset; class OpenTxnRequest { public: OpenTxnRequest(const OpenTxnRequest&); OpenTxnRequest& operator=(const OpenTxnRequest&); - OpenTxnRequest() : num_txns(0), user(), hostname() { + OpenTxnRequest() : num_txns(0), user(), hostname(), agentInfo("Unknown") { } virtual ~OpenTxnRequest() throw(); int32_t num_txns; std::string user; std::string hostname; + std::string agentInfo; + + _OpenTxnRequest__isset __isset; void __set_num_txns(const int32_t val); @@ -4269,6 +4289,8 @@ class OpenTxnRequest { void __set_hostname(const std::string& val); + void __set_agentInfo(const std::string& val); + bool operator == (const OpenTxnRequest & rhs) const { if (!(num_txns == rhs.num_txns)) @@ -4277,6 +4299,10 @@ class OpenTxnRequest { return false; if (!(hostname == rhs.hostname)) return false; + if (__isset.agentInfo != rhs.__isset.agentInfo) + return false; + else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) + return false; return true; } bool operator != (const OpenTxnRequest &rhs) const { diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java index 01371ec..f058c0d 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java @@ -41,6 +41,7 @@ private static final org.apache.thrift.protocol.TField NUM_TXNS_FIELD_DESC = new org.apache.thrift.protocol.TField("num_txns", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)4); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -51,12 +52,14 @@ private int num_txns; // required private String user; // required private String hostname; // required + private String agentInfo; // 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 { NUM_TXNS((short)1, "num_txns"), USER((short)2, "user"), - HOSTNAME((short)3, "hostname"); + HOSTNAME((short)3, "hostname"), + AGENT_INFO((short)4, "agentInfo"); private static final Map byName = new HashMap(); @@ -77,6 +80,8 @@ public static _Fields findByThriftId(int fieldId) { return USER; case 3: // HOSTNAME return HOSTNAME; + case 4: // AGENT_INFO + return AGENT_INFO; default: return null; } @@ -119,6 +124,7 @@ public String getFieldName() { // isset id assignments private static final int __NUM_TXNS_ISSET_ID = 0; private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.AGENT_INFO}; 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); @@ -128,11 +134,15 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", 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(OpenTxnRequest.class, metaDataMap); } public OpenTxnRequest() { + this.agentInfo = "Unknown"; + } public OpenTxnRequest( @@ -159,6 +169,9 @@ public OpenTxnRequest(OpenTxnRequest other) { if (other.isSetHostname()) { this.hostname = other.hostname; } + if (other.isSetAgentInfo()) { + this.agentInfo = other.agentInfo; + } } public OpenTxnRequest deepCopy() { @@ -171,6 +184,8 @@ public void clear() { this.num_txns = 0; this.user = null; this.hostname = null; + this.agentInfo = "Unknown"; + } public int getNum_txns() { @@ -241,6 +256,29 @@ public void setHostnameIsSet(boolean value) { } } + public String getAgentInfo() { + return this.agentInfo; + } + + public void setAgentInfo(String agentInfo) { + this.agentInfo = agentInfo; + } + + public void unsetAgentInfo() { + this.agentInfo = null; + } + + /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentInfo() { + return this.agentInfo != null; + } + + public void setAgentInfoIsSet(boolean value) { + if (!value) { + this.agentInfo = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case NUM_TXNS: @@ -267,6 +305,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case AGENT_INFO: + if (value == null) { + unsetAgentInfo(); + } else { + setAgentInfo((String)value); + } + break; + } } @@ -281,6 +327,9 @@ public Object getFieldValue(_Fields field) { case HOSTNAME: return getHostname(); + case AGENT_INFO: + return getAgentInfo(); + } throw new IllegalStateException(); } @@ -298,6 +347,8 @@ public boolean isSet(_Fields field) { return isSetUser(); case HOSTNAME: return isSetHostname(); + case AGENT_INFO: + return isSetAgentInfo(); } throw new IllegalStateException(); } @@ -342,6 +393,15 @@ public boolean equals(OpenTxnRequest that) { return false; } + boolean this_present_agentInfo = true && this.isSetAgentInfo(); + boolean that_present_agentInfo = true && that.isSetAgentInfo(); + if (this_present_agentInfo || that_present_agentInfo) { + if (!(this_present_agentInfo && that_present_agentInfo)) + return false; + if (!this.agentInfo.equals(that.agentInfo)) + return false; + } + return true; } @@ -364,6 +424,11 @@ public int hashCode() { if (present_hostname) list.add(hostname); + boolean present_agentInfo = true && (isSetAgentInfo()); + list.add(present_agentInfo); + if (present_agentInfo) + list.add(agentInfo); + return list.hashCode(); } @@ -405,6 +470,16 @@ public int compareTo(OpenTxnRequest other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -444,6 +519,16 @@ public String toString() { sb.append(this.hostname); } first = false; + if (isSetAgentInfo()) { + if (!first) sb.append(", "); + sb.append("agentInfo:"); + if (this.agentInfo == null) { + sb.append("null"); + } else { + sb.append(this.agentInfo); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -525,6 +610,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, OpenTxnRequest stru org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 4: // AGENT_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -551,6 +644,13 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, OpenTxnRequest str oprot.writeString(struct.hostname); oprot.writeFieldEnd(); } + if (struct.agentInfo != null) { + if (struct.isSetAgentInfo()) { + oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); + oprot.writeString(struct.agentInfo); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -571,6 +671,14 @@ public void write(org.apache.thrift.protocol.TProtocol prot, OpenTxnRequest stru oprot.writeI32(struct.num_txns); oprot.writeString(struct.user); oprot.writeString(struct.hostname); + BitSet optionals = new BitSet(); + if (struct.isSetAgentInfo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetAgentInfo()) { + oprot.writeString(struct.agentInfo); + } } @Override @@ -582,6 +690,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, OpenTxnRequest struc struct.setUserIsSet(true); struct.hostname = iprot.readString(); struct.setHostnameIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } } } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java index 47cdaf4..3d46c38 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java @@ -42,6 +42,7 @@ private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)2); private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)3); private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField AGENT_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("agentInfo", org.apache.thrift.protocol.TType.STRING, (short)5); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -53,6 +54,7 @@ private TxnState state; // required private String user; // required private String hostname; // required + private String agentInfo; // 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 { @@ -63,7 +65,8 @@ */ STATE((short)2, "state"), USER((short)3, "user"), - HOSTNAME((short)4, "hostname"); + HOSTNAME((short)4, "hostname"), + AGENT_INFO((short)5, "agentInfo"); private static final Map byName = new HashMap(); @@ -86,6 +89,8 @@ public static _Fields findByThriftId(int fieldId) { return USER; case 4: // HOSTNAME return HOSTNAME; + case 5: // AGENT_INFO + return AGENT_INFO; default: return null; } @@ -128,6 +133,7 @@ public String getFieldName() { // isset id assignments private static final int __ID_ISSET_ID = 0; private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.AGENT_INFO}; 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); @@ -139,11 +145,15 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AGENT_INFO, new org.apache.thrift.meta_data.FieldMetaData("agentInfo", 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(TxnInfo.class, metaDataMap); } public TxnInfo() { + this.agentInfo = "Unknown"; + } public TxnInfo( @@ -175,6 +185,9 @@ public TxnInfo(TxnInfo other) { if (other.isSetHostname()) { this.hostname = other.hostname; } + if (other.isSetAgentInfo()) { + this.agentInfo = other.agentInfo; + } } public TxnInfo deepCopy() { @@ -188,6 +201,8 @@ public void clear() { this.state = null; this.user = null; this.hostname = null; + this.agentInfo = "Unknown"; + } public long getId() { @@ -289,6 +304,29 @@ public void setHostnameIsSet(boolean value) { } } + public String getAgentInfo() { + return this.agentInfo; + } + + public void setAgentInfo(String agentInfo) { + this.agentInfo = agentInfo; + } + + public void unsetAgentInfo() { + this.agentInfo = null; + } + + /** Returns true if field agentInfo is set (has been assigned a value) and false otherwise */ + public boolean isSetAgentInfo() { + return this.agentInfo != null; + } + + public void setAgentInfoIsSet(boolean value) { + if (!value) { + this.agentInfo = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case ID: @@ -323,6 +361,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case AGENT_INFO: + if (value == null) { + unsetAgentInfo(); + } else { + setAgentInfo((String)value); + } + break; + } } @@ -340,6 +386,9 @@ public Object getFieldValue(_Fields field) { case HOSTNAME: return getHostname(); + case AGENT_INFO: + return getAgentInfo(); + } throw new IllegalStateException(); } @@ -359,6 +408,8 @@ public boolean isSet(_Fields field) { return isSetUser(); case HOSTNAME: return isSetHostname(); + case AGENT_INFO: + return isSetAgentInfo(); } throw new IllegalStateException(); } @@ -412,6 +463,15 @@ public boolean equals(TxnInfo that) { return false; } + boolean this_present_agentInfo = true && this.isSetAgentInfo(); + boolean that_present_agentInfo = true && that.isSetAgentInfo(); + if (this_present_agentInfo || that_present_agentInfo) { + if (!(this_present_agentInfo && that_present_agentInfo)) + return false; + if (!this.agentInfo.equals(that.agentInfo)) + return false; + } + return true; } @@ -439,6 +499,11 @@ public int hashCode() { if (present_hostname) list.add(hostname); + boolean present_agentInfo = true && (isSetAgentInfo()); + list.add(present_agentInfo); + if (present_agentInfo) + list.add(agentInfo); + return list.hashCode(); } @@ -490,6 +555,16 @@ public int compareTo(TxnInfo other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetAgentInfo()).compareTo(other.isSetAgentInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAgentInfo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -537,6 +612,16 @@ public String toString() { sb.append(this.hostname); } first = false; + if (isSetAgentInfo()) { + if (!first) sb.append(", "); + sb.append("agentInfo:"); + if (this.agentInfo == null) { + sb.append("null"); + } else { + sb.append(this.agentInfo); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -630,6 +715,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TxnInfo struct) thr org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 5: // AGENT_INFO + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -661,6 +754,13 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TxnInfo struct) th oprot.writeString(struct.hostname); oprot.writeFieldEnd(); } + if (struct.agentInfo != null) { + if (struct.isSetAgentInfo()) { + oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC); + oprot.writeString(struct.agentInfo); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -682,6 +782,14 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TxnInfo struct) thr oprot.writeI32(struct.state.getValue()); oprot.writeString(struct.user); oprot.writeString(struct.hostname); + BitSet optionals = new BitSet(); + if (struct.isSetAgentInfo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetAgentInfo()) { + oprot.writeString(struct.agentInfo); + } } @Override @@ -695,6 +803,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TxnInfo struct) thro struct.setUserIsSet(true); struct.hostname = iprot.readString(); struct.setHostnameIsSet(true); + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.agentInfo = iprot.readString(); + struct.setAgentInfoIsSet(true); + } } } diff --git metastore/src/gen/thrift/gen-php/metastore/Types.php metastore/src/gen/thrift/gen-php/metastore/Types.php index ea8f0f3..545900a 100644 --- metastore/src/gen/thrift/gen-php/metastore/Types.php +++ metastore/src/gen/thrift/gen-php/metastore/Types.php @@ -10085,6 +10085,10 @@ class TxnInfo { * @var string */ public $hostname = null; + /** + * @var string + */ + public $agentInfo = "Unknown"; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -10105,6 +10109,10 @@ class TxnInfo { 'var' => 'hostname', 'type' => TType::STRING, ), + 5 => array( + 'var' => 'agentInfo', + 'type' => TType::STRING, + ), ); } if (is_array($vals)) { @@ -10120,6 +10128,9 @@ class TxnInfo { if (isset($vals['hostname'])) { $this->hostname = $vals['hostname']; } + if (isset($vals['agentInfo'])) { + $this->agentInfo = $vals['agentInfo']; + } } } @@ -10170,6 +10181,13 @@ class TxnInfo { $xfer += $input->skip($ftype); } break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->agentInfo); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -10203,6 +10221,11 @@ class TxnInfo { $xfer += $output->writeString($this->hostname); $xfer += $output->writeFieldEnd(); } + if ($this->agentInfo !== null) { + $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 5); + $xfer += $output->writeString($this->agentInfo); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10483,6 +10506,10 @@ class OpenTxnRequest { * @var string */ public $hostname = null; + /** + * @var string + */ + public $agentInfo = "Unknown"; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -10499,6 +10526,10 @@ class OpenTxnRequest { 'var' => 'hostname', 'type' => TType::STRING, ), + 4 => array( + 'var' => 'agentInfo', + 'type' => TType::STRING, + ), ); } if (is_array($vals)) { @@ -10511,6 +10542,9 @@ class OpenTxnRequest { if (isset($vals['hostname'])) { $this->hostname = $vals['hostname']; } + if (isset($vals['agentInfo'])) { + $this->agentInfo = $vals['agentInfo']; + } } } @@ -10554,6 +10588,13 @@ class OpenTxnRequest { $xfer += $input->skip($ftype); } break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->agentInfo); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -10582,6 +10623,11 @@ class OpenTxnRequest { $xfer += $output->writeString($this->hostname); $xfer += $output->writeFieldEnd(); } + if ($this->agentInfo !== null) { + $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 4); + $xfer += $output->writeString($this->agentInfo); + $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 a58cb58..4d33939 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -6917,6 +6917,7 @@ class TxnInfo: - state - user - hostname + - agentInfo """ thrift_spec = ( @@ -6925,13 +6926,15 @@ class TxnInfo: (2, TType.I32, 'state', None, None, ), # 2 (3, TType.STRING, 'user', None, None, ), # 3 (4, TType.STRING, 'hostname', None, None, ), # 4 + (5, TType.STRING, 'agentInfo', None, "Unknown", ), # 5 ) - def __init__(self, id=None, state=None, user=None, hostname=None,): + def __init__(self, id=None, state=None, user=None, hostname=None, agentInfo=thrift_spec[5][4],): self.id = id self.state = state self.user = user self.hostname = hostname + self.agentInfo = agentInfo 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: @@ -6962,6 +6965,11 @@ def read(self, iprot): self.hostname = iprot.readString() else: iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.agentInfo = iprot.readString() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -6988,6 +6996,10 @@ def write(self, oprot): oprot.writeFieldBegin('hostname', TType.STRING, 4) oprot.writeString(self.hostname) oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin('agentInfo', TType.STRING, 5) + oprot.writeString(self.agentInfo) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7009,6 +7021,7 @@ def __hash__(self): value = (value * 31) ^ hash(self.state) value = (value * 31) ^ hash(self.user) value = (value * 31) ^ hash(self.hostname) + value = (value * 31) ^ hash(self.agentInfo) return value def __repr__(self): @@ -7209,6 +7222,7 @@ class OpenTxnRequest: - num_txns - user - hostname + - agentInfo """ thrift_spec = ( @@ -7216,12 +7230,14 @@ class OpenTxnRequest: (1, TType.I32, 'num_txns', None, None, ), # 1 (2, TType.STRING, 'user', None, None, ), # 2 (3, TType.STRING, 'hostname', None, None, ), # 3 + (4, TType.STRING, 'agentInfo', None, "Unknown", ), # 4 ) - def __init__(self, num_txns=None, user=None, hostname=None,): + def __init__(self, num_txns=None, user=None, hostname=None, agentInfo=thrift_spec[4][4],): self.num_txns = num_txns self.user = user self.hostname = hostname + self.agentInfo = agentInfo 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: @@ -7247,6 +7263,11 @@ def read(self, iprot): self.hostname = iprot.readString() else: iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.agentInfo = iprot.readString() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -7269,6 +7290,10 @@ def write(self, oprot): oprot.writeFieldBegin('hostname', TType.STRING, 3) oprot.writeString(self.hostname) oprot.writeFieldEnd() + if self.agentInfo is not None: + oprot.writeFieldBegin('agentInfo', TType.STRING, 4) + oprot.writeString(self.agentInfo) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7287,6 +7312,7 @@ def __hash__(self): value = (value * 31) ^ hash(self.num_txns) value = (value * 31) ^ hash(self.user) value = (value * 31) ^ hash(self.hostname) + value = (value * 31) ^ hash(self.agentInfo) 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 725a264..8b02e78 100644 --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -1558,12 +1558,14 @@ class TxnInfo STATE = 2 USER = 3 HOSTNAME = 4 + AGENTINFO = 5 FIELDS = { ID => {:type => ::Thrift::Types::I64, :name => 'id'}, STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::TxnState}, USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, - HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'} + HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, + AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true} } def struct_fields; FIELDS; end @@ -1626,11 +1628,13 @@ class OpenTxnRequest NUM_TXNS = 1 USER = 2 HOSTNAME = 3 + AGENTINFO = 4 FIELDS = { NUM_TXNS => {:type => ::Thrift::Types::I32, :name => 'num_txns'}, USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, - HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'} + HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, + AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :default => %q"Unknown", :optional => true} } def struct_fields; FIELDS; end