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 { 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 _OperatorType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(26, _kOperatorTypeValues, _kOperatorTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +const std::map _OperatorType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(27, _kOperatorTypeValues, _kOperatorTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _kTaskTypeValues[] = { TaskType::MAP, 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 }; }; 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', ); } 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: 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 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 @@ public void read(org.apache.thrift.protocol.TProtocol prot, flushCache_result st @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, java.io.Serializable, Cloneable, Comparable { 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -206588,7 +206588,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, flushCache_result st /** 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 byName = new HashMap(); @@ -206603,7 +206603,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, flushCache_result st */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case -1: // RQST + case 1: // RQST return RQST; default: return null; @@ -206868,7 +206868,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, add_write_notificat 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); 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(); } 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 @@ def read(self, iprot): (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 @@ def write(self, oprot): 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() 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} 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) 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 @@ private Partition getPartitionObj(String db, String table, List partitio @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);