ImpalaService.py 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  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 CloseInsert(self, handle):
  28. """
  29. Parameters:
  30. - handle
  31. """
  32. pass
  33. def PingImpalaService(self, ):
  34. pass
  35. class Client(beeswaxd.BeeswaxService.Client, Iface):
  36. def __init__(self, iprot, oprot=None):
  37. beeswaxd.BeeswaxService.Client.__init__(self, iprot, oprot)
  38. def Cancel(self, query_id):
  39. """
  40. Parameters:
  41. - query_id
  42. """
  43. self.send_Cancel(query_id)
  44. return self.recv_Cancel()
  45. def send_Cancel(self, query_id):
  46. self._oprot.writeMessageBegin('Cancel', TMessageType.CALL, self._seqid)
  47. args = Cancel_args()
  48. args.query_id = query_id
  49. args.write(self._oprot)
  50. self._oprot.writeMessageEnd()
  51. self._oprot.trans.flush()
  52. def recv_Cancel(self, ):
  53. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  54. if mtype == TMessageType.EXCEPTION:
  55. x = TApplicationException()
  56. x.read(self._iprot)
  57. self._iprot.readMessageEnd()
  58. raise x
  59. result = Cancel_result()
  60. result.read(self._iprot)
  61. self._iprot.readMessageEnd()
  62. if result.success is not None:
  63. return result.success
  64. if result.error is not None:
  65. raise result.error
  66. raise TApplicationException(TApplicationException.MISSING_RESULT, "Cancel failed: unknown result");
  67. def ResetCatalog(self, ):
  68. self.send_ResetCatalog()
  69. return self.recv_ResetCatalog()
  70. def send_ResetCatalog(self, ):
  71. self._oprot.writeMessageBegin('ResetCatalog', TMessageType.CALL, self._seqid)
  72. args = ResetCatalog_args()
  73. args.write(self._oprot)
  74. self._oprot.writeMessageEnd()
  75. self._oprot.trans.flush()
  76. def recv_ResetCatalog(self, ):
  77. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  78. if mtype == TMessageType.EXCEPTION:
  79. x = TApplicationException()
  80. x.read(self._iprot)
  81. self._iprot.readMessageEnd()
  82. raise x
  83. result = ResetCatalog_result()
  84. result.read(self._iprot)
  85. self._iprot.readMessageEnd()
  86. if result.success is not None:
  87. return result.success
  88. raise TApplicationException(TApplicationException.MISSING_RESULT, "ResetCatalog failed: unknown result");
  89. def CloseInsert(self, handle):
  90. """
  91. Parameters:
  92. - handle
  93. """
  94. self.send_CloseInsert(handle)
  95. return self.recv_CloseInsert()
  96. def send_CloseInsert(self, handle):
  97. self._oprot.writeMessageBegin('CloseInsert', TMessageType.CALL, self._seqid)
  98. args = CloseInsert_args()
  99. args.handle = handle
  100. args.write(self._oprot)
  101. self._oprot.writeMessageEnd()
  102. self._oprot.trans.flush()
  103. def recv_CloseInsert(self, ):
  104. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  105. if mtype == TMessageType.EXCEPTION:
  106. x = TApplicationException()
  107. x.read(self._iprot)
  108. self._iprot.readMessageEnd()
  109. raise x
  110. result = CloseInsert_result()
  111. result.read(self._iprot)
  112. self._iprot.readMessageEnd()
  113. if result.success is not None:
  114. return result.success
  115. if result.error is not None:
  116. raise result.error
  117. if result.error2 is not None:
  118. raise result.error2
  119. raise TApplicationException(TApplicationException.MISSING_RESULT, "CloseInsert failed: unknown result");
  120. def PingImpalaService(self, ):
  121. self.send_PingImpalaService()
  122. self.recv_PingImpalaService()
  123. def send_PingImpalaService(self, ):
  124. self._oprot.writeMessageBegin('PingImpalaService', TMessageType.CALL, self._seqid)
  125. args = PingImpalaService_args()
  126. args.write(self._oprot)
  127. self._oprot.writeMessageEnd()
  128. self._oprot.trans.flush()
  129. def recv_PingImpalaService(self, ):
  130. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  131. if mtype == TMessageType.EXCEPTION:
  132. x = TApplicationException()
  133. x.read(self._iprot)
  134. self._iprot.readMessageEnd()
  135. raise x
  136. result = PingImpalaService_result()
  137. result.read(self._iprot)
  138. self._iprot.readMessageEnd()
  139. return
  140. class Processor(beeswaxd.BeeswaxService.Processor, Iface, TProcessor):
  141. def __init__(self, handler):
  142. beeswaxd.BeeswaxService.Processor.__init__(self, handler)
  143. self._processMap["Cancel"] = Processor.process_Cancel
  144. self._processMap["ResetCatalog"] = Processor.process_ResetCatalog
  145. self._processMap["CloseInsert"] = Processor.process_CloseInsert
  146. self._processMap["PingImpalaService"] = Processor.process_PingImpalaService
  147. def process(self, iprot, oprot):
  148. (name, type, seqid) = iprot.readMessageBegin()
  149. if name not in self._processMap:
  150. iprot.skip(TType.STRUCT)
  151. iprot.readMessageEnd()
  152. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  153. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  154. x.write(oprot)
  155. oprot.writeMessageEnd()
  156. oprot.trans.flush()
  157. return
  158. else:
  159. self._processMap[name](self, seqid, iprot, oprot)
  160. return True
  161. def process_Cancel(self, seqid, iprot, oprot):
  162. args = Cancel_args()
  163. args.read(iprot)
  164. iprot.readMessageEnd()
  165. result = Cancel_result()
  166. try:
  167. result.success = self._handler.Cancel(args.query_id)
  168. except beeswaxd.ttypes.BeeswaxException as error:
  169. result.error = error
  170. oprot.writeMessageBegin("Cancel", TMessageType.REPLY, seqid)
  171. result.write(oprot)
  172. oprot.writeMessageEnd()
  173. oprot.trans.flush()
  174. def process_ResetCatalog(self, seqid, iprot, oprot):
  175. args = ResetCatalog_args()
  176. args.read(iprot)
  177. iprot.readMessageEnd()
  178. result = ResetCatalog_result()
  179. result.success = self._handler.ResetCatalog()
  180. oprot.writeMessageBegin("ResetCatalog", TMessageType.REPLY, seqid)
  181. result.write(oprot)
  182. oprot.writeMessageEnd()
  183. oprot.trans.flush()
  184. def process_CloseInsert(self, seqid, iprot, oprot):
  185. args = CloseInsert_args()
  186. args.read(iprot)
  187. iprot.readMessageEnd()
  188. result = CloseInsert_result()
  189. try:
  190. result.success = self._handler.CloseInsert(args.handle)
  191. except beeswaxd.ttypes.QueryNotFoundException as error:
  192. result.error = error
  193. except beeswaxd.ttypes.BeeswaxException as error2:
  194. result.error2 = error2
  195. oprot.writeMessageBegin("CloseInsert", TMessageType.REPLY, seqid)
  196. result.write(oprot)
  197. oprot.writeMessageEnd()
  198. oprot.trans.flush()
  199. def process_PingImpalaService(self, seqid, iprot, oprot):
  200. args = PingImpalaService_args()
  201. args.read(iprot)
  202. iprot.readMessageEnd()
  203. result = PingImpalaService_result()
  204. self._handler.PingImpalaService()
  205. oprot.writeMessageBegin("PingImpalaService", TMessageType.REPLY, seqid)
  206. result.write(oprot)
  207. oprot.writeMessageEnd()
  208. oprot.trans.flush()
  209. # HELPER FUNCTIONS AND STRUCTURES
  210. class Cancel_args(object):
  211. """
  212. Attributes:
  213. - query_id
  214. """
  215. thrift_spec = (
  216. None, # 0
  217. (1, TType.STRUCT, 'query_id', (beeswaxd.ttypes.QueryHandle, beeswaxd.ttypes.QueryHandle.thrift_spec), None, ), # 1
  218. )
  219. def __init__(self, query_id=None,):
  220. self.query_id = query_id
  221. def read(self, iprot):
  222. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  223. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  224. return
  225. iprot.readStructBegin()
  226. while True:
  227. (fname, ftype, fid) = iprot.readFieldBegin()
  228. if ftype == TType.STOP:
  229. break
  230. if fid == 1:
  231. if ftype == TType.STRUCT:
  232. self.query_id = beeswaxd.ttypes.QueryHandle()
  233. self.query_id.read(iprot)
  234. else:
  235. iprot.skip(ftype)
  236. else:
  237. iprot.skip(ftype)
  238. iprot.readFieldEnd()
  239. iprot.readStructEnd()
  240. def write(self, oprot):
  241. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  242. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  243. return
  244. oprot.writeStructBegin('Cancel_args')
  245. if self.query_id is not None:
  246. oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
  247. self.query_id.write(oprot)
  248. oprot.writeFieldEnd()
  249. oprot.writeFieldStop()
  250. oprot.writeStructEnd()
  251. def validate(self):
  252. return
  253. def __repr__(self):
  254. L = ['%s=%r' % (key, value)
  255. for key, value in self.__dict__.iteritems()]
  256. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  257. def __eq__(self, other):
  258. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  259. def __ne__(self, other):
  260. return not (self == other)
  261. class Cancel_result(object):
  262. """
  263. Attributes:
  264. - success
  265. - error
  266. """
  267. thrift_spec = (
  268. (0, TType.STRUCT, 'success', (Status.ttypes.TStatus, Status.ttypes.TStatus.thrift_spec), None, ), # 0
  269. (1, TType.STRUCT, 'error', (beeswaxd.ttypes.BeeswaxException, beeswaxd.ttypes.BeeswaxException.thrift_spec), None, ), # 1
  270. )
  271. def __init__(self, success=None, error=None,):
  272. self.success = success
  273. self.error = error
  274. def read(self, iprot):
  275. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  276. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  277. return
  278. iprot.readStructBegin()
  279. while True:
  280. (fname, ftype, fid) = iprot.readFieldBegin()
  281. if ftype == TType.STOP:
  282. break
  283. if fid == 0:
  284. if ftype == TType.STRUCT:
  285. self.success = Status.ttypes.TStatus()
  286. self.success.read(iprot)
  287. else:
  288. iprot.skip(ftype)
  289. elif fid == 1:
  290. if ftype == TType.STRUCT:
  291. self.error = beeswaxd.ttypes.BeeswaxException()
  292. self.error.read(iprot)
  293. else:
  294. iprot.skip(ftype)
  295. else:
  296. iprot.skip(ftype)
  297. iprot.readFieldEnd()
  298. iprot.readStructEnd()
  299. def write(self, oprot):
  300. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  301. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  302. return
  303. oprot.writeStructBegin('Cancel_result')
  304. if self.success is not None:
  305. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  306. self.success.write(oprot)
  307. oprot.writeFieldEnd()
  308. if self.error is not None:
  309. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  310. self.error.write(oprot)
  311. oprot.writeFieldEnd()
  312. oprot.writeFieldStop()
  313. oprot.writeStructEnd()
  314. def validate(self):
  315. return
  316. def __repr__(self):
  317. L = ['%s=%r' % (key, value)
  318. for key, value in self.__dict__.iteritems()]
  319. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  320. def __eq__(self, other):
  321. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  322. def __ne__(self, other):
  323. return not (self == other)
  324. class ResetCatalog_args(object):
  325. thrift_spec = (
  326. )
  327. def read(self, iprot):
  328. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  329. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  330. return
  331. iprot.readStructBegin()
  332. while True:
  333. (fname, ftype, fid) = iprot.readFieldBegin()
  334. if ftype == TType.STOP:
  335. break
  336. else:
  337. iprot.skip(ftype)
  338. iprot.readFieldEnd()
  339. iprot.readStructEnd()
  340. def write(self, oprot):
  341. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  342. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  343. return
  344. oprot.writeStructBegin('ResetCatalog_args')
  345. oprot.writeFieldStop()
  346. oprot.writeStructEnd()
  347. def validate(self):
  348. return
  349. def __repr__(self):
  350. L = ['%s=%r' % (key, value)
  351. for key, value in self.__dict__.iteritems()]
  352. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  353. def __eq__(self, other):
  354. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  355. def __ne__(self, other):
  356. return not (self == other)
  357. class ResetCatalog_result(object):
  358. """
  359. Attributes:
  360. - success
  361. """
  362. thrift_spec = (
  363. (0, TType.STRUCT, 'success', (Status.ttypes.TStatus, Status.ttypes.TStatus.thrift_spec), None, ), # 0
  364. )
  365. def __init__(self, success=None,):
  366. self.success = success
  367. def read(self, iprot):
  368. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  369. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  370. return
  371. iprot.readStructBegin()
  372. while True:
  373. (fname, ftype, fid) = iprot.readFieldBegin()
  374. if ftype == TType.STOP:
  375. break
  376. if fid == 0:
  377. if ftype == TType.STRUCT:
  378. self.success = Status.ttypes.TStatus()
  379. self.success.read(iprot)
  380. else:
  381. iprot.skip(ftype)
  382. else:
  383. iprot.skip(ftype)
  384. iprot.readFieldEnd()
  385. iprot.readStructEnd()
  386. def write(self, oprot):
  387. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  388. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  389. return
  390. oprot.writeStructBegin('ResetCatalog_result')
  391. if self.success is not None:
  392. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  393. self.success.write(oprot)
  394. oprot.writeFieldEnd()
  395. oprot.writeFieldStop()
  396. oprot.writeStructEnd()
  397. def validate(self):
  398. return
  399. def __repr__(self):
  400. L = ['%s=%r' % (key, value)
  401. for key, value in self.__dict__.iteritems()]
  402. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  403. def __eq__(self, other):
  404. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  405. def __ne__(self, other):
  406. return not (self == other)
  407. class CloseInsert_args(object):
  408. """
  409. Attributes:
  410. - handle
  411. """
  412. thrift_spec = (
  413. None, # 0
  414. (1, TType.STRUCT, 'handle', (beeswaxd.ttypes.QueryHandle, beeswaxd.ttypes.QueryHandle.thrift_spec), None, ), # 1
  415. )
  416. def __init__(self, handle=None,):
  417. self.handle = handle
  418. def read(self, iprot):
  419. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  420. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  421. return
  422. iprot.readStructBegin()
  423. while True:
  424. (fname, ftype, fid) = iprot.readFieldBegin()
  425. if ftype == TType.STOP:
  426. break
  427. if fid == 1:
  428. if ftype == TType.STRUCT:
  429. self.handle = beeswaxd.ttypes.QueryHandle()
  430. self.handle.read(iprot)
  431. else:
  432. iprot.skip(ftype)
  433. else:
  434. iprot.skip(ftype)
  435. iprot.readFieldEnd()
  436. iprot.readStructEnd()
  437. def write(self, oprot):
  438. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  439. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  440. return
  441. oprot.writeStructBegin('CloseInsert_args')
  442. if self.handle is not None:
  443. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  444. self.handle.write(oprot)
  445. oprot.writeFieldEnd()
  446. oprot.writeFieldStop()
  447. oprot.writeStructEnd()
  448. def validate(self):
  449. return
  450. def __repr__(self):
  451. L = ['%s=%r' % (key, value)
  452. for key, value in self.__dict__.iteritems()]
  453. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  454. def __eq__(self, other):
  455. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  456. def __ne__(self, other):
  457. return not (self == other)
  458. class CloseInsert_result(object):
  459. """
  460. Attributes:
  461. - success
  462. - error
  463. - error2
  464. """
  465. thrift_spec = (
  466. (0, TType.STRUCT, 'success', (TInsertResult, TInsertResult.thrift_spec), None, ), # 0
  467. (1, TType.STRUCT, 'error', (beeswaxd.ttypes.QueryNotFoundException, beeswaxd.ttypes.QueryNotFoundException.thrift_spec), None, ), # 1
  468. (2, TType.STRUCT, 'error2', (beeswaxd.ttypes.BeeswaxException, beeswaxd.ttypes.BeeswaxException.thrift_spec), None, ), # 2
  469. )
  470. def __init__(self, success=None, error=None, error2=None,):
  471. self.success = success
  472. self.error = error
  473. self.error2 = error2
  474. def read(self, iprot):
  475. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  476. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  477. return
  478. iprot.readStructBegin()
  479. while True:
  480. (fname, ftype, fid) = iprot.readFieldBegin()
  481. if ftype == TType.STOP:
  482. break
  483. if fid == 0:
  484. if ftype == TType.STRUCT:
  485. self.success = TInsertResult()
  486. self.success.read(iprot)
  487. else:
  488. iprot.skip(ftype)
  489. elif fid == 1:
  490. if ftype == TType.STRUCT:
  491. self.error = beeswaxd.ttypes.QueryNotFoundException()
  492. self.error.read(iprot)
  493. else:
  494. iprot.skip(ftype)
  495. elif fid == 2:
  496. if ftype == TType.STRUCT:
  497. self.error2 = beeswaxd.ttypes.BeeswaxException()
  498. self.error2.read(iprot)
  499. else:
  500. iprot.skip(ftype)
  501. else:
  502. iprot.skip(ftype)
  503. iprot.readFieldEnd()
  504. iprot.readStructEnd()
  505. def write(self, oprot):
  506. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  507. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  508. return
  509. oprot.writeStructBegin('CloseInsert_result')
  510. if self.success is not None:
  511. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  512. self.success.write(oprot)
  513. oprot.writeFieldEnd()
  514. if self.error is not None:
  515. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  516. self.error.write(oprot)
  517. oprot.writeFieldEnd()
  518. if self.error2 is not None:
  519. oprot.writeFieldBegin('error2', TType.STRUCT, 2)
  520. self.error2.write(oprot)
  521. oprot.writeFieldEnd()
  522. oprot.writeFieldStop()
  523. oprot.writeStructEnd()
  524. def validate(self):
  525. return
  526. def __repr__(self):
  527. L = ['%s=%r' % (key, value)
  528. for key, value in self.__dict__.iteritems()]
  529. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  530. def __eq__(self, other):
  531. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  532. def __ne__(self, other):
  533. return not (self == other)
  534. class PingImpalaService_args(object):
  535. thrift_spec = (
  536. )
  537. def read(self, iprot):
  538. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  539. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  540. return
  541. iprot.readStructBegin()
  542. while True:
  543. (fname, ftype, fid) = iprot.readFieldBegin()
  544. if ftype == TType.STOP:
  545. break
  546. else:
  547. iprot.skip(ftype)
  548. iprot.readFieldEnd()
  549. iprot.readStructEnd()
  550. def write(self, oprot):
  551. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  552. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  553. return
  554. oprot.writeStructBegin('PingImpalaService_args')
  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__.iteritems()]
  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. class PingImpalaService_result(object):
  568. thrift_spec = (
  569. )
  570. def read(self, iprot):
  571. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  572. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  573. return
  574. iprot.readStructBegin()
  575. while True:
  576. (fname, ftype, fid) = iprot.readFieldBegin()
  577. if ftype == TType.STOP:
  578. break
  579. else:
  580. iprot.skip(ftype)
  581. iprot.readFieldEnd()
  582. iprot.readStructEnd()
  583. def write(self, oprot):
  584. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  585. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  586. return
  587. oprot.writeStructBegin('PingImpalaService_result')
  588. oprot.writeFieldStop()
  589. oprot.writeStructEnd()
  590. def validate(self):
  591. return
  592. def __repr__(self):
  593. L = ['%s=%r' % (key, value)
  594. for key, value in self.__dict__.iteritems()]
  595. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  596. def __eq__(self, other):
  597. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  598. def __ne__(self, other):
  599. return not (self == other)