commit fa767b7b484a854e9d7776b90fa7b164e4a26019 Author: Alan Gates Date: Sat Jan 9 08:56:32 2016 -0800 HIVE-12831 Thrift and RDBMS schema changes for HIVE-10249 diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift index f4d2a8b..81837e6 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -629,6 +629,9 @@ struct ShowLocksResponseElement { 11: required string hostname, 12: optional i32 heartbeatCount = 0, 13: optional string agentInfo, + 14: optional i64 blockedByExtId, + 15: optional i64 blockedByIntId, + 16: optional i64 lockIdInternal, } struct ShowLocksResponse { diff --git metastore/scripts/upgrade/derby/031-HIVE-12831.derby.sql metastore/scripts/upgrade/derby/031-HIVE-12831.derby.sql new file mode 100644 index 0000000..890fa1a --- /dev/null +++ metastore/scripts/upgrade/derby/031-HIVE-12831.derby.sql @@ -0,0 +1,2 @@ +ALTER TABLE "HIVE_LOCKS" ADD "HL_BLOCKEDBY_EXT_ID" bigint; +ALTER TABLE "HIVE_LOCKS" ADD "HL_BLOCKEDBY_INT_ID" bigint; 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 143bd8a..2bdeede 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 @@ -62,6 +62,8 @@ CREATE TABLE HIVE_LOCKS ( HL_HOST varchar(128) NOT NULL, HL_HEARTBEAT_COUNT integer, HL_AGENT_INFO varchar(128), + HL_BLOCKEDBY_EXT_ID bigint, + HL_BLOCKEDBY_INT_ID bigint, PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_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 907be5a..1ebbcdb 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 @@ -62,6 +62,8 @@ CREATE TABLE HIVE_LOCKS ( HL_HOST varchar(128) NOT NULL, HL_HEARTBEAT_COUNT integer, HL_AGENT_INFO varchar(128), + HL_BLOCKEDBY_EXT_ID bigint, + HL_BLOCKEDBY_INT_ID bigint, PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_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 82f4fda..935c7cd 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 @@ -8,5 +8,6 @@ RUN '027-HIVE-12819.derby.sql'; RUN '028-HIVE-12821.derby.sql'; RUN '029-HIVE-12822.derby.sql'; RUN '030-HIVE-12823.derby.sql'; +RUN '031-HIVE-12831.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 679b58e..42c68ce 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 @@ -8,5 +8,6 @@ RUN '027-HIVE-12819.derby.sql'; RUN '028-HIVE-12821.derby.sql'; RUN '029-HIVE-12822.derby.sql'; RUN '030-HIVE-12823.derby.sql'; +RUN '031-HIVE-12831.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/016-HIVE-12831.mssql.sql metastore/scripts/upgrade/mssql/016-HIVE-12831.mssql.sql new file mode 100644 index 0000000..9f37461 --- /dev/null +++ metastore/scripts/upgrade/mssql/016-HIVE-12831.mssql.sql @@ -0,0 +1,2 @@ +ALTER TABLE HIVE_LOCKS ADD HL_BLOCKEDBY_EXT_ID bigint NULL; +ALTER TABLE HIVE_LOCKS ADD HL_BLOCKEDBY_INT_ID bigint 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 5fc2917..f126eb7 100644 --- metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql +++ metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql @@ -917,6 +917,8 @@ CREATE TABLE HIVE_LOCKS( HL_HOST nvarchar(128) NOT NULL, HL_HEARTBEAT_COUNT int NULL, HL_AGENT_INFO nvarchar(128) NULL, + HL_BLOCKEDBY_EXT_ID bigint NULL, + HL_BLOCKEDBY_INT_ID bigint NULL, PRIMARY KEY CLUSTERED ( HL_LOCK_EXT_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 0bd78fa..81c65b7 100644 --- metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql +++ metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql @@ -917,6 +917,8 @@ CREATE TABLE HIVE_LOCKS( HL_HOST nvarchar(128) NOT NULL, HL_HEARTBEAT_COUNT int NULL, HL_AGENT_INFO nvarchar(128) NULL, + HL_BLOCKEDBY_EXT_ID bigint NULL, + HL_BLOCKEDBY_INT_ID bigint NULL, PRIMARY KEY CLUSTERED ( HL_LOCK_EXT_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 d195279..cca9a40 100644 --- metastore/scripts/upgrade/mssql/hive-schema-2.1.0.mssql.sql +++ metastore/scripts/upgrade/mssql/hive-schema-2.1.0.mssql.sql @@ -917,6 +917,8 @@ CREATE TABLE HIVE_LOCKS( HL_HOST nvarchar(128) NOT NULL, HL_HEARTBEAT_COUNT int NULL, HL_AGENT_INFO nvarchar(128) NULL, + HL_BLOCKEDBY_EXT_ID bigint NULL, + HL_BLOCKEDBY_INT_ID bigint NULL, PRIMARY KEY CLUSTERED ( HL_LOCK_EXT_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 2df80be..84129d7 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 @@ -9,6 +9,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS MESSAGE; :r 013-HIVE-12821.mssql.sql; :r 014-HIVE-12822.mssql.sql; :r 015-HIVE-12823.mssql.sql; +:r 016-HIVE-12831.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 c66f7b1..9c7463e 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 @@ -9,6 +9,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS MESSAGE; :r 013-HIVE-12821.mssql.sql; :r 014-HIVE-12822.mssql.sql; :r 015-HIVE-12823.mssql.sql; +:r 016-HIVE-12831.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/031-HIVE-12831.mysql.sql metastore/scripts/upgrade/mysql/031-HIVE-12831.mysql.sql new file mode 100644 index 0000000..0b19bba --- /dev/null +++ metastore/scripts/upgrade/mysql/031-HIVE-12831.mysql.sql @@ -0,0 +1,2 @@ +ALTER TABLE `HIVE_LOCKS` ADD `HL_BLOCKEDBY_EXT_ID` bigint; +ALTER TABLE `HIVE_LOCKS` ADD `HL_BLOCKEDBY_INT_ID` bigint; 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 07815e3..c4f951e 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 @@ -64,6 +64,8 @@ CREATE TABLE HIVE_LOCKS ( HL_HOST varchar(128) NOT NULL, HL_HEARTBEAT_COUNT int, HL_AGENT_INFO varchar(128), + HL_BLOCKEDBY_EXT_ID bigint, + HL_BLOCKEDBY_INT_ID bigint, PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_ID), KEY HIVE_LOCK_TXNID_INDEX (HL_TXNID) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 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 07815e3..c4f951e 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 @@ -64,6 +64,8 @@ CREATE TABLE HIVE_LOCKS ( HL_HOST varchar(128) NOT NULL, HL_HEARTBEAT_COUNT int, HL_AGENT_INFO varchar(128), + HL_BLOCKEDBY_EXT_ID bigint, + HL_BLOCKEDBY_INT_ID bigint, PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_ID), KEY HIVE_LOCK_TXNID_INDEX (HL_TXNID) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 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 49a3551..88f1b6e 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 @@ -9,6 +9,7 @@ SOURCE 027-HIVE-12819.mysql.sql; SOURCE 028-HIVE-12821.mysql.sql; SOURCE 029-HIVE-12822.mysql.sql; SOURCE 030-HIVE-12823.mysql.sql; +SOURCE 031-HIVE-12831.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 6528645..2051a72 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 @@ -9,6 +9,7 @@ SOURCE 027-HIVE-12819.mysql.sql; SOURCE 028-HIVE-12821.mysql.sql; SOURCE 029-HIVE-12822.mysql.sql; SOURCE 030-HIVE-12823.mysql.sql; +SOURCE 031-HIVE-12831.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/031-HIVE-12381.oracle.sql metastore/scripts/upgrade/oracle/031-HIVE-12381.oracle.sql new file mode 100644 index 0000000..35a9b9d --- /dev/null +++ metastore/scripts/upgrade/oracle/031-HIVE-12381.oracle.sql @@ -0,0 +1,2 @@ +ALTER TABLE HIVE_LOCKS ADD HL_BLOCKEDBY_EXT_ID number(19); +ALTER TABLE HIVE_LOCKS ADD HL_BLOCKEDBY_INT_ID number(19); 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 0e2d43e..ba5f438 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 @@ -63,6 +63,8 @@ CREATE TABLE HIVE_LOCKS ( HL_HOST varchar(128) NOT NULL, HL_HEARTBEAT_COUNT number(10), HL_AGENT_INFO varchar2(128), + HL_BLOCKEDBY_EXT_ID number(19), + HL_BLOCKEDBY_INT_ID number(19), PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_ID) ) ROWDEPENDENCIES; 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 0e2d43e..ba5f438 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 @@ -63,6 +63,8 @@ CREATE TABLE HIVE_LOCKS ( HL_HOST varchar(128) NOT NULL, HL_HEARTBEAT_COUNT number(10), HL_AGENT_INFO varchar2(128), + HL_BLOCKEDBY_EXT_ID number(19), + HL_BLOCKEDBY_INT_ID number(19), PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_ID) ) ROWDEPENDENCIES; 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 621826e..7df9f79 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 @@ -9,6 +9,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS Status from dual; @028-HIVE-12821.oracle.sql; @029-HIVE-12822.oracle.sql; @030-HIVE-12823.oracle.sql; +@031-HIVE-12381.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 d849b21..d75f989 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 @@ -9,6 +9,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS Status from dual; @028-HIVE-12821.oracle.sql; @029-HIVE-12822.oracle.sql; @030-HIVE-12823.oracle.sql; +@031-HIVE-12381.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/030-HIVE-12831.postgres.sql metastore/scripts/upgrade/postgres/030-HIVE-12831.postgres.sql new file mode 100644 index 0000000..234fc19 --- /dev/null +++ metastore/scripts/upgrade/postgres/030-HIVE-12831.postgres.sql @@ -0,0 +1,2 @@ +ALTER TABLE "HIVE_LOCKS" ADD COLUMN "HL_BLOCKEDBY_EXT_ID" bigint; +ALTER TABLE "HIVE_LOCKS" ADD COLUMN "HL_BLOCKEDBY_INT_ID" bigint; 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 085496b..1e69e4f 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 @@ -63,6 +63,8 @@ CREATE TABLE HIVE_LOCKS ( HL_HOST varchar(128) NOT NULL, HL_HEARTBEAT_COUNT integer, HL_AGENT_INFO varchar(128), + HL_BLOCKEDBY_EXT_ID bigint, + HL_BLOCKEDBY_INT_ID bigint, PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_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 085496b..1e69e4f 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 @@ -63,6 +63,8 @@ CREATE TABLE HIVE_LOCKS ( HL_HOST varchar(128) NOT NULL, HL_HEARTBEAT_COUNT integer, HL_AGENT_INFO varchar(128), + HL_BLOCKEDBY_EXT_ID bigint, + HL_BLOCKEDBY_INT_ID bigint, PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_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 9650b73..8cb1997 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 @@ -9,6 +9,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0'; \i 027-HIVE-12821.postgres.sql; \i 028-HIVE-12822.postgres.sql; \i 029-HIVE-12823.postgres.sql; +\i 030-HIVE-12831.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 d53db6d..2f81b84 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 @@ -9,6 +9,7 @@ SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0'; \i 027-HIVE-12821.postgres.sql; \i 028-HIVE-12822.postgres.sql; \i 029-HIVE-12823.postgres.sql; +\i 030-HIVE-12831.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 1c81fef..0203b06 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -11803,6 +11803,21 @@ void ShowLocksResponseElement::__set_agentInfo(const std::string& val) { __isset.agentInfo = true; } +void ShowLocksResponseElement::__set_blockedByExtId(const int64_t val) { + this->blockedByExtId = val; +__isset.blockedByExtId = true; +} + +void ShowLocksResponseElement::__set_blockedByIntId(const int64_t val) { + this->blockedByIntId = val; +__isset.blockedByIntId = true; +} + +void ShowLocksResponseElement::__set_lockIdInternal(const int64_t val) { + this->lockIdInternal = val; +__isset.lockIdInternal = true; +} + uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); @@ -11939,6 +11954,30 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i xfer += iprot->skip(ftype); } break; + case 14: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->blockedByExtId); + this->__isset.blockedByExtId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 15: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->blockedByIntId); + this->__isset.blockedByIntId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 16: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lockIdInternal); + this->__isset.lockIdInternal = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -12028,6 +12067,21 @@ uint32_t ShowLocksResponseElement::write(::apache::thrift::protocol::TProtocol* xfer += oprot->writeString(this->agentInfo); xfer += oprot->writeFieldEnd(); } + if (this->__isset.blockedByExtId) { + xfer += oprot->writeFieldBegin("blockedByExtId", ::apache::thrift::protocol::T_I64, 14); + xfer += oprot->writeI64(this->blockedByExtId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.blockedByIntId) { + xfer += oprot->writeFieldBegin("blockedByIntId", ::apache::thrift::protocol::T_I64, 15); + xfer += oprot->writeI64(this->blockedByIntId); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.lockIdInternal) { + xfer += oprot->writeFieldBegin("lockIdInternal", ::apache::thrift::protocol::T_I64, 16); + xfer += oprot->writeI64(this->lockIdInternal); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -12048,6 +12102,9 @@ void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b) { swap(a.hostname, b.hostname); swap(a.heartbeatCount, b.heartbeatCount); swap(a.agentInfo, b.agentInfo); + swap(a.blockedByExtId, b.blockedByExtId); + swap(a.blockedByIntId, b.blockedByIntId); + swap(a.lockIdInternal, b.lockIdInternal); swap(a.__isset, b.__isset); } @@ -12065,6 +12122,9 @@ ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElemen hostname = other521.hostname; heartbeatCount = other521.heartbeatCount; agentInfo = other521.agentInfo; + blockedByExtId = other521.blockedByExtId; + blockedByIntId = other521.blockedByIntId; + lockIdInternal = other521.lockIdInternal; __isset = other521.__isset; } ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksResponseElement& other522) { @@ -12081,6 +12141,9 @@ ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksRes hostname = other522.hostname; heartbeatCount = other522.heartbeatCount; agentInfo = other522.agentInfo; + blockedByExtId = other522.blockedByExtId; + blockedByIntId = other522.blockedByIntId; + lockIdInternal = other522.lockIdInternal; __isset = other522.__isset; return *this; } @@ -12100,6 +12163,9 @@ void ShowLocksResponseElement::printTo(std::ostream& out) const { out << ", " << "hostname=" << to_string(hostname); out << ", " << "heartbeatCount="; (__isset.heartbeatCount ? (out << to_string(heartbeatCount)) : (out << "")); out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "")); + out << ", " << "blockedByExtId="; (__isset.blockedByExtId ? (out << to_string(blockedByExtId)) : (out << "")); + out << ", " << "blockedByIntId="; (__isset.blockedByIntId ? (out << to_string(blockedByIntId)) : (out << "")); + out << ", " << "lockIdInternal="; (__isset.lockIdInternal ? (out << to_string(lockIdInternal)) : (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 56e90cd..ce1d7da 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -4822,13 +4822,16 @@ inline std::ostream& operator<<(std::ostream& out, const ShowLocksRequest& obj) } typedef struct _ShowLocksResponseElement__isset { - _ShowLocksResponseElement__isset() : tablename(false), partname(false), txnid(false), acquiredat(false), heartbeatCount(true), agentInfo(false) {} + _ShowLocksResponseElement__isset() : tablename(false), partname(false), txnid(false), acquiredat(false), heartbeatCount(true), agentInfo(false), blockedByExtId(false), blockedByIntId(false), lockIdInternal(false) {} bool tablename :1; bool partname :1; bool txnid :1; bool acquiredat :1; bool heartbeatCount :1; bool agentInfo :1; + bool blockedByExtId :1; + bool blockedByIntId :1; + bool lockIdInternal :1; } _ShowLocksResponseElement__isset; class ShowLocksResponseElement { @@ -4836,7 +4839,7 @@ class ShowLocksResponseElement { ShowLocksResponseElement(const ShowLocksResponseElement&); ShowLocksResponseElement& operator=(const ShowLocksResponseElement&); - ShowLocksResponseElement() : lockid(0), dbname(), tablename(), partname(), state((LockState::type)0), type((LockType::type)0), txnid(0), lastheartbeat(0), acquiredat(0), user(), hostname(), heartbeatCount(0), agentInfo() { + ShowLocksResponseElement() : lockid(0), dbname(), tablename(), partname(), state((LockState::type)0), type((LockType::type)0), txnid(0), lastheartbeat(0), acquiredat(0), user(), hostname(), heartbeatCount(0), agentInfo(), blockedByExtId(0), blockedByIntId(0), lockIdInternal(0) { } virtual ~ShowLocksResponseElement() throw(); @@ -4853,6 +4856,9 @@ class ShowLocksResponseElement { std::string hostname; int32_t heartbeatCount; std::string agentInfo; + int64_t blockedByExtId; + int64_t blockedByIntId; + int64_t lockIdInternal; _ShowLocksResponseElement__isset __isset; @@ -4882,6 +4888,12 @@ class ShowLocksResponseElement { void __set_agentInfo(const std::string& val); + void __set_blockedByExtId(const int64_t val); + + void __set_blockedByIntId(const int64_t val); + + void __set_lockIdInternal(const int64_t val); + bool operator == (const ShowLocksResponseElement & rhs) const { if (!(lockid == rhs.lockid)) @@ -4922,6 +4934,18 @@ class ShowLocksResponseElement { return false; else if (__isset.agentInfo && !(agentInfo == rhs.agentInfo)) return false; + if (__isset.blockedByExtId != rhs.__isset.blockedByExtId) + return false; + else if (__isset.blockedByExtId && !(blockedByExtId == rhs.blockedByExtId)) + return false; + if (__isset.blockedByIntId != rhs.__isset.blockedByIntId) + return false; + else if (__isset.blockedByIntId && !(blockedByIntId == rhs.blockedByIntId)) + return false; + if (__isset.lockIdInternal != rhs.__isset.lockIdInternal) + return false; + else if (__isset.lockIdInternal && !(lockIdInternal == rhs.lockIdInternal)) + return false; return true; } bool operator != (const ShowLocksResponseElement &rhs) const { diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java index 20a1944..4bd7a7e 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java @@ -51,6 +51,9 @@ 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)11); private static final org.apache.thrift.protocol.TField HEARTBEAT_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeatCount", org.apache.thrift.protocol.TType.I32, (short)12); 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)13); + private static final org.apache.thrift.protocol.TField BLOCKED_BY_EXT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockedByExtId", org.apache.thrift.protocol.TType.I64, (short)14); + private static final org.apache.thrift.protocol.TField BLOCKED_BY_INT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("blockedByIntId", org.apache.thrift.protocol.TType.I64, (short)15); + private static final org.apache.thrift.protocol.TField LOCK_ID_INTERNAL_FIELD_DESC = new org.apache.thrift.protocol.TField("lockIdInternal", org.apache.thrift.protocol.TType.I64, (short)16); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -71,6 +74,9 @@ private String hostname; // required private int heartbeatCount; // optional private String agentInfo; // optional + private long blockedByExtId; // optional + private long blockedByIntId; // optional + private long lockIdInternal; // 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 { @@ -94,7 +100,10 @@ USER((short)10, "user"), HOSTNAME((short)11, "hostname"), HEARTBEAT_COUNT((short)12, "heartbeatCount"), - AGENT_INFO((short)13, "agentInfo"); + AGENT_INFO((short)13, "agentInfo"), + BLOCKED_BY_EXT_ID((short)14, "blockedByExtId"), + BLOCKED_BY_INT_ID((short)15, "blockedByIntId"), + LOCK_ID_INTERNAL((short)16, "lockIdInternal"); private static final Map byName = new HashMap(); @@ -135,6 +144,12 @@ public static _Fields findByThriftId(int fieldId) { return HEARTBEAT_COUNT; case 13: // AGENT_INFO return AGENT_INFO; + case 14: // BLOCKED_BY_EXT_ID + return BLOCKED_BY_EXT_ID; + case 15: // BLOCKED_BY_INT_ID + return BLOCKED_BY_INT_ID; + case 16: // LOCK_ID_INTERNAL + return LOCK_ID_INTERNAL; default: return null; } @@ -180,8 +195,11 @@ public String getFieldName() { private static final int __LASTHEARTBEAT_ISSET_ID = 2; private static final int __ACQUIREDAT_ISSET_ID = 3; private static final int __HEARTBEATCOUNT_ISSET_ID = 4; + private static final int __BLOCKEDBYEXTID_ISSET_ID = 5; + private static final int __BLOCKEDBYINTID_ISSET_ID = 6; + private static final int __LOCKIDINTERNAL_ISSET_ID = 7; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTNAME,_Fields.TXNID,_Fields.ACQUIREDAT,_Fields.HEARTBEAT_COUNT,_Fields.AGENT_INFO}; + private static final _Fields optionals[] = {_Fields.TABLENAME,_Fields.PARTNAME,_Fields.TXNID,_Fields.ACQUIREDAT,_Fields.HEARTBEAT_COUNT,_Fields.AGENT_INFO,_Fields.BLOCKED_BY_EXT_ID,_Fields.BLOCKED_BY_INT_ID,_Fields.LOCK_ID_INTERNAL}; 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); @@ -211,6 +229,12 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); 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))); + tmpMap.put(_Fields.BLOCKED_BY_EXT_ID, new org.apache.thrift.meta_data.FieldMetaData("blockedByExtId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.BLOCKED_BY_INT_ID, new org.apache.thrift.meta_data.FieldMetaData("blockedByIntId", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LOCK_ID_INTERNAL, new org.apache.thrift.meta_data.FieldMetaData("lockIdInternal", 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(ShowLocksResponseElement.class, metaDataMap); } @@ -275,6 +299,9 @@ public ShowLocksResponseElement(ShowLocksResponseElement other) { if (other.isSetAgentInfo()) { this.agentInfo = other.agentInfo; } + this.blockedByExtId = other.blockedByExtId; + this.blockedByIntId = other.blockedByIntId; + this.lockIdInternal = other.lockIdInternal; } public ShowLocksResponseElement deepCopy() { @@ -301,6 +328,12 @@ public void clear() { this.heartbeatCount = 0; this.agentInfo = null; + setBlockedByExtIdIsSet(false); + this.blockedByExtId = 0; + setBlockedByIntIdIsSet(false); + this.blockedByIntId = 0; + setLockIdInternalIsSet(false); + this.lockIdInternal = 0; } public long getLockid() { @@ -613,6 +646,72 @@ public void setAgentInfoIsSet(boolean value) { } } + public long getBlockedByExtId() { + return this.blockedByExtId; + } + + public void setBlockedByExtId(long blockedByExtId) { + this.blockedByExtId = blockedByExtId; + setBlockedByExtIdIsSet(true); + } + + public void unsetBlockedByExtId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKEDBYEXTID_ISSET_ID); + } + + /** Returns true if field blockedByExtId is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockedByExtId() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKEDBYEXTID_ISSET_ID); + } + + public void setBlockedByExtIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKEDBYEXTID_ISSET_ID, value); + } + + public long getBlockedByIntId() { + return this.blockedByIntId; + } + + public void setBlockedByIntId(long blockedByIntId) { + this.blockedByIntId = blockedByIntId; + setBlockedByIntIdIsSet(true); + } + + public void unsetBlockedByIntId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BLOCKEDBYINTID_ISSET_ID); + } + + /** Returns true if field blockedByIntId is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockedByIntId() { + return EncodingUtils.testBit(__isset_bitfield, __BLOCKEDBYINTID_ISSET_ID); + } + + public void setBlockedByIntIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BLOCKEDBYINTID_ISSET_ID, value); + } + + public long getLockIdInternal() { + return this.lockIdInternal; + } + + public void setLockIdInternal(long lockIdInternal) { + this.lockIdInternal = lockIdInternal; + setLockIdInternalIsSet(true); + } + + public void unsetLockIdInternal() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCKIDINTERNAL_ISSET_ID); + } + + /** Returns true if field lockIdInternal is set (has been assigned a value) and false otherwise */ + public boolean isSetLockIdInternal() { + return EncodingUtils.testBit(__isset_bitfield, __LOCKIDINTERNAL_ISSET_ID); + } + + public void setLockIdInternalIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKIDINTERNAL_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case LOCKID: @@ -719,6 +818,30 @@ public void setFieldValue(_Fields field, Object value) { } break; + case BLOCKED_BY_EXT_ID: + if (value == null) { + unsetBlockedByExtId(); + } else { + setBlockedByExtId((Long)value); + } + break; + + case BLOCKED_BY_INT_ID: + if (value == null) { + unsetBlockedByIntId(); + } else { + setBlockedByIntId((Long)value); + } + break; + + case LOCK_ID_INTERNAL: + if (value == null) { + unsetLockIdInternal(); + } else { + setLockIdInternal((Long)value); + } + break; + } } @@ -763,6 +886,15 @@ public Object getFieldValue(_Fields field) { case AGENT_INFO: return getAgentInfo(); + case BLOCKED_BY_EXT_ID: + return getBlockedByExtId(); + + case BLOCKED_BY_INT_ID: + return getBlockedByIntId(); + + case LOCK_ID_INTERNAL: + return getLockIdInternal(); + } throw new IllegalStateException(); } @@ -800,6 +932,12 @@ public boolean isSet(_Fields field) { return isSetHeartbeatCount(); case AGENT_INFO: return isSetAgentInfo(); + case BLOCKED_BY_EXT_ID: + return isSetBlockedByExtId(); + case BLOCKED_BY_INT_ID: + return isSetBlockedByIntId(); + case LOCK_ID_INTERNAL: + return isSetLockIdInternal(); } throw new IllegalStateException(); } @@ -934,6 +1072,33 @@ public boolean equals(ShowLocksResponseElement that) { return false; } + boolean this_present_blockedByExtId = true && this.isSetBlockedByExtId(); + boolean that_present_blockedByExtId = true && that.isSetBlockedByExtId(); + if (this_present_blockedByExtId || that_present_blockedByExtId) { + if (!(this_present_blockedByExtId && that_present_blockedByExtId)) + return false; + if (this.blockedByExtId != that.blockedByExtId) + return false; + } + + boolean this_present_blockedByIntId = true && this.isSetBlockedByIntId(); + boolean that_present_blockedByIntId = true && that.isSetBlockedByIntId(); + if (this_present_blockedByIntId || that_present_blockedByIntId) { + if (!(this_present_blockedByIntId && that_present_blockedByIntId)) + return false; + if (this.blockedByIntId != that.blockedByIntId) + return false; + } + + boolean this_present_lockIdInternal = true && this.isSetLockIdInternal(); + boolean that_present_lockIdInternal = true && that.isSetLockIdInternal(); + if (this_present_lockIdInternal || that_present_lockIdInternal) { + if (!(this_present_lockIdInternal && that_present_lockIdInternal)) + return false; + if (this.lockIdInternal != that.lockIdInternal) + return false; + } + return true; } @@ -1006,6 +1171,21 @@ public int hashCode() { if (present_agentInfo) list.add(agentInfo); + boolean present_blockedByExtId = true && (isSetBlockedByExtId()); + list.add(present_blockedByExtId); + if (present_blockedByExtId) + list.add(blockedByExtId); + + boolean present_blockedByIntId = true && (isSetBlockedByIntId()); + list.add(present_blockedByIntId); + if (present_blockedByIntId) + list.add(blockedByIntId); + + boolean present_lockIdInternal = true && (isSetLockIdInternal()); + list.add(present_lockIdInternal); + if (present_lockIdInternal) + list.add(lockIdInternal); + return list.hashCode(); } @@ -1147,6 +1327,36 @@ public int compareTo(ShowLocksResponseElement other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetBlockedByExtId()).compareTo(other.isSetBlockedByExtId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockedByExtId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedByExtId, other.blockedByExtId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockedByIntId()).compareTo(other.isSetBlockedByIntId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockedByIntId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedByIntId, other.blockedByIntId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLockIdInternal()).compareTo(other.isSetLockIdInternal()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLockIdInternal()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockIdInternal, other.lockIdInternal); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1262,6 +1472,24 @@ public String toString() { } first = false; } + if (isSetBlockedByExtId()) { + if (!first) sb.append(", "); + sb.append("blockedByExtId:"); + sb.append(this.blockedByExtId); + first = false; + } + if (isSetBlockedByIntId()) { + if (!first) sb.append(", "); + sb.append("blockedByIntId:"); + sb.append(this.blockedByIntId); + first = false; + } + if (isSetLockIdInternal()) { + if (!first) sb.append(", "); + sb.append("lockIdInternal:"); + sb.append(this.lockIdInternal); + first = false; + } sb.append(")"); return sb.toString(); } @@ -1439,6 +1667,30 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ShowLocksResponseEl org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 14: // BLOCKED_BY_EXT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.blockedByExtId = iprot.readI64(); + struct.setBlockedByExtIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // BLOCKED_BY_INT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.blockedByIntId = iprot.readI64(); + struct.setBlockedByIntIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // LOCK_ID_INTERNAL + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.lockIdInternal = iprot.readI64(); + struct.setLockIdInternalIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1519,6 +1771,21 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ShowLocksResponseE oprot.writeFieldEnd(); } } + if (struct.isSetBlockedByExtId()) { + oprot.writeFieldBegin(BLOCKED_BY_EXT_ID_FIELD_DESC); + oprot.writeI64(struct.blockedByExtId); + oprot.writeFieldEnd(); + } + if (struct.isSetBlockedByIntId()) { + oprot.writeFieldBegin(BLOCKED_BY_INT_ID_FIELD_DESC); + oprot.writeI64(struct.blockedByIntId); + oprot.writeFieldEnd(); + } + if (struct.isSetLockIdInternal()) { + oprot.writeFieldBegin(LOCK_ID_INTERNAL_FIELD_DESC); + oprot.writeI64(struct.lockIdInternal); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1562,7 +1829,16 @@ public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseEl if (struct.isSetAgentInfo()) { optionals.set(5); } - oprot.writeBitSet(optionals, 6); + if (struct.isSetBlockedByExtId()) { + optionals.set(6); + } + if (struct.isSetBlockedByIntId()) { + optionals.set(7); + } + if (struct.isSetLockIdInternal()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); if (struct.isSetTablename()) { oprot.writeString(struct.tablename); } @@ -1581,6 +1857,15 @@ public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseEl if (struct.isSetAgentInfo()) { oprot.writeString(struct.agentInfo); } + if (struct.isSetBlockedByExtId()) { + oprot.writeI64(struct.blockedByExtId); + } + if (struct.isSetBlockedByIntId()) { + oprot.writeI64(struct.blockedByIntId); + } + if (struct.isSetLockIdInternal()) { + oprot.writeI64(struct.lockIdInternal); + } } @Override @@ -1600,7 +1885,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseEle struct.setUserIsSet(true); struct.hostname = iprot.readString(); struct.setHostnameIsSet(true); - BitSet incoming = iprot.readBitSet(6); + BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { struct.tablename = iprot.readString(); struct.setTablenameIsSet(true); @@ -1625,6 +1910,18 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseEle struct.agentInfo = iprot.readString(); struct.setAgentInfoIsSet(true); } + if (incoming.get(6)) { + struct.blockedByExtId = iprot.readI64(); + struct.setBlockedByExtIdIsSet(true); + } + if (incoming.get(7)) { + struct.blockedByIntId = iprot.readI64(); + struct.setBlockedByIntIdIsSet(true); + } + if (incoming.get(8)) { + struct.lockIdInternal = iprot.readI64(); + struct.setLockIdInternalIsSet(true); + } } } diff --git metastore/src/gen/thrift/gen-php/metastore/Types.php metastore/src/gen/thrift/gen-php/metastore/Types.php index 4a42d22..380e6d0 100644 --- metastore/src/gen/thrift/gen-php/metastore/Types.php +++ metastore/src/gen/thrift/gen-php/metastore/Types.php @@ -11787,6 +11787,18 @@ class ShowLocksResponseElement { * @var string */ public $agentInfo = null; + /** + * @var int + */ + public $blockedByExtId = null; + /** + * @var int + */ + public $blockedByIntId = null; + /** + * @var int + */ + public $lockIdInternal = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -11843,6 +11855,18 @@ class ShowLocksResponseElement { 'var' => 'agentInfo', 'type' => TType::STRING, ), + 14 => array( + 'var' => 'blockedByExtId', + 'type' => TType::I64, + ), + 15 => array( + 'var' => 'blockedByIntId', + 'type' => TType::I64, + ), + 16 => array( + 'var' => 'lockIdInternal', + 'type' => TType::I64, + ), ); } if (is_array($vals)) { @@ -11885,6 +11909,15 @@ class ShowLocksResponseElement { if (isset($vals['agentInfo'])) { $this->agentInfo = $vals['agentInfo']; } + if (isset($vals['blockedByExtId'])) { + $this->blockedByExtId = $vals['blockedByExtId']; + } + if (isset($vals['blockedByIntId'])) { + $this->blockedByIntId = $vals['blockedByIntId']; + } + if (isset($vals['lockIdInternal'])) { + $this->lockIdInternal = $vals['lockIdInternal']; + } } } @@ -11998,6 +12031,27 @@ class ShowLocksResponseElement { $xfer += $input->skip($ftype); } break; + case 14: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->blockedByExtId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 15: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->blockedByIntId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 16: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->lockIdInternal); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -12076,6 +12130,21 @@ class ShowLocksResponseElement { $xfer += $output->writeString($this->agentInfo); $xfer += $output->writeFieldEnd(); } + if ($this->blockedByExtId !== null) { + $xfer += $output->writeFieldBegin('blockedByExtId', TType::I64, 14); + $xfer += $output->writeI64($this->blockedByExtId); + $xfer += $output->writeFieldEnd(); + } + if ($this->blockedByIntId !== null) { + $xfer += $output->writeFieldBegin('blockedByIntId', TType::I64, 15); + $xfer += $output->writeI64($this->blockedByIntId); + $xfer += $output->writeFieldEnd(); + } + if ($this->lockIdInternal !== null) { + $xfer += $output->writeFieldBegin('lockIdInternal', TType::I64, 16); + $xfer += $output->writeI64($this->lockIdInternal); + $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 baeeca1..409c247 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -8178,6 +8178,9 @@ class ShowLocksResponseElement: - hostname - heartbeatCount - agentInfo + - blockedByExtId + - blockedByIntId + - lockIdInternal """ thrift_spec = ( @@ -8195,9 +8198,12 @@ class ShowLocksResponseElement: (11, TType.STRING, 'hostname', None, None, ), # 11 (12, TType.I32, 'heartbeatCount', None, 0, ), # 12 (13, TType.STRING, 'agentInfo', None, None, ), # 13 + (14, TType.I64, 'blockedByExtId', None, None, ), # 14 + (15, TType.I64, 'blockedByIntId', None, None, ), # 15 + (16, TType.I64, 'lockIdInternal', None, None, ), # 16 ) - def __init__(self, lockid=None, dbname=None, tablename=None, partname=None, state=None, type=None, txnid=None, lastheartbeat=None, acquiredat=None, user=None, hostname=None, heartbeatCount=thrift_spec[12][4], agentInfo=None,): + def __init__(self, lockid=None, dbname=None, tablename=None, partname=None, state=None, type=None, txnid=None, lastheartbeat=None, acquiredat=None, user=None, hostname=None, heartbeatCount=thrift_spec[12][4], agentInfo=None, blockedByExtId=None, blockedByIntId=None, lockIdInternal=None,): self.lockid = lockid self.dbname = dbname self.tablename = tablename @@ -8211,6 +8217,9 @@ def __init__(self, lockid=None, dbname=None, tablename=None, partname=None, stat self.hostname = hostname self.heartbeatCount = heartbeatCount self.agentInfo = agentInfo + self.blockedByExtId = blockedByExtId + self.blockedByIntId = blockedByIntId + self.lockIdInternal = lockIdInternal 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: @@ -8286,6 +8295,21 @@ def read(self, iprot): self.agentInfo = iprot.readString() else: iprot.skip(ftype) + elif fid == 14: + if ftype == TType.I64: + self.blockedByExtId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.I64: + self.blockedByIntId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.I64: + self.lockIdInternal = iprot.readI64() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -8348,6 +8372,18 @@ def write(self, oprot): oprot.writeFieldBegin('agentInfo', TType.STRING, 13) oprot.writeString(self.agentInfo) oprot.writeFieldEnd() + if self.blockedByExtId is not None: + oprot.writeFieldBegin('blockedByExtId', TType.I64, 14) + oprot.writeI64(self.blockedByExtId) + oprot.writeFieldEnd() + if self.blockedByIntId is not None: + oprot.writeFieldBegin('blockedByIntId', TType.I64, 15) + oprot.writeI64(self.blockedByIntId) + oprot.writeFieldEnd() + if self.lockIdInternal is not None: + oprot.writeFieldBegin('lockIdInternal', TType.I64, 16) + oprot.writeI64(self.lockIdInternal) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8384,6 +8420,9 @@ def __hash__(self): value = (value * 31) ^ hash(self.hostname) value = (value * 31) ^ hash(self.heartbeatCount) value = (value * 31) ^ hash(self.agentInfo) + value = (value * 31) ^ hash(self.blockedByExtId) + value = (value * 31) ^ hash(self.blockedByIntId) + value = (value * 31) ^ hash(self.lockIdInternal) 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 b29650f..a473611 100644 --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -1861,6 +1861,9 @@ class ShowLocksResponseElement HOSTNAME = 11 HEARTBEATCOUNT = 12 AGENTINFO = 13 + BLOCKEDBYEXTID = 14 + BLOCKEDBYINTID = 15 + LOCKIDINTERNAL = 16 FIELDS = { LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'}, @@ -1875,7 +1878,10 @@ class ShowLocksResponseElement USER => {:type => ::Thrift::Types::STRING, :name => 'user'}, HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}, HEARTBEATCOUNT => {:type => ::Thrift::Types::I32, :name => 'heartbeatCount', :default => 0, :optional => true}, - AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :optional => true} + AGENTINFO => {:type => ::Thrift::Types::STRING, :name => 'agentInfo', :optional => true}, + BLOCKEDBYEXTID => {:type => ::Thrift::Types::I64, :name => 'blockedByExtId', :optional => true}, + BLOCKEDBYINTID => {:type => ::Thrift::Types::I64, :name => 'blockedByIntId', :optional => true}, + LOCKIDINTERNAL => {:type => ::Thrift::Types::I64, :name => 'lockIdInternal', :optional => true} } def struct_fields; FIELDS; end