ImpalaService.py 47 KB

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