| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425 |
- #
- # Autogenerated by Thrift Compiler (0.13.0)
- #
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- #
- # options string: py:new_style
- #
- from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
- from thrift.protocol.TProtocol import TProtocolException
- from thrift.TRecursive import fix_spec
- import sys
- import beeswaxd.BeeswaxService
- import logging
- from .ttypes import *
- from thrift.Thrift import TProcessor
- from thrift.transport import TTransport
- all_structs = []
- class Iface(beeswaxd.BeeswaxService.Iface):
- def Cancel(self, query_id):
- """
- Parameters:
- - query_id
- """
- pass
- def ResetCatalog(self):
- pass
- def ResetTable(self, request):
- """
- Parameters:
- - request
- """
- pass
- def GetRuntimeProfile(self, query_id):
- """
- Parameters:
- - query_id
- """
- pass
- def CloseInsert(self, handle):
- """
- Parameters:
- - handle
- """
- pass
- def PingImpalaService(self):
- pass
- def GetExecSummary(self, handle):
- """
- Parameters:
- - handle
- """
- pass
- class Client(beeswaxd.BeeswaxService.Client, Iface):
- def __init__(self, iprot, oprot=None):
- beeswaxd.BeeswaxService.Client.__init__(self, iprot, oprot)
- def Cancel(self, query_id):
- """
- Parameters:
- - query_id
- """
- self.send_Cancel(query_id)
- return self.recv_Cancel()
- def send_Cancel(self, query_id):
- self._oprot.writeMessageBegin('Cancel', TMessageType.CALL, self._seqid)
- args = Cancel_args()
- args.query_id = query_id
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_Cancel(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = Cancel_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- raise TApplicationException(TApplicationException.MISSING_RESULT, "Cancel failed: unknown result")
- def ResetCatalog(self):
- self.send_ResetCatalog()
- return self.recv_ResetCatalog()
- def send_ResetCatalog(self):
- self._oprot.writeMessageBegin('ResetCatalog', TMessageType.CALL, self._seqid)
- args = ResetCatalog_args()
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_ResetCatalog(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = ResetCatalog_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "ResetCatalog failed: unknown result")
- def ResetTable(self, request):
- """
- Parameters:
- - request
- """
- self.send_ResetTable(request)
- return self.recv_ResetTable()
- def send_ResetTable(self, request):
- self._oprot.writeMessageBegin('ResetTable', TMessageType.CALL, self._seqid)
- args = ResetTable_args()
- args.request = request
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_ResetTable(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = ResetTable_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "ResetTable failed: unknown result")
- def GetRuntimeProfile(self, query_id):
- """
- Parameters:
- - query_id
- """
- self.send_GetRuntimeProfile(query_id)
- return self.recv_GetRuntimeProfile()
- def send_GetRuntimeProfile(self, query_id):
- self._oprot.writeMessageBegin('GetRuntimeProfile', TMessageType.CALL, self._seqid)
- args = GetRuntimeProfile_args()
- args.query_id = query_id
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_GetRuntimeProfile(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = GetRuntimeProfile_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- raise TApplicationException(TApplicationException.MISSING_RESULT, "GetRuntimeProfile failed: unknown result")
- def CloseInsert(self, handle):
- """
- Parameters:
- - handle
- """
- self.send_CloseInsert(handle)
- return self.recv_CloseInsert()
- def send_CloseInsert(self, handle):
- self._oprot.writeMessageBegin('CloseInsert', TMessageType.CALL, self._seqid)
- args = CloseInsert_args()
- args.handle = handle
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_CloseInsert(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = CloseInsert_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- if result.error2 is not None:
- raise result.error2
- raise TApplicationException(TApplicationException.MISSING_RESULT, "CloseInsert failed: unknown result")
- def PingImpalaService(self):
- self.send_PingImpalaService()
- return self.recv_PingImpalaService()
- def send_PingImpalaService(self):
- self._oprot.writeMessageBegin('PingImpalaService', TMessageType.CALL, self._seqid)
- args = PingImpalaService_args()
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_PingImpalaService(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = PingImpalaService_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "PingImpalaService failed: unknown result")
- def GetExecSummary(self, handle):
- """
- Parameters:
- - handle
- """
- self.send_GetExecSummary(handle)
- return self.recv_GetExecSummary()
- def send_GetExecSummary(self, handle):
- self._oprot.writeMessageBegin('GetExecSummary', TMessageType.CALL, self._seqid)
- args = GetExecSummary_args()
- args.handle = handle
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_GetExecSummary(self):
- iprot = self._iprot
- (fname, mtype, rseqid) = iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(iprot)
- iprot.readMessageEnd()
- raise x
- result = GetExecSummary_result()
- result.read(iprot)
- iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- if result.error2 is not None:
- raise result.error2
- raise TApplicationException(TApplicationException.MISSING_RESULT, "GetExecSummary failed: unknown result")
- class Processor(beeswaxd.BeeswaxService.Processor, Iface, TProcessor):
- def __init__(self, handler):
- beeswaxd.BeeswaxService.Processor.__init__(self, handler)
- self._processMap["Cancel"] = Processor.process_Cancel
- self._processMap["ResetCatalog"] = Processor.process_ResetCatalog
- self._processMap["ResetTable"] = Processor.process_ResetTable
- self._processMap["GetRuntimeProfile"] = Processor.process_GetRuntimeProfile
- self._processMap["CloseInsert"] = Processor.process_CloseInsert
- self._processMap["PingImpalaService"] = Processor.process_PingImpalaService
- self._processMap["GetExecSummary"] = Processor.process_GetExecSummary
- self._on_message_begin = None
- def on_message_begin(self, func):
- self._on_message_begin = func
- def process(self, iprot, oprot):
- (name, type, seqid) = iprot.readMessageBegin()
- if self._on_message_begin:
- self._on_message_begin(name, type, seqid)
- if name not in self._processMap:
- iprot.skip(TType.STRUCT)
- iprot.readMessageEnd()
- x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
- oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
- x.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- return
- else:
- self._processMap[name](self, seqid, iprot, oprot)
- return True
- def process_Cancel(self, seqid, iprot, oprot):
- args = Cancel_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = Cancel_result()
- try:
- result.success = self._handler.Cancel(args.query_id)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except beeswaxd.ttypes.BeeswaxException as error:
- msg_type = TMessageType.REPLY
- result.error = error
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("Cancel", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_ResetCatalog(self, seqid, iprot, oprot):
- args = ResetCatalog_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = ResetCatalog_result()
- try:
- result.success = self._handler.ResetCatalog()
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("ResetCatalog", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_ResetTable(self, seqid, iprot, oprot):
- args = ResetTable_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = ResetTable_result()
- try:
- result.success = self._handler.ResetTable(args.request)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("ResetTable", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_GetRuntimeProfile(self, seqid, iprot, oprot):
- args = GetRuntimeProfile_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = GetRuntimeProfile_result()
- try:
- result.success = self._handler.GetRuntimeProfile(args.query_id)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except beeswaxd.ttypes.BeeswaxException as error:
- msg_type = TMessageType.REPLY
- result.error = error
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("GetRuntimeProfile", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_CloseInsert(self, seqid, iprot, oprot):
- args = CloseInsert_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = CloseInsert_result()
- try:
- result.success = self._handler.CloseInsert(args.handle)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except beeswaxd.ttypes.QueryNotFoundException as error:
- msg_type = TMessageType.REPLY
- result.error = error
- except beeswaxd.ttypes.BeeswaxException as error2:
- msg_type = TMessageType.REPLY
- result.error2 = error2
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("CloseInsert", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_PingImpalaService(self, seqid, iprot, oprot):
- args = PingImpalaService_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = PingImpalaService_result()
- try:
- result.success = self._handler.PingImpalaService()
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("PingImpalaService", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_GetExecSummary(self, seqid, iprot, oprot):
- args = GetExecSummary_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = GetExecSummary_result()
- try:
- result.success = self._handler.GetExecSummary(args.handle)
- msg_type = TMessageType.REPLY
- except TTransport.TTransportException:
- raise
- except beeswaxd.ttypes.QueryNotFoundException as error:
- msg_type = TMessageType.REPLY
- result.error = error
- except beeswaxd.ttypes.BeeswaxException as error2:
- msg_type = TMessageType.REPLY
- result.error2 = error2
- except TApplicationException as ex:
- logging.exception('TApplication exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = ex
- except Exception:
- logging.exception('Unexpected exception in handler')
- msg_type = TMessageType.EXCEPTION
- result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
- oprot.writeMessageBegin("GetExecSummary", msg_type, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- # HELPER FUNCTIONS AND STRUCTURES
- class Cancel_args(object):
- """
- Attributes:
- - query_id
- """
- def __init__(self, query_id=None,):
- self.query_id = query_id
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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.query_id = beeswaxd.ttypes.QueryHandle()
- self.query_id.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('Cancel_args')
- if self.query_id is not None:
- oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
- self.query_id.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(Cancel_args)
- Cancel_args.thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'query_id', [beeswaxd.ttypes.QueryHandle, None], None, ), # 1
- )
- class Cancel_result(object):
- """
- Attributes:
- - success
- - error
- """
- def __init__(self, success=None, error=None,):
- self.success = success
- self.error = error
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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 = Status.ttypes.TStatus()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = beeswaxd.ttypes.BeeswaxException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('Cancel_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(Cancel_result)
- Cancel_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [Status.ttypes.TStatus, None], None, ), # 0
- (1, TType.STRUCT, 'error', [beeswaxd.ttypes.BeeswaxException, None], None, ), # 1
- )
- class ResetCatalog_args(object):
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('ResetCatalog_args')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(ResetCatalog_args)
- ResetCatalog_args.thrift_spec = (
- )
- class ResetCatalog_result(object):
- """
- Attributes:
- - success
- """
- def __init__(self, success=None,):
- self.success = success
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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 = Status.ttypes.TStatus()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('ResetCatalog_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 __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(ResetCatalog_result)
- ResetCatalog_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [Status.ttypes.TStatus, None], None, ), # 0
- )
- class ResetTable_args(object):
- """
- Attributes:
- - request
- """
- def __init__(self, request=None,):
- self.request = request
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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.request = TResetTableReq()
- self.request.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('ResetTable_args')
- if self.request is not None:
- oprot.writeFieldBegin('request', TType.STRUCT, 1)
- self.request.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(ResetTable_args)
- ResetTable_args.thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'request', [TResetTableReq, None], None, ), # 1
- )
- class ResetTable_result(object):
- """
- Attributes:
- - success
- """
- def __init__(self, success=None,):
- self.success = success
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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 = Status.ttypes.TStatus()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('ResetTable_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 __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(ResetTable_result)
- ResetTable_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [Status.ttypes.TStatus, None], None, ), # 0
- )
- class GetRuntimeProfile_args(object):
- """
- Attributes:
- - query_id
- """
- def __init__(self, query_id=None,):
- self.query_id = query_id
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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.query_id = beeswaxd.ttypes.QueryHandle()
- self.query_id.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('GetRuntimeProfile_args')
- if self.query_id is not None:
- oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
- self.query_id.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(GetRuntimeProfile_args)
- GetRuntimeProfile_args.thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'query_id', [beeswaxd.ttypes.QueryHandle, None], None, ), # 1
- )
- class GetRuntimeProfile_result(object):
- """
- Attributes:
- - success
- - error
- """
- def __init__(self, success=None, error=None,):
- self.success = success
- self.error = error
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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.STRING:
- self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = beeswaxd.ttypes.BeeswaxException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('GetRuntimeProfile_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRING, 0)
- oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(GetRuntimeProfile_result)
- GetRuntimeProfile_result.thrift_spec = (
- (0, TType.STRING, 'success', 'UTF8', None, ), # 0
- (1, TType.STRUCT, 'error', [beeswaxd.ttypes.BeeswaxException, None], None, ), # 1
- )
- class CloseInsert_args(object):
- """
- Attributes:
- - handle
- """
- def __init__(self, handle=None,):
- self.handle = handle
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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.handle = beeswaxd.ttypes.QueryHandle()
- self.handle.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('CloseInsert_args')
- if self.handle is not None:
- oprot.writeFieldBegin('handle', TType.STRUCT, 1)
- self.handle.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(CloseInsert_args)
- CloseInsert_args.thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'handle', [beeswaxd.ttypes.QueryHandle, None], None, ), # 1
- )
- class CloseInsert_result(object):
- """
- Attributes:
- - success
- - error
- - error2
- """
- def __init__(self, success=None, error=None, error2=None,):
- self.success = success
- self.error = error
- self.error2 = error2
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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 = TInsertResult()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = beeswaxd.ttypes.QueryNotFoundException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.error2 = beeswaxd.ttypes.BeeswaxException()
- self.error2.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('CloseInsert_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- if self.error2 is not None:
- oprot.writeFieldBegin('error2', TType.STRUCT, 2)
- self.error2.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(CloseInsert_result)
- CloseInsert_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [TInsertResult, None], None, ), # 0
- (1, TType.STRUCT, 'error', [beeswaxd.ttypes.QueryNotFoundException, None], None, ), # 1
- (2, TType.STRUCT, 'error2', [beeswaxd.ttypes.BeeswaxException, None], None, ), # 2
- )
- class PingImpalaService_args(object):
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('PingImpalaService_args')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(PingImpalaService_args)
- PingImpalaService_args.thrift_spec = (
- )
- class PingImpalaService_result(object):
- """
- Attributes:
- - success
- """
- def __init__(self, success=None,):
- self.success = success
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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 = TPingImpalaServiceResp()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('PingImpalaService_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 __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(PingImpalaService_result)
- PingImpalaService_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [TPingImpalaServiceResp, None], None, ), # 0
- )
- class GetExecSummary_args(object):
- """
- Attributes:
- - handle
- """
- def __init__(self, handle=None,):
- self.handle = handle
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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.handle = beeswaxd.ttypes.QueryHandle()
- self.handle.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('GetExecSummary_args')
- if self.handle is not None:
- oprot.writeFieldBegin('handle', TType.STRUCT, 1)
- self.handle.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(GetExecSummary_args)
- GetExecSummary_args.thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'handle', [beeswaxd.ttypes.QueryHandle, None], None, ), # 1
- )
- class GetExecSummary_result(object):
- """
- Attributes:
- - success
- - error
- - error2
- """
- def __init__(self, success=None, error=None, error2=None,):
- self.success = success
- self.error = error
- self.error2 = error2
- def read(self, iprot):
- if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
- iprot._fast_decode(self, iprot, [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 = ExecStats.ttypes.TExecSummary()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = beeswaxd.ttypes.QueryNotFoundException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.error2 = beeswaxd.ttypes.BeeswaxException()
- self.error2.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot._fast_encode is not None and self.thrift_spec is not None:
- oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
- return
- oprot.writeStructBegin('GetExecSummary_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- if self.error2 is not None:
- oprot.writeFieldBegin('error2', TType.STRUCT, 2)
- self.error2.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.items()]
- 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)
- all_structs.append(GetExecSummary_result)
- GetExecSummary_result.thrift_spec = (
- (0, TType.STRUCT, 'success', [ExecStats.ttypes.TExecSummary, None], None, ), # 0
- (1, TType.STRUCT, 'error', [beeswaxd.ttypes.QueryNotFoundException, None], None, ), # 1
- (2, TType.STRUCT, 'error2', [beeswaxd.ttypes.BeeswaxException, None], None, ), # 2
- )
- fix_spec(all_structs)
- del all_structs
|