You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ga...@apache.org on 2016/01/15 01:13:10 UTC
[1/5] hive git commit: HIVE-12832 thrift and RDBMS changes for ACID
fixes, branch-2.0 version
Repository: hive
Updated Branches:
refs/heads/branch-2.0 2f4b68492 -> f260feb25
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-php/metastore/Types.php
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-php/metastore/Types.php b/metastore/src/gen/thrift/gen-php/metastore/Types.php
index e43a13d..b849943 100644
--- a/metastore/src/gen/thrift/gen-php/metastore/Types.php
+++ b/metastore/src/gen/thrift/gen-php/metastore/Types.php
@@ -10085,6 +10085,18 @@ class TxnInfo {
* @var string
*/
public $hostname = null;
+ /**
+ * @var string
+ */
+ public $agentInfo = "Unknown";
+ /**
+ * @var int
+ */
+ public $heartbeatCount = 0;
+ /**
+ * @var string
+ */
+ public $metaInfo = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -10105,6 +10117,18 @@ class TxnInfo {
'var' => 'hostname',
'type' => TType::STRING,
),
+ 5 => array(
+ 'var' => 'agentInfo',
+ 'type' => TType::STRING,
+ ),
+ 6 => array(
+ 'var' => 'heartbeatCount',
+ 'type' => TType::I32,
+ ),
+ 7 => array(
+ 'var' => 'metaInfo',
+ 'type' => TType::STRING,
+ ),
);
}
if (is_array($vals)) {
@@ -10120,6 +10144,15 @@ class TxnInfo {
if (isset($vals['hostname'])) {
$this->hostname = $vals['hostname'];
}
+ if (isset($vals['agentInfo'])) {
+ $this->agentInfo = $vals['agentInfo'];
+ }
+ if (isset($vals['heartbeatCount'])) {
+ $this->heartbeatCount = $vals['heartbeatCount'];
+ }
+ if (isset($vals['metaInfo'])) {
+ $this->metaInfo = $vals['metaInfo'];
+ }
}
}
@@ -10170,6 +10203,27 @@ class TxnInfo {
$xfer += $input->skip($ftype);
}
break;
+ case 5:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->agentInfo);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->heartbeatCount);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->metaInfo);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -10203,6 +10257,21 @@ 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();
+ }
+ if ($this->heartbeatCount !== null) {
+ $xfer += $output->writeFieldBegin('heartbeatCount', TType::I32, 6);
+ $xfer += $output->writeI32($this->heartbeatCount);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->metaInfo !== null) {
+ $xfer += $output->writeFieldBegin('metaInfo', TType::STRING, 7);
+ $xfer += $output->writeString($this->metaInfo);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -10483,6 +10552,10 @@ class OpenTxnRequest {
* @var string
*/
public $hostname = null;
+ /**
+ * @var string
+ */
+ public $agentInfo = "Unknown";
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -10499,6 +10572,10 @@ class OpenTxnRequest {
'var' => 'hostname',
'type' => TType::STRING,
),
+ 4 => array(
+ 'var' => 'agentInfo',
+ 'type' => TType::STRING,
+ ),
);
}
if (is_array($vals)) {
@@ -10511,6 +10588,9 @@ class OpenTxnRequest {
if (isset($vals['hostname'])) {
$this->hostname = $vals['hostname'];
}
+ if (isset($vals['agentInfo'])) {
+ $this->agentInfo = $vals['agentInfo'];
+ }
}
}
@@ -10554,6 +10634,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 +10669,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;
@@ -11026,6 +11118,10 @@ class LockRequest {
* @var string
*/
public $hostname = null;
+ /**
+ * @var string
+ */
+ public $agentInfo = "Unknown";
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -11051,6 +11147,10 @@ class LockRequest {
'var' => 'hostname',
'type' => TType::STRING,
),
+ 5 => array(
+ 'var' => 'agentInfo',
+ 'type' => TType::STRING,
+ ),
);
}
if (is_array($vals)) {
@@ -11066,6 +11166,9 @@ class LockRequest {
if (isset($vals['hostname'])) {
$this->hostname = $vals['hostname'];
}
+ if (isset($vals['agentInfo'])) {
+ $this->agentInfo = $vals['agentInfo'];
+ }
}
}
@@ -11127,6 +11230,13 @@ class LockRequest {
$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;
@@ -11172,6 +11282,11 @@ class LockRequest {
$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;
@@ -11284,6 +11399,14 @@ class CheckLockRequest {
* @var int
*/
public $lockid = null;
+ /**
+ * @var int
+ */
+ public $txnid = null;
+ /**
+ * @var int
+ */
+ public $elapsed_ms = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -11292,12 +11415,26 @@ class CheckLockRequest {
'var' => 'lockid',
'type' => TType::I64,
),
+ 2 => array(
+ 'var' => 'txnid',
+ 'type' => TType::I64,
+ ),
+ 3 => array(
+ 'var' => 'elapsed_ms',
+ 'type' => TType::I64,
+ ),
);
}
if (is_array($vals)) {
if (isset($vals['lockid'])) {
$this->lockid = $vals['lockid'];
}
+ if (isset($vals['txnid'])) {
+ $this->txnid = $vals['txnid'];
+ }
+ if (isset($vals['elapsed_ms'])) {
+ $this->elapsed_ms = $vals['elapsed_ms'];
+ }
}
}
@@ -11327,6 +11464,20 @@ class CheckLockRequest {
$xfer += $input->skip($ftype);
}
break;
+ case 2:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->txnid);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->elapsed_ms);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -11345,6 +11496,16 @@ class CheckLockRequest {
$xfer += $output->writeI64($this->lockid);
$xfer += $output->writeFieldEnd();
}
+ if ($this->txnid !== null) {
+ $xfer += $output->writeFieldBegin('txnid', TType::I64, 2);
+ $xfer += $output->writeI64($this->txnid);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->elapsed_ms !== null) {
+ $xfer += $output->writeFieldBegin('elapsed_ms', TType::I64, 3);
+ $xfer += $output->writeI64($this->elapsed_ms);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -11430,12 +11591,58 @@ class UnlockRequest {
class ShowLocksRequest {
static $_TSPEC;
+ /**
+ * @var string
+ */
+ public $dbname = null;
+ /**
+ * @var string
+ */
+ public $tablename = null;
+ /**
+ * @var string
+ */
+ public $partname = null;
+ /**
+ * @var bool
+ */
+ public $isExtended = false;
- public function __construct() {
+ public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'dbname',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tablename',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'partname',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'isExtended',
+ 'type' => TType::BOOL,
+ ),
);
}
+ if (is_array($vals)) {
+ if (isset($vals['dbname'])) {
+ $this->dbname = $vals['dbname'];
+ }
+ if (isset($vals['tablename'])) {
+ $this->tablename = $vals['tablename'];
+ }
+ if (isset($vals['partname'])) {
+ $this->partname = $vals['partname'];
+ }
+ if (isset($vals['isExtended'])) {
+ $this->isExtended = $vals['isExtended'];
+ }
+ }
}
public function getName() {
@@ -11457,6 +11664,34 @@ class ShowLocksRequest {
}
switch ($fid)
{
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dbname);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tablename);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->partname);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->isExtended);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -11470,6 +11705,26 @@ class ShowLocksRequest {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('ShowLocksRequest');
+ if ($this->dbname !== null) {
+ $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1);
+ $xfer += $output->writeString($this->dbname);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tablename !== null) {
+ $xfer += $output->writeFieldBegin('tablename', TType::STRING, 2);
+ $xfer += $output->writeString($this->tablename);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->partname !== null) {
+ $xfer += $output->writeFieldBegin('partname', TType::STRING, 3);
+ $xfer += $output->writeString($this->partname);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->isExtended !== null) {
+ $xfer += $output->writeFieldBegin('isExtended', TType::BOOL, 4);
+ $xfer += $output->writeBool($this->isExtended);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -11524,6 +11779,26 @@ class ShowLocksResponseElement {
* @var string
*/
public $hostname = null;
+ /**
+ * @var int
+ */
+ public $heartbeatCount = 0;
+ /**
+ * @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)) {
@@ -11572,6 +11847,26 @@ class ShowLocksResponseElement {
'var' => 'hostname',
'type' => TType::STRING,
),
+ 12 => array(
+ 'var' => 'heartbeatCount',
+ 'type' => TType::I32,
+ ),
+ 13 => array(
+ '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)) {
@@ -11608,6 +11903,21 @@ class ShowLocksResponseElement {
if (isset($vals['hostname'])) {
$this->hostname = $vals['hostname'];
}
+ if (isset($vals['heartbeatCount'])) {
+ $this->heartbeatCount = $vals['heartbeatCount'];
+ }
+ 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'];
+ }
}
}
@@ -11707,6 +12017,41 @@ class ShowLocksResponseElement {
$xfer += $input->skip($ftype);
}
break;
+ case 12:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->heartbeatCount);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 13:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->agentInfo);
+ } else {
+ $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;
@@ -11775,6 +12120,31 @@ class ShowLocksResponseElement {
$xfer += $output->writeString($this->hostname);
$xfer += $output->writeFieldEnd();
}
+ if ($this->heartbeatCount !== null) {
+ $xfer += $output->writeFieldBegin('heartbeatCount', TType::I32, 12);
+ $xfer += $output->writeI32($this->heartbeatCount);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->agentInfo !== null) {
+ $xfer += $output->writeFieldBegin('agentInfo', TType::STRING, 13);
+ $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;
@@ -12499,6 +12869,22 @@ class ShowCompactResponseElement {
* @var string
*/
public $runAs = null;
+ /**
+ * @var int
+ */
+ public $hightestTxnId = null;
+ /**
+ * @var string
+ */
+ public $metaInfo = null;
+ /**
+ * @var int
+ */
+ public $endTime = null;
+ /**
+ * @var string
+ */
+ public $hadoopJobId = "None";
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -12535,6 +12921,22 @@ class ShowCompactResponseElement {
'var' => 'runAs',
'type' => TType::STRING,
),
+ 9 => array(
+ 'var' => 'hightestTxnId',
+ 'type' => TType::I64,
+ ),
+ 10 => array(
+ 'var' => 'metaInfo',
+ 'type' => TType::STRING,
+ ),
+ 11 => array(
+ 'var' => 'endTime',
+ 'type' => TType::I64,
+ ),
+ 12 => array(
+ 'var' => 'hadoopJobId',
+ 'type' => TType::STRING,
+ ),
);
}
if (is_array($vals)) {
@@ -12562,6 +12964,18 @@ class ShowCompactResponseElement {
if (isset($vals['runAs'])) {
$this->runAs = $vals['runAs'];
}
+ if (isset($vals['hightestTxnId'])) {
+ $this->hightestTxnId = $vals['hightestTxnId'];
+ }
+ if (isset($vals['metaInfo'])) {
+ $this->metaInfo = $vals['metaInfo'];
+ }
+ if (isset($vals['endTime'])) {
+ $this->endTime = $vals['endTime'];
+ }
+ if (isset($vals['hadoopJobId'])) {
+ $this->hadoopJobId = $vals['hadoopJobId'];
+ }
}
}
@@ -12640,6 +13054,34 @@ class ShowCompactResponseElement {
$xfer += $input->skip($ftype);
}
break;
+ case 9:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->hightestTxnId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->metaInfo);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 11:
+ if ($ftype == TType::I64) {
+ $xfer += $input->readI64($this->endTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 12:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->hadoopJobId);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -12693,6 +13135,26 @@ class ShowCompactResponseElement {
$xfer += $output->writeString($this->runAs);
$xfer += $output->writeFieldEnd();
}
+ if ($this->hightestTxnId !== null) {
+ $xfer += $output->writeFieldBegin('hightestTxnId', TType::I64, 9);
+ $xfer += $output->writeI64($this->hightestTxnId);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->metaInfo !== null) {
+ $xfer += $output->writeFieldBegin('metaInfo', TType::STRING, 10);
+ $xfer += $output->writeString($this->metaInfo);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->endTime !== null) {
+ $xfer += $output->writeFieldBegin('endTime', TType::I64, 11);
+ $xfer += $output->writeI64($this->endTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->hadoopJobId !== null) {
+ $xfer += $output->writeFieldBegin('hadoopJobId', TType::STRING, 12);
+ $xfer += $output->writeString($this->hadoopJobId);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
index ba525ed..51b05a8 100644
--- a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
+++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
@@ -6917,6 +6917,9 @@ class TxnInfo:
- state
- user
- hostname
+ - agentInfo
+ - heartbeatCount
+ - metaInfo
"""
thrift_spec = (
@@ -6925,13 +6928,19 @@ 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
+ (6, TType.I32, 'heartbeatCount', None, 0, ), # 6
+ (7, TType.STRING, 'metaInfo', None, None, ), # 7
)
- 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], heartbeatCount=thrift_spec[6][4], metaInfo=None,):
self.id = id
self.state = state
self.user = user
self.hostname = hostname
+ self.agentInfo = agentInfo
+ self.heartbeatCount = heartbeatCount
+ self.metaInfo = metaInfo
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 +6971,21 @@ class TxnInfo:
self.hostname = iprot.readString()
else:
iprot.skip(ftype)
+ elif fid == 5:
+ if ftype == TType.STRING:
+ self.agentInfo = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 6:
+ if ftype == TType.I32:
+ self.heartbeatCount = iprot.readI32()
+ else:
+ iprot.skip(ftype)
+ elif fid == 7:
+ if ftype == TType.STRING:
+ self.metaInfo = iprot.readString()
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -6988,6 +7012,18 @@ class TxnInfo:
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()
+ if self.heartbeatCount is not None:
+ oprot.writeFieldBegin('heartbeatCount', TType.I32, 6)
+ oprot.writeI32(self.heartbeatCount)
+ oprot.writeFieldEnd()
+ if self.metaInfo is not None:
+ oprot.writeFieldBegin('metaInfo', TType.STRING, 7)
+ oprot.writeString(self.metaInfo)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -7009,6 +7045,9 @@ class TxnInfo:
value = (value * 31) ^ hash(self.state)
value = (value * 31) ^ hash(self.user)
value = (value * 31) ^ hash(self.hostname)
+ value = (value * 31) ^ hash(self.agentInfo)
+ value = (value * 31) ^ hash(self.heartbeatCount)
+ value = (value * 31) ^ hash(self.metaInfo)
return value
def __repr__(self):
@@ -7209,6 +7248,7 @@ class OpenTxnRequest:
- num_txns
- user
- hostname
+ - agentInfo
"""
thrift_spec = (
@@ -7216,12 +7256,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 +7289,11 @@ class OpenTxnRequest:
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 +7316,10 @@ class OpenTxnRequest:
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 +7338,7 @@ class OpenTxnRequest:
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):
@@ -7639,6 +7691,7 @@ class LockRequest:
- txnid
- user
- hostname
+ - agentInfo
"""
thrift_spec = (
@@ -7647,13 +7700,15 @@ class LockRequest:
(2, TType.I64, 'txnid', 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, component=None, txnid=None, user=None, hostname=None,):
+ def __init__(self, component=None, txnid=None, user=None, hostname=None, agentInfo=thrift_spec[5][4],):
self.component = component
self.txnid = txnid
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:
@@ -7690,6 +7745,11 @@ class LockRequest:
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()
@@ -7719,6 +7779,10 @@ class LockRequest:
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()
@@ -7738,6 +7802,7 @@ class LockRequest:
value = (value * 31) ^ hash(self.txnid)
value = (value * 31) ^ hash(self.user)
value = (value * 31) ^ hash(self.hostname)
+ value = (value * 31) ^ hash(self.agentInfo)
return value
def __repr__(self):
@@ -7837,15 +7902,21 @@ class CheckLockRequest:
"""
Attributes:
- lockid
+ - txnid
+ - elapsed_ms
"""
thrift_spec = (
None, # 0
(1, TType.I64, 'lockid', None, None, ), # 1
+ (2, TType.I64, 'txnid', None, None, ), # 2
+ (3, TType.I64, 'elapsed_ms', None, None, ), # 3
)
- def __init__(self, lockid=None,):
+ def __init__(self, lockid=None, txnid=None, elapsed_ms=None,):
self.lockid = lockid
+ self.txnid = txnid
+ self.elapsed_ms = elapsed_ms
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:
@@ -7861,6 +7932,16 @@ class CheckLockRequest:
self.lockid = iprot.readI64()
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.I64:
+ self.txnid = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.I64:
+ self.elapsed_ms = iprot.readI64()
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -7875,6 +7956,14 @@ class CheckLockRequest:
oprot.writeFieldBegin('lockid', TType.I64, 1)
oprot.writeI64(self.lockid)
oprot.writeFieldEnd()
+ if self.txnid is not None:
+ oprot.writeFieldBegin('txnid', TType.I64, 2)
+ oprot.writeI64(self.txnid)
+ oprot.writeFieldEnd()
+ if self.elapsed_ms is not None:
+ oprot.writeFieldBegin('elapsed_ms', TType.I64, 3)
+ oprot.writeI64(self.elapsed_ms)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -7887,6 +7976,8 @@ class CheckLockRequest:
def __hash__(self):
value = 17
value = (value * 31) ^ hash(self.lockid)
+ value = (value * 31) ^ hash(self.txnid)
+ value = (value * 31) ^ hash(self.elapsed_ms)
return value
def __repr__(self):
@@ -7968,10 +8059,28 @@ class UnlockRequest:
return not (self == other)
class ShowLocksRequest:
+ """
+ Attributes:
+ - dbname
+ - tablename
+ - partname
+ - isExtended
+ """
thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'dbname', None, None, ), # 1
+ (2, TType.STRING, 'tablename', None, None, ), # 2
+ (3, TType.STRING, 'partname', None, None, ), # 3
+ (4, TType.BOOL, 'isExtended', None, False, ), # 4
)
+ def __init__(self, dbname=None, tablename=None, partname=None, isExtended=thrift_spec[4][4],):
+ self.dbname = dbname
+ self.tablename = tablename
+ self.partname = partname
+ self.isExtended = isExtended
+
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:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
@@ -7981,6 +8090,26 @@ class ShowLocksRequest:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.dbname = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.tablename = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRING:
+ self.partname = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 4:
+ if ftype == TType.BOOL:
+ self.isExtended = iprot.readBool()
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -7991,6 +8120,22 @@ class ShowLocksRequest:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('ShowLocksRequest')
+ if self.dbname is not None:
+ oprot.writeFieldBegin('dbname', TType.STRING, 1)
+ oprot.writeString(self.dbname)
+ oprot.writeFieldEnd()
+ if self.tablename is not None:
+ oprot.writeFieldBegin('tablename', TType.STRING, 2)
+ oprot.writeString(self.tablename)
+ oprot.writeFieldEnd()
+ if self.partname is not None:
+ oprot.writeFieldBegin('partname', TType.STRING, 3)
+ oprot.writeString(self.partname)
+ oprot.writeFieldEnd()
+ if self.isExtended is not None:
+ oprot.writeFieldBegin('isExtended', TType.BOOL, 4)
+ oprot.writeBool(self.isExtended)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -8000,6 +8145,10 @@ class ShowLocksRequest:
def __hash__(self):
value = 17
+ value = (value * 31) ^ hash(self.dbname)
+ value = (value * 31) ^ hash(self.tablename)
+ value = (value * 31) ^ hash(self.partname)
+ value = (value * 31) ^ hash(self.isExtended)
return value
def __repr__(self):
@@ -8027,6 +8176,11 @@ class ShowLocksResponseElement:
- acquiredat
- user
- hostname
+ - heartbeatCount
+ - agentInfo
+ - blockedByExtId
+ - blockedByIntId
+ - lockIdInternal
"""
thrift_spec = (
@@ -8042,9 +8196,14 @@ class ShowLocksResponseElement:
(9, TType.I64, 'acquiredat', None, None, ), # 9
(10, TType.STRING, 'user', None, None, ), # 10
(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,):
+ 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
@@ -8056,6 +8215,11 @@ class ShowLocksResponseElement:
self.acquiredat = acquiredat
self.user = user
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:
@@ -8121,6 +8285,31 @@ class ShowLocksResponseElement:
self.hostname = iprot.readString()
else:
iprot.skip(ftype)
+ elif fid == 12:
+ if ftype == TType.I32:
+ self.heartbeatCount = iprot.readI32()
+ else:
+ iprot.skip(ftype)
+ elif fid == 13:
+ if ftype == TType.STRING:
+ 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()
@@ -8175,6 +8364,26 @@ class ShowLocksResponseElement:
oprot.writeFieldBegin('hostname', TType.STRING, 11)
oprot.writeString(self.hostname)
oprot.writeFieldEnd()
+ if self.heartbeatCount is not None:
+ oprot.writeFieldBegin('heartbeatCount', TType.I32, 12)
+ oprot.writeI32(self.heartbeatCount)
+ oprot.writeFieldEnd()
+ if self.agentInfo is not None:
+ 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()
@@ -8209,6 +8418,11 @@ class ShowLocksResponseElement:
value = (value * 31) ^ hash(self.acquiredat)
value = (value * 31) ^ hash(self.user)
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):
@@ -8734,6 +8948,10 @@ class ShowCompactResponseElement:
- workerid
- start
- runAs
+ - hightestTxnId
+ - metaInfo
+ - endTime
+ - hadoopJobId
"""
thrift_spec = (
@@ -8746,9 +8964,13 @@ class ShowCompactResponseElement:
(6, TType.STRING, 'workerid', None, None, ), # 6
(7, TType.I64, 'start', None, None, ), # 7
(8, TType.STRING, 'runAs', None, None, ), # 8
+ (9, TType.I64, 'hightestTxnId', None, None, ), # 9
+ (10, TType.STRING, 'metaInfo', None, None, ), # 10
+ (11, TType.I64, 'endTime', None, None, ), # 11
+ (12, TType.STRING, 'hadoopJobId', None, "None", ), # 12
)
- def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, state=None, workerid=None, start=None, runAs=None,):
+ def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, state=None, workerid=None, start=None, runAs=None, hightestTxnId=None, metaInfo=None, endTime=None, hadoopJobId=thrift_spec[12][4],):
self.dbname = dbname
self.tablename = tablename
self.partitionname = partitionname
@@ -8757,6 +8979,10 @@ class ShowCompactResponseElement:
self.workerid = workerid
self.start = start
self.runAs = runAs
+ self.hightestTxnId = hightestTxnId
+ self.metaInfo = metaInfo
+ self.endTime = endTime
+ self.hadoopJobId = hadoopJobId
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:
@@ -8807,6 +9033,26 @@ class ShowCompactResponseElement:
self.runAs = iprot.readString()
else:
iprot.skip(ftype)
+ elif fid == 9:
+ if ftype == TType.I64:
+ self.hightestTxnId = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 10:
+ if ftype == TType.STRING:
+ self.metaInfo = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ elif fid == 11:
+ if ftype == TType.I64:
+ self.endTime = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 12:
+ if ftype == TType.STRING:
+ self.hadoopJobId = iprot.readString()
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -8849,6 +9095,22 @@ class ShowCompactResponseElement:
oprot.writeFieldBegin('runAs', TType.STRING, 8)
oprot.writeString(self.runAs)
oprot.writeFieldEnd()
+ if self.hightestTxnId is not None:
+ oprot.writeFieldBegin('hightestTxnId', TType.I64, 9)
+ oprot.writeI64(self.hightestTxnId)
+ oprot.writeFieldEnd()
+ if self.metaInfo is not None:
+ oprot.writeFieldBegin('metaInfo', TType.STRING, 10)
+ oprot.writeString(self.metaInfo)
+ oprot.writeFieldEnd()
+ if self.endTime is not None:
+ oprot.writeFieldBegin('endTime', TType.I64, 11)
+ oprot.writeI64(self.endTime)
+ oprot.writeFieldEnd()
+ if self.hadoopJobId is not None:
+ oprot.writeFieldBegin('hadoopJobId', TType.STRING, 12)
+ oprot.writeString(self.hadoopJobId)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -8874,6 +9136,10 @@ class ShowCompactResponseElement:
value = (value * 31) ^ hash(self.workerid)
value = (value * 31) ^ hash(self.start)
value = (value * 31) ^ hash(self.runAs)
+ value = (value * 31) ^ hash(self.hightestTxnId)
+ value = (value * 31) ^ hash(self.metaInfo)
+ value = (value * 31) ^ hash(self.endTime)
+ value = (value * 31) ^ hash(self.hadoopJobId)
return value
def __repr__(self):
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb b/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
index f943f2d..48767ff 100644
--- a/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
+++ b/metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
@@ -1558,12 +1558,18 @@ class TxnInfo
STATE = 2
USER = 3
HOSTNAME = 4
+ AGENTINFO = 5
+ HEARTBEATCOUNT = 6
+ METAINFO = 7
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},
+ HEARTBEATCOUNT => {:type => ::Thrift::Types::I32, :name => 'heartbeatCount', :default => 0, :optional => true},
+ METAINFO => {:type => ::Thrift::Types::STRING, :name => 'metaInfo', :optional => true}
}
def struct_fields; FIELDS; end
@@ -1626,11 +1632,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
@@ -1734,12 +1742,14 @@ class LockRequest
TXNID = 2
USER = 3
HOSTNAME = 4
+ AGENTINFO = 5
FIELDS = {
COMPONENT => {:type => ::Thrift::Types::LIST, :name => 'component', :element => {:type => ::Thrift::Types::STRUCT, :class => ::LockComponent}},
TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true},
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
@@ -1779,9 +1789,13 @@ end
class CheckLockRequest
include ::Thrift::Struct, ::Thrift::Struct_Union
LOCKID = 1
+ TXNID = 2
+ ELAPSED_MS = 3
FIELDS = {
- LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'}
+ LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'},
+ TXNID => {:type => ::Thrift::Types::I64, :name => 'txnid', :optional => true},
+ ELAPSED_MS => {:type => ::Thrift::Types::I64, :name => 'elapsed_ms', :optional => true}
}
def struct_fields; FIELDS; end
@@ -1812,9 +1826,16 @@ end
class ShowLocksRequest
include ::Thrift::Struct, ::Thrift::Struct_Union
+ DBNAME = 1
+ TABLENAME = 2
+ PARTNAME = 3
+ ISEXTENDED = 4
FIELDS = {
-
+ DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname', :optional => true},
+ TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename', :optional => true},
+ PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partname', :optional => true},
+ ISEXTENDED => {:type => ::Thrift::Types::BOOL, :name => 'isExtended', :default => false, :optional => true}
}
def struct_fields; FIELDS; end
@@ -1838,6 +1859,11 @@ class ShowLocksResponseElement
ACQUIREDAT = 9
USER = 10
HOSTNAME = 11
+ HEARTBEATCOUNT = 12
+ AGENTINFO = 13
+ BLOCKEDBYEXTID = 14
+ BLOCKEDBYINTID = 15
+ LOCKIDINTERNAL = 16
FIELDS = {
LOCKID => {:type => ::Thrift::Types::I64, :name => 'lockid'},
@@ -1850,7 +1876,12 @@ class ShowLocksResponseElement
LASTHEARTBEAT => {:type => ::Thrift::Types::I64, :name => 'lastheartbeat'},
ACQUIREDAT => {:type => ::Thrift::Types::I64, :name => 'acquiredat', :optional => true},
USER => {:type => ::Thrift::Types::STRING, :name => 'user'},
- HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'}
+ 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},
+ 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
@@ -2003,6 +2034,10 @@ class ShowCompactResponseElement
WORKERID = 6
START = 7
RUNAS = 8
+ HIGHTESTTXNID = 9
+ METAINFO = 10
+ ENDTIME = 11
+ HADOOPJOBID = 12
FIELDS = {
DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'},
@@ -2012,7 +2047,11 @@ class ShowCompactResponseElement
STATE => {:type => ::Thrift::Types::STRING, :name => 'state'},
WORKERID => {:type => ::Thrift::Types::STRING, :name => 'workerid', :optional => true},
START => {:type => ::Thrift::Types::I64, :name => 'start', :optional => true},
- RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runAs', :optional => true}
+ RUNAS => {:type => ::Thrift::Types::STRING, :name => 'runAs', :optional => true},
+ HIGHTESTTXNID => {:type => ::Thrift::Types::I64, :name => 'hightestTxnId', :optional => true},
+ METAINFO => {:type => ::Thrift::Types::STRING, :name => 'metaInfo', :optional => true},
+ ENDTIME => {:type => ::Thrift::Types::I64, :name => 'endTime', :optional => true},
+ HADOOPJOBID => {:type => ::Thrift::Types::STRING, :name => 'hadoopJobId', :default => %q"None", :optional => true}
}
def struct_fields; FIELDS; end
[3/5] hive git commit: HIVE-12832 thrift and RDBMS changes for ACID
fixes, branch-2.0 version
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/hive-txn-schema-1.3.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/hive-txn-schema-1.3.0.postgres.sql b/metastore/scripts/upgrade/postgres/hive-txn-schema-1.3.0.postgres.sql
new file mode 100644
index 0000000..b2fc1a8
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/hive-txn-schema-1.3.0.postgres.sql
@@ -0,0 +1,121 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+--
+-- Tables for transaction management
+--
+
+CREATE TABLE TXNS (
+ TXN_ID bigint PRIMARY KEY,
+ TXN_STATE char(1) NOT NULL,
+ TXN_STARTED bigint NOT NULL,
+ TXN_LAST_HEARTBEAT bigint NOT NULL,
+ TXN_USER varchar(128) NOT NULL,
+ TXN_HOST varchar(128) NOT NULL,
+ TXN_AGENT_INFO varchar(128),
+ TXN_META_INFO varchar(128),
+ TXN_HEARTBEAT_COUNT integer
+);
+
+CREATE TABLE TXN_COMPONENTS (
+ TC_TXNID bigint REFERENCES TXNS (TXN_ID),
+ TC_DATABASE varchar(128) NOT NULL,
+ TC_TABLE varchar(128),
+ TC_PARTITION varchar(767) DEFAULT NULL
+);
+
+CREATE TABLE COMPLETED_TXN_COMPONENTS (
+ CTC_TXNID bigint,
+ CTC_DATABASE varchar(128) NOT NULL,
+ CTC_TABLE varchar(128),
+ CTC_PARTITION varchar(767)
+);
+
+CREATE TABLE NEXT_TXN_ID (
+ NTXN_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_TXN_ID VALUES(1);
+
+CREATE TABLE HIVE_LOCKS (
+ HL_LOCK_EXT_ID bigint NOT NULL,
+ HL_LOCK_INT_ID bigint NOT NULL,
+ HL_TXNID bigint,
+ HL_DB varchar(128) NOT NULL,
+ HL_TABLE varchar(128),
+ HL_PARTITION varchar(767) DEFAULT NULL,
+ HL_LOCK_STATE char(1) NOT NULL,
+ HL_LOCK_TYPE char(1) NOT NULL,
+ HL_LAST_HEARTBEAT bigint NOT NULL,
+ HL_ACQUIRED_AT bigint,
+ HL_USER varchar(128) NOT NULL,
+ 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)
+);
+
+CREATE INDEX HL_TXNID_INDEX ON HIVE_LOCKS USING hash (HL_TXNID);
+
+CREATE TABLE NEXT_LOCK_ID (
+ NL_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_LOCK_ID VALUES(1);
+
+CREATE TABLE COMPACTION_QUEUE (
+ CQ_ID bigint PRIMARY KEY,
+ CQ_DATABASE varchar(128) NOT NULL,
+ CQ_TABLE varchar(128) NOT NULL,
+ CQ_PARTITION varchar(767),
+ CQ_STATE char(1) NOT NULL,
+ CQ_TYPE char(1) NOT NULL,
+ CQ_WORKER_ID varchar(128),
+ CQ_START bigint,
+ CQ_RUN_AS varchar(128),
+ CQ_HIGHEST_TXN_ID bigint,
+ CQ_META_INFO bytea,
+ CQ_HADOOP_JOB_ID varchar(32)
+);
+
+CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
+ NCQ_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
+
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START bigint,
+ CC_END bigint,
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID bigint,
+ CC_META_INFO bytea,
+ CC_HADOOP_JOB_ID varchar(32)
+);
+
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT varchar(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+);
+
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/hive-txn-schema-2.0.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/hive-txn-schema-2.0.0.postgres.sql b/metastore/scripts/upgrade/postgres/hive-txn-schema-2.0.0.postgres.sql
new file mode 100644
index 0000000..b2fc1a8
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/hive-txn-schema-2.0.0.postgres.sql
@@ -0,0 +1,121 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+--
+-- Tables for transaction management
+--
+
+CREATE TABLE TXNS (
+ TXN_ID bigint PRIMARY KEY,
+ TXN_STATE char(1) NOT NULL,
+ TXN_STARTED bigint NOT NULL,
+ TXN_LAST_HEARTBEAT bigint NOT NULL,
+ TXN_USER varchar(128) NOT NULL,
+ TXN_HOST varchar(128) NOT NULL,
+ TXN_AGENT_INFO varchar(128),
+ TXN_META_INFO varchar(128),
+ TXN_HEARTBEAT_COUNT integer
+);
+
+CREATE TABLE TXN_COMPONENTS (
+ TC_TXNID bigint REFERENCES TXNS (TXN_ID),
+ TC_DATABASE varchar(128) NOT NULL,
+ TC_TABLE varchar(128),
+ TC_PARTITION varchar(767) DEFAULT NULL
+);
+
+CREATE TABLE COMPLETED_TXN_COMPONENTS (
+ CTC_TXNID bigint,
+ CTC_DATABASE varchar(128) NOT NULL,
+ CTC_TABLE varchar(128),
+ CTC_PARTITION varchar(767)
+);
+
+CREATE TABLE NEXT_TXN_ID (
+ NTXN_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_TXN_ID VALUES(1);
+
+CREATE TABLE HIVE_LOCKS (
+ HL_LOCK_EXT_ID bigint NOT NULL,
+ HL_LOCK_INT_ID bigint NOT NULL,
+ HL_TXNID bigint,
+ HL_DB varchar(128) NOT NULL,
+ HL_TABLE varchar(128),
+ HL_PARTITION varchar(767) DEFAULT NULL,
+ HL_LOCK_STATE char(1) NOT NULL,
+ HL_LOCK_TYPE char(1) NOT NULL,
+ HL_LAST_HEARTBEAT bigint NOT NULL,
+ HL_ACQUIRED_AT bigint,
+ HL_USER varchar(128) NOT NULL,
+ 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)
+);
+
+CREATE INDEX HL_TXNID_INDEX ON HIVE_LOCKS USING hash (HL_TXNID);
+
+CREATE TABLE NEXT_LOCK_ID (
+ NL_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_LOCK_ID VALUES(1);
+
+CREATE TABLE COMPACTION_QUEUE (
+ CQ_ID bigint PRIMARY KEY,
+ CQ_DATABASE varchar(128) NOT NULL,
+ CQ_TABLE varchar(128) NOT NULL,
+ CQ_PARTITION varchar(767),
+ CQ_STATE char(1) NOT NULL,
+ CQ_TYPE char(1) NOT NULL,
+ CQ_WORKER_ID varchar(128),
+ CQ_START bigint,
+ CQ_RUN_AS varchar(128),
+ CQ_HIGHEST_TXN_ID bigint,
+ CQ_META_INFO bytea,
+ CQ_HADOOP_JOB_ID varchar(32)
+);
+
+CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
+ NCQ_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
+
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START bigint,
+ CC_END bigint,
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID bigint,
+ CC_META_INFO bytea,
+ CC_HADOOP_JOB_ID varchar(32)
+);
+
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT varchar(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+);
+
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-1.3.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-1.3.0.postgres.sql b/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-1.3.0.postgres.sql
index b1ec241..6eb5620 100644
--- a/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-1.3.0.postgres.sql
+++ b/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-1.3.0.postgres.sql
@@ -1,6 +1,16 @@
SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0';
\i 021-HIVE-11970.postgres.sql;
+\i 022-HIVE-12807.postgres.sql;
+\i 023-HIVE-12814.postgres.sql;
+\i 024-HIVE-12816.postgres.sql;
+\i 025-HIVE-12818.postgres.sql;
+\i 026-HIVE-12819.postgres.sql;
+\i 027-HIVE-12821.postgres.sql;
+\i 028-HIVE-12822.postgres.sql;
+\i 029-HIVE-12823.postgres.sql;
+\i 030-HIVE-12831.postgres.sql;
+\i 031-HIVE-12832.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';
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-2.0.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-2.0.0.postgres.sql b/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-2.0.0.postgres.sql
index 628444c..77438c9 100644
--- a/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-2.0.0.postgres.sql
+++ b/metastore/scripts/upgrade/postgres/upgrade-1.2.0-to-2.0.0.postgres.sql
@@ -1,6 +1,16 @@
SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0';
\i 021-HIVE-11970.postgres.sql;
+\i 022-HIVE-12807.postgres.sql;
+\i 023-HIVE-12814.postgres.sql;
+\i 024-HIVE-12816.postgres.sql;
+\i 025-HIVE-12818.postgres.sql;
+\i 026-HIVE-12819.postgres.sql;
+\i 027-HIVE-12821.postgres.sql;
+\i 028-HIVE-12822.postgres.sql;
+\i 029-HIVE-12823.postgres.sql;
+\i 030-HIVE-12831.postgres.sql;
+\i 031-HIVE-12832.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';
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
index ee28d0d..d81b264 100644
--- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
+++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
@@ -9975,6 +9975,21 @@ 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;
+}
+
+void TxnInfo::__set_heartbeatCount(const int32_t val) {
+ this->heartbeatCount = val;
+__isset.heartbeatCount = true;
+}
+
+void TxnInfo::__set_metaInfo(const std::string& val) {
+ this->metaInfo = val;
+__isset.metaInfo = true;
+}
+
uint32_t TxnInfo::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -10034,6 +10049,30 @@ 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;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->heartbeatCount);
+ this->__isset.heartbeatCount = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 7:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->metaInfo);
+ this->__isset.metaInfo = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -10075,6 +10114,21 @@ 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();
+ }
+ if (this->__isset.heartbeatCount) {
+ xfer += oprot->writeFieldBegin("heartbeatCount", ::apache::thrift::protocol::T_I32, 6);
+ xfer += oprot->writeI32(this->heartbeatCount);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.metaInfo) {
+ xfer += oprot->writeFieldBegin("metaInfo", ::apache::thrift::protocol::T_STRING, 7);
+ xfer += oprot->writeString(this->metaInfo);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -10086,6 +10140,10 @@ 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.heartbeatCount, b.heartbeatCount);
+ swap(a.metaInfo, b.metaInfo);
+ swap(a.__isset, b.__isset);
}
TxnInfo::TxnInfo(const TxnInfo& other465) {
@@ -10093,12 +10151,20 @@ TxnInfo::TxnInfo(const TxnInfo& other465) {
state = other465.state;
user = other465.user;
hostname = other465.hostname;
+ agentInfo = other465.agentInfo;
+ heartbeatCount = other465.heartbeatCount;
+ metaInfo = other465.metaInfo;
+ __isset = other465.__isset;
}
TxnInfo& TxnInfo::operator=(const TxnInfo& other466) {
id = other466.id;
state = other466.state;
user = other466.user;
hostname = other466.hostname;
+ agentInfo = other466.agentInfo;
+ heartbeatCount = other466.heartbeatCount;
+ metaInfo = other466.metaInfo;
+ __isset = other466.__isset;
return *this;
}
void TxnInfo::printTo(std::ostream& out) const {
@@ -10108,6 +10174,9 @@ 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 << "<null>"));
+ out << ", " << "heartbeatCount="; (__isset.heartbeatCount ? (out << to_string(heartbeatCount)) : (out << "<null>"));
+ out << ", " << "metaInfo="; (__isset.metaInfo ? (out << to_string(metaInfo)) : (out << "<null>"));
out << ")";
}
@@ -10387,6 +10456,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 +10509,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 +10552,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 +10567,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 +10592,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 << "<null>"));
out << ")";
}
@@ -10985,6 +11079,11 @@ void LockRequest::__set_hostname(const std::string& val) {
this->hostname = val;
}
+void LockRequest::__set_agentInfo(const std::string& val) {
+ this->agentInfo = val;
+__isset.agentInfo = true;
+}
+
uint32_t LockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -11053,6 +11152,14 @@ uint32_t LockRequest::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;
@@ -11101,6 +11208,11 @@ uint32_t LockRequest::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;
@@ -11112,6 +11224,7 @@ void swap(LockRequest &a, LockRequest &b) {
swap(a.txnid, b.txnid);
swap(a.user, b.user);
swap(a.hostname, b.hostname);
+ swap(a.agentInfo, b.agentInfo);
swap(a.__isset, b.__isset);
}
@@ -11120,6 +11233,7 @@ LockRequest::LockRequest(const LockRequest& other508) {
txnid = other508.txnid;
user = other508.user;
hostname = other508.hostname;
+ agentInfo = other508.agentInfo;
__isset = other508.__isset;
}
LockRequest& LockRequest::operator=(const LockRequest& other509) {
@@ -11127,6 +11241,7 @@ LockRequest& LockRequest::operator=(const LockRequest& other509) {
txnid = other509.txnid;
user = other509.user;
hostname = other509.hostname;
+ agentInfo = other509.agentInfo;
__isset = other509.__isset;
return *this;
}
@@ -11137,6 +11252,7 @@ void LockRequest::printTo(std::ostream& out) const {
out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "<null>"));
out << ", " << "user=" << to_string(user);
out << ", " << "hostname=" << to_string(hostname);
+ out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "<null>"));
out << ")";
}
@@ -11260,6 +11376,16 @@ void CheckLockRequest::__set_lockid(const int64_t val) {
this->lockid = val;
}
+void CheckLockRequest::__set_txnid(const int64_t val) {
+ this->txnid = val;
+__isset.txnid = true;
+}
+
+void CheckLockRequest::__set_elapsed_ms(const int64_t val) {
+ this->elapsed_ms = val;
+__isset.elapsed_ms = true;
+}
+
uint32_t CheckLockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -11290,6 +11416,22 @@ uint32_t CheckLockRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
xfer += iprot->skip(ftype);
}
break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->txnid);
+ this->__isset.txnid = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->elapsed_ms);
+ this->__isset.elapsed_ms = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -11313,6 +11455,16 @@ uint32_t CheckLockRequest::write(::apache::thrift::protocol::TProtocol* oprot) c
xfer += oprot->writeI64(this->lockid);
xfer += oprot->writeFieldEnd();
+ if (this->__isset.txnid) {
+ xfer += oprot->writeFieldBegin("txnid", ::apache::thrift::protocol::T_I64, 2);
+ xfer += oprot->writeI64(this->txnid);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.elapsed_ms) {
+ xfer += oprot->writeFieldBegin("elapsed_ms", ::apache::thrift::protocol::T_I64, 3);
+ xfer += oprot->writeI64(this->elapsed_ms);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -11321,19 +11473,30 @@ uint32_t CheckLockRequest::write(::apache::thrift::protocol::TProtocol* oprot) c
void swap(CheckLockRequest &a, CheckLockRequest &b) {
using ::std::swap;
swap(a.lockid, b.lockid);
+ swap(a.txnid, b.txnid);
+ swap(a.elapsed_ms, b.elapsed_ms);
+ swap(a.__isset, b.__isset);
}
CheckLockRequest::CheckLockRequest(const CheckLockRequest& other513) {
lockid = other513.lockid;
+ txnid = other513.txnid;
+ elapsed_ms = other513.elapsed_ms;
+ __isset = other513.__isset;
}
CheckLockRequest& CheckLockRequest::operator=(const CheckLockRequest& other514) {
lockid = other514.lockid;
+ txnid = other514.txnid;
+ elapsed_ms = other514.elapsed_ms;
+ __isset = other514.__isset;
return *this;
}
void CheckLockRequest::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
out << "CheckLockRequest(";
out << "lockid=" << to_string(lockid);
+ out << ", " << "txnid="; (__isset.txnid ? (out << to_string(txnid)) : (out << "<null>"));
+ out << ", " << "elapsed_ms="; (__isset.elapsed_ms ? (out << to_string(elapsed_ms)) : (out << "<null>"));
out << ")";
}
@@ -11428,6 +11591,26 @@ ShowLocksRequest::~ShowLocksRequest() throw() {
}
+void ShowLocksRequest::__set_dbname(const std::string& val) {
+ this->dbname = val;
+__isset.dbname = true;
+}
+
+void ShowLocksRequest::__set_tablename(const std::string& val) {
+ this->tablename = val;
+__isset.tablename = true;
+}
+
+void ShowLocksRequest::__set_partname(const std::string& val) {
+ this->partname = val;
+__isset.partname = true;
+}
+
+void ShowLocksRequest::__set_isExtended(const bool val) {
+ this->isExtended = val;
+__isset.isExtended = true;
+}
+
uint32_t ShowLocksRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -11447,7 +11630,44 @@ uint32_t ShowLocksRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
if (ftype == ::apache::thrift::protocol::T_STOP) {
break;
}
- xfer += iprot->skip(ftype);
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->dbname);
+ this->__isset.dbname = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->tablename);
+ this->__isset.tablename = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->partname);
+ this->__isset.partname = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->isExtended);
+ this->__isset.isExtended = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
xfer += iprot->readFieldEnd();
}
@@ -11461,6 +11681,26 @@ uint32_t ShowLocksRequest::write(::apache::thrift::protocol::TProtocol* oprot) c
apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
xfer += oprot->writeStructBegin("ShowLocksRequest");
+ if (this->__isset.dbname) {
+ xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->dbname);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.tablename) {
+ xfer += oprot->writeFieldBegin("tablename", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->tablename);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.partname) {
+ xfer += oprot->writeFieldBegin("partname", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->partname);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.isExtended) {
+ xfer += oprot->writeFieldBegin("isExtended", ::apache::thrift::protocol::T_BOOL, 4);
+ xfer += oprot->writeBool(this->isExtended);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -11468,20 +11708,35 @@ uint32_t ShowLocksRequest::write(::apache::thrift::protocol::TProtocol* oprot) c
void swap(ShowLocksRequest &a, ShowLocksRequest &b) {
using ::std::swap;
- (void) a;
- (void) b;
+ swap(a.dbname, b.dbname);
+ swap(a.tablename, b.tablename);
+ swap(a.partname, b.partname);
+ swap(a.isExtended, b.isExtended);
+ swap(a.__isset, b.__isset);
}
ShowLocksRequest::ShowLocksRequest(const ShowLocksRequest& other517) {
- (void) other517;
+ dbname = other517.dbname;
+ tablename = other517.tablename;
+ partname = other517.partname;
+ isExtended = other517.isExtended;
+ __isset = other517.__isset;
}
ShowLocksRequest& ShowLocksRequest::operator=(const ShowLocksRequest& other518) {
- (void) other518;
+ dbname = other518.dbname;
+ tablename = other518.tablename;
+ partname = other518.partname;
+ isExtended = other518.isExtended;
+ __isset = other518.__isset;
return *this;
}
void ShowLocksRequest::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
out << "ShowLocksRequest(";
+ out << "dbname="; (__isset.dbname ? (out << to_string(dbname)) : (out << "<null>"));
+ out << ", " << "tablename="; (__isset.tablename ? (out << to_string(tablename)) : (out << "<null>"));
+ out << ", " << "partname="; (__isset.partname ? (out << to_string(partname)) : (out << "<null>"));
+ out << ", " << "isExtended="; (__isset.isExtended ? (out << to_string(isExtended)) : (out << "<null>"));
out << ")";
}
@@ -11538,6 +11793,31 @@ void ShowLocksResponseElement::__set_hostname(const std::string& val) {
this->hostname = val;
}
+void ShowLocksResponseElement::__set_heartbeatCount(const int32_t val) {
+ this->heartbeatCount = val;
+__isset.heartbeatCount = true;
+}
+
+void ShowLocksResponseElement::__set_agentInfo(const std::string& val) {
+ this->agentInfo = 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);
@@ -11658,6 +11938,46 @@ uint32_t ShowLocksResponseElement::read(::apache::thrift::protocol::TProtocol* i
xfer += iprot->skip(ftype);
}
break;
+ case 12:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->heartbeatCount);
+ this->__isset.heartbeatCount = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 13:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->agentInfo);
+ this->__isset.agentInfo = true;
+ } else {
+ 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;
@@ -11737,6 +12057,31 @@ uint32_t ShowLocksResponseElement::write(::apache::thrift::protocol::TProtocol*
xfer += oprot->writeString(this->hostname);
xfer += oprot->writeFieldEnd();
+ if (this->__isset.heartbeatCount) {
+ xfer += oprot->writeFieldBegin("heartbeatCount", ::apache::thrift::protocol::T_I32, 12);
+ xfer += oprot->writeI32(this->heartbeatCount);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.agentInfo) {
+ xfer += oprot->writeFieldBegin("agentInfo", ::apache::thrift::protocol::T_STRING, 13);
+ 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;
@@ -11755,6 +12100,11 @@ void swap(ShowLocksResponseElement &a, ShowLocksResponseElement &b) {
swap(a.acquiredat, b.acquiredat);
swap(a.user, b.user);
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);
}
@@ -11770,6 +12120,11 @@ ShowLocksResponseElement::ShowLocksResponseElement(const ShowLocksResponseElemen
acquiredat = other521.acquiredat;
user = other521.user;
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) {
@@ -11784,6 +12139,11 @@ ShowLocksResponseElement& ShowLocksResponseElement::operator=(const ShowLocksRes
acquiredat = other522.acquiredat;
user = other522.user;
hostname = other522.hostname;
+ heartbeatCount = other522.heartbeatCount;
+ agentInfo = other522.agentInfo;
+ blockedByExtId = other522.blockedByExtId;
+ blockedByIntId = other522.blockedByIntId;
+ lockIdInternal = other522.lockIdInternal;
__isset = other522.__isset;
return *this;
}
@@ -11801,6 +12161,11 @@ void ShowLocksResponseElement::printTo(std::ostream& out) const {
out << ", " << "acquiredat="; (__isset.acquiredat ? (out << to_string(acquiredat)) : (out << "<null>"));
out << ", " << "user=" << to_string(user);
out << ", " << "hostname=" << to_string(hostname);
+ out << ", " << "heartbeatCount="; (__isset.heartbeatCount ? (out << to_string(heartbeatCount)) : (out << "<null>"));
+ out << ", " << "agentInfo="; (__isset.agentInfo ? (out << to_string(agentInfo)) : (out << "<null>"));
+ out << ", " << "blockedByExtId="; (__isset.blockedByExtId ? (out << to_string(blockedByExtId)) : (out << "<null>"));
+ out << ", " << "blockedByIntId="; (__isset.blockedByIntId ? (out << to_string(blockedByIntId)) : (out << "<null>"));
+ out << ", " << "lockIdInternal="; (__isset.lockIdInternal ? (out << to_string(lockIdInternal)) : (out << "<null>"));
out << ")";
}
@@ -12564,6 +12929,26 @@ void ShowCompactResponseElement::__set_runAs(const std::string& val) {
__isset.runAs = true;
}
+void ShowCompactResponseElement::__set_hightestTxnId(const int64_t val) {
+ this->hightestTxnId = val;
+__isset.hightestTxnId = true;
+}
+
+void ShowCompactResponseElement::__set_metaInfo(const std::string& val) {
+ this->metaInfo = val;
+__isset.metaInfo = true;
+}
+
+void ShowCompactResponseElement::__set_endTime(const int64_t val) {
+ this->endTime = val;
+__isset.endTime = true;
+}
+
+void ShowCompactResponseElement::__set_hadoopJobId(const std::string& val) {
+ this->hadoopJobId = val;
+__isset.hadoopJobId = true;
+}
+
uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -12655,6 +13040,38 @@ uint32_t ShowCompactResponseElement::read(::apache::thrift::protocol::TProtocol*
xfer += iprot->skip(ftype);
}
break;
+ case 9:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->hightestTxnId);
+ this->__isset.hightestTxnId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 10:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->metaInfo);
+ this->__isset.metaInfo = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 11:
+ if (ftype == ::apache::thrift::protocol::T_I64) {
+ xfer += iprot->readI64(this->endTime);
+ this->__isset.endTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 12:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->hadoopJobId);
+ this->__isset.hadoopJobId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -12716,6 +13133,26 @@ uint32_t ShowCompactResponseElement::write(::apache::thrift::protocol::TProtocol
xfer += oprot->writeString(this->runAs);
xfer += oprot->writeFieldEnd();
}
+ if (this->__isset.hightestTxnId) {
+ xfer += oprot->writeFieldBegin("hightestTxnId", ::apache::thrift::protocol::T_I64, 9);
+ xfer += oprot->writeI64(this->hightestTxnId);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.metaInfo) {
+ xfer += oprot->writeFieldBegin("metaInfo", ::apache::thrift::protocol::T_STRING, 10);
+ xfer += oprot->writeString(this->metaInfo);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.endTime) {
+ xfer += oprot->writeFieldBegin("endTime", ::apache::thrift::protocol::T_I64, 11);
+ xfer += oprot->writeI64(this->endTime);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.hadoopJobId) {
+ xfer += oprot->writeFieldBegin("hadoopJobId", ::apache::thrift::protocol::T_STRING, 12);
+ xfer += oprot->writeString(this->hadoopJobId);
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -12731,6 +13168,10 @@ void swap(ShowCompactResponseElement &a, ShowCompactResponseElement &b) {
swap(a.workerid, b.workerid);
swap(a.start, b.start);
swap(a.runAs, b.runAs);
+ swap(a.hightestTxnId, b.hightestTxnId);
+ swap(a.metaInfo, b.metaInfo);
+ swap(a.endTime, b.endTime);
+ swap(a.hadoopJobId, b.hadoopJobId);
swap(a.__isset, b.__isset);
}
@@ -12743,6 +13184,10 @@ ShowCompactResponseElement::ShowCompactResponseElement(const ShowCompactResponse
workerid = other557.workerid;
start = other557.start;
runAs = other557.runAs;
+ hightestTxnId = other557.hightestTxnId;
+ metaInfo = other557.metaInfo;
+ endTime = other557.endTime;
+ hadoopJobId = other557.hadoopJobId;
__isset = other557.__isset;
}
ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowCompactResponseElement& other558) {
@@ -12754,6 +13199,10 @@ ShowCompactResponseElement& ShowCompactResponseElement::operator=(const ShowComp
workerid = other558.workerid;
start = other558.start;
runAs = other558.runAs;
+ hightestTxnId = other558.hightestTxnId;
+ metaInfo = other558.metaInfo;
+ endTime = other558.endTime;
+ hadoopJobId = other558.hadoopJobId;
__isset = other558.__isset;
return *this;
}
@@ -12768,6 +13217,10 @@ void ShowCompactResponseElement::printTo(std::ostream& out) const {
out << ", " << "workerid="; (__isset.workerid ? (out << to_string(workerid)) : (out << "<null>"));
out << ", " << "start="; (__isset.start ? (out << to_string(start)) : (out << "<null>"));
out << ", " << "runAs="; (__isset.runAs ? (out << to_string(runAs)) : (out << "<null>"));
+ out << ", " << "hightestTxnId="; (__isset.hightestTxnId ? (out << to_string(hightestTxnId)) : (out << "<null>"));
+ out << ", " << "metaInfo="; (__isset.metaInfo ? (out << to_string(metaInfo)) : (out << "<null>"));
+ out << ", " << "endTime="; (__isset.endTime ? (out << to_string(endTime)) : (out << "<null>"));
+ out << ", " << "hadoopJobId="; (__isset.hadoopJobId ? (out << to_string(hadoopJobId)) : (out << "<null>"));
out << ")";
}
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
index 05c288c..fe82c73 100644
--- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
+++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
@@ -4100,13 +4100,19 @@ inline std::ostream& operator<<(std::ostream& out, const Function& obj)
return out;
}
+typedef struct _TxnInfo__isset {
+ _TxnInfo__isset() : agentInfo(true), heartbeatCount(true), metaInfo(false) {}
+ bool agentInfo :1;
+ bool heartbeatCount :1;
+ bool metaInfo :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"), heartbeatCount(0), metaInfo() {
}
virtual ~TxnInfo() throw();
@@ -4114,6 +4120,11 @@ class TxnInfo {
TxnState::type state;
std::string user;
std::string hostname;
+ std::string agentInfo;
+ int32_t heartbeatCount;
+ std::string metaInfo;
+
+ _TxnInfo__isset __isset;
void __set_id(const int64_t val);
@@ -4123,6 +4134,12 @@ class TxnInfo {
void __set_hostname(const std::string& val);
+ void __set_agentInfo(const std::string& val);
+
+ void __set_heartbeatCount(const int32_t val);
+
+ void __set_metaInfo(const std::string& val);
+
bool operator == (const TxnInfo & rhs) const
{
if (!(id == rhs.id))
@@ -4133,6 +4150,18 @@ 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;
+ if (__isset.heartbeatCount != rhs.__isset.heartbeatCount)
+ return false;
+ else if (__isset.heartbeatCount && !(heartbeatCount == rhs.heartbeatCount))
+ return false;
+ if (__isset.metaInfo != rhs.__isset.metaInfo)
+ return false;
+ else if (__isset.metaInfo && !(metaInfo == rhs.metaInfo))
+ return false;
return true;
}
bool operator != (const TxnInfo &rhs) const {
@@ -4245,19 +4274,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);
@@ -4265,6 +4301,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))
@@ -4273,6 +4311,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 {
@@ -4487,8 +4529,9 @@ inline std::ostream& operator<<(std::ostream& out, const LockComponent& obj)
}
typedef struct _LockRequest__isset {
- _LockRequest__isset() : txnid(false) {}
+ _LockRequest__isset() : txnid(false), agentInfo(true) {}
bool txnid :1;
+ bool agentInfo :1;
} _LockRequest__isset;
class LockRequest {
@@ -4496,7 +4539,7 @@ class LockRequest {
LockRequest(const LockRequest&);
LockRequest& operator=(const LockRequest&);
- LockRequest() : txnid(0), user(), hostname() {
+ LockRequest() : txnid(0), user(), hostname(), agentInfo("Unknown") {
}
virtual ~LockRequest() throw();
@@ -4504,6 +4547,7 @@ class LockRequest {
int64_t txnid;
std::string user;
std::string hostname;
+ std::string agentInfo;
_LockRequest__isset __isset;
@@ -4515,6 +4559,8 @@ class LockRequest {
void __set_hostname(const std::string& val);
+ void __set_agentInfo(const std::string& val);
+
bool operator == (const LockRequest & rhs) const
{
if (!(component == rhs.component))
@@ -4527,6 +4573,10 @@ class LockRequest {
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 LockRequest &rhs) const {
@@ -4594,24 +4644,45 @@ inline std::ostream& operator<<(std::ostream& out, const LockResponse& obj)
return out;
}
+typedef struct _CheckLockRequest__isset {
+ _CheckLockRequest__isset() : txnid(false), elapsed_ms(false) {}
+ bool txnid :1;
+ bool elapsed_ms :1;
+} _CheckLockRequest__isset;
class CheckLockRequest {
public:
CheckLockRequest(const CheckLockRequest&);
CheckLockRequest& operator=(const CheckLockRequest&);
- CheckLockRequest() : lockid(0) {
+ CheckLockRequest() : lockid(0), txnid(0), elapsed_ms(0) {
}
virtual ~CheckLockRequest() throw();
int64_t lockid;
+ int64_t txnid;
+ int64_t elapsed_ms;
+
+ _CheckLockRequest__isset __isset;
void __set_lockid(const int64_t val);
+ void __set_txnid(const int64_t val);
+
+ void __set_elapsed_ms(const int64_t val);
+
bool operator == (const CheckLockRequest & rhs) const
{
if (!(lockid == rhs.lockid))
return false;
+ if (__isset.txnid != rhs.__isset.txnid)
+ return false;
+ else if (__isset.txnid && !(txnid == rhs.txnid))
+ return false;
+ if (__isset.elapsed_ms != rhs.__isset.elapsed_ms)
+ return false;
+ else if (__isset.elapsed_ms && !(elapsed_ms == rhs.elapsed_ms))
+ return false;
return true;
}
bool operator != (const CheckLockRequest &rhs) const {
@@ -4674,19 +4745,56 @@ inline std::ostream& operator<<(std::ostream& out, const UnlockRequest& obj)
return out;
}
+typedef struct _ShowLocksRequest__isset {
+ _ShowLocksRequest__isset() : dbname(false), tablename(false), partname(false), isExtended(true) {}
+ bool dbname :1;
+ bool tablename :1;
+ bool partname :1;
+ bool isExtended :1;
+} _ShowLocksRequest__isset;
class ShowLocksRequest {
public:
ShowLocksRequest(const ShowLocksRequest&);
ShowLocksRequest& operator=(const ShowLocksRequest&);
- ShowLocksRequest() {
+ ShowLocksRequest() : dbname(), tablename(), partname(), isExtended(false) {
}
virtual ~ShowLocksRequest() throw();
+ std::string dbname;
+ std::string tablename;
+ std::string partname;
+ bool isExtended;
+
+ _ShowLocksRequest__isset __isset;
+
+ void __set_dbname(const std::string& val);
+
+ void __set_tablename(const std::string& val);
+
+ void __set_partname(const std::string& val);
- bool operator == (const ShowLocksRequest & /* rhs */) const
+ void __set_isExtended(const bool val);
+
+ bool operator == (const ShowLocksRequest & rhs) const
{
+ if (__isset.dbname != rhs.__isset.dbname)
+ return false;
+ else if (__isset.dbname && !(dbname == rhs.dbname))
+ return false;
+ if (__isset.tablename != rhs.__isset.tablename)
+ return false;
+ else if (__isset.tablename && !(tablename == rhs.tablename))
+ return false;
+ if (__isset.partname != rhs.__isset.partname)
+ return false;
+ else if (__isset.partname && !(partname == rhs.partname))
+ return false;
+ if (__isset.isExtended != rhs.__isset.isExtended)
+ return false;
+ else if (__isset.isExtended && !(isExtended == rhs.isExtended))
+ return false;
return true;
}
bool operator != (const ShowLocksRequest &rhs) const {
@@ -4710,11 +4818,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) {}
+ _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 {
@@ -4722,7 +4835,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() {
+ 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();
@@ -4737,6 +4850,11 @@ class ShowLocksResponseElement {
int64_t acquiredat;
std::string user;
std::string hostname;
+ int32_t heartbeatCount;
+ std::string agentInfo;
+ int64_t blockedByExtId;
+ int64_t blockedByIntId;
+ int64_t lockIdInternal;
_ShowLocksResponseElement__isset __isset;
@@ -4762,6 +4880,16 @@ class ShowLocksResponseElement {
void __set_hostname(const std::string& val);
+ void __set_heartbeatCount(const int32_t val);
+
+ 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))
@@ -4794,6 +4922,26 @@ class ShowLocksResponseElement {
return false;
if (!(hostname == rhs.hostname))
return false;
+ if (__isset.heartbeatCount != rhs.__isset.heartbeatCount)
+ return false;
+ else if (__isset.heartbeatCount && !(heartbeatCount == rhs.heartbeatCount))
+ return false;
+ if (__isset.agentInfo != rhs.__isset.agentInfo)
+ 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 {
@@ -5115,11 +5263,15 @@ inline std::ostream& operator<<(std::ostream& out, const ShowCompactRequest& obj
}
typedef struct _ShowCompactResponseElement__isset {
- _ShowCompactResponseElement__isset() : partitionname(false), workerid(false), start(false), runAs(false) {}
+ _ShowCompactResponseElement__isset() : partitionname(false), workerid(false), start(false), runAs(false), hightestTxnId(false), metaInfo(false), endTime(false), hadoopJobId(true) {}
bool partitionname :1;
bool workerid :1;
bool start :1;
bool runAs :1;
+ bool hightestTxnId :1;
+ bool metaInfo :1;
+ bool endTime :1;
+ bool hadoopJobId :1;
} _ShowCompactResponseElement__isset;
class ShowCompactResponseElement {
@@ -5127,7 +5279,7 @@ class ShowCompactResponseElement {
ShowCompactResponseElement(const ShowCompactResponseElement&);
ShowCompactResponseElement& operator=(const ShowCompactResponseElement&);
- ShowCompactResponseElement() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), state(), workerid(), start(0), runAs() {
+ ShowCompactResponseElement() : dbname(), tablename(), partitionname(), type((CompactionType::type)0), state(), workerid(), start(0), runAs(), hightestTxnId(0), metaInfo(), endTime(0), hadoopJobId("None") {
}
virtual ~ShowCompactResponseElement() throw();
@@ -5139,6 +5291,10 @@ class ShowCompactResponseElement {
std::string workerid;
int64_t start;
std::string runAs;
+ int64_t hightestTxnId;
+ std::string metaInfo;
+ int64_t endTime;
+ std::string hadoopJobId;
_ShowCompactResponseElement__isset __isset;
@@ -5158,6 +5314,14 @@ class ShowCompactResponseElement {
void __set_runAs(const std::string& val);
+ void __set_hightestTxnId(const int64_t val);
+
+ void __set_metaInfo(const std::string& val);
+
+ void __set_endTime(const int64_t val);
+
+ void __set_hadoopJobId(const std::string& val);
+
bool operator == (const ShowCompactResponseElement & rhs) const
{
if (!(dbname == rhs.dbname))
@@ -5184,6 +5348,22 @@ class ShowCompactResponseElement {
return false;
else if (__isset.runAs && !(runAs == rhs.runAs))
return false;
+ if (__isset.hightestTxnId != rhs.__isset.hightestTxnId)
+ return false;
+ else if (__isset.hightestTxnId && !(hightestTxnId == rhs.hightestTxnId))
+ return false;
+ if (__isset.metaInfo != rhs.__isset.metaInfo)
+ return false;
+ else if (__isset.metaInfo && !(metaInfo == rhs.metaInfo))
+ return false;
+ if (__isset.endTime != rhs.__isset.endTime)
+ return false;
+ else if (__isset.endTime && !(endTime == rhs.endTime))
+ return false;
+ if (__isset.hadoopJobId != rhs.__isset.hadoopJobId)
+ return false;
+ else if (__isset.hadoopJobId && !(hadoopJobId == rhs.hadoopJobId))
+ return false;
return true;
}
bool operator != (const ShowCompactResponseElement &rhs) const {
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java
index 430be03..bcef2ff 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CheckLockRequest.java
@@ -39,6 +39,8 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CheckLockRequest");
private static final org.apache.thrift.protocol.TField LOCKID_FIELD_DESC = new org.apache.thrift.protocol.TField("lockid", org.apache.thrift.protocol.TType.I64, (short)1);
+ private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField ELAPSED_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsed_ms", org.apache.thrift.protocol.TType.I64, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -47,10 +49,14 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
}
private long lockid; // required
+ private long txnid; // optional
+ private long elapsed_ms; // 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 {
- LOCKID((short)1, "lockid");
+ LOCKID((short)1, "lockid"),
+ TXNID((short)2, "txnid"),
+ ELAPSED_MS((short)3, "elapsed_ms");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -67,6 +73,10 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
switch(fieldId) {
case 1: // LOCKID
return LOCKID;
+ case 2: // TXNID
+ return TXNID;
+ case 3: // ELAPSED_MS
+ return ELAPSED_MS;
default:
return null;
}
@@ -108,12 +118,19 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
// isset id assignments
private static final int __LOCKID_ISSET_ID = 0;
+ private static final int __TXNID_ISSET_ID = 1;
+ private static final int __ELAPSED_MS_ISSET_ID = 2;
private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.TXNID,_Fields.ELAPSED_MS};
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);
tmpMap.put(_Fields.LOCKID, new org.apache.thrift.meta_data.FieldMetaData("lockid", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.TXNID, new org.apache.thrift.meta_data.FieldMetaData("txnid", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.ELAPSED_MS, new org.apache.thrift.meta_data.FieldMetaData("elapsed_ms", 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(CheckLockRequest.class, metaDataMap);
}
@@ -135,6 +152,8 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
public CheckLockRequest(CheckLockRequest other) {
__isset_bitfield = other.__isset_bitfield;
this.lockid = other.lockid;
+ this.txnid = other.txnid;
+ this.elapsed_ms = other.elapsed_ms;
}
public CheckLockRequest deepCopy() {
@@ -145,6 +164,10 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
public void clear() {
setLockidIsSet(false);
this.lockid = 0;
+ setTxnidIsSet(false);
+ this.txnid = 0;
+ setElapsed_msIsSet(false);
+ this.elapsed_ms = 0;
}
public long getLockid() {
@@ -169,6 +192,50 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCKID_ISSET_ID, value);
}
+ public long getTxnid() {
+ return this.txnid;
+ }
+
+ public void setTxnid(long txnid) {
+ this.txnid = txnid;
+ setTxnidIsSet(true);
+ }
+
+ public void unsetTxnid() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TXNID_ISSET_ID);
+ }
+
+ /** Returns true if field txnid is set (has been assigned a value) and false otherwise */
+ public boolean isSetTxnid() {
+ return EncodingUtils.testBit(__isset_bitfield, __TXNID_ISSET_ID);
+ }
+
+ public void setTxnidIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TXNID_ISSET_ID, value);
+ }
+
+ public long getElapsed_ms() {
+ return this.elapsed_ms;
+ }
+
+ public void setElapsed_ms(long elapsed_ms) {
+ this.elapsed_ms = elapsed_ms;
+ setElapsed_msIsSet(true);
+ }
+
+ public void unsetElapsed_ms() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ELAPSED_MS_ISSET_ID);
+ }
+
+ /** Returns true if field elapsed_ms is set (has been assigned a value) and false otherwise */
+ public boolean isSetElapsed_ms() {
+ return EncodingUtils.testBit(__isset_bitfield, __ELAPSED_MS_ISSET_ID);
+ }
+
+ public void setElapsed_msIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ELAPSED_MS_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case LOCKID:
@@ -179,6 +246,22 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
}
break;
+ case TXNID:
+ if (value == null) {
+ unsetTxnid();
+ } else {
+ setTxnid((Long)value);
+ }
+ break;
+
+ case ELAPSED_MS:
+ if (value == null) {
+ unsetElapsed_ms();
+ } else {
+ setElapsed_ms((Long)value);
+ }
+ break;
+
}
}
@@ -187,6 +270,12 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
case LOCKID:
return getLockid();
+ case TXNID:
+ return getTxnid();
+
+ case ELAPSED_MS:
+ return getElapsed_ms();
+
}
throw new IllegalStateException();
}
@@ -200,6 +289,10 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
switch (field) {
case LOCKID:
return isSetLockid();
+ case TXNID:
+ return isSetTxnid();
+ case ELAPSED_MS:
+ return isSetElapsed_ms();
}
throw new IllegalStateException();
}
@@ -226,6 +319,24 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
return false;
}
+ boolean this_present_txnid = true && this.isSetTxnid();
+ boolean that_present_txnid = true && that.isSetTxnid();
+ if (this_present_txnid || that_present_txnid) {
+ if (!(this_present_txnid && that_present_txnid))
+ return false;
+ if (this.txnid != that.txnid)
+ return false;
+ }
+
+ boolean this_present_elapsed_ms = true && this.isSetElapsed_ms();
+ boolean that_present_elapsed_ms = true && that.isSetElapsed_ms();
+ if (this_present_elapsed_ms || that_present_elapsed_ms) {
+ if (!(this_present_elapsed_ms && that_present_elapsed_ms))
+ return false;
+ if (this.elapsed_ms != that.elapsed_ms)
+ return false;
+ }
+
return true;
}
@@ -238,6 +349,16 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
if (present_lockid)
list.add(lockid);
+ boolean present_txnid = true && (isSetTxnid());
+ list.add(present_txnid);
+ if (present_txnid)
+ list.add(txnid);
+
+ boolean present_elapsed_ms = true && (isSetElapsed_ms());
+ list.add(present_elapsed_ms);
+ if (present_elapsed_ms)
+ list.add(elapsed_ms);
+
return list.hashCode();
}
@@ -259,6 +380,26 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetTxnid()).compareTo(other.isSetTxnid());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTxnid()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetElapsed_ms()).compareTo(other.isSetElapsed_ms());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetElapsed_ms()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsed_ms, other.elapsed_ms);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -282,6 +423,18 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
sb.append("lockid:");
sb.append(this.lockid);
first = false;
+ if (isSetTxnid()) {
+ if (!first) sb.append(", ");
+ sb.append("txnid:");
+ sb.append(this.txnid);
+ first = false;
+ }
+ if (isSetElapsed_ms()) {
+ if (!first) sb.append(", ");
+ sb.append("elapsed_ms:");
+ sb.append(this.elapsed_ms);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -339,6 +492,22 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 2: // TXNID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.txnid = iprot.readI64();
+ struct.setTxnidIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ELAPSED_MS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.elapsed_ms = iprot.readI64();
+ struct.setElapsed_msIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -355,6 +524,16 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
oprot.writeFieldBegin(LOCKID_FIELD_DESC);
oprot.writeI64(struct.lockid);
oprot.writeFieldEnd();
+ if (struct.isSetTxnid()) {
+ oprot.writeFieldBegin(TXNID_FIELD_DESC);
+ oprot.writeI64(struct.txnid);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetElapsed_ms()) {
+ oprot.writeFieldBegin(ELAPSED_MS_FIELD_DESC);
+ oprot.writeI64(struct.elapsed_ms);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -373,6 +552,20 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
public void write(org.apache.thrift.protocol.TProtocol prot, CheckLockRequest struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeI64(struct.lockid);
+ BitSet optionals = new BitSet();
+ if (struct.isSetTxnid()) {
+ optionals.set(0);
+ }
+ if (struct.isSetElapsed_ms()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetTxnid()) {
+ oprot.writeI64(struct.txnid);
+ }
+ if (struct.isSetElapsed_ms()) {
+ oprot.writeI64(struct.elapsed_ms);
+ }
}
@Override
@@ -380,6 +573,15 @@ public class CheckLockRequest implements org.apache.thrift.TBase<CheckLockReques
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.lockid = iprot.readI64();
struct.setLockidIsSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.txnid = iprot.readI64();
+ struct.setTxnidIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.elapsed_ms = iprot.readI64();
+ struct.setElapsed_msIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
index eada4ee..f39f582 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockRequest.java
@@ -42,6 +42,7 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
private static final org.apache.thrift.protocol.TField TXNID_FIELD_DESC = new org.apache.thrift.protocol.TField("txnid", org.apache.thrift.protocol.TType.I64, (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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -53,13 +54,15 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
private long txnid; // optional
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 {
COMPONENT((short)1, "component"),
TXNID((short)2, "txnid"),
USER((short)3, "user"),
- HOSTNAME((short)4, "hostname");
+ HOSTNAME((short)4, "hostname"),
+ AGENT_INFO((short)5, "agentInfo");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -82,6 +85,8 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
return USER;
case 4: // HOSTNAME
return HOSTNAME;
+ case 5: // AGENT_INFO
+ return AGENT_INFO;
default:
return null;
}
@@ -124,7 +129,7 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
// isset id assignments
private static final int __TXNID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.TXNID};
+ private static final _Fields optionals[] = {_Fields.TXNID,_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);
@@ -137,11 +142,15 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
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(LockRequest.class, metaDataMap);
}
public LockRequest() {
+ this.agentInfo = "Unknown";
+
}
public LockRequest(
@@ -174,6 +183,9 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
if (other.isSetHostname()) {
this.hostname = other.hostname;
}
+ if (other.isSetAgentInfo()) {
+ this.agentInfo = other.agentInfo;
+ }
}
public LockRequest deepCopy() {
@@ -187,6 +199,8 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
this.txnid = 0;
this.user = null;
this.hostname = null;
+ this.agentInfo = "Unknown";
+
}
public int getComponentSize() {
@@ -295,6 +309,29 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
}
}
+ 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 COMPONENT:
@@ -329,6 +366,14 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
}
break;
+ case AGENT_INFO:
+ if (value == null) {
+ unsetAgentInfo();
+ } else {
+ setAgentInfo((String)value);
+ }
+ break;
+
}
}
@@ -346,6 +391,9 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
case HOSTNAME:
return getHostname();
+ case AGENT_INFO:
+ return getAgentInfo();
+
}
throw new IllegalStateException();
}
@@ -365,6 +413,8 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
return isSetUser();
case HOSTNAME:
return isSetHostname();
+ case AGENT_INFO:
+ return isSetAgentInfo();
}
throw new IllegalStateException();
}
@@ -418,6 +468,15 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
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;
}
@@ -445,6 +504,11 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
if (present_hostname)
list.add(hostname);
+ boolean present_agentInfo = true && (isSetAgentInfo());
+ list.add(present_agentInfo);
+ if (present_agentInfo)
+ list.add(agentInfo);
+
return list.hashCode();
}
@@ -496,6 +560,16 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
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;
}
@@ -545,6 +619,16 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
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();
}
@@ -645,6 +729,14 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
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);
}
@@ -685,6 +777,13 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
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();
}
@@ -715,10 +814,16 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
if (struct.isSetTxnid()) {
optionals.set(0);
}
- oprot.writeBitSet(optionals, 1);
+ if (struct.isSetAgentInfo()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
if (struct.isSetTxnid()) {
oprot.writeI64(struct.txnid);
}
+ if (struct.isSetAgentInfo()) {
+ oprot.writeString(struct.agentInfo);
+ }
}
@Override
@@ -740,11 +845,15 @@ public class LockRequest implements org.apache.thrift.TBase<LockRequest, LockReq
struct.setUserIsSet(true);
struct.hostname = iprot.readString();
struct.setHostnameIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.txnid = iprot.readI64();
struct.setTxnidIsSet(true);
}
+ if (incoming.get(1)) {
+ struct.agentInfo = iprot.readString();
+ struct.setAgentInfoIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java
index 01371ec..f058c0d 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/OpenTxnRequest.java
@@ -41,6 +41,7 @@ public class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -51,12 +52,14 @@ public class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -77,6 +80,8 @@ public class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
return USER;
case 3: // HOSTNAME
return HOSTNAME;
+ case 4: // AGENT_INFO
+ return AGENT_INFO;
default:
return null;
}
@@ -119,6 +124,7 @@ public class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
// 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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
if (other.isSetHostname()) {
this.hostname = other.hostname;
}
+ if (other.isSetAgentInfo()) {
+ this.agentInfo = other.agentInfo;
+ }
}
public OpenTxnRequest deepCopy() {
@@ -171,6 +184,8 @@ public class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
this.num_txns = 0;
this.user = null;
this.hostname = null;
+ this.agentInfo = "Unknown";
+
}
public int getNum_txns() {
@@ -241,6 +256,29 @@ public class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
}
}
+ 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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
}
break;
+ case AGENT_INFO:
+ if (value == null) {
+ unsetAgentInfo();
+ } else {
+ setAgentInfo((String)value);
+ }
+ break;
+
}
}
@@ -281,6 +327,9 @@ public class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
case HOSTNAME:
return getHostname();
+ case AGENT_INFO:
+ return getAgentInfo();
+
}
throw new IllegalStateException();
}
@@ -298,6 +347,8 @@ public class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
return isSetUser();
case HOSTNAME:
return isSetHostname();
+ case AGENT_INFO:
+ return isSetAgentInfo();
}
throw new IllegalStateException();
}
@@ -342,6 +393,15 @@ public class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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 class OpenTxnRequest implements org.apache.thrift.TBase<OpenTxnRequest, O
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);
+ }
}
}
[2/5] hive git commit: HIVE-12832 thrift and RDBMS changes for ACID
fixes, branch-2.0 version
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java
index dd7dd8e..212ecd6 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowCompactResponseElement.java
@@ -46,6 +46,10 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
private static final org.apache.thrift.protocol.TField WORKERID_FIELD_DESC = new org.apache.thrift.protocol.TField("workerid", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField START_FIELD_DESC = new org.apache.thrift.protocol.TField("start", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.protocol.TField RUN_AS_FIELD_DESC = new org.apache.thrift.protocol.TField("runAs", org.apache.thrift.protocol.TType.STRING, (short)8);
+ private static final org.apache.thrift.protocol.TField HIGHTEST_TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hightestTxnId", org.apache.thrift.protocol.TType.I64, (short)9);
+ private static final org.apache.thrift.protocol.TField META_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("metaInfo", org.apache.thrift.protocol.TType.STRING, (short)10);
+ private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)11);
+ private static final org.apache.thrift.protocol.TField HADOOP_JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hadoopJobId", org.apache.thrift.protocol.TType.STRING, (short)12);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -61,6 +65,10 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
private String workerid; // optional
private long start; // optional
private String runAs; // optional
+ private long hightestTxnId; // optional
+ private String metaInfo; // optional
+ private long endTime; // optional
+ private String hadoopJobId; // 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 {
@@ -75,7 +83,11 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
STATE((short)5, "state"),
WORKERID((short)6, "workerid"),
START((short)7, "start"),
- RUN_AS((short)8, "runAs");
+ RUN_AS((short)8, "runAs"),
+ HIGHTEST_TXN_ID((short)9, "hightestTxnId"),
+ META_INFO((short)10, "metaInfo"),
+ END_TIME((short)11, "endTime"),
+ HADOOP_JOB_ID((short)12, "hadoopJobId");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -106,6 +118,14 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
return START;
case 8: // RUN_AS
return RUN_AS;
+ case 9: // HIGHTEST_TXN_ID
+ return HIGHTEST_TXN_ID;
+ case 10: // META_INFO
+ return META_INFO;
+ case 11: // END_TIME
+ return END_TIME;
+ case 12: // HADOOP_JOB_ID
+ return HADOOP_JOB_ID;
default:
return null;
}
@@ -147,8 +167,10 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
// isset id assignments
private static final int __START_ISSET_ID = 0;
+ private static final int __HIGHTESTTXNID_ISSET_ID = 1;
+ private static final int __ENDTIME_ISSET_ID = 2;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.WORKERID,_Fields.START,_Fields.RUN_AS};
+ private static final _Fields optionals[] = {_Fields.PARTITIONNAME,_Fields.WORKERID,_Fields.START,_Fields.RUN_AS,_Fields.HIGHTEST_TXN_ID,_Fields.META_INFO,_Fields.END_TIME,_Fields.HADOOP_JOB_ID};
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);
@@ -168,11 +190,21 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.RUN_AS, new org.apache.thrift.meta_data.FieldMetaData("runAs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.HIGHTEST_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("hightestTxnId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.META_INFO, new org.apache.thrift.meta_data.FieldMetaData("metaInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.HADOOP_JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("hadoopJobId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowCompactResponseElement.class, metaDataMap);
}
public ShowCompactResponseElement() {
+ this.hadoopJobId = "None";
+
}
public ShowCompactResponseElement(
@@ -215,6 +247,14 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
if (other.isSetRunAs()) {
this.runAs = other.runAs;
}
+ this.hightestTxnId = other.hightestTxnId;
+ if (other.isSetMetaInfo()) {
+ this.metaInfo = other.metaInfo;
+ }
+ this.endTime = other.endTime;
+ if (other.isSetHadoopJobId()) {
+ this.hadoopJobId = other.hadoopJobId;
+ }
}
public ShowCompactResponseElement deepCopy() {
@@ -232,6 +272,13 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
setStartIsSet(false);
this.start = 0;
this.runAs = null;
+ setHightestTxnIdIsSet(false);
+ this.hightestTxnId = 0;
+ this.metaInfo = null;
+ setEndTimeIsSet(false);
+ this.endTime = 0;
+ this.hadoopJobId = "None";
+
}
public String getDbname() {
@@ -425,6 +472,96 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
}
}
+ public long getHightestTxnId() {
+ return this.hightestTxnId;
+ }
+
+ public void setHightestTxnId(long hightestTxnId) {
+ this.hightestTxnId = hightestTxnId;
+ setHightestTxnIdIsSet(true);
+ }
+
+ public void unsetHightestTxnId() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID);
+ }
+
+ /** Returns true if field hightestTxnId is set (has been assigned a value) and false otherwise */
+ public boolean isSetHightestTxnId() {
+ return EncodingUtils.testBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID);
+ }
+
+ public void setHightestTxnIdIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHTESTTXNID_ISSET_ID, value);
+ }
+
+ public String getMetaInfo() {
+ return this.metaInfo;
+ }
+
+ public void setMetaInfo(String metaInfo) {
+ this.metaInfo = metaInfo;
+ }
+
+ public void unsetMetaInfo() {
+ this.metaInfo = null;
+ }
+
+ /** Returns true if field metaInfo is set (has been assigned a value) and false otherwise */
+ public boolean isSetMetaInfo() {
+ return this.metaInfo != null;
+ }
+
+ public void setMetaInfoIsSet(boolean value) {
+ if (!value) {
+ this.metaInfo = null;
+ }
+ }
+
+ public long getEndTime() {
+ return this.endTime;
+ }
+
+ public void setEndTime(long endTime) {
+ this.endTime = endTime;
+ setEndTimeIsSet(true);
+ }
+
+ public void unsetEndTime() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field endTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetEndTime() {
+ return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ }
+
+ public void setEndTimeIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
+ }
+
+ public String getHadoopJobId() {
+ return this.hadoopJobId;
+ }
+
+ public void setHadoopJobId(String hadoopJobId) {
+ this.hadoopJobId = hadoopJobId;
+ }
+
+ public void unsetHadoopJobId() {
+ this.hadoopJobId = null;
+ }
+
+ /** Returns true if field hadoopJobId is set (has been assigned a value) and false otherwise */
+ public boolean isSetHadoopJobId() {
+ return this.hadoopJobId != null;
+ }
+
+ public void setHadoopJobIdIsSet(boolean value) {
+ if (!value) {
+ this.hadoopJobId = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DBNAME:
@@ -491,6 +628,38 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
}
break;
+ case HIGHTEST_TXN_ID:
+ if (value == null) {
+ unsetHightestTxnId();
+ } else {
+ setHightestTxnId((Long)value);
+ }
+ break;
+
+ case META_INFO:
+ if (value == null) {
+ unsetMetaInfo();
+ } else {
+ setMetaInfo((String)value);
+ }
+ break;
+
+ case END_TIME:
+ if (value == null) {
+ unsetEndTime();
+ } else {
+ setEndTime((Long)value);
+ }
+ break;
+
+ case HADOOP_JOB_ID:
+ if (value == null) {
+ unsetHadoopJobId();
+ } else {
+ setHadoopJobId((String)value);
+ }
+ break;
+
}
}
@@ -520,6 +689,18 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
case RUN_AS:
return getRunAs();
+ case HIGHTEST_TXN_ID:
+ return getHightestTxnId();
+
+ case META_INFO:
+ return getMetaInfo();
+
+ case END_TIME:
+ return getEndTime();
+
+ case HADOOP_JOB_ID:
+ return getHadoopJobId();
+
}
throw new IllegalStateException();
}
@@ -547,6 +728,14 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
return isSetStart();
case RUN_AS:
return isSetRunAs();
+ case HIGHTEST_TXN_ID:
+ return isSetHightestTxnId();
+ case META_INFO:
+ return isSetMetaInfo();
+ case END_TIME:
+ return isSetEndTime();
+ case HADOOP_JOB_ID:
+ return isSetHadoopJobId();
}
throw new IllegalStateException();
}
@@ -636,6 +825,42 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
return false;
}
+ boolean this_present_hightestTxnId = true && this.isSetHightestTxnId();
+ boolean that_present_hightestTxnId = true && that.isSetHightestTxnId();
+ if (this_present_hightestTxnId || that_present_hightestTxnId) {
+ if (!(this_present_hightestTxnId && that_present_hightestTxnId))
+ return false;
+ if (this.hightestTxnId != that.hightestTxnId)
+ return false;
+ }
+
+ boolean this_present_metaInfo = true && this.isSetMetaInfo();
+ boolean that_present_metaInfo = true && that.isSetMetaInfo();
+ if (this_present_metaInfo || that_present_metaInfo) {
+ if (!(this_present_metaInfo && that_present_metaInfo))
+ return false;
+ if (!this.metaInfo.equals(that.metaInfo))
+ return false;
+ }
+
+ boolean this_present_endTime = true && this.isSetEndTime();
+ boolean that_present_endTime = true && that.isSetEndTime();
+ if (this_present_endTime || that_present_endTime) {
+ if (!(this_present_endTime && that_present_endTime))
+ return false;
+ if (this.endTime != that.endTime)
+ return false;
+ }
+
+ boolean this_present_hadoopJobId = true && this.isSetHadoopJobId();
+ boolean that_present_hadoopJobId = true && that.isSetHadoopJobId();
+ if (this_present_hadoopJobId || that_present_hadoopJobId) {
+ if (!(this_present_hadoopJobId && that_present_hadoopJobId))
+ return false;
+ if (!this.hadoopJobId.equals(that.hadoopJobId))
+ return false;
+ }
+
return true;
}
@@ -683,6 +908,26 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
if (present_runAs)
list.add(runAs);
+ boolean present_hightestTxnId = true && (isSetHightestTxnId());
+ list.add(present_hightestTxnId);
+ if (present_hightestTxnId)
+ list.add(hightestTxnId);
+
+ boolean present_metaInfo = true && (isSetMetaInfo());
+ list.add(present_metaInfo);
+ if (present_metaInfo)
+ list.add(metaInfo);
+
+ boolean present_endTime = true && (isSetEndTime());
+ list.add(present_endTime);
+ if (present_endTime)
+ list.add(endTime);
+
+ boolean present_hadoopJobId = true && (isSetHadoopJobId());
+ list.add(present_hadoopJobId);
+ if (present_hadoopJobId)
+ list.add(hadoopJobId);
+
return list.hashCode();
}
@@ -774,6 +1019,46 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetHightestTxnId()).compareTo(other.isSetHightestTxnId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHightestTxnId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hightestTxnId, other.hightestTxnId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMetaInfo()).compareTo(other.isSetMetaInfo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMetaInfo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaInfo, other.metaInfo);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetEndTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHadoopJobId()).compareTo(other.isSetHadoopJobId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHadoopJobId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hadoopJobId, other.hadoopJobId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -861,6 +1146,38 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
}
first = false;
}
+ if (isSetHightestTxnId()) {
+ if (!first) sb.append(", ");
+ sb.append("hightestTxnId:");
+ sb.append(this.hightestTxnId);
+ first = false;
+ }
+ if (isSetMetaInfo()) {
+ if (!first) sb.append(", ");
+ sb.append("metaInfo:");
+ if (this.metaInfo == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.metaInfo);
+ }
+ first = false;
+ }
+ if (isSetEndTime()) {
+ if (!first) sb.append(", ");
+ sb.append("endTime:");
+ sb.append(this.endTime);
+ first = false;
+ }
+ if (isSetHadoopJobId()) {
+ if (!first) sb.append(", ");
+ sb.append("hadoopJobId:");
+ if (this.hadoopJobId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.hadoopJobId);
+ }
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -986,6 +1303,38 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 9: // HIGHTEST_TXN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.hightestTxnId = iprot.readI64();
+ struct.setHightestTxnIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // META_INFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.metaInfo = iprot.readString();
+ struct.setMetaInfoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // END_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.endTime = iprot.readI64();
+ struct.setEndTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // HADOOP_JOB_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.hadoopJobId = iprot.readString();
+ struct.setHadoopJobIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1045,6 +1394,30 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
oprot.writeFieldEnd();
}
}
+ if (struct.isSetHightestTxnId()) {
+ oprot.writeFieldBegin(HIGHTEST_TXN_ID_FIELD_DESC);
+ oprot.writeI64(struct.hightestTxnId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.metaInfo != null) {
+ if (struct.isSetMetaInfo()) {
+ oprot.writeFieldBegin(META_INFO_FIELD_DESC);
+ oprot.writeString(struct.metaInfo);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetEndTime()) {
+ oprot.writeFieldBegin(END_TIME_FIELD_DESC);
+ oprot.writeI64(struct.endTime);
+ oprot.writeFieldEnd();
+ }
+ if (struct.hadoopJobId != null) {
+ if (struct.isSetHadoopJobId()) {
+ oprot.writeFieldBegin(HADOOP_JOB_ID_FIELD_DESC);
+ oprot.writeString(struct.hadoopJobId);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -1079,7 +1452,19 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
if (struct.isSetRunAs()) {
optionals.set(3);
}
- oprot.writeBitSet(optionals, 4);
+ if (struct.isSetHightestTxnId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetMetaInfo()) {
+ optionals.set(5);
+ }
+ if (struct.isSetEndTime()) {
+ optionals.set(6);
+ }
+ if (struct.isSetHadoopJobId()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
if (struct.isSetPartitionname()) {
oprot.writeString(struct.partitionname);
}
@@ -1092,6 +1477,18 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
if (struct.isSetRunAs()) {
oprot.writeString(struct.runAs);
}
+ if (struct.isSetHightestTxnId()) {
+ oprot.writeI64(struct.hightestTxnId);
+ }
+ if (struct.isSetMetaInfo()) {
+ oprot.writeString(struct.metaInfo);
+ }
+ if (struct.isSetEndTime()) {
+ oprot.writeI64(struct.endTime);
+ }
+ if (struct.isSetHadoopJobId()) {
+ oprot.writeString(struct.hadoopJobId);
+ }
}
@Override
@@ -1105,7 +1502,7 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
struct.setTypeIsSet(true);
struct.state = iprot.readString();
struct.setStateIsSet(true);
- BitSet incoming = iprot.readBitSet(4);
+ BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.partitionname = iprot.readString();
struct.setPartitionnameIsSet(true);
@@ -1122,6 +1519,22 @@ public class ShowCompactResponseElement implements org.apache.thrift.TBase<ShowC
struct.runAs = iprot.readString();
struct.setRunAsIsSet(true);
}
+ if (incoming.get(4)) {
+ struct.hightestTxnId = iprot.readI64();
+ struct.setHightestTxnIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.metaInfo = iprot.readString();
+ struct.setMetaInfoIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.endTime = iprot.readI64();
+ struct.setEndTimeIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.hadoopJobId = iprot.readString();
+ struct.setHadoopJobIdIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java
index e89b93b..f566d6f 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksRequest.java
@@ -38,6 +38,10 @@ import org.slf4j.LoggerFactory;
public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksRequest, ShowLocksRequest._Fields>, java.io.Serializable, Cloneable, Comparable<ShowLocksRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShowLocksRequest");
+ private static final org.apache.thrift.protocol.TField DBNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbname", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField TABLENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tablename", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField PARTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partname", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField IS_EXTENDED_FIELD_DESC = new org.apache.thrift.protocol.TField("isExtended", org.apache.thrift.protocol.TType.BOOL, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -45,10 +49,17 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
schemes.put(TupleScheme.class, new ShowLocksRequestTupleSchemeFactory());
}
+ private String dbname; // optional
+ private String tablename; // optional
+ private String partname; // optional
+ private boolean isExtended; // 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 {
-;
+ DBNAME((short)1, "dbname"),
+ TABLENAME((short)2, "tablename"),
+ PARTNAME((short)3, "partname"),
+ IS_EXTENDED((short)4, "isExtended");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -63,6 +74,14 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
+ case 1: // DBNAME
+ return DBNAME;
+ case 2: // TABLENAME
+ return TABLENAME;
+ case 3: // PARTNAME
+ return PARTNAME;
+ case 4: // IS_EXTENDED
+ return IS_EXTENDED;
default:
return null;
}
@@ -101,20 +120,46 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
return _fieldName;
}
}
+
+ // isset id assignments
+ private static final int __ISEXTENDED_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.DBNAME,_Fields.TABLENAME,_Fields.PARTNAME,_Fields.IS_EXTENDED};
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);
+ tmpMap.put(_Fields.DBNAME, new org.apache.thrift.meta_data.FieldMetaData("dbname", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TABLENAME, new org.apache.thrift.meta_data.FieldMetaData("tablename", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PARTNAME, new org.apache.thrift.meta_data.FieldMetaData("partname", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.IS_EXTENDED, new org.apache.thrift.meta_data.FieldMetaData("isExtended", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShowLocksRequest.class, metaDataMap);
}
public ShowLocksRequest() {
+ this.isExtended = false;
+
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ShowLocksRequest(ShowLocksRequest other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetDbname()) {
+ this.dbname = other.dbname;
+ }
+ if (other.isSetTablename()) {
+ this.tablename = other.tablename;
+ }
+ if (other.isSetPartname()) {
+ this.partname = other.partname;
+ }
+ this.isExtended = other.isExtended;
}
public ShowLocksRequest deepCopy() {
@@ -123,15 +168,155 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
@Override
public void clear() {
+ this.dbname = null;
+ this.tablename = null;
+ this.partname = null;
+ this.isExtended = false;
+
+ }
+
+ public String getDbname() {
+ return this.dbname;
+ }
+
+ public void setDbname(String dbname) {
+ this.dbname = dbname;
+ }
+
+ public void unsetDbname() {
+ this.dbname = null;
+ }
+
+ /** Returns true if field dbname is set (has been assigned a value) and false otherwise */
+ public boolean isSetDbname() {
+ return this.dbname != null;
+ }
+
+ public void setDbnameIsSet(boolean value) {
+ if (!value) {
+ this.dbname = null;
+ }
+ }
+
+ public String getTablename() {
+ return this.tablename;
+ }
+
+ public void setTablename(String tablename) {
+ this.tablename = tablename;
+ }
+
+ public void unsetTablename() {
+ this.tablename = null;
+ }
+
+ /** Returns true if field tablename is set (has been assigned a value) and false otherwise */
+ public boolean isSetTablename() {
+ return this.tablename != null;
+ }
+
+ public void setTablenameIsSet(boolean value) {
+ if (!value) {
+ this.tablename = null;
+ }
+ }
+
+ public String getPartname() {
+ return this.partname;
+ }
+
+ public void setPartname(String partname) {
+ this.partname = partname;
+ }
+
+ public void unsetPartname() {
+ this.partname = null;
+ }
+
+ /** Returns true if field partname is set (has been assigned a value) and false otherwise */
+ public boolean isSetPartname() {
+ return this.partname != null;
+ }
+
+ public void setPartnameIsSet(boolean value) {
+ if (!value) {
+ this.partname = null;
+ }
+ }
+
+ public boolean isIsExtended() {
+ return this.isExtended;
+ }
+
+ public void setIsExtended(boolean isExtended) {
+ this.isExtended = isExtended;
+ setIsExtendedIsSet(true);
+ }
+
+ public void unsetIsExtended() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXTENDED_ISSET_ID);
+ }
+
+ /** Returns true if field isExtended is set (has been assigned a value) and false otherwise */
+ public boolean isSetIsExtended() {
+ return EncodingUtils.testBit(__isset_bitfield, __ISEXTENDED_ISSET_ID);
+ }
+
+ public void setIsExtendedIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXTENDED_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
+ case DBNAME:
+ if (value == null) {
+ unsetDbname();
+ } else {
+ setDbname((String)value);
+ }
+ break;
+
+ case TABLENAME:
+ if (value == null) {
+ unsetTablename();
+ } else {
+ setTablename((String)value);
+ }
+ break;
+
+ case PARTNAME:
+ if (value == null) {
+ unsetPartname();
+ } else {
+ setPartname((String)value);
+ }
+ break;
+
+ case IS_EXTENDED:
+ if (value == null) {
+ unsetIsExtended();
+ } else {
+ setIsExtended((Boolean)value);
+ }
+ break;
+
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
+ case DBNAME:
+ return getDbname();
+
+ case TABLENAME:
+ return getTablename();
+
+ case PARTNAME:
+ return getPartname();
+
+ case IS_EXTENDED:
+ return isIsExtended();
+
}
throw new IllegalStateException();
}
@@ -143,6 +328,14 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
}
switch (field) {
+ case DBNAME:
+ return isSetDbname();
+ case TABLENAME:
+ return isSetTablename();
+ case PARTNAME:
+ return isSetPartname();
+ case IS_EXTENDED:
+ return isSetIsExtended();
}
throw new IllegalStateException();
}
@@ -160,6 +353,42 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
if (that == null)
return false;
+ boolean this_present_dbname = true && this.isSetDbname();
+ boolean that_present_dbname = true && that.isSetDbname();
+ if (this_present_dbname || that_present_dbname) {
+ if (!(this_present_dbname && that_present_dbname))
+ return false;
+ if (!this.dbname.equals(that.dbname))
+ return false;
+ }
+
+ boolean this_present_tablename = true && this.isSetTablename();
+ boolean that_present_tablename = true && that.isSetTablename();
+ if (this_present_tablename || that_present_tablename) {
+ if (!(this_present_tablename && that_present_tablename))
+ return false;
+ if (!this.tablename.equals(that.tablename))
+ return false;
+ }
+
+ boolean this_present_partname = true && this.isSetPartname();
+ boolean that_present_partname = true && that.isSetPartname();
+ if (this_present_partname || that_present_partname) {
+ if (!(this_present_partname && that_present_partname))
+ return false;
+ if (!this.partname.equals(that.partname))
+ return false;
+ }
+
+ boolean this_present_isExtended = true && this.isSetIsExtended();
+ boolean that_present_isExtended = true && that.isSetIsExtended();
+ if (this_present_isExtended || that_present_isExtended) {
+ if (!(this_present_isExtended && that_present_isExtended))
+ return false;
+ if (this.isExtended != that.isExtended)
+ return false;
+ }
+
return true;
}
@@ -167,6 +396,26 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
public int hashCode() {
List<Object> list = new ArrayList<Object>();
+ boolean present_dbname = true && (isSetDbname());
+ list.add(present_dbname);
+ if (present_dbname)
+ list.add(dbname);
+
+ boolean present_tablename = true && (isSetTablename());
+ list.add(present_tablename);
+ if (present_tablename)
+ list.add(tablename);
+
+ boolean present_partname = true && (isSetPartname());
+ list.add(present_partname);
+ if (present_partname)
+ list.add(partname);
+
+ boolean present_isExtended = true && (isSetIsExtended());
+ list.add(present_isExtended);
+ if (present_isExtended)
+ list.add(isExtended);
+
return list.hashCode();
}
@@ -178,6 +427,46 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
int lastComparison = 0;
+ lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDbname()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTablename()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPartname()).compareTo(other.isSetPartname());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPartname()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partname, other.partname);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIsExtended()).compareTo(other.isSetIsExtended());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIsExtended()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isExtended, other.isExtended);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -198,6 +487,41 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
StringBuilder sb = new StringBuilder("ShowLocksRequest(");
boolean first = true;
+ if (isSetDbname()) {
+ sb.append("dbname:");
+ if (this.dbname == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dbname);
+ }
+ first = false;
+ }
+ if (isSetTablename()) {
+ if (!first) sb.append(", ");
+ sb.append("tablename:");
+ if (this.tablename == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tablename);
+ }
+ first = false;
+ }
+ if (isSetPartname()) {
+ if (!first) sb.append(", ");
+ sb.append("partname:");
+ if (this.partname == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.partname);
+ }
+ first = false;
+ }
+ if (isSetIsExtended()) {
+ if (!first) sb.append(", ");
+ sb.append("isExtended:");
+ sb.append(this.isExtended);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -217,6 +541,8 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
@@ -241,6 +567,38 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
break;
}
switch (schemeField.id) {
+ case 1: // DBNAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dbname = iprot.readString();
+ struct.setDbnameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TABLENAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tablename = iprot.readString();
+ struct.setTablenameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PARTNAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.partname = iprot.readString();
+ struct.setPartnameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // IS_EXTENDED
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.isExtended = iprot.readBool();
+ struct.setIsExtendedIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -254,6 +612,32 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.dbname != null) {
+ if (struct.isSetDbname()) {
+ oprot.writeFieldBegin(DBNAME_FIELD_DESC);
+ oprot.writeString(struct.dbname);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.tablename != null) {
+ if (struct.isSetTablename()) {
+ oprot.writeFieldBegin(TABLENAME_FIELD_DESC);
+ oprot.writeString(struct.tablename);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.partname != null) {
+ if (struct.isSetPartname()) {
+ oprot.writeFieldBegin(PARTNAME_FIELD_DESC);
+ oprot.writeString(struct.partname);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetIsExtended()) {
+ oprot.writeFieldBegin(IS_EXTENDED_FIELD_DESC);
+ oprot.writeBool(struct.isExtended);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -271,11 +655,54 @@ public class ShowLocksRequest implements org.apache.thrift.TBase<ShowLocksReques
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksRequest struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetDbname()) {
+ optionals.set(0);
+ }
+ if (struct.isSetTablename()) {
+ optionals.set(1);
+ }
+ if (struct.isSetPartname()) {
+ optionals.set(2);
+ }
+ if (struct.isSetIsExtended()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
+ if (struct.isSetDbname()) {
+ oprot.writeString(struct.dbname);
+ }
+ if (struct.isSetTablename()) {
+ oprot.writeString(struct.tablename);
+ }
+ if (struct.isSetPartname()) {
+ oprot.writeString(struct.partname);
+ }
+ if (struct.isSetIsExtended()) {
+ oprot.writeBool(struct.isExtended);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ShowLocksRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(4);
+ if (incoming.get(0)) {
+ struct.dbname = iprot.readString();
+ struct.setDbnameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.tablename = iprot.readString();
+ struct.setTablenameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.partname = iprot.readString();
+ struct.setPartnameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.isExtended = iprot.readBool();
+ struct.setIsExtendedIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java
index 037a383..4bd7a7e 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java
@@ -49,6 +49,11 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
private static final org.apache.thrift.protocol.TField ACQUIREDAT_FIELD_DESC = new org.apache.thrift.protocol.TField("acquiredat", org.apache.thrift.protocol.TType.I64, (short)9);
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)10);
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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -67,6 +72,11 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
private long acquiredat; // optional
private String user; // required
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 {
@@ -88,7 +98,12 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
LASTHEARTBEAT((short)8, "lastheartbeat"),
ACQUIREDAT((short)9, "acquiredat"),
USER((short)10, "user"),
- HOSTNAME((short)11, "hostname");
+ HOSTNAME((short)11, "hostname"),
+ HEARTBEAT_COUNT((short)12, "heartbeatCount"),
+ 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<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -125,6 +140,16 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
return USER;
case 11: // HOSTNAME
return HOSTNAME;
+ case 12: // HEARTBEAT_COUNT
+ 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;
}
@@ -169,8 +194,12 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
private static final int __TXNID_ISSET_ID = 1;
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};
+ 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);
@@ -196,11 +225,23 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
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.HEARTBEAT_COUNT, new org.apache.thrift.meta_data.FieldMetaData("heartbeatCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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);
}
public ShowLocksResponseElement() {
+ this.heartbeatCount = 0;
+
}
public ShowLocksResponseElement(
@@ -254,6 +295,13 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
if (other.isSetHostname()) {
this.hostname = other.hostname;
}
+ this.heartbeatCount = other.heartbeatCount;
+ if (other.isSetAgentInfo()) {
+ this.agentInfo = other.agentInfo;
+ }
+ this.blockedByExtId = other.blockedByExtId;
+ this.blockedByIntId = other.blockedByIntId;
+ this.lockIdInternal = other.lockIdInternal;
}
public ShowLocksResponseElement deepCopy() {
@@ -277,6 +325,15 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
this.acquiredat = 0;
this.user = null;
this.hostname = null;
+ this.heartbeatCount = 0;
+
+ this.agentInfo = null;
+ setBlockedByExtIdIsSet(false);
+ this.blockedByExtId = 0;
+ setBlockedByIntIdIsSet(false);
+ this.blockedByIntId = 0;
+ setLockIdInternalIsSet(false);
+ this.lockIdInternal = 0;
}
public long getLockid() {
@@ -544,6 +601,117 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
}
}
+ public int getHeartbeatCount() {
+ return this.heartbeatCount;
+ }
+
+ public void setHeartbeatCount(int heartbeatCount) {
+ this.heartbeatCount = heartbeatCount;
+ setHeartbeatCountIsSet(true);
+ }
+
+ public void unsetHeartbeatCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field heartbeatCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetHeartbeatCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID);
+ }
+
+ public void setHeartbeatCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID, 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 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:
@@ -634,6 +802,46 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
}
break;
+ case HEARTBEAT_COUNT:
+ if (value == null) {
+ unsetHeartbeatCount();
+ } else {
+ setHeartbeatCount((Integer)value);
+ }
+ break;
+
+ case AGENT_INFO:
+ if (value == null) {
+ unsetAgentInfo();
+ } else {
+ setAgentInfo((String)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;
+
}
}
@@ -672,6 +880,21 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
case HOSTNAME:
return getHostname();
+ case HEARTBEAT_COUNT:
+ return getHeartbeatCount();
+
+ 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();
}
@@ -705,6 +928,16 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
return isSetUser();
case HOSTNAME:
return isSetHostname();
+ case HEARTBEAT_COUNT:
+ 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();
}
@@ -821,6 +1054,51 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
return false;
}
+ boolean this_present_heartbeatCount = true && this.isSetHeartbeatCount();
+ boolean that_present_heartbeatCount = true && that.isSetHeartbeatCount();
+ if (this_present_heartbeatCount || that_present_heartbeatCount) {
+ if (!(this_present_heartbeatCount && that_present_heartbeatCount))
+ return false;
+ if (this.heartbeatCount != that.heartbeatCount)
+ 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;
+ }
+
+ 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;
}
@@ -883,6 +1161,31 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
if (present_hostname)
list.add(hostname);
+ boolean present_heartbeatCount = true && (isSetHeartbeatCount());
+ list.add(present_heartbeatCount);
+ if (present_heartbeatCount)
+ list.add(heartbeatCount);
+
+ boolean present_agentInfo = true && (isSetAgentInfo());
+ list.add(present_agentInfo);
+ 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();
}
@@ -1004,6 +1307,56 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetHeartbeatCount()).compareTo(other.isSetHeartbeatCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHeartbeatCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heartbeatCount, other.heartbeatCount);
+ if (lastComparison != 0) {
+ 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;
+ }
+ }
+ 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;
}
@@ -1103,6 +1456,40 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
sb.append(this.hostname);
}
first = false;
+ if (isSetHeartbeatCount()) {
+ if (!first) sb.append(", ");
+ sb.append("heartbeatCount:");
+ sb.append(this.heartbeatCount);
+ 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;
+ }
+ 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();
}
@@ -1264,6 +1651,46 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 12: // HEARTBEAT_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.heartbeatCount = iprot.readI32();
+ struct.setHeartbeatCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // 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;
+ 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);
}
@@ -1332,6 +1759,33 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
oprot.writeString(struct.hostname);
oprot.writeFieldEnd();
}
+ if (struct.isSetHeartbeatCount()) {
+ oprot.writeFieldBegin(HEARTBEAT_COUNT_FIELD_DESC);
+ oprot.writeI32(struct.heartbeatCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.agentInfo != null) {
+ if (struct.isSetAgentInfo()) {
+ oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC);
+ oprot.writeString(struct.agentInfo);
+ 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();
}
@@ -1369,7 +1823,22 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
if (struct.isSetAcquiredat()) {
optionals.set(3);
}
- oprot.writeBitSet(optionals, 4);
+ if (struct.isSetHeartbeatCount()) {
+ optionals.set(4);
+ }
+ if (struct.isSetAgentInfo()) {
+ optionals.set(5);
+ }
+ 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);
}
@@ -1382,6 +1851,21 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
if (struct.isSetAcquiredat()) {
oprot.writeI64(struct.acquiredat);
}
+ if (struct.isSetHeartbeatCount()) {
+ oprot.writeI32(struct.heartbeatCount);
+ }
+ 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
@@ -1401,7 +1885,7 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
struct.setUserIsSet(true);
struct.hostname = iprot.readString();
struct.setHostnameIsSet(true);
- BitSet incoming = iprot.readBitSet(4);
+ BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.tablename = iprot.readString();
struct.setTablenameIsSet(true);
@@ -1418,6 +1902,26 @@ public class ShowLocksResponseElement implements org.apache.thrift.TBase<ShowLoc
struct.acquiredat = iprot.readI64();
struct.setAcquiredatIsSet(true);
}
+ if (incoming.get(4)) {
+ struct.heartbeatCount = iprot.readI32();
+ struct.setHeartbeatCountIsSet(true);
+ }
+ if (incoming.get(5)) {
+ 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);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java
index 47cdaf4..9c56ee3 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TxnInfo.java
@@ -42,6 +42,9 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
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 org.apache.thrift.protocol.TField HEARTBEAT_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("heartbeatCount", org.apache.thrift.protocol.TType.I32, (short)6);
+ private static final org.apache.thrift.protocol.TField META_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("metaInfo", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -53,6 +56,9 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
private TxnState state; // required
private String user; // required
private String hostname; // required
+ private String agentInfo; // optional
+ private int heartbeatCount; // optional
+ private String metaInfo; // 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 +69,10 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
*/
STATE((short)2, "state"),
USER((short)3, "user"),
- HOSTNAME((short)4, "hostname");
+ HOSTNAME((short)4, "hostname"),
+ AGENT_INFO((short)5, "agentInfo"),
+ HEARTBEAT_COUNT((short)6, "heartbeatCount"),
+ META_INFO((short)7, "metaInfo");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -86,6 +95,12 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
return USER;
case 4: // HOSTNAME
return HOSTNAME;
+ case 5: // AGENT_INFO
+ return AGENT_INFO;
+ case 6: // HEARTBEAT_COUNT
+ return HEARTBEAT_COUNT;
+ case 7: // META_INFO
+ return META_INFO;
default:
return null;
}
@@ -127,7 +142,9 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
// isset id assignments
private static final int __ID_ISSET_ID = 0;
+ private static final int __HEARTBEATCOUNT_ISSET_ID = 1;
private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.AGENT_INFO,_Fields.HEARTBEAT_COUNT,_Fields.META_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 +156,21 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
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)));
+ tmpMap.put(_Fields.HEARTBEAT_COUNT, new org.apache.thrift.meta_data.FieldMetaData("heartbeatCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.META_INFO, new org.apache.thrift.meta_data.FieldMetaData("metaInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TxnInfo.class, metaDataMap);
}
public TxnInfo() {
+ this.agentInfo = "Unknown";
+
+ this.heartbeatCount = 0;
+
}
public TxnInfo(
@@ -175,6 +202,13 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
if (other.isSetHostname()) {
this.hostname = other.hostname;
}
+ if (other.isSetAgentInfo()) {
+ this.agentInfo = other.agentInfo;
+ }
+ this.heartbeatCount = other.heartbeatCount;
+ if (other.isSetMetaInfo()) {
+ this.metaInfo = other.metaInfo;
+ }
}
public TxnInfo deepCopy() {
@@ -188,6 +222,11 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
this.state = null;
this.user = null;
this.hostname = null;
+ this.agentInfo = "Unknown";
+
+ this.heartbeatCount = 0;
+
+ this.metaInfo = null;
}
public long getId() {
@@ -289,6 +328,74 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
}
}
+ 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 int getHeartbeatCount() {
+ return this.heartbeatCount;
+ }
+
+ public void setHeartbeatCount(int heartbeatCount) {
+ this.heartbeatCount = heartbeatCount;
+ setHeartbeatCountIsSet(true);
+ }
+
+ public void unsetHeartbeatCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field heartbeatCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetHeartbeatCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID);
+ }
+
+ public void setHeartbeatCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HEARTBEATCOUNT_ISSET_ID, value);
+ }
+
+ public String getMetaInfo() {
+ return this.metaInfo;
+ }
+
+ public void setMetaInfo(String metaInfo) {
+ this.metaInfo = metaInfo;
+ }
+
+ public void unsetMetaInfo() {
+ this.metaInfo = null;
+ }
+
+ /** Returns true if field metaInfo is set (has been assigned a value) and false otherwise */
+ public boolean isSetMetaInfo() {
+ return this.metaInfo != null;
+ }
+
+ public void setMetaInfoIsSet(boolean value) {
+ if (!value) {
+ this.metaInfo = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ID:
@@ -323,6 +430,30 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
}
break;
+ case AGENT_INFO:
+ if (value == null) {
+ unsetAgentInfo();
+ } else {
+ setAgentInfo((String)value);
+ }
+ break;
+
+ case HEARTBEAT_COUNT:
+ if (value == null) {
+ unsetHeartbeatCount();
+ } else {
+ setHeartbeatCount((Integer)value);
+ }
+ break;
+
+ case META_INFO:
+ if (value == null) {
+ unsetMetaInfo();
+ } else {
+ setMetaInfo((String)value);
+ }
+ break;
+
}
}
@@ -340,6 +471,15 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
case HOSTNAME:
return getHostname();
+ case AGENT_INFO:
+ return getAgentInfo();
+
+ case HEARTBEAT_COUNT:
+ return getHeartbeatCount();
+
+ case META_INFO:
+ return getMetaInfo();
+
}
throw new IllegalStateException();
}
@@ -359,6 +499,12 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
return isSetUser();
case HOSTNAME:
return isSetHostname();
+ case AGENT_INFO:
+ return isSetAgentInfo();
+ case HEARTBEAT_COUNT:
+ return isSetHeartbeatCount();
+ case META_INFO:
+ return isSetMetaInfo();
}
throw new IllegalStateException();
}
@@ -412,6 +558,33 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
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;
+ }
+
+ boolean this_present_heartbeatCount = true && this.isSetHeartbeatCount();
+ boolean that_present_heartbeatCount = true && that.isSetHeartbeatCount();
+ if (this_present_heartbeatCount || that_present_heartbeatCount) {
+ if (!(this_present_heartbeatCount && that_present_heartbeatCount))
+ return false;
+ if (this.heartbeatCount != that.heartbeatCount)
+ return false;
+ }
+
+ boolean this_present_metaInfo = true && this.isSetMetaInfo();
+ boolean that_present_metaInfo = true && that.isSetMetaInfo();
+ if (this_present_metaInfo || that_present_metaInfo) {
+ if (!(this_present_metaInfo && that_present_metaInfo))
+ return false;
+ if (!this.metaInfo.equals(that.metaInfo))
+ return false;
+ }
+
return true;
}
@@ -439,6 +612,21 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
if (present_hostname)
list.add(hostname);
+ boolean present_agentInfo = true && (isSetAgentInfo());
+ list.add(present_agentInfo);
+ if (present_agentInfo)
+ list.add(agentInfo);
+
+ boolean present_heartbeatCount = true && (isSetHeartbeatCount());
+ list.add(present_heartbeatCount);
+ if (present_heartbeatCount)
+ list.add(heartbeatCount);
+
+ boolean present_metaInfo = true && (isSetMetaInfo());
+ list.add(present_metaInfo);
+ if (present_metaInfo)
+ list.add(metaInfo);
+
return list.hashCode();
}
@@ -490,6 +678,36 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
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;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHeartbeatCount()).compareTo(other.isSetHeartbeatCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHeartbeatCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heartbeatCount, other.heartbeatCount);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMetaInfo()).compareTo(other.isSetMetaInfo());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMetaInfo()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metaInfo, other.metaInfo);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -537,6 +755,32 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
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;
+ }
+ if (isSetHeartbeatCount()) {
+ if (!first) sb.append(", ");
+ sb.append("heartbeatCount:");
+ sb.append(this.heartbeatCount);
+ first = false;
+ }
+ if (isSetMetaInfo()) {
+ if (!first) sb.append(", ");
+ sb.append("metaInfo:");
+ if (this.metaInfo == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.metaInfo);
+ }
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -630,6 +874,30 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
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;
+ case 6: // HEARTBEAT_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.heartbeatCount = iprot.readI32();
+ struct.setHeartbeatCountIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // META_INFO
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.metaInfo = iprot.readString();
+ struct.setMetaInfoIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -661,6 +929,25 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
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();
+ }
+ }
+ if (struct.isSetHeartbeatCount()) {
+ oprot.writeFieldBegin(HEARTBEAT_COUNT_FIELD_DESC);
+ oprot.writeI32(struct.heartbeatCount);
+ oprot.writeFieldEnd();
+ }
+ if (struct.metaInfo != null) {
+ if (struct.isSetMetaInfo()) {
+ oprot.writeFieldBegin(META_INFO_FIELD_DESC);
+ oprot.writeString(struct.metaInfo);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -682,6 +969,26 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
oprot.writeI32(struct.state.getValue());
oprot.writeString(struct.user);
oprot.writeString(struct.hostname);
+ BitSet optionals = new BitSet();
+ if (struct.isSetAgentInfo()) {
+ optionals.set(0);
+ }
+ if (struct.isSetHeartbeatCount()) {
+ optionals.set(1);
+ }
+ if (struct.isSetMetaInfo()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetAgentInfo()) {
+ oprot.writeString(struct.agentInfo);
+ }
+ if (struct.isSetHeartbeatCount()) {
+ oprot.writeI32(struct.heartbeatCount);
+ }
+ if (struct.isSetMetaInfo()) {
+ oprot.writeString(struct.metaInfo);
+ }
}
@Override
@@ -695,6 +1002,19 @@ public class TxnInfo implements org.apache.thrift.TBase<TxnInfo, TxnInfo._Fields
struct.setUserIsSet(true);
struct.hostname = iprot.readString();
struct.setHostnameIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.agentInfo = iprot.readString();
+ struct.setAgentInfoIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.heartbeatCount = iprot.readI32();
+ struct.setHeartbeatCountIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.metaInfo = iprot.readString();
+ struct.setMetaInfoIsSet(true);
+ }
}
}
[5/5] hive git commit: Merge branch 'hive12832-branch2' into
branch-2.0
Posted by ga...@apache.org.
Merge branch 'hive12832-branch2' into branch-2.0
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/f260feb2
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/f260feb2
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/f260feb2
Branch: refs/heads/branch-2.0
Commit: f260feb2548fad2cc5e8526292cdebdc874208bf
Parents: 2f4b684 36df88c
Author: Alan Gates <ga...@hortonworks.com>
Authored: Thu Jan 14 16:08:24 2016 -0800
Committer: Alan Gates <ga...@hortonworks.com>
Committed: Thu Jan 14 16:08:24 2016 -0800
----------------------------------------------------------------------
.../org/apache/hive/beeline/HiveSchemaTool.java | 42 +-
metastore/if/hive_metastore.thrift | 20 +
.../upgrade/derby/023-HIVE-12807.derby.sql | 1 +
.../upgrade/derby/024-HIVE-12814.derby.sql | 1 +
.../upgrade/derby/025-HIVE-12816.derby.sql | 1 +
.../upgrade/derby/026-HIVE-12818.derby.sql | 15 +
.../upgrade/derby/027-HIVE-12819.derby.sql | 1 +
.../upgrade/derby/028-HIVE-12821.derby.sql | 2 +
.../upgrade/derby/029-HIVE-12822.derby.sql | 1 +
.../upgrade/derby/030-HIVE-12823.derby.sql | 1 +
.../upgrade/derby/031-HIVE-12831.derby.sql | 2 +
.../upgrade/derby/032-HIVE-12832.derby.sql | 7 +
.../upgrade/derby/hive-schema-1.3.0.derby.sql | 2 +-
.../upgrade/derby/hive-schema-2.0.0.derby.sql | 2 +-
.../derby/hive-txn-schema-1.3.0.derby.sql | 119 +++++
.../derby/hive-txn-schema-2.0.0.derby.sql | 119 +++++
.../derby/upgrade-1.2.0-to-1.3.0.derby.sql | 10 +
.../derby/upgrade-1.2.0-to-2.0.0.derby.sql | 10 +
.../upgrade/mssql/008-HIVE-12807.mssql.sql | 1 +
.../upgrade/mssql/009-HIVE-12814.mssql.sql | 1 +
.../upgrade/mssql/010-HIVE-12816.mssql.sql | 1 +
.../upgrade/mssql/011-HIVE-12818.mssql.sql | 21 +
.../upgrade/mssql/012-HIVE-12819.mssql.sql | 1 +
.../upgrade/mssql/013-HIVE-12821.mssql.sql | 2 +
.../upgrade/mssql/014-HIVE-12822.mssql.sql | 1 +
.../upgrade/mssql/015-HIVE-12823.mssql.sql | 1 +
.../upgrade/mssql/016-HIVE-12831.mssql.sql | 2 +
.../upgrade/mssql/017-HIVE-12832.mssql.sql | 10 +
.../upgrade/mssql/hive-schema-1.3.0.mssql.sql | 40 ++
.../upgrade/mssql/hive-schema-2.0.0.mssql.sql | 40 ++
.../mssql/upgrade-1.2.0-to-1.3.0.mssql.sql | 10 +
.../mssql/upgrade-1.2.0-to-2.0.0.mssql.sql | 10 +
.../upgrade/mysql/023-HIVE-12807.mysql.sql | 1 +
.../upgrade/mysql/024-HIVE-12814.mysql.sql | 1 +
.../upgrade/mysql/025-HIVE-12816.mysql.sql | 1 +
.../upgrade/mysql/026-HIVE-12818.mysql.sql | 17 +
.../upgrade/mysql/027-HIVE-12819.mysql.sql | 1 +
.../upgrade/mysql/028-HIVE-12821.mysql.sql | 2 +
.../upgrade/mysql/029-HIVE-12822.mysql.sql | 1 +
.../upgrade/mysql/030-HIVE-12823.mysql.sql | 1 +
.../upgrade/mysql/031-HIVE-12831.mysql.sql | 2 +
.../upgrade/mysql/032-HIVE-12832.mysql.sql | 7 +
.../upgrade/mysql/hive-schema-1.3.0.mysql.sql | 2 +-
.../upgrade/mysql/hive-schema-2.0.0.mysql.sql | 2 +-
.../mysql/hive-txn-schema-1.3.0.mysql.sql | 122 +++++
.../mysql/hive-txn-schema-2.0.0.mysql.sql | 122 +++++
.../mysql/upgrade-1.2.0-to-1.3.0.mysql.sql | 11 +
.../mysql/upgrade-1.2.0-to-2.0.0.mysql.sql | 11 +
.../upgrade/oracle/023-HIVE-12807.oracle.sql | 1 +
.../upgrade/oracle/024-HIVE-12814.oracle.sql | 1 +
.../upgrade/oracle/025-HIVE-12816.oracle.sql | 1 +
.../upgrade/oracle/026-HIVE-12818.oracle.sql | 17 +
.../upgrade/oracle/027-HIVE-12819.oracle.sql | 1 +
.../upgrade/oracle/028-HIVE-12821.oracle.sql | 2 +
.../upgrade/oracle/029-HIVE-12822.oracle.sql | 1 +
.../upgrade/oracle/030-HIVE-12823.oracle.sql | 1 +
.../upgrade/oracle/031-HIVE-12381.oracle.sql | 2 +
.../upgrade/oracle/032-HIVE-12832.oracle.sql | 7 +
.../upgrade/oracle/hive-schema-1.3.0.oracle.sql | 2 +-
.../upgrade/oracle/hive-schema-2.0.0.oracle.sql | 2 +-
.../oracle/hive-txn-schema-1.3.0.oracle.sql | 120 +++++
.../oracle/hive-txn-schema-2.0.0.oracle.sql | 120 +++++
.../oracle/upgrade-1.2.0-to-1.3.0.oracle.sql | 10 +
.../oracle/upgrade-1.2.0-to-2.0.0.oracle.sql | 10 +
.../postgres/022-HIVE-12807.postgres.sql | 1 +
.../postgres/023-HIVE-12814.postgres.sql | 1 +
.../postgres/024-HIVE-12816.postgres.sql | 1 +
.../postgres/025-HIVE-12818.postgres.sql | 17 +
.../postgres/026-HIVE-12819.postgres.sql | 1 +
.../postgres/027-HIVE-12821.postgres.sql | 2 +
.../postgres/028-HIVE-12822.postgres.sql | 1 +
.../postgres/029-HIVE-12823.postgres.sql | 1 +
.../postgres/030-HIVE-12831.postgres.sql | 2 +
.../postgres/031-HIVE-12832.postgres.sql | 7 +
.../postgres/hive-schema-1.3.0.postgres.sql | 2 +-
.../postgres/hive-schema-2.0.0.postgres.sql | 2 +-
.../postgres/hive-txn-schema-1.3.0.postgres.sql | 121 +++++
.../postgres/hive-txn-schema-2.0.0.postgres.sql | 121 +++++
.../upgrade-1.2.0-to-1.3.0.postgres.sql | 10 +
.../upgrade-1.2.0-to-2.0.0.postgres.sql | 10 +
.../gen/thrift/gen-cpp/hive_metastore_types.cpp | 463 ++++++++++++++++-
.../gen/thrift/gen-cpp/hive_metastore_types.h | 202 +++++++-
.../hive/metastore/api/CheckLockRequest.java | 204 +++++++-
.../hadoop/hive/metastore/api/LockRequest.java | 117 ++++-
.../hive/metastore/api/OpenTxnRequest.java | 115 ++++-
.../api/ShowCompactResponseElement.java | 421 ++++++++++++++-
.../hive/metastore/api/ShowLocksRequest.java | 429 +++++++++++++++-
.../metastore/api/ShowLocksResponseElement.java | 512 ++++++++++++++++++-
.../hadoop/hive/metastore/api/TxnInfo.java | 322 +++++++++++-
.../src/gen/thrift/gen-php/metastore/Types.php | 464 ++++++++++++++++-
.../gen/thrift/gen-py/hive_metastore/ttypes.py | 278 +++++++++-
.../gen/thrift/gen-rb/hive_metastore_types.rb | 53 +-
92 files changed, 4913 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
[4/5] hive git commit: HIVE-12832 thrift and RDBMS changes for ACID
fixes, branch-2.0 version
Posted by ga...@apache.org.
HIVE-12832 thrift and RDBMS changes for ACID fixes, branch-2.0 version
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/36df88c8
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/36df88c8
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/36df88c8
Branch: refs/heads/branch-2.0
Commit: 36df88c8ee2ad92bcf1b787c18dd9a064d25f3df
Parents: 295ad94
Author: Alan Gates <ga...@hortonworks.com>
Authored: Thu Jan 14 16:03:09 2016 -0800
Committer: Alan Gates <ga...@hortonworks.com>
Committed: Thu Jan 14 16:03:09 2016 -0800
----------------------------------------------------------------------
.../org/apache/hive/beeline/HiveSchemaTool.java | 42 +-
metastore/if/hive_metastore.thrift | 20 +
.../upgrade/derby/023-HIVE-12807.derby.sql | 1 +
.../upgrade/derby/024-HIVE-12814.derby.sql | 1 +
.../upgrade/derby/025-HIVE-12816.derby.sql | 1 +
.../upgrade/derby/026-HIVE-12818.derby.sql | 15 +
.../upgrade/derby/027-HIVE-12819.derby.sql | 1 +
.../upgrade/derby/028-HIVE-12821.derby.sql | 2 +
.../upgrade/derby/029-HIVE-12822.derby.sql | 1 +
.../upgrade/derby/030-HIVE-12823.derby.sql | 1 +
.../upgrade/derby/031-HIVE-12831.derby.sql | 2 +
.../upgrade/derby/032-HIVE-12832.derby.sql | 7 +
.../upgrade/derby/hive-schema-1.3.0.derby.sql | 2 +-
.../upgrade/derby/hive-schema-2.0.0.derby.sql | 2 +-
.../derby/hive-txn-schema-1.3.0.derby.sql | 119 +++++
.../derby/hive-txn-schema-2.0.0.derby.sql | 119 +++++
.../derby/upgrade-1.2.0-to-1.3.0.derby.sql | 10 +
.../derby/upgrade-1.2.0-to-2.0.0.derby.sql | 10 +
.../upgrade/mssql/008-HIVE-12807.mssql.sql | 1 +
.../upgrade/mssql/009-HIVE-12814.mssql.sql | 1 +
.../upgrade/mssql/010-HIVE-12816.mssql.sql | 1 +
.../upgrade/mssql/011-HIVE-12818.mssql.sql | 21 +
.../upgrade/mssql/012-HIVE-12819.mssql.sql | 1 +
.../upgrade/mssql/013-HIVE-12821.mssql.sql | 2 +
.../upgrade/mssql/014-HIVE-12822.mssql.sql | 1 +
.../upgrade/mssql/015-HIVE-12823.mssql.sql | 1 +
.../upgrade/mssql/016-HIVE-12831.mssql.sql | 2 +
.../upgrade/mssql/017-HIVE-12832.mssql.sql | 10 +
.../upgrade/mssql/hive-schema-1.3.0.mssql.sql | 40 ++
.../upgrade/mssql/hive-schema-2.0.0.mssql.sql | 40 ++
.../mssql/upgrade-1.2.0-to-1.3.0.mssql.sql | 10 +
.../mssql/upgrade-1.2.0-to-2.0.0.mssql.sql | 10 +
.../upgrade/mysql/023-HIVE-12807.mysql.sql | 1 +
.../upgrade/mysql/024-HIVE-12814.mysql.sql | 1 +
.../upgrade/mysql/025-HIVE-12816.mysql.sql | 1 +
.../upgrade/mysql/026-HIVE-12818.mysql.sql | 17 +
.../upgrade/mysql/027-HIVE-12819.mysql.sql | 1 +
.../upgrade/mysql/028-HIVE-12821.mysql.sql | 2 +
.../upgrade/mysql/029-HIVE-12822.mysql.sql | 1 +
.../upgrade/mysql/030-HIVE-12823.mysql.sql | 1 +
.../upgrade/mysql/031-HIVE-12831.mysql.sql | 2 +
.../upgrade/mysql/032-HIVE-12832.mysql.sql | 7 +
.../upgrade/mysql/hive-schema-1.3.0.mysql.sql | 2 +-
.../upgrade/mysql/hive-schema-2.0.0.mysql.sql | 2 +-
.../mysql/hive-txn-schema-1.3.0.mysql.sql | 122 +++++
.../mysql/hive-txn-schema-2.0.0.mysql.sql | 122 +++++
.../mysql/upgrade-1.2.0-to-1.3.0.mysql.sql | 11 +
.../mysql/upgrade-1.2.0-to-2.0.0.mysql.sql | 11 +
.../upgrade/oracle/023-HIVE-12807.oracle.sql | 1 +
.../upgrade/oracle/024-HIVE-12814.oracle.sql | 1 +
.../upgrade/oracle/025-HIVE-12816.oracle.sql | 1 +
.../upgrade/oracle/026-HIVE-12818.oracle.sql | 17 +
.../upgrade/oracle/027-HIVE-12819.oracle.sql | 1 +
.../upgrade/oracle/028-HIVE-12821.oracle.sql | 2 +
.../upgrade/oracle/029-HIVE-12822.oracle.sql | 1 +
.../upgrade/oracle/030-HIVE-12823.oracle.sql | 1 +
.../upgrade/oracle/031-HIVE-12381.oracle.sql | 2 +
.../upgrade/oracle/032-HIVE-12832.oracle.sql | 7 +
.../upgrade/oracle/hive-schema-1.3.0.oracle.sql | 2 +-
.../upgrade/oracle/hive-schema-2.0.0.oracle.sql | 2 +-
.../oracle/hive-txn-schema-1.3.0.oracle.sql | 120 +++++
.../oracle/hive-txn-schema-2.0.0.oracle.sql | 120 +++++
.../oracle/upgrade-1.2.0-to-1.3.0.oracle.sql | 10 +
.../oracle/upgrade-1.2.0-to-2.0.0.oracle.sql | 10 +
.../postgres/022-HIVE-12807.postgres.sql | 1 +
.../postgres/023-HIVE-12814.postgres.sql | 1 +
.../postgres/024-HIVE-12816.postgres.sql | 1 +
.../postgres/025-HIVE-12818.postgres.sql | 17 +
.../postgres/026-HIVE-12819.postgres.sql | 1 +
.../postgres/027-HIVE-12821.postgres.sql | 2 +
.../postgres/028-HIVE-12822.postgres.sql | 1 +
.../postgres/029-HIVE-12823.postgres.sql | 1 +
.../postgres/030-HIVE-12831.postgres.sql | 2 +
.../postgres/031-HIVE-12832.postgres.sql | 7 +
.../postgres/hive-schema-1.3.0.postgres.sql | 2 +-
.../postgres/hive-schema-2.0.0.postgres.sql | 2 +-
.../postgres/hive-txn-schema-1.3.0.postgres.sql | 121 +++++
.../postgres/hive-txn-schema-2.0.0.postgres.sql | 121 +++++
.../upgrade-1.2.0-to-1.3.0.postgres.sql | 10 +
.../upgrade-1.2.0-to-2.0.0.postgres.sql | 10 +
.../gen/thrift/gen-cpp/hive_metastore_types.cpp | 463 ++++++++++++++++-
.../gen/thrift/gen-cpp/hive_metastore_types.h | 202 +++++++-
.../hive/metastore/api/CheckLockRequest.java | 204 +++++++-
.../hadoop/hive/metastore/api/LockRequest.java | 117 ++++-
.../hive/metastore/api/OpenTxnRequest.java | 115 ++++-
.../api/ShowCompactResponseElement.java | 421 ++++++++++++++-
.../hive/metastore/api/ShowLocksRequest.java | 429 +++++++++++++++-
.../metastore/api/ShowLocksResponseElement.java | 512 ++++++++++++++++++-
.../hadoop/hive/metastore/api/TxnInfo.java | 322 +++++++++++-
.../src/gen/thrift/gen-php/metastore/Types.php | 464 ++++++++++++++++-
.../gen/thrift/gen-py/hive_metastore/ttypes.py | 278 +++++++++-
.../gen/thrift/gen-rb/hive_metastore_types.rb | 53 +-
92 files changed, 4913 insertions(+), 66 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
----------------------------------------------------------------------
diff --git a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
index 6f0ba07..2d7910d 100644
--- a/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
+++ b/beeline/src/java/org/apache/hive/beeline/HiveSchemaTool.java
@@ -17,18 +17,6 @@
*/
package org.apache.hive.beeline;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.List;
-
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.GnuParser;
@@ -39,6 +27,7 @@ import org.apache.commons.cli.OptionGroup;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.io.output.NullOutputStream;
+import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
import org.apache.hadoop.hive.metastore.HiveMetaException;
@@ -46,6 +35,22 @@ import org.apache.hadoop.hive.metastore.MetaStoreSchemaInfo;
import org.apache.hadoop.hive.metastore.api.MetaException;
import org.apache.hadoop.hive.shims.ShimLoader;
import org.apache.hive.beeline.HiveSchemaHelper.NestedScriptParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
public class HiveSchemaTool {
private String userName = null;
@@ -57,6 +62,8 @@ public class HiveSchemaTool {
private final String dbType;
private final MetaStoreSchemaInfo metaStoreSchemaInfo;
+ static final private Logger LOG = LoggerFactory.getLogger(HiveSchemaTool.class.getName());
+
public HiveSchemaTool(String dbType) throws HiveMetaException {
this(System.getenv("HIVE_HOME"), new HiveConf(HiveSchemaTool.class), dbType);
}
@@ -356,6 +363,16 @@ public class HiveSchemaTool {
argList.add("-f");
argList.add(sqlScriptFile);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Going to invoke file that contains:");
+ FileReader fr = new FileReader(sqlScriptFile);
+ BufferedReader reader = new BufferedReader(fr);
+ String line;
+ while ((line = reader.readLine()) != null) {
+ LOG.debug("script: " + line);
+ }
+ }
+
// run the script using Beeline
BeeLine beeLine = new BeeLine();
if (!verbose) {
@@ -367,6 +384,7 @@ public class HiveSchemaTool {
// We can be pretty sure that an entire line can be processed as a single command since
// we always add a line separator at the end while calling dbCommandParser.buildCommand.
beeLine.getOpts().setEntireLineAsCommand(true);
+ LOG.debug("Going to run command <" + StringUtils.join(argList, " ") + ">");
int status = beeLine.begin(argList.toArray(new String[0]), null);
if (status != 0) {
throw new IOException("Schema script failed, errorcode " + status);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/if/hive_metastore.thrift
----------------------------------------------------------------------
diff --git a/metastore/if/hive_metastore.thrift b/metastore/if/hive_metastore.thrift
index bb754f1..f2b2472 100755
--- a/metastore/if/hive_metastore.thrift
+++ b/metastore/if/hive_metastore.thrift
@@ -543,6 +543,9 @@ 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",
+ 6: optional i32 heartbeatCount=0,
+ 7: optional string metaInfo,
}
struct GetOpenTxnsInfoResponse {
@@ -559,6 +562,7 @@ struct OpenTxnRequest {
1: required i32 num_txns,
2: required string user,
3: required string hostname,
+ 4: optional string agentInfo = "Unknown",
}
struct OpenTxnsResponse {
@@ -586,6 +590,7 @@ struct LockRequest {
2: optional i64 txnid,
3: required string user, // used in 'show locks' to help admins find who has open locks
4: required string hostname, // used in 'show locks' to help admins find who has open locks
+ 5: optional string agentInfo = "Unknown",
}
struct LockResponse {
@@ -595,6 +600,8 @@ struct LockResponse {
struct CheckLockRequest {
1: required i64 lockid,
+ 2: optional i64 txnid,
+ 3: optional i64 elapsed_ms,
}
struct UnlockRequest {
@@ -602,6 +609,10 @@ struct UnlockRequest {
}
struct ShowLocksRequest {
+ 1: optional string dbname,
+ 2: optional string tablename,
+ 3: optional string partname,
+ 4: optional bool isExtended=false,
}
struct ShowLocksResponseElement {
@@ -616,6 +627,11 @@ struct ShowLocksResponseElement {
9: optional i64 acquiredat,
10: required string user,
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 {
@@ -657,6 +673,10 @@ struct ShowCompactResponseElement {
6: optional string workerid,
7: optional i64 start,
8: optional string runAs,
+ 9: optional i64 hightestTxnId, // Highest Txn ID handled by this compaction
+ 10: optional string metaInfo,
+ 11: optional i64 endTime,
+ 12: optional string hadoopJobId = "None",
}
struct ShowCompactResponse {
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/023-HIVE-12807.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/023-HIVE-12807.derby.sql b/metastore/scripts/upgrade/derby/023-HIVE-12807.derby.sql
new file mode 100644
index 0000000..3dfc6fe
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/023-HIVE-12807.derby.sql
@@ -0,0 +1 @@
+ALTER TABLE "COMPACTION_QUEUE" ADD "CQ_HIGHEST_TXN_ID" bigint;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/024-HIVE-12814.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/024-HIVE-12814.derby.sql b/metastore/scripts/upgrade/derby/024-HIVE-12814.derby.sql
new file mode 100644
index 0000000..a451846
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/024-HIVE-12814.derby.sql
@@ -0,0 +1 @@
+ALTER TABLE "COMPACTION_QUEUE" ADD "CQ_META_INFO" varchar(2048) for bit data;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/025-HIVE-12816.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/025-HIVE-12816.derby.sql b/metastore/scripts/upgrade/derby/025-HIVE-12816.derby.sql
new file mode 100644
index 0000000..2a78bf1
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/025-HIVE-12816.derby.sql
@@ -0,0 +1 @@
+ALTER TABLE "COMPACTION_QUEUE" ADD "CQ_HADOOP_JOB_ID" VARCHAR(32);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/026-HIVE-12818.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/026-HIVE-12818.derby.sql b/metastore/scripts/upgrade/derby/026-HIVE-12818.derby.sql
new file mode 100644
index 0000000..4e3c82b
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/026-HIVE-12818.derby.sql
@@ -0,0 +1,15 @@
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START bigint,
+ CC_END bigint,
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID bigint,
+ CC_META_INFO varchar(2048) for bit data,
+ CC_HADOOP_JOB_ID varchar(32)
+);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/027-HIVE-12819.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/027-HIVE-12819.derby.sql b/metastore/scripts/upgrade/derby/027-HIVE-12819.derby.sql
new file mode 100644
index 0000000..69b8a3a
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/027-HIVE-12819.derby.sql
@@ -0,0 +1 @@
+ALTER TABLE "TXNS" ADD "TXN_AGENT_INFO" varchar(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/028-HIVE-12821.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/028-HIVE-12821.derby.sql b/metastore/scripts/upgrade/derby/028-HIVE-12821.derby.sql
new file mode 100644
index 0000000..0c10245
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/028-HIVE-12821.derby.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "TXNS" ADD "TXN_HEARTBEAT_COUNT" INTEGER;
+ALTER TABLE "HIVE_LOCKS" ADD "HL_HEARTBEAT_COUNT" INTEGER;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/029-HIVE-12822.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/029-HIVE-12822.derby.sql b/metastore/scripts/upgrade/derby/029-HIVE-12822.derby.sql
new file mode 100644
index 0000000..9f9423e
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/029-HIVE-12822.derby.sql
@@ -0,0 +1 @@
+ALTER TABLE "TXNS" ADD "TXN_META_INFO" varchar(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/030-HIVE-12823.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/030-HIVE-12823.derby.sql b/metastore/scripts/upgrade/derby/030-HIVE-12823.derby.sql
new file mode 100644
index 0000000..b7fbc71
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/030-HIVE-12823.derby.sql
@@ -0,0 +1 @@
+ALTER TABLE "HIVE_LOCKS" ADD "HL_AGENT_INFO" varchar(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/031-HIVE-12831.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/031-HIVE-12831.derby.sql b/metastore/scripts/upgrade/derby/031-HIVE-12831.derby.sql
new file mode 100644
index 0000000..890fa1a
--- /dev/null
+++ b/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;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/032-HIVE-12832.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/032-HIVE-12832.derby.sql b/metastore/scripts/upgrade/derby/032-HIVE-12832.derby.sql
new file mode 100644
index 0000000..0e5515c
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/032-HIVE-12832.derby.sql
@@ -0,0 +1,7 @@
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT varchar(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+);
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/hive-schema-1.3.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/hive-schema-1.3.0.derby.sql b/metastore/scripts/upgrade/derby/hive-schema-1.3.0.derby.sql
index 20eb326..3893194 100644
--- a/metastore/scripts/upgrade/derby/hive-schema-1.3.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/hive-schema-1.3.0.derby.sql
@@ -327,7 +327,7 @@ ALTER TABLE "APP"."SDS" ADD CONSTRAINT "SQL110318025505550" CHECK (IS_COMPRESSED
-- ----------------------------
-- Transaction and Lock Tables
-- ----------------------------
-RUN 'hive-txn-schema-0.13.0.derby.sql';
+RUN 'hive-txn-schema-1.3.0.derby.sql';
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/hive-schema-2.0.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/hive-schema-2.0.0.derby.sql b/metastore/scripts/upgrade/derby/hive-schema-2.0.0.derby.sql
index abc6bf4..2c2f1e7 100644
--- a/metastore/scripts/upgrade/derby/hive-schema-2.0.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/hive-schema-2.0.0.derby.sql
@@ -327,7 +327,7 @@ ALTER TABLE "APP"."SDS" ADD CONSTRAINT "SQL110318025505550" CHECK (IS_COMPRESSED
-- ----------------------------
-- Transaction and Lock Tables
-- ----------------------------
-RUN 'hive-txn-schema-0.13.0.derby.sql';
+RUN 'hive-txn-schema-2.0.0.derby.sql';
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/hive-txn-schema-1.3.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/hive-txn-schema-1.3.0.derby.sql b/metastore/scripts/upgrade/derby/hive-txn-schema-1.3.0.derby.sql
new file mode 100644
index 0000000..13f3340
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/hive-txn-schema-1.3.0.derby.sql
@@ -0,0 +1,119 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the License); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an AS IS BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+--
+-- Tables for transaction management
+--
+CREATE TABLE TXNS (
+ TXN_ID bigint PRIMARY KEY,
+ TXN_STATE char(1) NOT NULL,
+ TXN_STARTED bigint NOT NULL,
+ TXN_LAST_HEARTBEAT bigint NOT NULL,
+ TXN_USER varchar(128) NOT NULL,
+ TXN_HOST varchar(128) NOT NULL,
+ TXN_AGENT_INFO varchar(128),
+ TXN_META_INFO varchar(128),
+ TXN_HEARTBEAT_COUNT integer
+);
+
+CREATE TABLE TXN_COMPONENTS (
+ TC_TXNID bigint REFERENCES TXNS (TXN_ID),
+ TC_DATABASE varchar(128) NOT NULL,
+ TC_TABLE varchar(128),
+ TC_PARTITION varchar(767)
+);
+
+CREATE TABLE COMPLETED_TXN_COMPONENTS (
+ CTC_TXNID bigint,
+ CTC_DATABASE varchar(128) NOT NULL,
+ CTC_TABLE varchar(128),
+ CTC_PARTITION varchar(767)
+);
+
+CREATE TABLE NEXT_TXN_ID (
+ NTXN_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_TXN_ID VALUES(1);
+
+CREATE TABLE HIVE_LOCKS (
+ HL_LOCK_EXT_ID bigint NOT NULL,
+ HL_LOCK_INT_ID bigint NOT NULL,
+ HL_TXNID bigint,
+ HL_DB varchar(128) NOT NULL,
+ HL_TABLE varchar(128),
+ HL_PARTITION varchar(767),
+ HL_LOCK_STATE char(1) NOT NULL,
+ HL_LOCK_TYPE char(1) NOT NULL,
+ HL_LAST_HEARTBEAT bigint NOT NULL,
+ HL_ACQUIRED_AT bigint,
+ HL_USER varchar(128) NOT NULL,
+ 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)
+);
+
+CREATE INDEX HL_TXNID_INDEX ON HIVE_LOCKS (HL_TXNID);
+
+CREATE TABLE NEXT_LOCK_ID (
+ NL_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_LOCK_ID VALUES(1);
+
+CREATE TABLE COMPACTION_QUEUE (
+ CQ_ID bigint PRIMARY KEY,
+ CQ_DATABASE varchar(128) NOT NULL,
+ CQ_TABLE varchar(128) NOT NULL,
+ CQ_PARTITION varchar(767),
+ CQ_STATE char(1) NOT NULL,
+ CQ_TYPE char(1) NOT NULL,
+ CQ_WORKER_ID varchar(128),
+ CQ_START bigint,
+ CQ_RUN_AS varchar(128),
+ CQ_HIGHEST_TXN_ID bigint,
+ CQ_META_INFO varchar(2048) for bit data,
+ CQ_HADOOP_JOB_ID varchar(32)
+);
+
+CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
+ NCQ_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
+
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START bigint,
+ CC_END bigint,
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID bigint,
+ CC_META_INFO varchar(2048) for bit data,
+ CC_HADOOP_JOB_ID varchar(32)
+);
+
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT varchar(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+);
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/hive-txn-schema-2.0.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/hive-txn-schema-2.0.0.derby.sql b/metastore/scripts/upgrade/derby/hive-txn-schema-2.0.0.derby.sql
new file mode 100644
index 0000000..13f3340
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/hive-txn-schema-2.0.0.derby.sql
@@ -0,0 +1,119 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the License); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an AS IS BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+--
+-- Tables for transaction management
+--
+CREATE TABLE TXNS (
+ TXN_ID bigint PRIMARY KEY,
+ TXN_STATE char(1) NOT NULL,
+ TXN_STARTED bigint NOT NULL,
+ TXN_LAST_HEARTBEAT bigint NOT NULL,
+ TXN_USER varchar(128) NOT NULL,
+ TXN_HOST varchar(128) NOT NULL,
+ TXN_AGENT_INFO varchar(128),
+ TXN_META_INFO varchar(128),
+ TXN_HEARTBEAT_COUNT integer
+);
+
+CREATE TABLE TXN_COMPONENTS (
+ TC_TXNID bigint REFERENCES TXNS (TXN_ID),
+ TC_DATABASE varchar(128) NOT NULL,
+ TC_TABLE varchar(128),
+ TC_PARTITION varchar(767)
+);
+
+CREATE TABLE COMPLETED_TXN_COMPONENTS (
+ CTC_TXNID bigint,
+ CTC_DATABASE varchar(128) NOT NULL,
+ CTC_TABLE varchar(128),
+ CTC_PARTITION varchar(767)
+);
+
+CREATE TABLE NEXT_TXN_ID (
+ NTXN_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_TXN_ID VALUES(1);
+
+CREATE TABLE HIVE_LOCKS (
+ HL_LOCK_EXT_ID bigint NOT NULL,
+ HL_LOCK_INT_ID bigint NOT NULL,
+ HL_TXNID bigint,
+ HL_DB varchar(128) NOT NULL,
+ HL_TABLE varchar(128),
+ HL_PARTITION varchar(767),
+ HL_LOCK_STATE char(1) NOT NULL,
+ HL_LOCK_TYPE char(1) NOT NULL,
+ HL_LAST_HEARTBEAT bigint NOT NULL,
+ HL_ACQUIRED_AT bigint,
+ HL_USER varchar(128) NOT NULL,
+ 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)
+);
+
+CREATE INDEX HL_TXNID_INDEX ON HIVE_LOCKS (HL_TXNID);
+
+CREATE TABLE NEXT_LOCK_ID (
+ NL_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_LOCK_ID VALUES(1);
+
+CREATE TABLE COMPACTION_QUEUE (
+ CQ_ID bigint PRIMARY KEY,
+ CQ_DATABASE varchar(128) NOT NULL,
+ CQ_TABLE varchar(128) NOT NULL,
+ CQ_PARTITION varchar(767),
+ CQ_STATE char(1) NOT NULL,
+ CQ_TYPE char(1) NOT NULL,
+ CQ_WORKER_ID varchar(128),
+ CQ_START bigint,
+ CQ_RUN_AS varchar(128),
+ CQ_HIGHEST_TXN_ID bigint,
+ CQ_META_INFO varchar(2048) for bit data,
+ CQ_HADOOP_JOB_ID varchar(32)
+);
+
+CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
+ NCQ_NEXT bigint NOT NULL
+);
+INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
+
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START bigint,
+ CC_END bigint,
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID bigint,
+ CC_META_INFO varchar(2048) for bit data,
+ CC_HADOOP_JOB_ID varchar(32)
+);
+
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT varchar(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+);
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-1.3.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-1.3.0.derby.sql b/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-1.3.0.derby.sql
index 6359de4..74ecac2 100644
--- a/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-1.3.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-1.3.0.derby.sql
@@ -1,4 +1,14 @@
-- Upgrade MetaStore schema from 1.2.0 to 1.3.0
RUN '021-HIVE-11970.derby.sql';
+RUN '023-HIVE-12807.derby.sql';
+RUN '024-HIVE-12814.derby.sql';
+RUN '025-HIVE-12816.derby.sql';
+RUN '026-HIVE-12818.derby.sql';
+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';
+RUN '032-HIVE-12832.derby.sql';
UPDATE "APP".VERSION SET SCHEMA_VERSION='1.3.0', VERSION_COMMENT='Hive release version 1.3.0' where VER_ID=1;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-2.0.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-2.0.0.derby.sql b/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-2.0.0.derby.sql
index adf3cb0..e6817ad 100644
--- a/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-2.0.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/upgrade-1.2.0-to-2.0.0.derby.sql
@@ -1,4 +1,14 @@
-- Upgrade MetaStore schema from 1.2.0 to 2.0.0
RUN '021-HIVE-11970.derby.sql';
+RUN '023-HIVE-12807.derby.sql';
+RUN '024-HIVE-12814.derby.sql';
+RUN '025-HIVE-12816.derby.sql';
+RUN '026-HIVE-12818.derby.sql';
+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';
+RUN '032-HIVE-12832.derby.sql';
UPDATE "APP".VERSION SET SCHEMA_VERSION='2.0.0', VERSION_COMMENT='Hive release version 2.0.0' where VER_ID=1;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/008-HIVE-12807.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/008-HIVE-12807.mssql.sql b/metastore/scripts/upgrade/mssql/008-HIVE-12807.mssql.sql
new file mode 100644
index 0000000..e2d7615
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/008-HIVE-12807.mssql.sql
@@ -0,0 +1 @@
+ALTER TABLE COMPACTION_QUEUE ADD CQ_HIGHEST_TXN_ID bigint NULL;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/009-HIVE-12814.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/009-HIVE-12814.mssql.sql b/metastore/scripts/upgrade/mssql/009-HIVE-12814.mssql.sql
new file mode 100644
index 0000000..0088290
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/009-HIVE-12814.mssql.sql
@@ -0,0 +1 @@
+ALTER TABLE COMPACTION_QUEUE ADD CQ_META_INFO varbinary(2048) NULL;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/010-HIVE-12816.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/010-HIVE-12816.mssql.sql b/metastore/scripts/upgrade/mssql/010-HIVE-12816.mssql.sql
new file mode 100644
index 0000000..0c0342f
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/010-HIVE-12816.mssql.sql
@@ -0,0 +1 @@
+ALTER TABLE COMPACTION_QUEUE ADD CQ_HADOOP_JOB_ID nvarchar(32) NULL;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/011-HIVE-12818.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/011-HIVE-12818.mssql.sql b/metastore/scripts/upgrade/mssql/011-HIVE-12818.mssql.sql
new file mode 100644
index 0000000..74ac5bf
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/011-HIVE-12818.mssql.sql
@@ -0,0 +1,21 @@
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint NOT NULL,
+ CC_DATABASE nvarchar(128) NOT NULL,
+ CC_TABLE nvarchar(128) NOT NULL,
+ CC_PARTITION nvarchar(767) NULL,
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID nvarchar(128) NULL,
+ CC_START bigint NULL,
+ CC_END bigint NULL,
+ CC_RUN_AS nvarchar(128) NULL,
+ CC_HIGHEST_TXN_ID bigint NULL,
+ CC_META_INFO varbinary(2048) NULL,
+ CC_HADOOP_JOB_ID nvarchar(128) NULL,
+PRIMARY KEY CLUSTERED
+(
+ CC_ID ASC
+)
+);
+
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/012-HIVE-12819.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/012-HIVE-12819.mssql.sql b/metastore/scripts/upgrade/mssql/012-HIVE-12819.mssql.sql
new file mode 100644
index 0000000..778cbd5
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/012-HIVE-12819.mssql.sql
@@ -0,0 +1 @@
+ALTER TABLE TXNS ADD TXN_AGENT_INFO nvarchar(128) NULL;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/013-HIVE-12821.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/013-HIVE-12821.mssql.sql b/metastore/scripts/upgrade/mssql/013-HIVE-12821.mssql.sql
new file mode 100644
index 0000000..3b8a610
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/013-HIVE-12821.mssql.sql
@@ -0,0 +1,2 @@
+ALTER TABLE TXNS ADD TXN_HEARTBEAT_COUNT int NULL;
+ALTER TABLE HIVE_LOCKS ADD HL_HEARTBEAT_COUNT int NULL;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/014-HIVE-12822.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/014-HIVE-12822.mssql.sql b/metastore/scripts/upgrade/mssql/014-HIVE-12822.mssql.sql
new file mode 100644
index 0000000..b82d0ec
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/014-HIVE-12822.mssql.sql
@@ -0,0 +1 @@
+ALTER TABLE TXNS ADD TXN_META_INFO nvarchar(128) NULL;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/015-HIVE-12823.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/015-HIVE-12823.mssql.sql b/metastore/scripts/upgrade/mssql/015-HIVE-12823.mssql.sql
new file mode 100644
index 0000000..d125b24
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/015-HIVE-12823.mssql.sql
@@ -0,0 +1 @@
+ALTER TABLE HIVE_LOCKS ADD HL_AGENT_INFO nvarchar(128) NULL;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/016-HIVE-12831.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/016-HIVE-12831.mssql.sql b/metastore/scripts/upgrade/mssql/016-HIVE-12831.mssql.sql
new file mode 100644
index 0000000..9f37461
--- /dev/null
+++ b/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;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/017-HIVE-12832.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/017-HIVE-12832.mssql.sql b/metastore/scripts/upgrade/mssql/017-HIVE-12832.mssql.sql
new file mode 100644
index 0000000..7adfe2e
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/017-HIVE-12832.mssql.sql
@@ -0,0 +1,10 @@
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 nvarchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT nvarchar(255) NULL,
+ PRIMARY KEY CLUSTERED
+(
+ MT_KEY1 ASC,
+ MT_KEY2 ASC
+)
+);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql b/metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql
index 01c1376..57d2343 100644
--- a/metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql
+++ b/metastore/scripts/upgrade/mssql/hive-schema-1.3.0.mssql.sql
@@ -866,12 +866,35 @@ CREATE TABLE COMPACTION_QUEUE(
CQ_WORKER_ID nvarchar(128) NULL,
CQ_START bigint NULL,
CQ_RUN_AS nvarchar(128) NULL,
+ CQ_HIGHEST_TXN_ID bigint NULL,
+ CQ_META_INFO varbinary(2048) NULL,
+ CQ_HADOOP_JOB_ID nvarchar(128) NULL,
PRIMARY KEY CLUSTERED
(
CQ_ID ASC
)
);
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint NOT NULL,
+ CC_DATABASE nvarchar(128) NOT NULL,
+ CC_TABLE nvarchar(128) NOT NULL,
+ CC_PARTITION nvarchar(767) NULL,
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID nvarchar(128) NULL,
+ CC_START bigint NULL,
+ CC_END bigint NULL,
+ CC_RUN_AS nvarchar(128) NULL,
+ CC_HIGHEST_TXN_ID bigint NULL,
+ CC_META_INFO varbinary(2048) NULL,
+ CC_HADOOP_JOB_ID nvarchar(128) NULL,
+PRIMARY KEY CLUSTERED
+(
+ CC_ID ASC
+)
+);
+
CREATE TABLE COMPLETED_TXN_COMPONENTS(
CTC_TXNID bigint NULL,
CTC_DATABASE nvarchar(128) NOT NULL,
@@ -892,6 +915,10 @@ CREATE TABLE HIVE_LOCKS(
HL_ACQUIRED_AT bigint NULL,
HL_USER nvarchar(128) NOT NULL,
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,
@@ -924,6 +951,9 @@ 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,
+ TXN_META_INFO nvarchar(128) NULL,
+ TXN_HEARTBEAT_COUNT int NULL,
PRIMARY KEY CLUSTERED
(
TXN_ID ASC
@@ -939,6 +969,16 @@ CREATE TABLE TXN_COMPONENTS(
ALTER TABLE TXN_COMPONENTS WITH CHECK ADD FOREIGN KEY(TC_TXNID) REFERENCES TXNS (TXN_ID);
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 nvarchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT nvarchar(255) NULL,
+ PRIMARY KEY CLUSTERED
+(
+ MT_KEY1 ASC,
+ MT_KEY2 ASC
+)
+);
-- -----------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql b/metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql
index 1ec8632..57257c4 100644
--- a/metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql
+++ b/metastore/scripts/upgrade/mssql/hive-schema-2.0.0.mssql.sql
@@ -866,12 +866,35 @@ CREATE TABLE COMPACTION_QUEUE(
CQ_WORKER_ID nvarchar(128) NULL,
CQ_START bigint NULL,
CQ_RUN_AS nvarchar(128) NULL,
+ CQ_HIGHEST_TXN_ID bigint NULL,
+ CQ_META_INFO varbinary(2048) NULL,
+ CQ_HADOOP_JOB_ID nvarchar(128) NULL,
PRIMARY KEY CLUSTERED
(
CQ_ID ASC
)
);
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint NOT NULL,
+ CC_DATABASE nvarchar(128) NOT NULL,
+ CC_TABLE nvarchar(128) NOT NULL,
+ CC_PARTITION nvarchar(767) NULL,
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID nvarchar(128) NULL,
+ CC_START bigint NULL,
+ CC_END bigint NULL,
+ CC_RUN_AS nvarchar(128) NULL,
+ CC_HIGHEST_TXN_ID bigint NULL,
+ CC_META_INFO varbinary(2048) NULL,
+ CC_HADOOP_JOB_ID nvarchar(128) NULL,
+PRIMARY KEY CLUSTERED
+(
+ CC_ID ASC
+)
+);
+
CREATE TABLE COMPLETED_TXN_COMPONENTS(
CTC_TXNID bigint NULL,
CTC_DATABASE nvarchar(128) NOT NULL,
@@ -892,6 +915,10 @@ CREATE TABLE HIVE_LOCKS(
HL_ACQUIRED_AT bigint NULL,
HL_USER nvarchar(128) NOT NULL,
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,
@@ -924,6 +951,9 @@ 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,
+ TXN_META_INFO nvarchar(128) NULL,
+ TXN_HEARTBEAT_COUNT int NULL,
PRIMARY KEY CLUSTERED
(
TXN_ID ASC
@@ -939,6 +969,16 @@ CREATE TABLE TXN_COMPONENTS(
ALTER TABLE TXN_COMPONENTS WITH CHECK ADD FOREIGN KEY(TC_TXNID) REFERENCES TXNS (TXN_ID);
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 nvarchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT nvarchar(255) NULL,
+ PRIMARY KEY CLUSTERED
+(
+ MT_KEY1 ASC,
+ MT_KEY2 ASC
+)
+);
-- -----------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-1.3.0.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-1.3.0.mssql.sql b/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-1.3.0.mssql.sql
index 9cf9d25..b0f28bb 100644
--- a/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-1.3.0.mssql.sql
+++ b/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-1.3.0.mssql.sql
@@ -1,6 +1,16 @@
SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS MESSAGE;
:r 007-HIVE-11970.mssql.sql;
+:r 008-HIVE-12807.mssql.sql;
+:r 009-HIVE-12814.mssql.sql;
+:r 010-HIVE-12816.mssql.sql;
+:r 011-HIVE-12818.mssql.sql;
+:r 012-HIVE-12819.mssql.sql;
+:r 013-HIVE-12821.mssql.sql;
+:r 014-HIVE-12822.mssql.sql;
+:r 015-HIVE-12823.mssql.sql;
+:r 016-HIVE-12831.mssql.sql;
+:r 017-HIVE-12832.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;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-2.0.0.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-2.0.0.mssql.sql b/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-2.0.0.mssql.sql
index de3d29d..66a09a8 100644
--- a/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-2.0.0.mssql.sql
+++ b/metastore/scripts/upgrade/mssql/upgrade-1.2.0-to-2.0.0.mssql.sql
@@ -1,6 +1,16 @@
SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS MESSAGE;
:r 007-HIVE-11970.mssql.sql;
+:r 008-HIVE-12807.mssql.sql;
+:r 009-HIVE-12814.mssql.sql;
+:r 010-HIVE-12816.mssql.sql;
+:r 011-HIVE-12818.mssql.sql;
+:r 012-HIVE-12819.mssql.sql;
+:r 013-HIVE-12821.mssql.sql;
+:r 014-HIVE-12822.mssql.sql;
+:r 015-HIVE-12823.mssql.sql;
+:r 016-HIVE-12831.mssql.sql;
+:r 017-HIVE-12832.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;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/023-HIVE-12807.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/023-HIVE-12807.mysql.sql b/metastore/scripts/upgrade/mysql/023-HIVE-12807.mysql.sql
new file mode 100644
index 0000000..31a2dd1
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/023-HIVE-12807.mysql.sql
@@ -0,0 +1 @@
+ALTER TABLE `COMPACTION_QUEUE` ADD `CQ_HIGHEST_TXN_ID` bigint;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/024-HIVE-12814.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/024-HIVE-12814.mysql.sql b/metastore/scripts/upgrade/mysql/024-HIVE-12814.mysql.sql
new file mode 100644
index 0000000..5d5f3ca
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/024-HIVE-12814.mysql.sql
@@ -0,0 +1 @@
+ALTER TABLE `COMPACTION_QUEUE` ADD `CQ_META_INFO` varbinary(2048);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/025-HIVE-12816.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/025-HIVE-12816.mysql.sql b/metastore/scripts/upgrade/mysql/025-HIVE-12816.mysql.sql
new file mode 100644
index 0000000..87e48b4
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/025-HIVE-12816.mysql.sql
@@ -0,0 +1 @@
+ALTER TABLE `COMPACTION_QUEUE` ADD `CQ_HADOOP_JOB_ID` varchar(32);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/026-HIVE-12818.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/026-HIVE-12818.mysql.sql b/metastore/scripts/upgrade/mysql/026-HIVE-12818.mysql.sql
new file mode 100644
index 0000000..e241eee
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/026-HIVE-12818.mysql.sql
@@ -0,0 +1,17 @@
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START bigint,
+ CC_END bigint,
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID bigint,
+ CC_META_INFO varbinary(2048),
+ CC_HADOOP_JOB_ID varchar(32)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/027-HIVE-12819.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/027-HIVE-12819.mysql.sql b/metastore/scripts/upgrade/mysql/027-HIVE-12819.mysql.sql
new file mode 100644
index 0000000..f1e25d5
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/027-HIVE-12819.mysql.sql
@@ -0,0 +1 @@
+ALTER TABLE `TXNS` ADD `TXN_AGENT_INFO` varchar(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/028-HIVE-12821.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/028-HIVE-12821.mysql.sql b/metastore/scripts/upgrade/mysql/028-HIVE-12821.mysql.sql
new file mode 100644
index 0000000..a951021
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/028-HIVE-12821.mysql.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `TXNS` ADD `TXN_HEARTBEAT_COUNT` int;
+ALTER TABLE `HIVE_LOCKS` ADD `HL_HEARTBEAT_COUNT` int;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/029-HIVE-12822.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/029-HIVE-12822.mysql.sql b/metastore/scripts/upgrade/mysql/029-HIVE-12822.mysql.sql
new file mode 100644
index 0000000..ffd0bab
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/029-HIVE-12822.mysql.sql
@@ -0,0 +1 @@
+ALTER TABLE `TXNS` ADD `TXN_META_INFO` varchar(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/030-HIVE-12823.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/030-HIVE-12823.mysql.sql b/metastore/scripts/upgrade/mysql/030-HIVE-12823.mysql.sql
new file mode 100644
index 0000000..42c9b17
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/030-HIVE-12823.mysql.sql
@@ -0,0 +1 @@
+ALTER TABLE `HIVE_LOCKS` ADD `HL_AGENT_INFO` varchar(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/031-HIVE-12831.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/031-HIVE-12831.mysql.sql b/metastore/scripts/upgrade/mysql/031-HIVE-12831.mysql.sql
new file mode 100644
index 0000000..0b19bba
--- /dev/null
+++ b/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;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/032-HIVE-12832.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/032-HIVE-12832.mysql.sql b/metastore/scripts/upgrade/mysql/032-HIVE-12832.mysql.sql
new file mode 100644
index 0000000..98c7706
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/032-HIVE-12832.mysql.sql
@@ -0,0 +1,7 @@
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT varchar(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/hive-schema-1.3.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/hive-schema-1.3.0.mysql.sql b/metastore/scripts/upgrade/mysql/hive-schema-1.3.0.mysql.sql
index 6c211a6..d9232d2 100644
--- a/metastore/scripts/upgrade/mysql/hive-schema-1.3.0.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/hive-schema-1.3.0.mysql.sql
@@ -813,7 +813,7 @@ CREATE TABLE IF NOT EXISTS `NOTIFICATION_SEQUENCE`
-- ----------------------------
-- Transaction and Lock Tables
-- ----------------------------
-SOURCE hive-txn-schema-0.13.0.mysql.sql;
+SOURCE hive-txn-schema-1.3.0.mysql.sql;
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/hive-schema-2.0.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/hive-schema-2.0.0.mysql.sql b/metastore/scripts/upgrade/mysql/hive-schema-2.0.0.mysql.sql
index ff0b643..82e0128 100644
--- a/metastore/scripts/upgrade/mysql/hive-schema-2.0.0.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/hive-schema-2.0.0.mysql.sql
@@ -813,7 +813,7 @@ CREATE TABLE IF NOT EXISTS `NOTIFICATION_SEQUENCE`
-- ----------------------------
-- Transaction and Lock Tables
-- ----------------------------
-SOURCE hive-txn-schema-0.13.0.mysql.sql;
+SOURCE hive-txn-schema-2.0.0.mysql.sql;
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/hive-txn-schema-1.3.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/hive-txn-schema-1.3.0.mysql.sql b/metastore/scripts/upgrade/mysql/hive-txn-schema-1.3.0.mysql.sql
new file mode 100644
index 0000000..ea42757
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/hive-txn-schema-1.3.0.mysql.sql
@@ -0,0 +1,122 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+--
+-- Tables for transaction management
+--
+
+CREATE TABLE TXNS (
+ TXN_ID bigint PRIMARY KEY,
+ TXN_STATE char(1) NOT NULL,
+ TXN_STARTED bigint NOT NULL,
+ TXN_LAST_HEARTBEAT bigint NOT NULL,
+ TXN_USER varchar(128) NOT NULL,
+ TXN_HOST varchar(128) NOT NULL,
+ TXN_AGENT_INFO varchar(128),
+ TXN_META_INFO varchar(128),
+ TXN_HEARTBEAT_COUNT int
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE TXN_COMPONENTS (
+ TC_TXNID bigint,
+ TC_DATABASE varchar(128) NOT NULL,
+ TC_TABLE varchar(128),
+ TC_PARTITION varchar(767),
+ FOREIGN KEY (TC_TXNID) REFERENCES TXNS (TXN_ID)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE COMPLETED_TXN_COMPONENTS (
+ CTC_TXNID bigint,
+ CTC_DATABASE varchar(128) NOT NULL,
+ CTC_TABLE varchar(128),
+ CTC_PARTITION varchar(767)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE NEXT_TXN_ID (
+ NTXN_NEXT bigint NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO NEXT_TXN_ID VALUES(1);
+
+CREATE TABLE HIVE_LOCKS (
+ HL_LOCK_EXT_ID bigint NOT NULL,
+ HL_LOCK_INT_ID bigint NOT NULL,
+ HL_TXNID bigint,
+ HL_DB varchar(128) NOT NULL,
+ HL_TABLE varchar(128),
+ HL_PARTITION varchar(767),
+ HL_LOCK_STATE char(1) not null,
+ HL_LOCK_TYPE char(1) not null,
+ HL_LAST_HEARTBEAT bigint NOT NULL,
+ HL_ACQUIRED_AT bigint,
+ HL_USER varchar(128) NOT NULL,
+ 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;
+
+CREATE INDEX HL_TXNID_IDX ON HIVE_LOCKS (HL_TXNID);
+
+CREATE TABLE NEXT_LOCK_ID (
+ NL_NEXT bigint NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO NEXT_LOCK_ID VALUES(1);
+
+CREATE TABLE COMPACTION_QUEUE (
+ CQ_ID bigint PRIMARY KEY,
+ CQ_DATABASE varchar(128) NOT NULL,
+ CQ_TABLE varchar(128) NOT NULL,
+ CQ_PARTITION varchar(767),
+ CQ_STATE char(1) NOT NULL,
+ CQ_TYPE char(1) NOT NULL,
+ CQ_WORKER_ID varchar(128),
+ CQ_START bigint,
+ CQ_RUN_AS varchar(128),
+ CQ_HIGHEST_TXN_ID bigint,
+ CQ_META_INFO varbinary(2048),
+ CQ_HADOOP_JOB_ID varchar(32)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START bigint,
+ CC_END bigint,
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID bigint,
+ CC_META_INFO varbinary(2048),
+ CC_HADOOP_JOB_ID varchar(32)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
+ NCQ_NEXT bigint NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
+
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT varchar(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/hive-txn-schema-2.0.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/hive-txn-schema-2.0.0.mysql.sql b/metastore/scripts/upgrade/mysql/hive-txn-schema-2.0.0.mysql.sql
new file mode 100644
index 0000000..ea42757
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/hive-txn-schema-2.0.0.mysql.sql
@@ -0,0 +1,122 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+--
+-- Tables for transaction management
+--
+
+CREATE TABLE TXNS (
+ TXN_ID bigint PRIMARY KEY,
+ TXN_STATE char(1) NOT NULL,
+ TXN_STARTED bigint NOT NULL,
+ TXN_LAST_HEARTBEAT bigint NOT NULL,
+ TXN_USER varchar(128) NOT NULL,
+ TXN_HOST varchar(128) NOT NULL,
+ TXN_AGENT_INFO varchar(128),
+ TXN_META_INFO varchar(128),
+ TXN_HEARTBEAT_COUNT int
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE TXN_COMPONENTS (
+ TC_TXNID bigint,
+ TC_DATABASE varchar(128) NOT NULL,
+ TC_TABLE varchar(128),
+ TC_PARTITION varchar(767),
+ FOREIGN KEY (TC_TXNID) REFERENCES TXNS (TXN_ID)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE COMPLETED_TXN_COMPONENTS (
+ CTC_TXNID bigint,
+ CTC_DATABASE varchar(128) NOT NULL,
+ CTC_TABLE varchar(128),
+ CTC_PARTITION varchar(767)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE NEXT_TXN_ID (
+ NTXN_NEXT bigint NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO NEXT_TXN_ID VALUES(1);
+
+CREATE TABLE HIVE_LOCKS (
+ HL_LOCK_EXT_ID bigint NOT NULL,
+ HL_LOCK_INT_ID bigint NOT NULL,
+ HL_TXNID bigint,
+ HL_DB varchar(128) NOT NULL,
+ HL_TABLE varchar(128),
+ HL_PARTITION varchar(767),
+ HL_LOCK_STATE char(1) not null,
+ HL_LOCK_TYPE char(1) not null,
+ HL_LAST_HEARTBEAT bigint NOT NULL,
+ HL_ACQUIRED_AT bigint,
+ HL_USER varchar(128) NOT NULL,
+ 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;
+
+CREATE INDEX HL_TXNID_IDX ON HIVE_LOCKS (HL_TXNID);
+
+CREATE TABLE NEXT_LOCK_ID (
+ NL_NEXT bigint NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO NEXT_LOCK_ID VALUES(1);
+
+CREATE TABLE COMPACTION_QUEUE (
+ CQ_ID bigint PRIMARY KEY,
+ CQ_DATABASE varchar(128) NOT NULL,
+ CQ_TABLE varchar(128) NOT NULL,
+ CQ_PARTITION varchar(767),
+ CQ_STATE char(1) NOT NULL,
+ CQ_TYPE char(1) NOT NULL,
+ CQ_WORKER_ID varchar(128),
+ CQ_START bigint,
+ CQ_RUN_AS varchar(128),
+ CQ_HIGHEST_TXN_ID bigint,
+ CQ_META_INFO varbinary(2048),
+ CQ_HADOOP_JOB_ID varchar(32)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START bigint,
+ CC_END bigint,
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID bigint,
+ CC_META_INFO varbinary(2048),
+ CC_HADOOP_JOB_ID varchar(32)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
+ NCQ_NEXT bigint NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
+
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT varchar(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-1.3.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-1.3.0.mysql.sql b/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-1.3.0.mysql.sql
index 1b32d93..477c10b 100644
--- a/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-1.3.0.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-1.3.0.mysql.sql
@@ -1,5 +1,16 @@
SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS ' ';
SOURCE 021-HIVE-7018.mysql.sql;
SOURCE 022-HIVE-11970.mysql.sql;
+SOURCE 023-HIVE-12807.mysql.sql;
+SOURCE 024-HIVE-12814.mysql.sql;
+SOURCE 025-HIVE-12816.mysql.sql;
+SOURCE 026-HIVE-12818.mysql.sql;
+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;
+SOURCE 032-HIVE-12832.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 ' ';
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-2.0.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-2.0.0.mysql.sql b/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-2.0.0.mysql.sql
index 1340f27..4fc1ea7 100644
--- a/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-2.0.0.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/upgrade-1.2.0-to-2.0.0.mysql.sql
@@ -1,6 +1,17 @@
SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS ' ';
SOURCE 021-HIVE-7018.mysql.sql;
SOURCE 022-HIVE-11970.mysql.sql;
+SOURCE 023-HIVE-12807.mysql.sql;
+SOURCE 024-HIVE-12814.mysql.sql;
+SOURCE 025-HIVE-12816.mysql.sql;
+SOURCE 026-HIVE-12818.mysql.sql;
+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;
+SOURCE 032-HIVE-12832.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 ' ';
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/023-HIVE-12807.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/023-HIVE-12807.oracle.sql b/metastore/scripts/upgrade/oracle/023-HIVE-12807.oracle.sql
new file mode 100644
index 0000000..0313e96
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/023-HIVE-12807.oracle.sql
@@ -0,0 +1 @@
+ALTER TABLE COMPACTION_QUEUE ADD CQ_HIGHEST_TXN_ID NUMBER(19);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/024-HIVE-12814.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/024-HIVE-12814.oracle.sql b/metastore/scripts/upgrade/oracle/024-HIVE-12814.oracle.sql
new file mode 100644
index 0000000..d9a5575
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/024-HIVE-12814.oracle.sql
@@ -0,0 +1 @@
+ALTER TABLE COMPACTION_QUEUE ADD CQ_META_INFO BLOB;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/025-HIVE-12816.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/025-HIVE-12816.oracle.sql b/metastore/scripts/upgrade/oracle/025-HIVE-12816.oracle.sql
new file mode 100644
index 0000000..9a96d8c
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/025-HIVE-12816.oracle.sql
@@ -0,0 +1 @@
+ALTER TABLE COMPACTION_QUEUE ADD CQ_HADOOP_JOB_ID varchar2(32);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/026-HIVE-12818.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/026-HIVE-12818.oracle.sql b/metastore/scripts/upgrade/oracle/026-HIVE-12818.oracle.sql
new file mode 100644
index 0000000..9ecb43e
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/026-HIVE-12818.oracle.sql
@@ -0,0 +1,17 @@
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID NUMBER(19) PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START NUMBER(19),
+ CC_END NUMBER(19),
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID NUMBER(19),
+ CC_META_INFO BLOB,
+ CC_HADOOP_JOB_ID varchar2(32)
+) ROWDEPENDENCIES;
+
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/027-HIVE-12819.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/027-HIVE-12819.oracle.sql b/metastore/scripts/upgrade/oracle/027-HIVE-12819.oracle.sql
new file mode 100644
index 0000000..0d74a98
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/027-HIVE-12819.oracle.sql
@@ -0,0 +1 @@
+ALTER TABLE TXNS ADD TXN_AGENT_INFO varchar2(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/028-HIVE-12821.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/028-HIVE-12821.oracle.sql b/metastore/scripts/upgrade/oracle/028-HIVE-12821.oracle.sql
new file mode 100644
index 0000000..152d2ab
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/028-HIVE-12821.oracle.sql
@@ -0,0 +1,2 @@
+ALTER TABLE TXNS ADD TXN_HEARTBEAT_COUNT number(10);
+ALTER TABLE HIVE_LOCKS ADD HL_HEARTBEAT_COUNT number(10);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/029-HIVE-12822.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/029-HIVE-12822.oracle.sql b/metastore/scripts/upgrade/oracle/029-HIVE-12822.oracle.sql
new file mode 100644
index 0000000..63c0d77
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/029-HIVE-12822.oracle.sql
@@ -0,0 +1 @@
+ALTER TABLE TXNS ADD TXN_META_INFO varchar2(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/030-HIVE-12823.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/030-HIVE-12823.oracle.sql b/metastore/scripts/upgrade/oracle/030-HIVE-12823.oracle.sql
new file mode 100644
index 0000000..f938603
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/030-HIVE-12823.oracle.sql
@@ -0,0 +1 @@
+ALTER TABLE HIVE_LOCKS ADD HL_AGENT_INFO varchar2(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/031-HIVE-12381.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/031-HIVE-12381.oracle.sql b/metastore/scripts/upgrade/oracle/031-HIVE-12381.oracle.sql
new file mode 100644
index 0000000..35a9b9d
--- /dev/null
+++ b/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);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/032-HIVE-12832.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/032-HIVE-12832.oracle.sql b/metastore/scripts/upgrade/oracle/032-HIVE-12832.oracle.sql
new file mode 100644
index 0000000..2b58d2e
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/032-HIVE-12832.oracle.sql
@@ -0,0 +1,7 @@
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar2(128) NOT NULL,
+ MT_KEY2 number(19) NOT NULL,
+ MT_COMMENT varchar2(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+);
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/hive-schema-1.3.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/hive-schema-1.3.0.oracle.sql b/metastore/scripts/upgrade/oracle/hive-schema-1.3.0.oracle.sql
index d2e7945..e162988 100644
--- a/metastore/scripts/upgrade/oracle/hive-schema-1.3.0.oracle.sql
+++ b/metastore/scripts/upgrade/oracle/hive-schema-1.3.0.oracle.sql
@@ -780,7 +780,7 @@ CREATE INDEX FUNC_RU_N49 ON FUNC_RU (FUNC_ID);
------------------------------
-- Transaction and lock tables
------------------------------
-@hive-txn-schema-0.13.0.oracle.sql;
+@hive-txn-schema-1.3.0.oracle.sql;
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/hive-schema-2.0.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/hive-schema-2.0.0.oracle.sql b/metastore/scripts/upgrade/oracle/hive-schema-2.0.0.oracle.sql
index 2dcdd77..168473a 100644
--- a/metastore/scripts/upgrade/oracle/hive-schema-2.0.0.oracle.sql
+++ b/metastore/scripts/upgrade/oracle/hive-schema-2.0.0.oracle.sql
@@ -780,7 +780,7 @@ CREATE INDEX FUNC_RU_N49 ON FUNC_RU (FUNC_ID);
------------------------------
-- Transaction and lock tables
------------------------------
-@hive-txn-schema-0.13.0.oracle.sql;
+@hive-txn-schema-2.0.0.oracle.sql;
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/hive-txn-schema-1.3.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/hive-txn-schema-1.3.0.oracle.sql b/metastore/scripts/upgrade/oracle/hive-txn-schema-1.3.0.oracle.sql
new file mode 100644
index 0000000..788741a
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/hive-txn-schema-1.3.0.oracle.sql
@@ -0,0 +1,120 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the License); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an AS IS BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+--
+-- Tables for transaction management
+--
+
+CREATE TABLE TXNS (
+ TXN_ID NUMBER(19) PRIMARY KEY,
+ TXN_STATE char(1) NOT NULL,
+ 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_AGENT_INFO varchar2(128),
+ TXN_META_INFO varchar2(128),
+ TXN_HEARTBEAT_COUNT number(10)
+) ROWDEPENDENCIES;
+
+CREATE TABLE TXN_COMPONENTS (
+ TC_TXNID NUMBER(19) REFERENCES TXNS (TXN_ID),
+ TC_DATABASE VARCHAR2(128) NOT NULL,
+ TC_TABLE VARCHAR2(128),
+ TC_PARTITION VARCHAR2(767) NULL
+) ROWDEPENDENCIES;
+
+CREATE TABLE COMPLETED_TXN_COMPONENTS (
+ CTC_TXNID NUMBER(19),
+ CTC_DATABASE varchar(128) NOT NULL,
+ CTC_TABLE varchar(128),
+ CTC_PARTITION varchar(767)
+) ROWDEPENDENCIES;
+
+CREATE TABLE NEXT_TXN_ID (
+ NTXN_NEXT NUMBER(19) NOT NULL
+);
+INSERT INTO NEXT_TXN_ID VALUES(1);
+
+CREATE TABLE HIVE_LOCKS (
+ HL_LOCK_EXT_ID NUMBER(19) NOT NULL,
+ HL_LOCK_INT_ID NUMBER(19) NOT NULL,
+ HL_TXNID NUMBER(19),
+ HL_DB VARCHAR2(128) NOT NULL,
+ HL_TABLE VARCHAR2(128),
+ HL_PARTITION VARCHAR2(767),
+ HL_LOCK_STATE CHAR(1) NOT NULL,
+ HL_LOCK_TYPE CHAR(1) NOT NULL,
+ HL_LAST_HEARTBEAT NUMBER(19) NOT NULL,
+ HL_ACQUIRED_AT NUMBER(19),
+ HL_USER varchar(128) NOT NULL,
+ 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;
+
+CREATE INDEX HL_TXNID_INDEX ON HIVE_LOCKS (HL_TXNID);
+
+CREATE TABLE NEXT_LOCK_ID (
+ NL_NEXT NUMBER(19) NOT NULL
+);
+INSERT INTO NEXT_LOCK_ID VALUES(1);
+
+CREATE TABLE COMPACTION_QUEUE (
+ CQ_ID NUMBER(19) PRIMARY KEY,
+ CQ_DATABASE varchar(128) NOT NULL,
+ CQ_TABLE varchar(128) NOT NULL,
+ CQ_PARTITION varchar(767),
+ CQ_STATE char(1) NOT NULL,
+ CQ_TYPE char(1) NOT NULL,
+ CQ_WORKER_ID varchar(128),
+ CQ_START NUMBER(19),
+ CQ_RUN_AS varchar(128),
+ CQ_HIGHEST_TXN_ID NUMBER(19),
+ CQ_META_INFO BLOB,
+ CQ_HADOOP_JOB_ID varchar2(32)
+) ROWDEPENDENCIES;
+
+CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
+ NCQ_NEXT NUMBER(19) NOT NULL
+);
+INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
+
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID NUMBER(19) PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START NUMBER(19),
+ CC_END NUMBER(19),
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID NUMBER(19),
+ CC_META_INFO BLOB,
+ CC_HADOOP_JOB_ID varchar2(32)
+) ROWDEPENDENCIES;
+
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar2(128) NOT NULL,
+ MT_KEY2 number(19) NOT NULL,
+ MT_COMMENT varchar2(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+);
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/hive-txn-schema-2.0.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/hive-txn-schema-2.0.0.oracle.sql b/metastore/scripts/upgrade/oracle/hive-txn-schema-2.0.0.oracle.sql
new file mode 100644
index 0000000..788741a
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/hive-txn-schema-2.0.0.oracle.sql
@@ -0,0 +1,120 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the License); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an AS IS BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+--
+-- Tables for transaction management
+--
+
+CREATE TABLE TXNS (
+ TXN_ID NUMBER(19) PRIMARY KEY,
+ TXN_STATE char(1) NOT NULL,
+ 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_AGENT_INFO varchar2(128),
+ TXN_META_INFO varchar2(128),
+ TXN_HEARTBEAT_COUNT number(10)
+) ROWDEPENDENCIES;
+
+CREATE TABLE TXN_COMPONENTS (
+ TC_TXNID NUMBER(19) REFERENCES TXNS (TXN_ID),
+ TC_DATABASE VARCHAR2(128) NOT NULL,
+ TC_TABLE VARCHAR2(128),
+ TC_PARTITION VARCHAR2(767) NULL
+) ROWDEPENDENCIES;
+
+CREATE TABLE COMPLETED_TXN_COMPONENTS (
+ CTC_TXNID NUMBER(19),
+ CTC_DATABASE varchar(128) NOT NULL,
+ CTC_TABLE varchar(128),
+ CTC_PARTITION varchar(767)
+) ROWDEPENDENCIES;
+
+CREATE TABLE NEXT_TXN_ID (
+ NTXN_NEXT NUMBER(19) NOT NULL
+);
+INSERT INTO NEXT_TXN_ID VALUES(1);
+
+CREATE TABLE HIVE_LOCKS (
+ HL_LOCK_EXT_ID NUMBER(19) NOT NULL,
+ HL_LOCK_INT_ID NUMBER(19) NOT NULL,
+ HL_TXNID NUMBER(19),
+ HL_DB VARCHAR2(128) NOT NULL,
+ HL_TABLE VARCHAR2(128),
+ HL_PARTITION VARCHAR2(767),
+ HL_LOCK_STATE CHAR(1) NOT NULL,
+ HL_LOCK_TYPE CHAR(1) NOT NULL,
+ HL_LAST_HEARTBEAT NUMBER(19) NOT NULL,
+ HL_ACQUIRED_AT NUMBER(19),
+ HL_USER varchar(128) NOT NULL,
+ 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;
+
+CREATE INDEX HL_TXNID_INDEX ON HIVE_LOCKS (HL_TXNID);
+
+CREATE TABLE NEXT_LOCK_ID (
+ NL_NEXT NUMBER(19) NOT NULL
+);
+INSERT INTO NEXT_LOCK_ID VALUES(1);
+
+CREATE TABLE COMPACTION_QUEUE (
+ CQ_ID NUMBER(19) PRIMARY KEY,
+ CQ_DATABASE varchar(128) NOT NULL,
+ CQ_TABLE varchar(128) NOT NULL,
+ CQ_PARTITION varchar(767),
+ CQ_STATE char(1) NOT NULL,
+ CQ_TYPE char(1) NOT NULL,
+ CQ_WORKER_ID varchar(128),
+ CQ_START NUMBER(19),
+ CQ_RUN_AS varchar(128),
+ CQ_HIGHEST_TXN_ID NUMBER(19),
+ CQ_META_INFO BLOB,
+ CQ_HADOOP_JOB_ID varchar2(32)
+) ROWDEPENDENCIES;
+
+CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
+ NCQ_NEXT NUMBER(19) NOT NULL
+);
+INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
+
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID NUMBER(19) PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START NUMBER(19),
+ CC_END NUMBER(19),
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID NUMBER(19),
+ CC_META_INFO BLOB,
+ CC_HADOOP_JOB_ID varchar2(32)
+) ROWDEPENDENCIES;
+
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar2(128) NOT NULL,
+ MT_KEY2 number(19) NOT NULL,
+ MT_COMMENT varchar2(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+);
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-1.3.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-1.3.0.oracle.sql b/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-1.3.0.oracle.sql
index bd283d4..94ee2c4 100644
--- a/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-1.3.0.oracle.sql
+++ b/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-1.3.0.oracle.sql
@@ -1,6 +1,16 @@
SELECT 'Upgrading MetaStore schema from 1.2.0 to 1.3.0' AS Status from dual;
@022-HIVE-11970.oracle.sql;
+@023-HIVE-12807.oracle.sql;
+@024-HIVE-12814.oracle.sql;
+@025-HIVE-12816.oracle.sql;
+@026-HIVE-12818.oracle.sql;
+@027-HIVE-12819.oracle.sql;
+@028-HIVE-12821.oracle.sql;
+@029-HIVE-12822.oracle.sql;
+@030-HIVE-12823.oracle.sql;
+@031-HIVE-12381.oracle.sql;
+@032-HIVE-12832.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;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-2.0.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-2.0.0.oracle.sql b/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-2.0.0.oracle.sql
index ceb09be..f3a774a 100644
--- a/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-2.0.0.oracle.sql
+++ b/metastore/scripts/upgrade/oracle/upgrade-1.2.0-to-2.0.0.oracle.sql
@@ -1,6 +1,16 @@
SELECT 'Upgrading MetaStore schema from 1.2.0 to 2.0.0' AS Status from dual;
@022-HIVE-11970.oracle.sql;
+@023-HIVE-12807.oracle.sql;
+@024-HIVE-12814.oracle.sql;
+@025-HIVE-12816.oracle.sql;
+@026-HIVE-12818.oracle.sql;
+@027-HIVE-12819.oracle.sql;
+@028-HIVE-12821.oracle.sql;
+@029-HIVE-12822.oracle.sql;
+@030-HIVE-12823.oracle.sql;
+@031-HIVE-12381.oracle.sql;
+@032-HIVE-12832.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;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/022-HIVE-12807.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/022-HIVE-12807.postgres.sql b/metastore/scripts/upgrade/postgres/022-HIVE-12807.postgres.sql
new file mode 100644
index 0000000..d4c7a18
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/022-HIVE-12807.postgres.sql
@@ -0,0 +1 @@
+ALTER TABLE COMPACTION_QUEUE ADD COLUMN CQ_HIGHEST_TXN_ID bigint;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/023-HIVE-12814.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/023-HIVE-12814.postgres.sql b/metastore/scripts/upgrade/postgres/023-HIVE-12814.postgres.sql
new file mode 100644
index 0000000..37ef99e
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/023-HIVE-12814.postgres.sql
@@ -0,0 +1 @@
+ALTER TABLE COMPACTION_QUEUE ADD COLUMN CQ_META_INFO bytea;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/024-HIVE-12816.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/024-HIVE-12816.postgres.sql b/metastore/scripts/upgrade/postgres/024-HIVE-12816.postgres.sql
new file mode 100644
index 0000000..fa987d9
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/024-HIVE-12816.postgres.sql
@@ -0,0 +1 @@
+ALTER TABLE COMPACTION_QUEUE ADD COLUMN CQ_HADOOP_JOB_ID varchar(32);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/025-HIVE-12818.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/025-HIVE-12818.postgres.sql b/metastore/scripts/upgrade/postgres/025-HIVE-12818.postgres.sql
new file mode 100644
index 0000000..5eb2f26
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/025-HIVE-12818.postgres.sql
@@ -0,0 +1,17 @@
+CREATE TABLE COMPLETED_COMPACTIONS (
+ CC_ID bigint PRIMARY KEY,
+ CC_DATABASE varchar(128) NOT NULL,
+ CC_TABLE varchar(128) NOT NULL,
+ CC_PARTITION varchar(767),
+ CC_STATE char(1) NOT NULL,
+ CC_TYPE char(1) NOT NULL,
+ CC_WORKER_ID varchar(128),
+ CC_START bigint,
+ CC_END bigint,
+ CC_RUN_AS varchar(128),
+ CC_HIGHEST_TXN_ID bigint,
+ CC_META_INFO bytea,
+ CC_HADOOP_JOB_ID varchar(32)
+);
+
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/026-HIVE-12819.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/026-HIVE-12819.postgres.sql b/metastore/scripts/upgrade/postgres/026-HIVE-12819.postgres.sql
new file mode 100644
index 0000000..eceb910
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/026-HIVE-12819.postgres.sql
@@ -0,0 +1 @@
+ALTER TABLE TXNS ADD COLUMN TXN_AGENT_INFO varchar(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/027-HIVE-12821.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/027-HIVE-12821.postgres.sql b/metastore/scripts/upgrade/postgres/027-HIVE-12821.postgres.sql
new file mode 100644
index 0000000..ba5a51a
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/027-HIVE-12821.postgres.sql
@@ -0,0 +1,2 @@
+ALTER TABLE TXNS ADD COLUMN TXN_HEARTBEAT_COUNT integer;
+ALTER TABLE HIVE_LOCKS ADD COLUMN HL_HEARTBEAT_COUNT integer;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/028-HIVE-12822.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/028-HIVE-12822.postgres.sql b/metastore/scripts/upgrade/postgres/028-HIVE-12822.postgres.sql
new file mode 100644
index 0000000..f4e9742
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/028-HIVE-12822.postgres.sql
@@ -0,0 +1 @@
+ALTER TABLE TXNS ADD COLUMN TXN_META_INFO varchar(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/029-HIVE-12823.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/029-HIVE-12823.postgres.sql b/metastore/scripts/upgrade/postgres/029-HIVE-12823.postgres.sql
new file mode 100644
index 0000000..f7a980b
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/029-HIVE-12823.postgres.sql
@@ -0,0 +1 @@
+ALTER TABLE HIVE_LOCKS ADD COLUMN HL_AGENT_INFO varchar(128);
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/030-HIVE-12831.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/030-HIVE-12831.postgres.sql b/metastore/scripts/upgrade/postgres/030-HIVE-12831.postgres.sql
new file mode 100644
index 0000000..3f314e8
--- /dev/null
+++ b/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;
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/031-HIVE-12832.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/031-HIVE-12832.postgres.sql b/metastore/scripts/upgrade/postgres/031-HIVE-12832.postgres.sql
new file mode 100644
index 0000000..0e5515c
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/031-HIVE-12832.postgres.sql
@@ -0,0 +1,7 @@
+CREATE TABLE AUX_TABLE (
+ MT_KEY1 varchar(128) NOT NULL,
+ MT_KEY2 bigint NOT NULL,
+ MT_COMMENT varchar(255),
+ PRIMARY KEY(MT_KEY1, MT_KEY2)
+);
+
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/hive-schema-1.3.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/hive-schema-1.3.0.postgres.sql b/metastore/scripts/upgrade/postgres/hive-schema-1.3.0.postgres.sql
index 9bb5765..1ea19c3 100644
--- a/metastore/scripts/upgrade/postgres/hive-schema-1.3.0.postgres.sql
+++ b/metastore/scripts/upgrade/postgres/hive-schema-1.3.0.postgres.sql
@@ -1449,7 +1449,7 @@ GRANT ALL ON SCHEMA public TO PUBLIC;
------------------------------
-- Transaction and lock tables
------------------------------
-\i hive-txn-schema-0.13.0.postgres.sql;
+\i hive-txn-schema-1.3.0.postgres.sql;
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script
http://git-wip-us.apache.org/repos/asf/hive/blob/36df88c8/metastore/scripts/upgrade/postgres/hive-schema-2.0.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/hive-schema-2.0.0.postgres.sql b/metastore/scripts/upgrade/postgres/hive-schema-2.0.0.postgres.sql
index c749a29..4f034d7 100644
--- a/metastore/scripts/upgrade/postgres/hive-schema-2.0.0.postgres.sql
+++ b/metastore/scripts/upgrade/postgres/hive-schema-2.0.0.postgres.sql
@@ -1449,7 +1449,7 @@ GRANT ALL ON SCHEMA public TO PUBLIC;
------------------------------
-- Transaction and lock tables
------------------------------
-\i hive-txn-schema-0.13.0.postgres.sql;
+\i hive-txn-schema-2.0.0.postgres.sql;
-- -----------------------------------------------------------------
-- Record schema version. Should be the last step in the init script