ImpalaService.py 44 KB

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