ImpalaService.py 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  1. #
  2. # Autogenerated by Thrift Compiler (0.9.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, TException, TApplicationException
  9. import beeswaxd.BeeswaxService
  10. from ttypes import *
  11. from thrift.Thrift import TProcessor
  12. from thrift.transport import TTransport
  13. from thrift.protocol import TBinaryProtocol, TProtocol
  14. try:
  15. from thrift.protocol import fastbinary
  16. except:
  17. fastbinary = None
  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. class Client(beeswaxd.BeeswaxService.Client, Iface):
  48. def __init__(self, iprot, oprot=None):
  49. beeswaxd.BeeswaxService.Client.__init__(self, iprot, oprot)
  50. def Cancel(self, query_id):
  51. """
  52. Parameters:
  53. - query_id
  54. """
  55. self.send_Cancel(query_id)
  56. return self.recv_Cancel()
  57. def send_Cancel(self, query_id):
  58. self._oprot.writeMessageBegin('Cancel', TMessageType.CALL, self._seqid)
  59. args = Cancel_args()
  60. args.query_id = query_id
  61. args.write(self._oprot)
  62. self._oprot.writeMessageEnd()
  63. self._oprot.trans.flush()
  64. def recv_Cancel(self, ):
  65. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  66. if mtype == TMessageType.EXCEPTION:
  67. x = TApplicationException()
  68. x.read(self._iprot)
  69. self._iprot.readMessageEnd()
  70. raise x
  71. result = Cancel_result()
  72. result.read(self._iprot)
  73. self._iprot.readMessageEnd()
  74. if result.success is not None:
  75. return result.success
  76. if result.error is not None:
  77. raise result.error
  78. raise TApplicationException(TApplicationException.MISSING_RESULT, "Cancel failed: unknown result");
  79. def ResetCatalog(self, ):
  80. self.send_ResetCatalog()
  81. return self.recv_ResetCatalog()
  82. def send_ResetCatalog(self, ):
  83. self._oprot.writeMessageBegin('ResetCatalog', TMessageType.CALL, self._seqid)
  84. args = ResetCatalog_args()
  85. args.write(self._oprot)
  86. self._oprot.writeMessageEnd()
  87. self._oprot.trans.flush()
  88. def recv_ResetCatalog(self, ):
  89. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  90. if mtype == TMessageType.EXCEPTION:
  91. x = TApplicationException()
  92. x.read(self._iprot)
  93. self._iprot.readMessageEnd()
  94. raise x
  95. result = ResetCatalog_result()
  96. result.read(self._iprot)
  97. self._iprot.readMessageEnd()
  98. if result.success is not None:
  99. return result.success
  100. raise TApplicationException(TApplicationException.MISSING_RESULT, "ResetCatalog failed: unknown result");
  101. def ResetTable(self, request):
  102. """
  103. Parameters:
  104. - request
  105. """
  106. self.send_ResetTable(request)
  107. return self.recv_ResetTable()
  108. def send_ResetTable(self, request):
  109. self._oprot.writeMessageBegin('ResetTable', TMessageType.CALL, self._seqid)
  110. args = ResetTable_args()
  111. args.request = request
  112. args.write(self._oprot)
  113. self._oprot.writeMessageEnd()
  114. self._oprot.trans.flush()
  115. def recv_ResetTable(self, ):
  116. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  117. if mtype == TMessageType.EXCEPTION:
  118. x = TApplicationException()
  119. x.read(self._iprot)
  120. self._iprot.readMessageEnd()
  121. raise x
  122. result = ResetTable_result()
  123. result.read(self._iprot)
  124. self._iprot.readMessageEnd()
  125. if result.success is not None:
  126. return result.success
  127. raise TApplicationException(TApplicationException.MISSING_RESULT, "ResetTable failed: unknown result");
  128. def GetRuntimeProfile(self, query_id):
  129. """
  130. Parameters:
  131. - query_id
  132. """
  133. self.send_GetRuntimeProfile(query_id)
  134. return self.recv_GetRuntimeProfile()
  135. def send_GetRuntimeProfile(self, query_id):
  136. self._oprot.writeMessageBegin('GetRuntimeProfile', TMessageType.CALL, self._seqid)
  137. args = GetRuntimeProfile_args()
  138. args.query_id = query_id
  139. args.write(self._oprot)
  140. self._oprot.writeMessageEnd()
  141. self._oprot.trans.flush()
  142. def recv_GetRuntimeProfile(self, ):
  143. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  144. if mtype == TMessageType.EXCEPTION:
  145. x = TApplicationException()
  146. x.read(self._iprot)
  147. self._iprot.readMessageEnd()
  148. raise x
  149. result = GetRuntimeProfile_result()
  150. result.read(self._iprot)
  151. self._iprot.readMessageEnd()
  152. if result.success is not None:
  153. return result.success
  154. if result.error is not None:
  155. raise result.error
  156. raise TApplicationException(TApplicationException.MISSING_RESULT, "GetRuntimeProfile failed: unknown result");
  157. def CloseInsert(self, handle):
  158. """
  159. Parameters:
  160. - handle
  161. """
  162. self.send_CloseInsert(handle)
  163. return self.recv_CloseInsert()
  164. def send_CloseInsert(self, handle):
  165. self._oprot.writeMessageBegin('CloseInsert', TMessageType.CALL, self._seqid)
  166. args = CloseInsert_args()
  167. args.handle = handle
  168. args.write(self._oprot)
  169. self._oprot.writeMessageEnd()
  170. self._oprot.trans.flush()
  171. def recv_CloseInsert(self, ):
  172. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  173. if mtype == TMessageType.EXCEPTION:
  174. x = TApplicationException()
  175. x.read(self._iprot)
  176. self._iprot.readMessageEnd()
  177. raise x
  178. result = CloseInsert_result()
  179. result.read(self._iprot)
  180. self._iprot.readMessageEnd()
  181. if result.success is not None:
  182. return result.success
  183. if result.error is not None:
  184. raise result.error
  185. if result.error2 is not None:
  186. raise result.error2
  187. raise TApplicationException(TApplicationException.MISSING_RESULT, "CloseInsert failed: unknown result");
  188. def PingImpalaService(self, ):
  189. self.send_PingImpalaService()
  190. return self.recv_PingImpalaService()
  191. def send_PingImpalaService(self, ):
  192. self._oprot.writeMessageBegin('PingImpalaService', TMessageType.CALL, self._seqid)
  193. args = PingImpalaService_args()
  194. args.write(self._oprot)
  195. self._oprot.writeMessageEnd()
  196. self._oprot.trans.flush()
  197. def recv_PingImpalaService(self, ):
  198. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  199. if mtype == TMessageType.EXCEPTION:
  200. x = TApplicationException()
  201. x.read(self._iprot)
  202. self._iprot.readMessageEnd()
  203. raise x
  204. result = PingImpalaService_result()
  205. result.read(self._iprot)
  206. self._iprot.readMessageEnd()
  207. if result.success is not None:
  208. return result.success
  209. raise TApplicationException(TApplicationException.MISSING_RESULT, "PingImpalaService failed: unknown result");
  210. class Processor(beeswaxd.BeeswaxService.Processor, Iface, TProcessor):
  211. def __init__(self, handler):
  212. beeswaxd.BeeswaxService.Processor.__init__(self, handler)
  213. self._processMap["Cancel"] = Processor.process_Cancel
  214. self._processMap["ResetCatalog"] = Processor.process_ResetCatalog
  215. self._processMap["ResetTable"] = Processor.process_ResetTable
  216. self._processMap["GetRuntimeProfile"] = Processor.process_GetRuntimeProfile
  217. self._processMap["CloseInsert"] = Processor.process_CloseInsert
  218. self._processMap["PingImpalaService"] = Processor.process_PingImpalaService
  219. def process(self, iprot, oprot):
  220. (name, type, seqid) = iprot.readMessageBegin()
  221. if name not in self._processMap:
  222. iprot.skip(TType.STRUCT)
  223. iprot.readMessageEnd()
  224. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  225. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  226. x.write(oprot)
  227. oprot.writeMessageEnd()
  228. oprot.trans.flush()
  229. return
  230. else:
  231. self._processMap[name](self, seqid, iprot, oprot)
  232. return True
  233. def process_Cancel(self, seqid, iprot, oprot):
  234. args = Cancel_args()
  235. args.read(iprot)
  236. iprot.readMessageEnd()
  237. result = Cancel_result()
  238. try:
  239. result.success = self._handler.Cancel(args.query_id)
  240. except beeswaxd.ttypes.BeeswaxException as error:
  241. result.error = error
  242. oprot.writeMessageBegin("Cancel", TMessageType.REPLY, seqid)
  243. result.write(oprot)
  244. oprot.writeMessageEnd()
  245. oprot.trans.flush()
  246. def process_ResetCatalog(self, seqid, iprot, oprot):
  247. args = ResetCatalog_args()
  248. args.read(iprot)
  249. iprot.readMessageEnd()
  250. result = ResetCatalog_result()
  251. result.success = self._handler.ResetCatalog()
  252. oprot.writeMessageBegin("ResetCatalog", TMessageType.REPLY, seqid)
  253. result.write(oprot)
  254. oprot.writeMessageEnd()
  255. oprot.trans.flush()
  256. def process_ResetTable(self, seqid, iprot, oprot):
  257. args = ResetTable_args()
  258. args.read(iprot)
  259. iprot.readMessageEnd()
  260. result = ResetTable_result()
  261. result.success = self._handler.ResetTable(args.request)
  262. oprot.writeMessageBegin("ResetTable", TMessageType.REPLY, seqid)
  263. result.write(oprot)
  264. oprot.writeMessageEnd()
  265. oprot.trans.flush()
  266. def process_GetRuntimeProfile(self, seqid, iprot, oprot):
  267. args = GetRuntimeProfile_args()
  268. args.read(iprot)
  269. iprot.readMessageEnd()
  270. result = GetRuntimeProfile_result()
  271. try:
  272. result.success = self._handler.GetRuntimeProfile(args.query_id)
  273. except beeswaxd.ttypes.BeeswaxException as error:
  274. result.error = error
  275. oprot.writeMessageBegin("GetRuntimeProfile", TMessageType.REPLY, seqid)
  276. result.write(oprot)
  277. oprot.writeMessageEnd()
  278. oprot.trans.flush()
  279. def process_CloseInsert(self, seqid, iprot, oprot):
  280. args = CloseInsert_args()
  281. args.read(iprot)
  282. iprot.readMessageEnd()
  283. result = CloseInsert_result()
  284. try:
  285. result.success = self._handler.CloseInsert(args.handle)
  286. except beeswaxd.ttypes.QueryNotFoundException as error:
  287. result.error = error
  288. except beeswaxd.ttypes.BeeswaxException as error2:
  289. result.error2 = error2
  290. oprot.writeMessageBegin("CloseInsert", TMessageType.REPLY, seqid)
  291. result.write(oprot)
  292. oprot.writeMessageEnd()
  293. oprot.trans.flush()
  294. def process_PingImpalaService(self, seqid, iprot, oprot):
  295. args = PingImpalaService_args()
  296. args.read(iprot)
  297. iprot.readMessageEnd()
  298. result = PingImpalaService_result()
  299. result.success = self._handler.PingImpalaService()
  300. oprot.writeMessageBegin("PingImpalaService", TMessageType.REPLY, seqid)
  301. result.write(oprot)
  302. oprot.writeMessageEnd()
  303. oprot.trans.flush()
  304. # HELPER FUNCTIONS AND STRUCTURES
  305. class Cancel_args(object):
  306. """
  307. Attributes:
  308. - query_id
  309. """
  310. thrift_spec = (
  311. None, # 0
  312. (1, TType.STRUCT, 'query_id', (beeswaxd.ttypes.QueryHandle, beeswaxd.ttypes.QueryHandle.thrift_spec), None, ), # 1
  313. )
  314. def __init__(self, query_id=None,):
  315. self.query_id = query_id
  316. def read(self, iprot):
  317. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  318. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  319. return
  320. iprot.readStructBegin()
  321. while True:
  322. (fname, ftype, fid) = iprot.readFieldBegin()
  323. if ftype == TType.STOP:
  324. break
  325. if fid == 1:
  326. if ftype == TType.STRUCT:
  327. self.query_id = beeswaxd.ttypes.QueryHandle()
  328. self.query_id.read(iprot)
  329. else:
  330. iprot.skip(ftype)
  331. else:
  332. iprot.skip(ftype)
  333. iprot.readFieldEnd()
  334. iprot.readStructEnd()
  335. def write(self, oprot):
  336. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  337. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  338. return
  339. oprot.writeStructBegin('Cancel_args')
  340. if self.query_id is not None:
  341. oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
  342. self.query_id.write(oprot)
  343. oprot.writeFieldEnd()
  344. oprot.writeFieldStop()
  345. oprot.writeStructEnd()
  346. def validate(self):
  347. return
  348. def __repr__(self):
  349. L = ['%s=%r' % (key, value)
  350. for key, value in self.__dict__.iteritems()]
  351. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  352. def __eq__(self, other):
  353. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  354. def __ne__(self, other):
  355. return not (self == other)
  356. class Cancel_result(object):
  357. """
  358. Attributes:
  359. - success
  360. - error
  361. """
  362. thrift_spec = (
  363. (0, TType.STRUCT, 'success', (Status.ttypes.TStatus, Status.ttypes.TStatus.thrift_spec), None, ), # 0
  364. (1, TType.STRUCT, 'error', (beeswaxd.ttypes.BeeswaxException, beeswaxd.ttypes.BeeswaxException.thrift_spec), None, ), # 1
  365. )
  366. def __init__(self, success=None, error=None,):
  367. self.success = success
  368. self.error = error
  369. def read(self, iprot):
  370. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  371. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  372. return
  373. iprot.readStructBegin()
  374. while True:
  375. (fname, ftype, fid) = iprot.readFieldBegin()
  376. if ftype == TType.STOP:
  377. break
  378. if fid == 0:
  379. if ftype == TType.STRUCT:
  380. self.success = Status.ttypes.TStatus()
  381. self.success.read(iprot)
  382. else:
  383. iprot.skip(ftype)
  384. elif fid == 1:
  385. if ftype == TType.STRUCT:
  386. self.error = beeswaxd.ttypes.BeeswaxException()
  387. self.error.read(iprot)
  388. else:
  389. iprot.skip(ftype)
  390. else:
  391. iprot.skip(ftype)
  392. iprot.readFieldEnd()
  393. iprot.readStructEnd()
  394. def write(self, oprot):
  395. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  396. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  397. return
  398. oprot.writeStructBegin('Cancel_result')
  399. if self.success is not None:
  400. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  401. self.success.write(oprot)
  402. oprot.writeFieldEnd()
  403. if self.error is not None:
  404. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  405. self.error.write(oprot)
  406. oprot.writeFieldEnd()
  407. oprot.writeFieldStop()
  408. oprot.writeStructEnd()
  409. def validate(self):
  410. return
  411. def __repr__(self):
  412. L = ['%s=%r' % (key, value)
  413. for key, value in self.__dict__.iteritems()]
  414. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  415. def __eq__(self, other):
  416. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  417. def __ne__(self, other):
  418. return not (self == other)
  419. class ResetCatalog_args(object):
  420. thrift_spec = (
  421. )
  422. def read(self, iprot):
  423. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  424. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  425. return
  426. iprot.readStructBegin()
  427. while True:
  428. (fname, ftype, fid) = iprot.readFieldBegin()
  429. if ftype == TType.STOP:
  430. break
  431. else:
  432. iprot.skip(ftype)
  433. iprot.readFieldEnd()
  434. iprot.readStructEnd()
  435. def write(self, oprot):
  436. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  437. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  438. return
  439. oprot.writeStructBegin('ResetCatalog_args')
  440. oprot.writeFieldStop()
  441. oprot.writeStructEnd()
  442. def validate(self):
  443. return
  444. def __repr__(self):
  445. L = ['%s=%r' % (key, value)
  446. for key, value in self.__dict__.iteritems()]
  447. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  448. def __eq__(self, other):
  449. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  450. def __ne__(self, other):
  451. return not (self == other)
  452. class ResetCatalog_result(object):
  453. """
  454. Attributes:
  455. - success
  456. """
  457. thrift_spec = (
  458. (0, TType.STRUCT, 'success', (Status.ttypes.TStatus, Status.ttypes.TStatus.thrift_spec), None, ), # 0
  459. )
  460. def __init__(self, success=None,):
  461. self.success = success
  462. def read(self, iprot):
  463. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  464. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  465. return
  466. iprot.readStructBegin()
  467. while True:
  468. (fname, ftype, fid) = iprot.readFieldBegin()
  469. if ftype == TType.STOP:
  470. break
  471. if fid == 0:
  472. if ftype == TType.STRUCT:
  473. self.success = Status.ttypes.TStatus()
  474. self.success.read(iprot)
  475. else:
  476. iprot.skip(ftype)
  477. else:
  478. iprot.skip(ftype)
  479. iprot.readFieldEnd()
  480. iprot.readStructEnd()
  481. def write(self, oprot):
  482. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  483. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  484. return
  485. oprot.writeStructBegin('ResetCatalog_result')
  486. if self.success is not None:
  487. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  488. self.success.write(oprot)
  489. oprot.writeFieldEnd()
  490. oprot.writeFieldStop()
  491. oprot.writeStructEnd()
  492. def validate(self):
  493. return
  494. def __repr__(self):
  495. L = ['%s=%r' % (key, value)
  496. for key, value in self.__dict__.iteritems()]
  497. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  498. def __eq__(self, other):
  499. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  500. def __ne__(self, other):
  501. return not (self == other)
  502. class ResetTable_args(object):
  503. """
  504. Attributes:
  505. - request
  506. """
  507. thrift_spec = (
  508. None, # 0
  509. (1, TType.STRUCT, 'request', (TResetTableReq, TResetTableReq.thrift_spec), None, ), # 1
  510. )
  511. def __init__(self, request=None,):
  512. self.request = request
  513. def read(self, iprot):
  514. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  515. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  516. return
  517. iprot.readStructBegin()
  518. while True:
  519. (fname, ftype, fid) = iprot.readFieldBegin()
  520. if ftype == TType.STOP:
  521. break
  522. if fid == 1:
  523. if ftype == TType.STRUCT:
  524. self.request = TResetTableReq()
  525. self.request.read(iprot)
  526. else:
  527. iprot.skip(ftype)
  528. else:
  529. iprot.skip(ftype)
  530. iprot.readFieldEnd()
  531. iprot.readStructEnd()
  532. def write(self, oprot):
  533. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  534. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  535. return
  536. oprot.writeStructBegin('ResetTable_args')
  537. if self.request is not None:
  538. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  539. self.request.write(oprot)
  540. oprot.writeFieldEnd()
  541. oprot.writeFieldStop()
  542. oprot.writeStructEnd()
  543. def validate(self):
  544. return
  545. def __repr__(self):
  546. L = ['%s=%r' % (key, value)
  547. for key, value in self.__dict__.iteritems()]
  548. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  549. def __eq__(self, other):
  550. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  551. def __ne__(self, other):
  552. return not (self == other)
  553. class ResetTable_result(object):
  554. """
  555. Attributes:
  556. - success
  557. """
  558. thrift_spec = (
  559. (0, TType.STRUCT, 'success', (Status.ttypes.TStatus, Status.ttypes.TStatus.thrift_spec), None, ), # 0
  560. )
  561. def __init__(self, success=None,):
  562. self.success = success
  563. def read(self, iprot):
  564. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  565. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  566. return
  567. iprot.readStructBegin()
  568. while True:
  569. (fname, ftype, fid) = iprot.readFieldBegin()
  570. if ftype == TType.STOP:
  571. break
  572. if fid == 0:
  573. if ftype == TType.STRUCT:
  574. self.success = Status.ttypes.TStatus()
  575. self.success.read(iprot)
  576. else:
  577. iprot.skip(ftype)
  578. else:
  579. iprot.skip(ftype)
  580. iprot.readFieldEnd()
  581. iprot.readStructEnd()
  582. def write(self, oprot):
  583. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  584. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  585. return
  586. oprot.writeStructBegin('ResetTable_result')
  587. if self.success is not None:
  588. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  589. self.success.write(oprot)
  590. oprot.writeFieldEnd()
  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__.iteritems()]
  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. class GetRuntimeProfile_args(object):
  604. """
  605. Attributes:
  606. - query_id
  607. """
  608. thrift_spec = (
  609. None, # 0
  610. (1, TType.STRUCT, 'query_id', (beeswaxd.ttypes.QueryHandle, beeswaxd.ttypes.QueryHandle.thrift_spec), None, ), # 1
  611. )
  612. def __init__(self, query_id=None,):
  613. self.query_id = query_id
  614. def read(self, iprot):
  615. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  616. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  617. return
  618. iprot.readStructBegin()
  619. while True:
  620. (fname, ftype, fid) = iprot.readFieldBegin()
  621. if ftype == TType.STOP:
  622. break
  623. if fid == 1:
  624. if ftype == TType.STRUCT:
  625. self.query_id = beeswaxd.ttypes.QueryHandle()
  626. self.query_id.read(iprot)
  627. else:
  628. iprot.skip(ftype)
  629. else:
  630. iprot.skip(ftype)
  631. iprot.readFieldEnd()
  632. iprot.readStructEnd()
  633. def write(self, oprot):
  634. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  635. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  636. return
  637. oprot.writeStructBegin('GetRuntimeProfile_args')
  638. if self.query_id is not None:
  639. oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
  640. self.query_id.write(oprot)
  641. oprot.writeFieldEnd()
  642. oprot.writeFieldStop()
  643. oprot.writeStructEnd()
  644. def validate(self):
  645. return
  646. def __repr__(self):
  647. L = ['%s=%r' % (key, value)
  648. for key, value in self.__dict__.iteritems()]
  649. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  650. def __eq__(self, other):
  651. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  652. def __ne__(self, other):
  653. return not (self == other)
  654. class GetRuntimeProfile_result(object):
  655. """
  656. Attributes:
  657. - success
  658. - error
  659. """
  660. thrift_spec = (
  661. (0, TType.STRING, 'success', None, None, ), # 0
  662. (1, TType.STRUCT, 'error', (beeswaxd.ttypes.BeeswaxException, beeswaxd.ttypes.BeeswaxException.thrift_spec), None, ), # 1
  663. )
  664. def __init__(self, success=None, error=None,):
  665. self.success = success
  666. self.error = error
  667. def read(self, iprot):
  668. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  669. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  670. return
  671. iprot.readStructBegin()
  672. while True:
  673. (fname, ftype, fid) = iprot.readFieldBegin()
  674. if ftype == TType.STOP:
  675. break
  676. if fid == 0:
  677. if ftype == TType.STRING:
  678. self.success = iprot.readString();
  679. else:
  680. iprot.skip(ftype)
  681. elif fid == 1:
  682. if ftype == TType.STRUCT:
  683. self.error = beeswaxd.ttypes.BeeswaxException()
  684. self.error.read(iprot)
  685. else:
  686. iprot.skip(ftype)
  687. else:
  688. iprot.skip(ftype)
  689. iprot.readFieldEnd()
  690. iprot.readStructEnd()
  691. def write(self, oprot):
  692. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  693. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  694. return
  695. oprot.writeStructBegin('GetRuntimeProfile_result')
  696. if self.success is not None:
  697. oprot.writeFieldBegin('success', TType.STRING, 0)
  698. oprot.writeString(self.success)
  699. oprot.writeFieldEnd()
  700. if self.error is not None:
  701. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  702. self.error.write(oprot)
  703. oprot.writeFieldEnd()
  704. oprot.writeFieldStop()
  705. oprot.writeStructEnd()
  706. def validate(self):
  707. return
  708. def __repr__(self):
  709. L = ['%s=%r' % (key, value)
  710. for key, value in self.__dict__.iteritems()]
  711. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  712. def __eq__(self, other):
  713. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  714. def __ne__(self, other):
  715. return not (self == other)
  716. class CloseInsert_args(object):
  717. """
  718. Attributes:
  719. - handle
  720. """
  721. thrift_spec = (
  722. None, # 0
  723. (1, TType.STRUCT, 'handle', (beeswaxd.ttypes.QueryHandle, beeswaxd.ttypes.QueryHandle.thrift_spec), None, ), # 1
  724. )
  725. def __init__(self, handle=None,):
  726. self.handle = handle
  727. def read(self, iprot):
  728. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  729. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  730. return
  731. iprot.readStructBegin()
  732. while True:
  733. (fname, ftype, fid) = iprot.readFieldBegin()
  734. if ftype == TType.STOP:
  735. break
  736. if fid == 1:
  737. if ftype == TType.STRUCT:
  738. self.handle = beeswaxd.ttypes.QueryHandle()
  739. self.handle.read(iprot)
  740. else:
  741. iprot.skip(ftype)
  742. else:
  743. iprot.skip(ftype)
  744. iprot.readFieldEnd()
  745. iprot.readStructEnd()
  746. def write(self, oprot):
  747. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  748. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  749. return
  750. oprot.writeStructBegin('CloseInsert_args')
  751. if self.handle is not None:
  752. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  753. self.handle.write(oprot)
  754. oprot.writeFieldEnd()
  755. oprot.writeFieldStop()
  756. oprot.writeStructEnd()
  757. def validate(self):
  758. return
  759. def __repr__(self):
  760. L = ['%s=%r' % (key, value)
  761. for key, value in self.__dict__.iteritems()]
  762. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  763. def __eq__(self, other):
  764. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  765. def __ne__(self, other):
  766. return not (self == other)
  767. class CloseInsert_result(object):
  768. """
  769. Attributes:
  770. - success
  771. - error
  772. - error2
  773. """
  774. thrift_spec = (
  775. (0, TType.STRUCT, 'success', (TInsertResult, TInsertResult.thrift_spec), None, ), # 0
  776. (1, TType.STRUCT, 'error', (beeswaxd.ttypes.QueryNotFoundException, beeswaxd.ttypes.QueryNotFoundException.thrift_spec), None, ), # 1
  777. (2, TType.STRUCT, 'error2', (beeswaxd.ttypes.BeeswaxException, beeswaxd.ttypes.BeeswaxException.thrift_spec), None, ), # 2
  778. )
  779. def __init__(self, success=None, error=None, error2=None,):
  780. self.success = success
  781. self.error = error
  782. self.error2 = error2
  783. def read(self, iprot):
  784. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  785. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  786. return
  787. iprot.readStructBegin()
  788. while True:
  789. (fname, ftype, fid) = iprot.readFieldBegin()
  790. if ftype == TType.STOP:
  791. break
  792. if fid == 0:
  793. if ftype == TType.STRUCT:
  794. self.success = TInsertResult()
  795. self.success.read(iprot)
  796. else:
  797. iprot.skip(ftype)
  798. elif fid == 1:
  799. if ftype == TType.STRUCT:
  800. self.error = beeswaxd.ttypes.QueryNotFoundException()
  801. self.error.read(iprot)
  802. else:
  803. iprot.skip(ftype)
  804. elif fid == 2:
  805. if ftype == TType.STRUCT:
  806. self.error2 = beeswaxd.ttypes.BeeswaxException()
  807. self.error2.read(iprot)
  808. else:
  809. iprot.skip(ftype)
  810. else:
  811. iprot.skip(ftype)
  812. iprot.readFieldEnd()
  813. iprot.readStructEnd()
  814. def write(self, oprot):
  815. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  816. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  817. return
  818. oprot.writeStructBegin('CloseInsert_result')
  819. if self.success is not None:
  820. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  821. self.success.write(oprot)
  822. oprot.writeFieldEnd()
  823. if self.error is not None:
  824. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  825. self.error.write(oprot)
  826. oprot.writeFieldEnd()
  827. if self.error2 is not None:
  828. oprot.writeFieldBegin('error2', TType.STRUCT, 2)
  829. self.error2.write(oprot)
  830. oprot.writeFieldEnd()
  831. oprot.writeFieldStop()
  832. oprot.writeStructEnd()
  833. def validate(self):
  834. return
  835. def __repr__(self):
  836. L = ['%s=%r' % (key, value)
  837. for key, value in self.__dict__.iteritems()]
  838. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  839. def __eq__(self, other):
  840. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  841. def __ne__(self, other):
  842. return not (self == other)
  843. class PingImpalaService_args(object):
  844. thrift_spec = (
  845. )
  846. def read(self, iprot):
  847. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  848. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  849. return
  850. iprot.readStructBegin()
  851. while True:
  852. (fname, ftype, fid) = iprot.readFieldBegin()
  853. if ftype == TType.STOP:
  854. break
  855. else:
  856. iprot.skip(ftype)
  857. iprot.readFieldEnd()
  858. iprot.readStructEnd()
  859. def write(self, oprot):
  860. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  861. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  862. return
  863. oprot.writeStructBegin('PingImpalaService_args')
  864. oprot.writeFieldStop()
  865. oprot.writeStructEnd()
  866. def validate(self):
  867. return
  868. def __repr__(self):
  869. L = ['%s=%r' % (key, value)
  870. for key, value in self.__dict__.iteritems()]
  871. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  872. def __eq__(self, other):
  873. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  874. def __ne__(self, other):
  875. return not (self == other)
  876. class PingImpalaService_result(object):
  877. """
  878. Attributes:
  879. - success
  880. """
  881. thrift_spec = (
  882. (0, TType.STRUCT, 'success', (TPingImpalaServiceResp, TPingImpalaServiceResp.thrift_spec), None, ), # 0
  883. )
  884. def __init__(self, success=None,):
  885. self.success = success
  886. def read(self, iprot):
  887. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  888. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  889. return
  890. iprot.readStructBegin()
  891. while True:
  892. (fname, ftype, fid) = iprot.readFieldBegin()
  893. if ftype == TType.STOP:
  894. break
  895. if fid == 0:
  896. if ftype == TType.STRUCT:
  897. self.success = TPingImpalaServiceResp()
  898. self.success.read(iprot)
  899. else:
  900. iprot.skip(ftype)
  901. else:
  902. iprot.skip(ftype)
  903. iprot.readFieldEnd()
  904. iprot.readStructEnd()
  905. def write(self, oprot):
  906. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  907. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  908. return
  909. oprot.writeStructBegin('PingImpalaService_result')
  910. if self.success is not None:
  911. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  912. self.success.write(oprot)
  913. oprot.writeFieldEnd()
  914. oprot.writeFieldStop()
  915. oprot.writeStructEnd()
  916. def validate(self):
  917. return
  918. def __repr__(self):
  919. L = ['%s=%r' % (key, value)
  920. for key, value in self.__dict__.iteritems()]
  921. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  922. def __eq__(self, other):
  923. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  924. def __ne__(self, other):
  925. return not (self == other)