You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by we...@apache.org on 2017/09/07 05:58:34 UTC
[20/50] [abbrv] hive git commit: HIVE-17100 : Improve HS2 operation
logs for REPL commands (Sankar Hariappan, reviewed by Anishek Agarwal,
Thejas Nair)
http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
index 2ecf555..4b45c3a 100644
--- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
+++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
@@ -1224,6 +1224,13 @@ class Iface(fb303.FacebookService.Iface):
def get_current_notificationEventId(self):
pass
+ def get_notification_events_count(self, rqst):
+ """
+ Parameters:
+ - rqst
+ """
+ pass
+
def fire_listener_event(self, rqst):
"""
Parameters:
@@ -6774,6 +6781,37 @@ class Client(fb303.FacebookService.Client, Iface):
return result.success
raise TApplicationException(TApplicationException.MISSING_RESULT, "get_current_notificationEventId failed: unknown result")
+ def get_notification_events_count(self, rqst):
+ """
+ Parameters:
+ - rqst
+ """
+ self.send_get_notification_events_count(rqst)
+ return self.recv_get_notification_events_count()
+
+ def send_get_notification_events_count(self, rqst):
+ self._oprot.writeMessageBegin('get_notification_events_count', TMessageType.CALL, self._seqid)
+ args = get_notification_events_count_args()
+ args.rqst = rqst
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_get_notification_events_count(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = get_notification_events_count_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "get_notification_events_count failed: unknown result")
+
def fire_listener_event(self, rqst):
"""
Parameters:
@@ -7200,6 +7238,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
self._processMap["add_dynamic_partitions"] = Processor.process_add_dynamic_partitions
self._processMap["get_next_notification"] = Processor.process_get_next_notification
self._processMap["get_current_notificationEventId"] = Processor.process_get_current_notificationEventId
+ self._processMap["get_notification_events_count"] = Processor.process_get_notification_events_count
self._processMap["fire_listener_event"] = Processor.process_fire_listener_event
self._processMap["flushCache"] = Processor.process_flushCache
self._processMap["cm_recycle"] = Processor.process_cm_recycle
@@ -10946,6 +10985,25 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_get_notification_events_count(self, seqid, iprot, oprot):
+ args = get_notification_events_count_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = get_notification_events_count_result()
+ try:
+ result.success = self._handler.get_notification_events_count(args.rqst)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("get_notification_events_count", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_fire_listener_event(self, seqid, iprot, oprot):
args = fire_listener_event_args()
args.read(iprot)
@@ -36964,6 +37022,133 @@ class get_current_notificationEventId_result:
def __ne__(self, other):
return not (self == other)
+class get_notification_events_count_args:
+ """
+ Attributes:
+ - rqst
+ """
+
+ thrift_spec = None
+ def __init__(self, rqst=None,):
+ self.rqst = rqst
+
+ 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))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == -1:
+ if ftype == TType.STRUCT:
+ self.rqst = NotificationEventsCountRequest()
+ self.rqst.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('get_notification_events_count_args')
+ if self.rqst is not None:
+ oprot.writeFieldBegin('rqst', TType.STRUCT, -1)
+ self.rqst.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.rqst)
+ return value
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class get_notification_events_count_result:
+ """
+ Attributes:
+ - success
+ """
+
+ thrift_spec = (
+ (0, TType.STRUCT, 'success', (NotificationEventsCountResponse, NotificationEventsCountResponse.thrift_spec), None, ), # 0
+ )
+
+ def __init__(self, success=None,):
+ self.success = success
+
+ 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))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.STRUCT:
+ self.success = NotificationEventsCountResponse()
+ self.success.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('get_notification_events_count_result')
+ if self.success is not None:
+ oprot.writeFieldBegin('success', TType.STRUCT, 0)
+ self.success.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.success)
+ return value
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
class fire_listener_event_args:
"""
Attributes:
http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
index 53671e3..7570895 100644
--- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
+++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py
@@ -11935,6 +11935,155 @@ class CurrentNotificationEventId:
def __ne__(self, other):
return not (self == other)
+class NotificationEventsCountRequest:
+ """
+ Attributes:
+ - fromEventId
+ - dbName
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I64, 'fromEventId', None, None, ), # 1
+ (2, TType.STRING, 'dbName', None, None, ), # 2
+ )
+
+ def __init__(self, fromEventId=None, dbName=None,):
+ self.fromEventId = fromEventId
+ self.dbName = dbName
+
+ 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))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.I64:
+ self.fromEventId = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRING:
+ self.dbName = iprot.readString()
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('NotificationEventsCountRequest')
+ if self.fromEventId is not None:
+ oprot.writeFieldBegin('fromEventId', TType.I64, 1)
+ oprot.writeI64(self.fromEventId)
+ oprot.writeFieldEnd()
+ if self.dbName is not None:
+ oprot.writeFieldBegin('dbName', TType.STRING, 2)
+ oprot.writeString(self.dbName)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.fromEventId is None:
+ raise TProtocol.TProtocolException(message='Required field fromEventId is unset!')
+ if self.dbName is None:
+ raise TProtocol.TProtocolException(message='Required field dbName is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.fromEventId)
+ value = (value * 31) ^ hash(self.dbName)
+ return value
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class NotificationEventsCountResponse:
+ """
+ Attributes:
+ - eventsCount
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.I64, 'eventsCount', None, None, ), # 1
+ )
+
+ def __init__(self, eventsCount=None,):
+ self.eventsCount = eventsCount
+
+ 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))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.I64:
+ self.eventsCount = iprot.readI64()
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('NotificationEventsCountResponse')
+ if self.eventsCount is not None:
+ oprot.writeFieldBegin('eventsCount', TType.I64, 1)
+ oprot.writeI64(self.eventsCount)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def validate(self):
+ if self.eventsCount is None:
+ raise TProtocol.TProtocolException(message='Required field eventsCount is unset!')
+ return
+
+
+ def __hash__(self):
+ value = 17
+ value = (value * 31) ^ hash(self.eventsCount)
+ return value
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
class InsertEventRequestData:
"""
Attributes:
http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
index c67f3b0..ea73b34 100644
--- a/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
+++ b/standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb
@@ -2670,6 +2670,43 @@ class CurrentNotificationEventId
::Thrift::Struct.generate_accessors self
end
+class NotificationEventsCountRequest
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ FROMEVENTID = 1
+ DBNAME = 2
+
+ FIELDS = {
+ FROMEVENTID => {:type => ::Thrift::Types::I64, :name => 'fromEventId'},
+ DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fromEventId is unset!') unless @fromEventId
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
+class NotificationEventsCountResponse
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ EVENTSCOUNT = 1
+
+ FIELDS = {
+ EVENTSCOUNT => {:type => ::Thrift::Types::I64, :name => 'eventsCount'}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field eventsCount is unset!') unless @eventsCount
+ end
+
+ ::Thrift::Struct.generate_accessors self
+end
+
class InsertEventRequestData
include ::Thrift::Struct, ::Thrift::Struct_Union
REPLACE = 1
http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb b/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
index cfe08f6..54b3dfb 100644
--- a/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
+++ b/standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
@@ -2524,6 +2524,21 @@ module ThriftHiveMetastore
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_current_notificationEventId failed: unknown result')
end
+ def get_notification_events_count(rqst)
+ send_get_notification_events_count(rqst)
+ return recv_get_notification_events_count()
+ end
+
+ def send_get_notification_events_count(rqst)
+ send_message('get_notification_events_count', Get_notification_events_count_args, :rqst => rqst)
+ end
+
+ def recv_get_notification_events_count()
+ result = receive_message(Get_notification_events_count_result)
+ return result.success unless result.success.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_notification_events_count failed: unknown result')
+ end
+
def fire_listener_event(rqst)
send_fire_listener_event(rqst)
return recv_fire_listener_event()
@@ -4558,6 +4573,13 @@ module ThriftHiveMetastore
write_result(result, oprot, 'get_current_notificationEventId', seqid)
end
+ def process_get_notification_events_count(seqid, iprot, oprot)
+ args = read_args(iprot, Get_notification_events_count_args)
+ result = Get_notification_events_count_result.new()
+ result.success = @handler.get_notification_events_count(args.rqst)
+ write_result(result, oprot, 'get_notification_events_count', seqid)
+ end
+
def process_fire_listener_event(seqid, iprot, oprot)
args = read_args(iprot, Fire_listener_event_args)
result = Fire_listener_event_result.new()
@@ -10325,6 +10347,38 @@ module ThriftHiveMetastore
::Thrift::Struct.generate_accessors self
end
+ class Get_notification_events_count_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ RQST = -1
+
+ FIELDS = {
+ RQST => {:type => ::Thrift::Types::STRUCT, :name => 'rqst', :class => ::NotificationEventsCountRequest}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class Get_notification_events_count_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::NotificationEventsCountResponse}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
class Fire_listener_event_args
include ::Thrift::Struct, ::Thrift::Struct_Union
RQST = 1
http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/main/thrift/hive_metastore.thrift
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/thrift/hive_metastore.thrift b/standalone-metastore/src/main/thrift/hive_metastore.thrift
index 9b0a846..7268d53 100644
--- a/standalone-metastore/src/main/thrift/hive_metastore.thrift
+++ b/standalone-metastore/src/main/thrift/hive_metastore.thrift
@@ -859,6 +859,15 @@ struct CurrentNotificationEventId {
1: required i64 eventId,
}
+struct NotificationEventsCountRequest {
+ 1: required i64 fromEventId,
+ 2: required string dbName,
+}
+
+struct NotificationEventsCountResponse {
+ 1: required i64 eventsCount,
+}
+
struct InsertEventRequestData {
1: optional bool replace,
2: required list<string> filesAdded,
@@ -1546,6 +1555,7 @@ service ThriftHiveMetastore extends fb303.FacebookService
// Notification logging calls
NotificationEventResponse get_next_notification(1:NotificationEventRequest rqst)
CurrentNotificationEventId get_current_notificationEventId()
+ NotificationEventsCountResponse get_notification_events_count(NotificationEventsCountRequest rqst)
FireEventResponse fire_listener_event(1:FireEventRequest rqst)
void flushCache()