You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by sa...@apache.org on 2018/08/24 09:46:20 UTC
hive git commit: HIVE-20371: Fix definition for
add_write_notification_log in hive_metastore.thrift (Sankar Hariappan,
reviewed by Anishek Agarwal)
Repository: hive
Updated Branches:
refs/heads/master 9a5f1c244 -> 065604093
HIVE-20371: Fix definition for add_write_notification_log in hive_metastore.thrift (Sankar Hariappan, reviewed by Anishek Agarwal)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/06560409
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/06560409
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/06560409
Branch: refs/heads/master
Commit: 0656040933973f55afa8b6e8f53140b6f76b7446
Parents: 9a5f1c2
Author: Sankar Hariappan <sa...@apache.org>
Authored: Fri Aug 24 15:16:00 2018 +0530
Committer: Sankar Hariappan <sa...@apache.org>
Committed: Fri Aug 24 15:16:00 2018 +0530
----------------------------------------------------------------------
ql/if/queryplan.thrift | 1 +
ql/src/gen/thrift/gen-cpp/queryplan_types.cpp | 8 +++++---
ql/src/gen/thrift/gen-cpp/queryplan_types.h | 3 ++-
ql/src/gen/thrift/gen-php/Types.php | 2 ++
ql/src/gen/thrift/gen-py/queryplan/ttypes.py | 3 +++
ql/src/gen/thrift/gen-rb/queryplan_types.rb | 5 +++--
.../hadoop/hive/metastore/api/ThriftHiveMetastore.java | 8 ++++----
.../gen/thrift/gen-php/metastore/ThriftHiveMetastore.php | 6 +++---
.../thrift/gen-py/hive_metastore/ThriftHiveMetastore.py | 10 +++++++---
.../src/gen/thrift/gen-rb/thrift_hive_metastore.rb | 2 +-
.../src/main/thrift/hive_metastore.thrift | 2 +-
.../org/apache/hadoop/hive/metastore/HiveMetaStore.java | 2 +-
12 files changed, 33 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/ql/if/queryplan.thrift
----------------------------------------------------------------------
diff --git a/ql/if/queryplan.thrift b/ql/if/queryplan.thrift
index d43eed3..de21914 100644
--- a/ql/if/queryplan.thrift
+++ b/ql/if/queryplan.thrift
@@ -61,6 +61,7 @@ enum OperatorType {
RCFILEMERGE,
MERGEJOIN,
SPARKPRUNINGSINK,
+ TOPNKEY,
}
struct Operator {
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/ql/src/gen/thrift/gen-cpp/queryplan_types.cpp
----------------------------------------------------------------------
diff --git a/ql/src/gen/thrift/gen-cpp/queryplan_types.cpp b/ql/src/gen/thrift/gen-cpp/queryplan_types.cpp
index 73bbe3a..fd04675 100644
--- a/ql/src/gen/thrift/gen-cpp/queryplan_types.cpp
+++ b/ql/src/gen/thrift/gen-cpp/queryplan_types.cpp
@@ -59,7 +59,8 @@ int _kOperatorTypeValues[] = {
OperatorType::ORCFILEMERGE,
OperatorType::RCFILEMERGE,
OperatorType::MERGEJOIN,
- OperatorType::SPARKPRUNINGSINK
+ OperatorType::SPARKPRUNINGSINK,
+ OperatorType::TOPNKEY
};
const char* _kOperatorTypeNames[] = {
"JOIN",
@@ -87,9 +88,10 @@ const char* _kOperatorTypeNames[] = {
"ORCFILEMERGE",
"RCFILEMERGE",
"MERGEJOIN",
- "SPARKPRUNINGSINK"
+ "SPARKPRUNINGSINK",
+ "TOPNKEY"
};
-const std::map<int, const char*> _OperatorType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(26, _kOperatorTypeValues, _kOperatorTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _OperatorType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(27, _kOperatorTypeValues, _kOperatorTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
int _kTaskTypeValues[] = {
TaskType::MAP,
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/ql/src/gen/thrift/gen-cpp/queryplan_types.h
----------------------------------------------------------------------
diff --git a/ql/src/gen/thrift/gen-cpp/queryplan_types.h b/ql/src/gen/thrift/gen-cpp/queryplan_types.h
index 04c749f..8bd11c0 100644
--- a/ql/src/gen/thrift/gen-cpp/queryplan_types.h
+++ b/ql/src/gen/thrift/gen-cpp/queryplan_types.h
@@ -64,7 +64,8 @@ struct OperatorType {
ORCFILEMERGE = 22,
RCFILEMERGE = 23,
MERGEJOIN = 24,
- SPARKPRUNINGSINK = 25
+ SPARKPRUNINGSINK = 25,
+ TOPNKEY = 26
};
};
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/ql/src/gen/thrift/gen-php/Types.php
----------------------------------------------------------------------
diff --git a/ql/src/gen/thrift/gen-php/Types.php b/ql/src/gen/thrift/gen-php/Types.php
index 1a36d08..937dad2 100644
--- a/ql/src/gen/thrift/gen-php/Types.php
+++ b/ql/src/gen/thrift/gen-php/Types.php
@@ -60,6 +60,7 @@ final class OperatorType {
const RCFILEMERGE = 23;
const MERGEJOIN = 24;
const SPARKPRUNINGSINK = 25;
+ const TOPNKEY = 26;
static public $__names = array(
0 => 'JOIN',
1 => 'MAPJOIN',
@@ -87,6 +88,7 @@ final class OperatorType {
23 => 'RCFILEMERGE',
24 => 'MERGEJOIN',
25 => 'SPARKPRUNINGSINK',
+ 26 => 'TOPNKEY',
);
}
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/ql/src/gen/thrift/gen-py/queryplan/ttypes.py
----------------------------------------------------------------------
diff --git a/ql/src/gen/thrift/gen-py/queryplan/ttypes.py b/ql/src/gen/thrift/gen-py/queryplan/ttypes.py
index c0a2204..f61f27b 100644
--- a/ql/src/gen/thrift/gen-py/queryplan/ttypes.py
+++ b/ql/src/gen/thrift/gen-py/queryplan/ttypes.py
@@ -71,6 +71,7 @@ class OperatorType:
RCFILEMERGE = 23
MERGEJOIN = 24
SPARKPRUNINGSINK = 25
+ TOPNKEY = 26
_VALUES_TO_NAMES = {
0: "JOIN",
@@ -99,6 +100,7 @@ class OperatorType:
23: "RCFILEMERGE",
24: "MERGEJOIN",
25: "SPARKPRUNINGSINK",
+ 26: "TOPNKEY",
}
_NAMES_TO_VALUES = {
@@ -128,6 +130,7 @@ class OperatorType:
"RCFILEMERGE": 23,
"MERGEJOIN": 24,
"SPARKPRUNINGSINK": 25,
+ "TOPNKEY": 26,
}
class TaskType:
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/ql/src/gen/thrift/gen-rb/queryplan_types.rb
----------------------------------------------------------------------
diff --git a/ql/src/gen/thrift/gen-rb/queryplan_types.rb b/ql/src/gen/thrift/gen-rb/queryplan_types.rb
index 61349a2..2867df3 100644
--- a/ql/src/gen/thrift/gen-rb/queryplan_types.rb
+++ b/ql/src/gen/thrift/gen-rb/queryplan_types.rb
@@ -47,8 +47,9 @@ module OperatorType
RCFILEMERGE = 23
MERGEJOIN = 24
SPARKPRUNINGSINK = 25
- VALUE_MAP = {0 => "JOIN", 1 => "MAPJOIN", 2 => "EXTRACT", 3 => "FILTER", 4 => "FORWARD", 5 => "GROUPBY", 6 => "LIMIT", 7 => "SCRIPT", 8 => "SELECT", 9 => "TABLESCAN", 10 => "FILESINK", 11 => "REDUCESINK", 12 => "UNION", 13 => "UDTF", 14 => "LATERALVIEWJOIN", 15 => "LATERALVIEWFORWARD", 16 => "HASHTABLESINK", 17 => "HASHTABLEDUMMY", 18 => "PTF", 19 => "MUX", 20 => "DEMUX", 21 => "EVENT", 22 => "ORCFILEMERGE", 23 => "RCFILEMERGE", 24 => "MERGEJOIN", 25 => "SPARKPRUNINGSINK"}
- VALID_VALUES = Set.new([JOIN, MAPJOIN, EXTRACT, FILTER, FORWARD, GROUPBY, LIMIT, SCRIPT, SELECT, TABLESCAN, FILESINK, REDUCESINK, UNION, UDTF, LATERALVIEWJOIN, LATERALVIEWFORWARD, HASHTABLESINK, HASHTABLEDUMMY, PTF, MUX, DEMUX, EVENT, ORCFILEMERGE, RCFILEMERGE, MERGEJOIN, SPARKPRUNINGSINK]).freeze
+ TOPNKEY = 26
+ VALUE_MAP = {0 => "JOIN", 1 => "MAPJOIN", 2 => "EXTRACT", 3 => "FILTER", 4 => "FORWARD", 5 => "GROUPBY", 6 => "LIMIT", 7 => "SCRIPT", 8 => "SELECT", 9 => "TABLESCAN", 10 => "FILESINK", 11 => "REDUCESINK", 12 => "UNION", 13 => "UDTF", 14 => "LATERALVIEWJOIN", 15 => "LATERALVIEWFORWARD", 16 => "HASHTABLESINK", 17 => "HASHTABLEDUMMY", 18 => "PTF", 19 => "MUX", 20 => "DEMUX", 21 => "EVENT", 22 => "ORCFILEMERGE", 23 => "RCFILEMERGE", 24 => "MERGEJOIN", 25 => "SPARKPRUNINGSINK", 26 => "TOPNKEY"}
+ VALID_VALUES = Set.new([JOIN, MAPJOIN, EXTRACT, FILTER, FORWARD, GROUPBY, LIMIT, SCRIPT, SELECT, TABLESCAN, FILESINK, REDUCESINK, UNION, UDTF, LATERALVIEWJOIN, LATERALVIEWFORWARD, HASHTABLESINK, HASHTABLEDUMMY, PTF, MUX, DEMUX, EVENT, ORCFILEMERGE, RCFILEMERGE, MERGEJOIN, SPARKPRUNINGSINK, TOPNKEY]).freeze
end
module TaskType
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
index 7ab64ea..47f96f3 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
@@ -206576,7 +206576,7 @@ import org.slf4j.LoggerFactory;
@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public static class add_write_notification_log_args implements org.apache.thrift.TBase<add_write_notification_log_args, add_write_notification_log_args._Fields>, java.io.Serializable, Cloneable, Comparable<add_write_notification_log_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("add_write_notification_log_args");
- private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)-1);
+ private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -206588,7 +206588,7 @@ import org.slf4j.LoggerFactory;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- RQST((short)-1, "rqst");
+ RQST((short)1, "rqst");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -206603,7 +206603,7 @@ import org.slf4j.LoggerFactory;
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case -1: // RQST
+ case 1: // RQST
return RQST;
default:
return null;
@@ -206868,7 +206868,7 @@ import org.slf4j.LoggerFactory;
break;
}
switch (schemeField.id) {
- case -1: // RQST
+ case 1: // RQST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.rqst = new WriteNotificationLogRequest();
struct.rqst.read(iprot);
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
index cc19f23..0973f4f 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
@@ -52822,7 +52822,7 @@ class ThriftHiveMetastore_add_write_notification_log_args {
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
- -1 => array(
+ 1 => array(
'var' => 'rqst',
'type' => TType::STRUCT,
'class' => '\metastore\WriteNotificationLogRequest',
@@ -52855,7 +52855,7 @@ class ThriftHiveMetastore_add_write_notification_log_args {
}
switch ($fid)
{
- case -1:
+ case 1:
if ($ftype == TType::STRUCT) {
$this->rqst = new \metastore\WriteNotificationLogRequest();
$xfer += $this->rqst->read($input);
@@ -52880,7 +52880,7 @@ class ThriftHiveMetastore_add_write_notification_log_args {
if (!is_object($this->rqst)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
}
- $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, -1);
+ $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1);
$xfer += $this->rqst->write($output);
$xfer += $output->writeFieldEnd();
}
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
index d098dba..3c0d0a5 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
@@ -43637,7 +43637,11 @@ class add_write_notification_log_args:
- rqst
"""
- thrift_spec = None
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRUCT, 'rqst', (WriteNotificationLogRequest, WriteNotificationLogRequest.thrift_spec), None, ), # 1
+ )
+
def __init__(self, rqst=None,):
self.rqst = rqst
@@ -43650,7 +43654,7 @@ class add_write_notification_log_args:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
- if fid == -1:
+ if fid == 1:
if ftype == TType.STRUCT:
self.rqst = WriteNotificationLogRequest()
self.rqst.read(iprot)
@@ -43667,7 +43671,7 @@ class add_write_notification_log_args:
return
oprot.writeStructBegin('add_write_notification_log_args')
if self.rqst is not None:
- oprot.writeFieldBegin('rqst', TType.STRUCT, -1)
+ oprot.writeFieldBegin('rqst', TType.STRUCT, 1)
self.rqst.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
index 92424a4..e54a732 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
@@ -12655,7 +12655,7 @@ module ThriftHiveMetastore
class Add_write_notification_log_args
include ::Thrift::Struct, ::Thrift::Struct_Union
- RQST = -1
+ RQST = 1
FIELDS = {
RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::WriteNotificationLogRequest}
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
index 8a4bdd8..feb44d5 100644
--- a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
+++ b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
@@ -2221,7 +2221,7 @@ service ThriftHiveMetastore extends fb303.FacebookService
NotificationEventsCountResponse get_notification_events_count(1:NotificationEventsCountRequest rqst)
FireEventResponse fire_listener_event(1:FireEventRequest rqst)
void flushCache()
- WriteNotificationLogResponse add_write_notification_log(WriteNotificationLogRequest rqst)
+ WriteNotificationLogResponse add_write_notification_log(1:WriteNotificationLogRequest rqst)
// Repl Change Management api
CmRecycleResponse cm_recycle(1:CmRecycleRequest request) throws(1:MetaException o1)
http://git-wip-us.apache.org/repos/asf/hive/blob/06560409/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index e971d0f..6b660f5 100644
--- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -7456,7 +7456,7 @@ public class HiveMetaStore extends ThriftHiveMetastore {
@Override
public WriteNotificationLogResponse add_write_notification_log(WriteNotificationLogRequest rqst)
- throws MetaException, NoSuchObjectException {
+ throws TException {
Table tableObj = getTblObject(rqst.getDb(), rqst.getTable());
Partition ptnObj = getPartitionObj(rqst.getDb(), rqst.getTable(), rqst.getPartitionVals(), tableObj);
addTxnWriteNotificationLog(tableObj, ptnObj, rqst);