ImpalaService.py 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427
  1. #
  2. # Autogenerated by Thrift Compiler (0.9.3)
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. # options string: py:new_style
  7. #
  8. from thrift.Thrift import TType, TMessageType, TException, TApplicationException
  9. import beeswaxd.BeeswaxService
  10. import logging
  11. from ttypes import *
  12. from thrift.Thrift import TProcessor
  13. from thrift.transport import TTransport
  14. from thrift.protocol import TBinaryProtocol, TProtocol
  15. try:
  16. from thrift.protocol import fastbinary
  17. except:
  18. fastbinary = None
  19. class Iface(beeswaxd.BeeswaxService.Iface):
  20. def Cancel(self, query_id):
  21. """
  22. Parameters:
  23. - query_id
  24. """
  25. pass
  26. def ResetCatalog(self):
  27. pass
  28. def ResetTable(self, request):
  29. """
  30. Parameters:
  31. - request
  32. """
  33. pass
  34. def GetRuntimeProfile(self, query_id):
  35. """
  36. Parameters:
  37. - query_id
  38. """
  39. pass
  40. def CloseInsert(self, handle):
  41. """
  42. Parameters:
  43. - handle
  44. """
  45. pass
  46. def PingImpalaService(self):
  47. pass
  48. def GetExecSummary(self, handle):
  49. """
  50. Parameters:
  51. - handle
  52. """
  53. pass
  54. class Client(beeswaxd.BeeswaxService.Client, Iface):
  55. def __init__(self, iprot, oprot=None):
  56. beeswaxd.BeeswaxService.Client.__init__(self, iprot, oprot)
  57. def Cancel(self, query_id):
  58. """
  59. Parameters:
  60. - query_id
  61. """
  62. self.send_Cancel(query_id)
  63. return self.recv_Cancel()
  64. def send_Cancel(self, query_id):
  65. self._oprot.writeMessageBegin('Cancel', TMessageType.CALL, self._seqid)
  66. args = Cancel_args()
  67. args.query_id = query_id
  68. args.write(self._oprot)
  69. self._oprot.writeMessageEnd()
  70. self._oprot.trans.flush()
  71. def recv_Cancel(self):
  72. iprot = self._iprot
  73. (fname, mtype, rseqid) = iprot.readMessageBegin()
  74. if mtype == TMessageType.EXCEPTION:
  75. x = TApplicationException()
  76. x.read(iprot)
  77. iprot.readMessageEnd()
  78. raise x
  79. result = Cancel_result()
  80. result.read(iprot)
  81. iprot.readMessageEnd()
  82. if result.success is not None:
  83. return result.success
  84. if result.error is not None:
  85. raise result.error
  86. raise TApplicationException(TApplicationException.MISSING_RESULT, "Cancel failed: unknown result")
  87. def ResetCatalog(self):
  88. self.send_ResetCatalog()
  89. return self.recv_ResetCatalog()
  90. def send_ResetCatalog(self):
  91. self._oprot.writeMessageBegin('ResetCatalog', TMessageType.CALL, self._seqid)
  92. args = ResetCatalog_args()
  93. args.write(self._oprot)
  94. self._oprot.writeMessageEnd()
  95. self._oprot.trans.flush()
  96. def recv_ResetCatalog(self):
  97. iprot = self._iprot
  98. (fname, mtype, rseqid) = iprot.readMessageBegin()
  99. if mtype == TMessageType.EXCEPTION:
  100. x = TApplicationException()
  101. x.read(iprot)
  102. iprot.readMessageEnd()
  103. raise x
  104. result = ResetCatalog_result()
  105. result.read(iprot)
  106. iprot.readMessageEnd()
  107. if result.success is not None:
  108. return result.success
  109. raise TApplicationException(TApplicationException.MISSING_RESULT, "ResetCatalog failed: unknown result")
  110. def ResetTable(self, request):
  111. """
  112. Parameters:
  113. - request
  114. """
  115. self.send_ResetTable(request)
  116. return self.recv_ResetTable()
  117. def send_ResetTable(self, request):
  118. self._oprot.writeMessageBegin('ResetTable', TMessageType.CALL, self._seqid)
  119. args = ResetTable_args()
  120. args.request = request
  121. args.write(self._oprot)
  122. self._oprot.writeMessageEnd()
  123. self._oprot.trans.flush()
  124. def recv_ResetTable(self):
  125. iprot = self._iprot
  126. (fname, mtype, rseqid) = iprot.readMessageBegin()
  127. if mtype == TMessageType.EXCEPTION:
  128. x = TApplicationException()
  129. x.read(iprot)
  130. iprot.readMessageEnd()
  131. raise x
  132. result = ResetTable_result()
  133. result.read(iprot)
  134. iprot.readMessageEnd()
  135. if result.success is not None:
  136. return result.success
  137. raise TApplicationException(TApplicationException.MISSING_RESULT, "ResetTable failed: unknown result")
  138. def GetRuntimeProfile(self, query_id):
  139. """
  140. Parameters:
  141. - query_id
  142. """
  143. self.send_GetRuntimeProfile(query_id)
  144. return self.recv_GetRuntimeProfile()
  145. def send_GetRuntimeProfile(self, query_id):
  146. self._oprot.writeMessageBegin('GetRuntimeProfile', TMessageType.CALL, self._seqid)
  147. args = GetRuntimeProfile_args()
  148. args.query_id = query_id
  149. args.write(self._oprot)
  150. self._oprot.writeMessageEnd()
  151. self._oprot.trans.flush()
  152. def recv_GetRuntimeProfile(self):
  153. iprot = self._iprot
  154. (fname, mtype, rseqid) = iprot.readMessageBegin()
  155. if mtype == TMessageType.EXCEPTION:
  156. x = TApplicationException()
  157. x.read(iprot)
  158. iprot.readMessageEnd()
  159. raise x
  160. result = GetRuntimeProfile_result()
  161. result.read(iprot)
  162. iprot.readMessageEnd()
  163. if result.success is not None:
  164. return result.success
  165. if result.error is not None:
  166. raise result.error
  167. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetRuntimeProfile failed: unknown result")
  168. def CloseInsert(self, handle):
  169. """
  170. Parameters:
  171. - handle
  172. """
  173. self.send_CloseInsert(handle)
  174. return self.recv_CloseInsert()
  175. def send_CloseInsert(self, handle):
  176. self._oprot.writeMessageBegin('CloseInsert', TMessageType.CALL, self._seqid)
  177. args = CloseInsert_args()
  178. args.handle = handle
  179. args.write(self._oprot)
  180. self._oprot.writeMessageEnd()
  181. self._oprot.trans.flush()
  182. def recv_CloseInsert(self):
  183. iprot = self._iprot
  184. (fname, mtype, rseqid) = iprot.readMessageBegin()
  185. if mtype == TMessageType.EXCEPTION:
  186. x = TApplicationException()
  187. x.read(iprot)
  188. iprot.readMessageEnd()
  189. raise x
  190. result = CloseInsert_result()
  191. result.read(iprot)
  192. iprot.readMessageEnd()
  193. if result.success is not None:
  194. return result.success
  195. if result.error is not None:
  196. raise result.error
  197. if result.error2 is not None:
  198. raise result.error2
  199. raise TApplicationException(TApplicationException.MISSING_RESULT, "CloseInsert failed: unknown result")
  200. def PingImpalaService(self):
  201. self.send_PingImpalaService()
  202. return self.recv_PingImpalaService()
  203. def send_PingImpalaService(self):
  204. self._oprot.writeMessageBegin('PingImpalaService', TMessageType.CALL, self._seqid)
  205. args = PingImpalaService_args()
  206. args.write(self._oprot)
  207. self._oprot.writeMessageEnd()
  208. self._oprot.trans.flush()
  209. def recv_PingImpalaService(self):
  210. iprot = self._iprot
  211. (fname, mtype, rseqid) = iprot.readMessageBegin()
  212. if mtype == TMessageType.EXCEPTION:
  213. x = TApplicationException()
  214. x.read(iprot)
  215. iprot.readMessageEnd()
  216. raise x
  217. result = PingImpalaService_result()
  218. result.read(iprot)
  219. iprot.readMessageEnd()
  220. if result.success is not None:
  221. return result.success
  222. raise TApplicationException(TApplicationException.MISSING_RESULT, "PingImpalaService failed: unknown result")
  223. def GetExecSummary(self, handle):
  224. """
  225. Parameters:
  226. - handle
  227. """
  228. self.send_GetExecSummary(handle)
  229. return self.recv_GetExecSummary()
  230. def send_GetExecSummary(self, handle):
  231. self._oprot.writeMessageBegin('GetExecSummary', TMessageType.CALL, self._seqid)
  232. args = GetExecSummary_args()
  233. args.handle = handle
  234. args.write(self._oprot)
  235. self._oprot.writeMessageEnd()
  236. self._oprot.trans.flush()
  237. def recv_GetExecSummary(self):
  238. iprot = self._iprot
  239. (fname, mtype, rseqid) = iprot.readMessageBegin()
  240. if mtype == TMessageType.EXCEPTION:
  241. x = TApplicationException()
  242. x.read(iprot)
  243. iprot.readMessageEnd()
  244. raise x
  245. result = GetExecSummary_result()
  246. result.read(iprot)
  247. iprot.readMessageEnd()
  248. if result.success is not None:
  249. return result.success
  250. if result.error is not None:
  251. raise result.error
  252. if result.error2 is not None:
  253. raise result.error2
  254. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetExecSummary failed: unknown result")
  255. class Processor(beeswaxd.BeeswaxService.Processor, Iface, TProcessor):
  256. def __init__(self, handler):
  257. beeswaxd.BeeswaxService.Processor.__init__(self, handler)
  258. self._processMap["Cancel"] = Processor.process_Cancel
  259. self._processMap["ResetCatalog"] = Processor.process_ResetCatalog
  260. self._processMap["ResetTable"] = Processor.process_ResetTable
  261. self._processMap["GetRuntimeProfile"] = Processor.process_GetRuntimeProfile
  262. self._processMap["CloseInsert"] = Processor.process_CloseInsert
  263. self._processMap["PingImpalaService"] = Processor.process_PingImpalaService
  264. self._processMap["GetExecSummary"] = Processor.process_GetExecSummary
  265. def process(self, iprot, oprot):
  266. (name, type, seqid) = iprot.readMessageBegin()
  267. if name not in self._processMap:
  268. iprot.skip(TType.STRUCT)
  269. iprot.readMessageEnd()
  270. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  271. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  272. x.write(oprot)
  273. oprot.writeMessageEnd()
  274. oprot.trans.flush()
  275. return
  276. else:
  277. self._processMap[name](self, seqid, iprot, oprot)
  278. return True
  279. def process_Cancel(self, seqid, iprot, oprot):
  280. args = Cancel_args()
  281. args.read(iprot)
  282. iprot.readMessageEnd()
  283. result = Cancel_result()
  284. try:
  285. result.success = self._handler.Cancel(args.query_id)
  286. msg_type = TMessageType.REPLY
  287. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  288. raise
  289. except beeswaxd.ttypes.BeeswaxException as error:
  290. msg_type = TMessageType.REPLY
  291. result.error = error
  292. except Exception as ex:
  293. msg_type = TMessageType.EXCEPTION
  294. logging.exception(ex)
  295. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  296. oprot.writeMessageBegin("Cancel", msg_type, seqid)
  297. result.write(oprot)
  298. oprot.writeMessageEnd()
  299. oprot.trans.flush()
  300. def process_ResetCatalog(self, seqid, iprot, oprot):
  301. args = ResetCatalog_args()
  302. args.read(iprot)
  303. iprot.readMessageEnd()
  304. result = ResetCatalog_result()
  305. try:
  306. result.success = self._handler.ResetCatalog()
  307. msg_type = TMessageType.REPLY
  308. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  309. raise
  310. except Exception as ex:
  311. msg_type = TMessageType.EXCEPTION
  312. logging.exception(ex)
  313. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  314. oprot.writeMessageBegin("ResetCatalog", msg_type, seqid)
  315. result.write(oprot)
  316. oprot.writeMessageEnd()
  317. oprot.trans.flush()
  318. def process_ResetTable(self, seqid, iprot, oprot):
  319. args = ResetTable_args()
  320. args.read(iprot)
  321. iprot.readMessageEnd()
  322. result = ResetTable_result()
  323. try:
  324. result.success = self._handler.ResetTable(args.request)
  325. msg_type = TMessageType.REPLY
  326. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  327. raise
  328. except Exception as ex:
  329. msg_type = TMessageType.EXCEPTION
  330. logging.exception(ex)
  331. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  332. oprot.writeMessageBegin("ResetTable", msg_type, seqid)
  333. result.write(oprot)
  334. oprot.writeMessageEnd()
  335. oprot.trans.flush()
  336. def process_GetRuntimeProfile(self, seqid, iprot, oprot):
  337. args = GetRuntimeProfile_args()
  338. args.read(iprot)
  339. iprot.readMessageEnd()
  340. result = GetRuntimeProfile_result()
  341. try:
  342. result.success = self._handler.GetRuntimeProfile(args.query_id)
  343. msg_type = TMessageType.REPLY
  344. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  345. raise
  346. except beeswaxd.ttypes.BeeswaxException as error:
  347. msg_type = TMessageType.REPLY
  348. result.error = error
  349. except Exception as ex:
  350. msg_type = TMessageType.EXCEPTION
  351. logging.exception(ex)
  352. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  353. oprot.writeMessageBegin("GetRuntimeProfile", msg_type, seqid)
  354. result.write(oprot)
  355. oprot.writeMessageEnd()
  356. oprot.trans.flush()
  357. def process_CloseInsert(self, seqid, iprot, oprot):
  358. args = CloseInsert_args()
  359. args.read(iprot)
  360. iprot.readMessageEnd()
  361. result = CloseInsert_result()
  362. try:
  363. result.success = self._handler.CloseInsert(args.handle)
  364. msg_type = TMessageType.REPLY
  365. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  366. raise
  367. except beeswaxd.ttypes.QueryNotFoundException as error:
  368. msg_type = TMessageType.REPLY
  369. result.error = error
  370. except beeswaxd.ttypes.BeeswaxException as error2:
  371. msg_type = TMessageType.REPLY
  372. result.error2 = error2
  373. except Exception as ex:
  374. msg_type = TMessageType.EXCEPTION
  375. logging.exception(ex)
  376. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  377. oprot.writeMessageBegin("CloseInsert", msg_type, seqid)
  378. result.write(oprot)
  379. oprot.writeMessageEnd()
  380. oprot.trans.flush()
  381. def process_PingImpalaService(self, seqid, iprot, oprot):
  382. args = PingImpalaService_args()
  383. args.read(iprot)
  384. iprot.readMessageEnd()
  385. result = PingImpalaService_result()
  386. try:
  387. result.success = self._handler.PingImpalaService()
  388. msg_type = TMessageType.REPLY
  389. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  390. raise
  391. except Exception as ex:
  392. msg_type = TMessageType.EXCEPTION
  393. logging.exception(ex)
  394. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  395. oprot.writeMessageBegin("PingImpalaService", msg_type, seqid)
  396. result.write(oprot)
  397. oprot.writeMessageEnd()
  398. oprot.trans.flush()
  399. def process_GetExecSummary(self, seqid, iprot, oprot):
  400. args = GetExecSummary_args()
  401. args.read(iprot)
  402. iprot.readMessageEnd()
  403. result = GetExecSummary_result()
  404. try:
  405. result.success = self._handler.GetExecSummary(args.handle)
  406. msg_type = TMessageType.REPLY
  407. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  408. raise
  409. except beeswaxd.ttypes.QueryNotFoundException as error:
  410. msg_type = TMessageType.REPLY
  411. result.error = error
  412. except beeswaxd.ttypes.BeeswaxException as error2:
  413. msg_type = TMessageType.REPLY
  414. result.error2 = error2
  415. except Exception as ex:
  416. msg_type = TMessageType.EXCEPTION
  417. logging.exception(ex)
  418. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  419. oprot.writeMessageBegin("GetExecSummary", msg_type, seqid)
  420. result.write(oprot)
  421. oprot.writeMessageEnd()
  422. oprot.trans.flush()
  423. # HELPER FUNCTIONS AND STRUCTURES
  424. class Cancel_args(object):
  425. """
  426. Attributes:
  427. - query_id
  428. """
  429. thrift_spec = (
  430. None, # 0
  431. (1, TType.STRUCT, 'query_id', (beeswaxd.ttypes.QueryHandle, beeswaxd.ttypes.QueryHandle.thrift_spec), None, ), # 1
  432. )
  433. def __init__(self, query_id=None,):
  434. self.query_id = query_id
  435. def read(self, iprot):
  436. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  437. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  438. return
  439. iprot.readStructBegin()
  440. while True:
  441. (fname, ftype, fid) = iprot.readFieldBegin()
  442. if ftype == TType.STOP:
  443. break
  444. if fid == 1:
  445. if ftype == TType.STRUCT:
  446. self.query_id = beeswaxd.ttypes.QueryHandle()
  447. self.query_id.read(iprot)
  448. else:
  449. iprot.skip(ftype)
  450. else:
  451. iprot.skip(ftype)
  452. iprot.readFieldEnd()
  453. iprot.readStructEnd()
  454. def write(self, oprot):
  455. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  456. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  457. return
  458. oprot.writeStructBegin('Cancel_args')
  459. if self.query_id is not None:
  460. oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
  461. self.query_id.write(oprot)
  462. oprot.writeFieldEnd()
  463. oprot.writeFieldStop()
  464. oprot.writeStructEnd()
  465. def validate(self):
  466. return
  467. def __hash__(self):
  468. value = 17
  469. value = (value * 31) ^ hash(self.query_id)
  470. return value
  471. def __repr__(self):
  472. L = ['%s=%r' % (key, value)
  473. for key, value in self.__dict__.iteritems()]
  474. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  475. def __eq__(self, other):
  476. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  477. def __ne__(self, other):
  478. return not (self == other)
  479. class Cancel_result(object):
  480. """
  481. Attributes:
  482. - success
  483. - error
  484. """
  485. thrift_spec = (
  486. (0, TType.STRUCT, 'success', (Status.ttypes.TStatus, Status.ttypes.TStatus.thrift_spec), None, ), # 0
  487. (1, TType.STRUCT, 'error', (beeswaxd.ttypes.BeeswaxException, beeswaxd.ttypes.BeeswaxException.thrift_spec), None, ), # 1
  488. )
  489. def __init__(self, success=None, error=None,):
  490. self.success = success
  491. self.error = error
  492. def read(self, iprot):
  493. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  494. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  495. return
  496. iprot.readStructBegin()
  497. while True:
  498. (fname, ftype, fid) = iprot.readFieldBegin()
  499. if ftype == TType.STOP:
  500. break
  501. if fid == 0:
  502. if ftype == TType.STRUCT:
  503. self.success = Status.ttypes.TStatus()
  504. self.success.read(iprot)
  505. else:
  506. iprot.skip(ftype)
  507. elif fid == 1:
  508. if ftype == TType.STRUCT:
  509. self.error = beeswaxd.ttypes.BeeswaxException()
  510. self.error.read(iprot)
  511. else:
  512. iprot.skip(ftype)
  513. else:
  514. iprot.skip(ftype)
  515. iprot.readFieldEnd()
  516. iprot.readStructEnd()
  517. def write(self, oprot):
  518. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  519. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  520. return
  521. oprot.writeStructBegin('Cancel_result')
  522. if self.success is not None:
  523. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  524. self.success.write(oprot)
  525. oprot.writeFieldEnd()
  526. if self.error is not None:
  527. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  528. self.error.write(oprot)
  529. oprot.writeFieldEnd()
  530. oprot.writeFieldStop()
  531. oprot.writeStructEnd()
  532. def validate(self):
  533. return
  534. def __hash__(self):
  535. value = 17
  536. value = (value * 31) ^ hash(self.success)
  537. value = (value * 31) ^ hash(self.error)
  538. return value
  539. def __repr__(self):
  540. L = ['%s=%r' % (key, value)
  541. for key, value in self.__dict__.iteritems()]
  542. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  543. def __eq__(self, other):
  544. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  545. def __ne__(self, other):
  546. return not (self == other)
  547. class ResetCatalog_args(object):
  548. thrift_spec = (
  549. )
  550. def read(self, iprot):
  551. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  552. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  553. return
  554. iprot.readStructBegin()
  555. while True:
  556. (fname, ftype, fid) = iprot.readFieldBegin()
  557. if ftype == TType.STOP:
  558. break
  559. else:
  560. iprot.skip(ftype)
  561. iprot.readFieldEnd()
  562. iprot.readStructEnd()
  563. def write(self, oprot):
  564. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  565. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  566. return
  567. oprot.writeStructBegin('ResetCatalog_args')
  568. oprot.writeFieldStop()
  569. oprot.writeStructEnd()
  570. def validate(self):
  571. return
  572. def __hash__(self):
  573. value = 17
  574. return value
  575. def __repr__(self):
  576. L = ['%s=%r' % (key, value)
  577. for key, value in self.__dict__.iteritems()]
  578. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  579. def __eq__(self, other):
  580. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  581. def __ne__(self, other):
  582. return not (self == other)
  583. class ResetCatalog_result(object):
  584. """
  585. Attributes:
  586. - success
  587. """
  588. thrift_spec = (
  589. (0, TType.STRUCT, 'success', (Status.ttypes.TStatus, Status.ttypes.TStatus.thrift_spec), None, ), # 0
  590. )
  591. def __init__(self, success=None,):
  592. self.success = success
  593. def read(self, iprot):
  594. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  595. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  596. return
  597. iprot.readStructBegin()
  598. while True:
  599. (fname, ftype, fid) = iprot.readFieldBegin()
  600. if ftype == TType.STOP:
  601. break
  602. if fid == 0:
  603. if ftype == TType.STRUCT:
  604. self.success = Status.ttypes.TStatus()
  605. self.success.read(iprot)
  606. else:
  607. iprot.skip(ftype)
  608. else:
  609. iprot.skip(ftype)
  610. iprot.readFieldEnd()
  611. iprot.readStructEnd()
  612. def write(self, oprot):
  613. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  614. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  615. return
  616. oprot.writeStructBegin('ResetCatalog_result')
  617. if self.success is not None:
  618. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  619. self.success.write(oprot)
  620. oprot.writeFieldEnd()
  621. oprot.writeFieldStop()
  622. oprot.writeStructEnd()
  623. def validate(self):
  624. return
  625. def __hash__(self):
  626. value = 17
  627. value = (value * 31) ^ hash(self.success)
  628. return value
  629. def __repr__(self):
  630. L = ['%s=%r' % (key, value)
  631. for key, value in self.__dict__.iteritems()]
  632. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  633. def __eq__(self, other):
  634. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  635. def __ne__(self, other):
  636. return not (self == other)
  637. class ResetTable_args(object):
  638. """
  639. Attributes:
  640. - request
  641. """
  642. thrift_spec = (
  643. None, # 0
  644. (1, TType.STRUCT, 'request', (TResetTableReq, TResetTableReq.thrift_spec), None, ), # 1
  645. )
  646. def __init__(self, request=None,):
  647. self.request = request
  648. def read(self, iprot):
  649. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  650. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  651. return
  652. iprot.readStructBegin()
  653. while True:
  654. (fname, ftype, fid) = iprot.readFieldBegin()
  655. if ftype == TType.STOP:
  656. break
  657. if fid == 1:
  658. if ftype == TType.STRUCT:
  659. self.request = TResetTableReq()
  660. self.request.read(iprot)
  661. else:
  662. iprot.skip(ftype)
  663. else:
  664. iprot.skip(ftype)
  665. iprot.readFieldEnd()
  666. iprot.readStructEnd()
  667. def write(self, oprot):
  668. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  669. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  670. return
  671. oprot.writeStructBegin('ResetTable_args')
  672. if self.request is not None:
  673. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  674. self.request.write(oprot)
  675. oprot.writeFieldEnd()
  676. oprot.writeFieldStop()
  677. oprot.writeStructEnd()
  678. def validate(self):
  679. return
  680. def __hash__(self):
  681. value = 17
  682. value = (value * 31) ^ hash(self.request)
  683. return value
  684. def __repr__(self):
  685. L = ['%s=%r' % (key, value)
  686. for key, value in self.__dict__.iteritems()]
  687. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  688. def __eq__(self, other):
  689. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  690. def __ne__(self, other):
  691. return not (self == other)
  692. class ResetTable_result(object):
  693. """
  694. Attributes:
  695. - success
  696. """
  697. thrift_spec = (
  698. (0, TType.STRUCT, 'success', (Status.ttypes.TStatus, Status.ttypes.TStatus.thrift_spec), None, ), # 0
  699. )
  700. def __init__(self, success=None,):
  701. self.success = success
  702. def read(self, iprot):
  703. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  704. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  705. return
  706. iprot.readStructBegin()
  707. while True:
  708. (fname, ftype, fid) = iprot.readFieldBegin()
  709. if ftype == TType.STOP:
  710. break
  711. if fid == 0:
  712. if ftype == TType.STRUCT:
  713. self.success = Status.ttypes.TStatus()
  714. self.success.read(iprot)
  715. else:
  716. iprot.skip(ftype)
  717. else:
  718. iprot.skip(ftype)
  719. iprot.readFieldEnd()
  720. iprot.readStructEnd()
  721. def write(self, oprot):
  722. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  723. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  724. return
  725. oprot.writeStructBegin('ResetTable_result')
  726. if self.success is not None:
  727. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  728. self.success.write(oprot)
  729. oprot.writeFieldEnd()
  730. oprot.writeFieldStop()
  731. oprot.writeStructEnd()
  732. def validate(self):
  733. return
  734. def __hash__(self):
  735. value = 17
  736. value = (value * 31) ^ hash(self.success)
  737. return value
  738. def __repr__(self):
  739. L = ['%s=%r' % (key, value)
  740. for key, value in self.__dict__.iteritems()]
  741. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  742. def __eq__(self, other):
  743. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  744. def __ne__(self, other):
  745. return not (self == other)
  746. class GetRuntimeProfile_args(object):
  747. """
  748. Attributes:
  749. - query_id
  750. """
  751. thrift_spec = (
  752. None, # 0
  753. (1, TType.STRUCT, 'query_id', (beeswaxd.ttypes.QueryHandle, beeswaxd.ttypes.QueryHandle.thrift_spec), None, ), # 1
  754. )
  755. def __init__(self, query_id=None,):
  756. self.query_id = query_id
  757. def read(self, iprot):
  758. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  759. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  760. return
  761. iprot.readStructBegin()
  762. while True:
  763. (fname, ftype, fid) = iprot.readFieldBegin()
  764. if ftype == TType.STOP:
  765. break
  766. if fid == 1:
  767. if ftype == TType.STRUCT:
  768. self.query_id = beeswaxd.ttypes.QueryHandle()
  769. self.query_id.read(iprot)
  770. else:
  771. iprot.skip(ftype)
  772. else:
  773. iprot.skip(ftype)
  774. iprot.readFieldEnd()
  775. iprot.readStructEnd()
  776. def write(self, oprot):
  777. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  778. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  779. return
  780. oprot.writeStructBegin('GetRuntimeProfile_args')
  781. if self.query_id is not None:
  782. oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
  783. self.query_id.write(oprot)
  784. oprot.writeFieldEnd()
  785. oprot.writeFieldStop()
  786. oprot.writeStructEnd()
  787. def validate(self):
  788. return
  789. def __hash__(self):
  790. value = 17
  791. value = (value * 31) ^ hash(self.query_id)
  792. return value
  793. def __repr__(self):
  794. L = ['%s=%r' % (key, value)
  795. for key, value in self.__dict__.iteritems()]
  796. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  797. def __eq__(self, other):
  798. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  799. def __ne__(self, other):
  800. return not (self == other)
  801. class GetRuntimeProfile_result(object):
  802. """
  803. Attributes:
  804. - success
  805. - error
  806. """
  807. thrift_spec = (
  808. (0, TType.STRING, 'success', None, None, ), # 0
  809. (1, TType.STRUCT, 'error', (beeswaxd.ttypes.BeeswaxException, beeswaxd.ttypes.BeeswaxException.thrift_spec), None, ), # 1
  810. )
  811. def __init__(self, success=None, error=None,):
  812. self.success = success
  813. self.error = error
  814. def read(self, iprot):
  815. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  816. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  817. return
  818. iprot.readStructBegin()
  819. while True:
  820. (fname, ftype, fid) = iprot.readFieldBegin()
  821. if ftype == TType.STOP:
  822. break
  823. if fid == 0:
  824. if ftype == TType.STRING:
  825. self.success = iprot.readString()
  826. else:
  827. iprot.skip(ftype)
  828. elif fid == 1:
  829. if ftype == TType.STRUCT:
  830. self.error = beeswaxd.ttypes.BeeswaxException()
  831. self.error.read(iprot)
  832. else:
  833. iprot.skip(ftype)
  834. else:
  835. iprot.skip(ftype)
  836. iprot.readFieldEnd()
  837. iprot.readStructEnd()
  838. def write(self, oprot):
  839. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  840. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  841. return
  842. oprot.writeStructBegin('GetRuntimeProfile_result')
  843. if self.success is not None:
  844. oprot.writeFieldBegin('success', TType.STRING, 0)
  845. oprot.writeString(self.success)
  846. oprot.writeFieldEnd()
  847. if self.error is not None:
  848. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  849. self.error.write(oprot)
  850. oprot.writeFieldEnd()
  851. oprot.writeFieldStop()
  852. oprot.writeStructEnd()
  853. def validate(self):
  854. return
  855. def __hash__(self):
  856. value = 17
  857. value = (value * 31) ^ hash(self.success)
  858. value = (value * 31) ^ hash(self.error)
  859. return value
  860. def __repr__(self):
  861. L = ['%s=%r' % (key, value)
  862. for key, value in self.__dict__.iteritems()]
  863. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  864. def __eq__(self, other):
  865. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  866. def __ne__(self, other):
  867. return not (self == other)
  868. class CloseInsert_args(object):
  869. """
  870. Attributes:
  871. - handle
  872. """
  873. thrift_spec = (
  874. None, # 0
  875. (1, TType.STRUCT, 'handle', (beeswaxd.ttypes.QueryHandle, beeswaxd.ttypes.QueryHandle.thrift_spec), None, ), # 1
  876. )
  877. def __init__(self, handle=None,):
  878. self.handle = handle
  879. def read(self, iprot):
  880. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  881. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  882. return
  883. iprot.readStructBegin()
  884. while True:
  885. (fname, ftype, fid) = iprot.readFieldBegin()
  886. if ftype == TType.STOP:
  887. break
  888. if fid == 1:
  889. if ftype == TType.STRUCT:
  890. self.handle = beeswaxd.ttypes.QueryHandle()
  891. self.handle.read(iprot)
  892. else:
  893. iprot.skip(ftype)
  894. else:
  895. iprot.skip(ftype)
  896. iprot.readFieldEnd()
  897. iprot.readStructEnd()
  898. def write(self, oprot):
  899. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  900. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  901. return
  902. oprot.writeStructBegin('CloseInsert_args')
  903. if self.handle is not None:
  904. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  905. self.handle.write(oprot)
  906. oprot.writeFieldEnd()
  907. oprot.writeFieldStop()
  908. oprot.writeStructEnd()
  909. def validate(self):
  910. return
  911. def __hash__(self):
  912. value = 17
  913. value = (value * 31) ^ hash(self.handle)
  914. return value
  915. def __repr__(self):
  916. L = ['%s=%r' % (key, value)
  917. for key, value in self.__dict__.iteritems()]
  918. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  919. def __eq__(self, other):
  920. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  921. def __ne__(self, other):
  922. return not (self == other)
  923. class CloseInsert_result(object):
  924. """
  925. Attributes:
  926. - success
  927. - error
  928. - error2
  929. """
  930. thrift_spec = (
  931. (0, TType.STRUCT, 'success', (TInsertResult, TInsertResult.thrift_spec), None, ), # 0
  932. (1, TType.STRUCT, 'error', (beeswaxd.ttypes.QueryNotFoundException, beeswaxd.ttypes.QueryNotFoundException.thrift_spec), None, ), # 1
  933. (2, TType.STRUCT, 'error2', (beeswaxd.ttypes.BeeswaxException, beeswaxd.ttypes.BeeswaxException.thrift_spec), None, ), # 2
  934. )
  935. def __init__(self, success=None, error=None, error2=None,):
  936. self.success = success
  937. self.error = error
  938. self.error2 = error2
  939. def read(self, iprot):
  940. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  941. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  942. return
  943. iprot.readStructBegin()
  944. while True:
  945. (fname, ftype, fid) = iprot.readFieldBegin()
  946. if ftype == TType.STOP:
  947. break
  948. if fid == 0:
  949. if ftype == TType.STRUCT:
  950. self.success = TInsertResult()
  951. self.success.read(iprot)
  952. else:
  953. iprot.skip(ftype)
  954. elif fid == 1:
  955. if ftype == TType.STRUCT:
  956. self.error = beeswaxd.ttypes.QueryNotFoundException()
  957. self.error.read(iprot)
  958. else:
  959. iprot.skip(ftype)
  960. elif fid == 2:
  961. if ftype == TType.STRUCT:
  962. self.error2 = beeswaxd.ttypes.BeeswaxException()
  963. self.error2.read(iprot)
  964. else:
  965. iprot.skip(ftype)
  966. else:
  967. iprot.skip(ftype)
  968. iprot.readFieldEnd()
  969. iprot.readStructEnd()
  970. def write(self, oprot):
  971. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  972. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  973. return
  974. oprot.writeStructBegin('CloseInsert_result')
  975. if self.success is not None:
  976. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  977. self.success.write(oprot)
  978. oprot.writeFieldEnd()
  979. if self.error is not None:
  980. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  981. self.error.write(oprot)
  982. oprot.writeFieldEnd()
  983. if self.error2 is not None:
  984. oprot.writeFieldBegin('error2', TType.STRUCT, 2)
  985. self.error2.write(oprot)
  986. oprot.writeFieldEnd()
  987. oprot.writeFieldStop()
  988. oprot.writeStructEnd()
  989. def validate(self):
  990. return
  991. def __hash__(self):
  992. value = 17
  993. value = (value * 31) ^ hash(self.success)
  994. value = (value * 31) ^ hash(self.error)
  995. value = (value * 31) ^ hash(self.error2)
  996. return value
  997. def __repr__(self):
  998. L = ['%s=%r' % (key, value)
  999. for key, value in self.__dict__.iteritems()]
  1000. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1001. def __eq__(self, other):
  1002. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1003. def __ne__(self, other):
  1004. return not (self == other)
  1005. class PingImpalaService_args(object):
  1006. thrift_spec = (
  1007. )
  1008. def read(self, iprot):
  1009. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1010. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1011. return
  1012. iprot.readStructBegin()
  1013. while True:
  1014. (fname, ftype, fid) = iprot.readFieldBegin()
  1015. if ftype == TType.STOP:
  1016. break
  1017. else:
  1018. iprot.skip(ftype)
  1019. iprot.readFieldEnd()
  1020. iprot.readStructEnd()
  1021. def write(self, oprot):
  1022. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1023. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1024. return
  1025. oprot.writeStructBegin('PingImpalaService_args')
  1026. oprot.writeFieldStop()
  1027. oprot.writeStructEnd()
  1028. def validate(self):
  1029. return
  1030. def __hash__(self):
  1031. value = 17
  1032. return value
  1033. def __repr__(self):
  1034. L = ['%s=%r' % (key, value)
  1035. for key, value in self.__dict__.iteritems()]
  1036. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1037. def __eq__(self, other):
  1038. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1039. def __ne__(self, other):
  1040. return not (self == other)
  1041. class PingImpalaService_result(object):
  1042. """
  1043. Attributes:
  1044. - success
  1045. """
  1046. thrift_spec = (
  1047. (0, TType.STRUCT, 'success', (TPingImpalaServiceResp, TPingImpalaServiceResp.thrift_spec), None, ), # 0
  1048. )
  1049. def __init__(self, success=None,):
  1050. self.success = success
  1051. def read(self, iprot):
  1052. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1053. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1054. return
  1055. iprot.readStructBegin()
  1056. while True:
  1057. (fname, ftype, fid) = iprot.readFieldBegin()
  1058. if ftype == TType.STOP:
  1059. break
  1060. if fid == 0:
  1061. if ftype == TType.STRUCT:
  1062. self.success = TPingImpalaServiceResp()
  1063. self.success.read(iprot)
  1064. else:
  1065. iprot.skip(ftype)
  1066. else:
  1067. iprot.skip(ftype)
  1068. iprot.readFieldEnd()
  1069. iprot.readStructEnd()
  1070. def write(self, oprot):
  1071. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1072. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1073. return
  1074. oprot.writeStructBegin('PingImpalaService_result')
  1075. if self.success is not None:
  1076. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1077. self.success.write(oprot)
  1078. oprot.writeFieldEnd()
  1079. oprot.writeFieldStop()
  1080. oprot.writeStructEnd()
  1081. def validate(self):
  1082. return
  1083. def __hash__(self):
  1084. value = 17
  1085. value = (value * 31) ^ hash(self.success)
  1086. return value
  1087. def __repr__(self):
  1088. L = ['%s=%r' % (key, value)
  1089. for key, value in self.__dict__.iteritems()]
  1090. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1091. def __eq__(self, other):
  1092. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1093. def __ne__(self, other):
  1094. return not (self == other)
  1095. class GetExecSummary_args(object):
  1096. """
  1097. Attributes:
  1098. - handle
  1099. """
  1100. thrift_spec = (
  1101. None, # 0
  1102. (1, TType.STRUCT, 'handle', (beeswaxd.ttypes.QueryHandle, beeswaxd.ttypes.QueryHandle.thrift_spec), None, ), # 1
  1103. )
  1104. def __init__(self, handle=None,):
  1105. self.handle = handle
  1106. def read(self, iprot):
  1107. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1108. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1109. return
  1110. iprot.readStructBegin()
  1111. while True:
  1112. (fname, ftype, fid) = iprot.readFieldBegin()
  1113. if ftype == TType.STOP:
  1114. break
  1115. if fid == 1:
  1116. if ftype == TType.STRUCT:
  1117. self.handle = beeswaxd.ttypes.QueryHandle()
  1118. self.handle.read(iprot)
  1119. else:
  1120. iprot.skip(ftype)
  1121. else:
  1122. iprot.skip(ftype)
  1123. iprot.readFieldEnd()
  1124. iprot.readStructEnd()
  1125. def write(self, oprot):
  1126. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1127. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1128. return
  1129. oprot.writeStructBegin('GetExecSummary_args')
  1130. if self.handle is not None:
  1131. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  1132. self.handle.write(oprot)
  1133. oprot.writeFieldEnd()
  1134. oprot.writeFieldStop()
  1135. oprot.writeStructEnd()
  1136. def validate(self):
  1137. return
  1138. def __hash__(self):
  1139. value = 17
  1140. value = (value * 31) ^ hash(self.handle)
  1141. return value
  1142. def __repr__(self):
  1143. L = ['%s=%r' % (key, value)
  1144. for key, value in self.__dict__.iteritems()]
  1145. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1146. def __eq__(self, other):
  1147. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1148. def __ne__(self, other):
  1149. return not (self == other)
  1150. class GetExecSummary_result(object):
  1151. """
  1152. Attributes:
  1153. - success
  1154. - error
  1155. - error2
  1156. """
  1157. thrift_spec = (
  1158. (0, TType.STRUCT, 'success', (ExecStats.ttypes.TExecSummary, ExecStats.ttypes.TExecSummary.thrift_spec), None, ), # 0
  1159. (1, TType.STRUCT, 'error', (beeswaxd.ttypes.QueryNotFoundException, beeswaxd.ttypes.QueryNotFoundException.thrift_spec), None, ), # 1
  1160. (2, TType.STRUCT, 'error2', (beeswaxd.ttypes.BeeswaxException, beeswaxd.ttypes.BeeswaxException.thrift_spec), None, ), # 2
  1161. )
  1162. def __init__(self, success=None, error=None, error2=None,):
  1163. self.success = success
  1164. self.error = error
  1165. self.error2 = error2
  1166. def read(self, iprot):
  1167. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1168. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1169. return
  1170. iprot.readStructBegin()
  1171. while True:
  1172. (fname, ftype, fid) = iprot.readFieldBegin()
  1173. if ftype == TType.STOP:
  1174. break
  1175. if fid == 0:
  1176. if ftype == TType.STRUCT:
  1177. self.success = ExecStats.ttypes.TExecSummary()
  1178. self.success.read(iprot)
  1179. else:
  1180. iprot.skip(ftype)
  1181. elif fid == 1:
  1182. if ftype == TType.STRUCT:
  1183. self.error = beeswaxd.ttypes.QueryNotFoundException()
  1184. self.error.read(iprot)
  1185. else:
  1186. iprot.skip(ftype)
  1187. elif fid == 2:
  1188. if ftype == TType.STRUCT:
  1189. self.error2 = beeswaxd.ttypes.BeeswaxException()
  1190. self.error2.read(iprot)
  1191. else:
  1192. iprot.skip(ftype)
  1193. else:
  1194. iprot.skip(ftype)
  1195. iprot.readFieldEnd()
  1196. iprot.readStructEnd()
  1197. def write(self, oprot):
  1198. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1199. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1200. return
  1201. oprot.writeStructBegin('GetExecSummary_result')
  1202. if self.success is not None:
  1203. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1204. self.success.write(oprot)
  1205. oprot.writeFieldEnd()
  1206. if self.error is not None:
  1207. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1208. self.error.write(oprot)
  1209. oprot.writeFieldEnd()
  1210. if self.error2 is not None:
  1211. oprot.writeFieldBegin('error2', TType.STRUCT, 2)
  1212. self.error2.write(oprot)
  1213. oprot.writeFieldEnd()
  1214. oprot.writeFieldStop()
  1215. oprot.writeStructEnd()
  1216. def validate(self):
  1217. return
  1218. def __hash__(self):
  1219. value = 17
  1220. value = (value * 31) ^ hash(self.success)
  1221. value = (value * 31) ^ hash(self.error)
  1222. value = (value * 31) ^ hash(self.error2)
  1223. return value
  1224. def __repr__(self):
  1225. L = ['%s=%r' % (key, value)
  1226. for key, value in self.__dict__.iteritems()]
  1227. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1228. def __eq__(self, other):
  1229. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1230. def __ne__(self, other):
  1231. return not (self == other)