BeeswaxService.py 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712
  1. #
  2. # Autogenerated by Thrift
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. from thrift.Thrift import *
  7. from ttypes import *
  8. from thrift.Thrift import TProcessor
  9. from thrift.transport import TTransport
  10. from thrift.protocol import TBinaryProtocol, TProtocol
  11. try:
  12. from thrift.protocol import fastbinary
  13. except:
  14. fastbinary = None
  15. class Iface(object):
  16. def query(self, query):
  17. """
  18. Submit a query and return a handle (QueryHandle). The query runs asynchronously.
  19. Parameters:
  20. - query
  21. """
  22. pass
  23. def explain(self, query):
  24. """
  25. Get the query plan for a query.
  26. Parameters:
  27. - query
  28. """
  29. pass
  30. def fetch(self, query_id, start_over):
  31. """
  32. Get the results of a query. This is non-blocking. Caller should check
  33. Results.ready to determine if the results are in yet.
  34. Parameters:
  35. - query_id
  36. - start_over
  37. """
  38. pass
  39. def get_state(self, handle):
  40. """
  41. Get the state of the query
  42. Parameters:
  43. - handle
  44. """
  45. pass
  46. def get_results_metadata(self, handle):
  47. """
  48. Get the result metadata
  49. Parameters:
  50. - handle
  51. """
  52. pass
  53. def echo(self, s):
  54. """
  55. Used to test connection to server. A "noop" command.
  56. Parameters:
  57. - s
  58. """
  59. pass
  60. def dump_config(self, ):
  61. """
  62. Returns a string representation of the configuration object being used.
  63. Handy for debugging.
  64. """
  65. pass
  66. def get_log(self, context):
  67. """
  68. Get the log messages related to the given context.
  69. Parameters:
  70. - context
  71. """
  72. pass
  73. def get_default_configuration(self, include_hadoop):
  74. """
  75. Parameters:
  76. - include_hadoop
  77. """
  78. pass
  79. class Client(Iface):
  80. def __init__(self, iprot, oprot=None):
  81. self._iprot = self._oprot = iprot
  82. if oprot != None:
  83. self._oprot = oprot
  84. self._seqid = 0
  85. def query(self, query):
  86. """
  87. Submit a query and return a handle (QueryHandle). The query runs asynchronously.
  88. Parameters:
  89. - query
  90. """
  91. self.send_query(query)
  92. return self.recv_query()
  93. def send_query(self, query):
  94. self._oprot.writeMessageBegin('query', TMessageType.CALL, self._seqid)
  95. args = query_args()
  96. args.query = query
  97. args.write(self._oprot)
  98. self._oprot.writeMessageEnd()
  99. self._oprot.trans.flush()
  100. def recv_query(self, ):
  101. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  102. if mtype == TMessageType.EXCEPTION:
  103. x = TApplicationException()
  104. x.read(self._iprot)
  105. self._iprot.readMessageEnd()
  106. raise x
  107. result = query_result()
  108. result.read(self._iprot)
  109. self._iprot.readMessageEnd()
  110. if result.success != None:
  111. return result.success
  112. if result.error != None:
  113. raise result.error
  114. raise TApplicationException(TApplicationException.MISSING_RESULT, "query failed: unknown result");
  115. def explain(self, query):
  116. """
  117. Get the query plan for a query.
  118. Parameters:
  119. - query
  120. """
  121. self.send_explain(query)
  122. return self.recv_explain()
  123. def send_explain(self, query):
  124. self._oprot.writeMessageBegin('explain', TMessageType.CALL, self._seqid)
  125. args = explain_args()
  126. args.query = query
  127. args.write(self._oprot)
  128. self._oprot.writeMessageEnd()
  129. self._oprot.trans.flush()
  130. def recv_explain(self, ):
  131. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  132. if mtype == TMessageType.EXCEPTION:
  133. x = TApplicationException()
  134. x.read(self._iprot)
  135. self._iprot.readMessageEnd()
  136. raise x
  137. result = explain_result()
  138. result.read(self._iprot)
  139. self._iprot.readMessageEnd()
  140. if result.success != None:
  141. return result.success
  142. if result.error != None:
  143. raise result.error
  144. raise TApplicationException(TApplicationException.MISSING_RESULT, "explain failed: unknown result");
  145. def fetch(self, query_id, start_over):
  146. """
  147. Get the results of a query. This is non-blocking. Caller should check
  148. Results.ready to determine if the results are in yet.
  149. Parameters:
  150. - query_id
  151. - start_over
  152. """
  153. self.send_fetch(query_id, start_over)
  154. return self.recv_fetch()
  155. def send_fetch(self, query_id, start_over):
  156. self._oprot.writeMessageBegin('fetch', TMessageType.CALL, self._seqid)
  157. args = fetch_args()
  158. args.query_id = query_id
  159. args.start_over = start_over
  160. args.write(self._oprot)
  161. self._oprot.writeMessageEnd()
  162. self._oprot.trans.flush()
  163. def recv_fetch(self, ):
  164. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  165. if mtype == TMessageType.EXCEPTION:
  166. x = TApplicationException()
  167. x.read(self._iprot)
  168. self._iprot.readMessageEnd()
  169. raise x
  170. result = fetch_result()
  171. result.read(self._iprot)
  172. self._iprot.readMessageEnd()
  173. if result.success != None:
  174. return result.success
  175. if result.error != None:
  176. raise result.error
  177. if result.error2 != None:
  178. raise result.error2
  179. raise TApplicationException(TApplicationException.MISSING_RESULT, "fetch failed: unknown result");
  180. def get_state(self, handle):
  181. """
  182. Get the state of the query
  183. Parameters:
  184. - handle
  185. """
  186. self.send_get_state(handle)
  187. return self.recv_get_state()
  188. def send_get_state(self, handle):
  189. self._oprot.writeMessageBegin('get_state', TMessageType.CALL, self._seqid)
  190. args = get_state_args()
  191. args.handle = handle
  192. args.write(self._oprot)
  193. self._oprot.writeMessageEnd()
  194. self._oprot.trans.flush()
  195. def recv_get_state(self, ):
  196. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  197. if mtype == TMessageType.EXCEPTION:
  198. x = TApplicationException()
  199. x.read(self._iprot)
  200. self._iprot.readMessageEnd()
  201. raise x
  202. result = get_state_result()
  203. result.read(self._iprot)
  204. self._iprot.readMessageEnd()
  205. if result.success != None:
  206. return result.success
  207. if result.error != None:
  208. raise result.error
  209. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_state failed: unknown result");
  210. def get_results_metadata(self, handle):
  211. """
  212. Get the result metadata
  213. Parameters:
  214. - handle
  215. """
  216. self.send_get_results_metadata(handle)
  217. return self.recv_get_results_metadata()
  218. def send_get_results_metadata(self, handle):
  219. self._oprot.writeMessageBegin('get_results_metadata', TMessageType.CALL, self._seqid)
  220. args = get_results_metadata_args()
  221. args.handle = handle
  222. args.write(self._oprot)
  223. self._oprot.writeMessageEnd()
  224. self._oprot.trans.flush()
  225. def recv_get_results_metadata(self, ):
  226. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  227. if mtype == TMessageType.EXCEPTION:
  228. x = TApplicationException()
  229. x.read(self._iprot)
  230. self._iprot.readMessageEnd()
  231. raise x
  232. result = get_results_metadata_result()
  233. result.read(self._iprot)
  234. self._iprot.readMessageEnd()
  235. if result.success != None:
  236. return result.success
  237. if result.error != None:
  238. raise result.error
  239. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_results_metadata failed: unknown result");
  240. def echo(self, s):
  241. """
  242. Used to test connection to server. A "noop" command.
  243. Parameters:
  244. - s
  245. """
  246. self.send_echo(s)
  247. return self.recv_echo()
  248. def send_echo(self, s):
  249. self._oprot.writeMessageBegin('echo', TMessageType.CALL, self._seqid)
  250. args = echo_args()
  251. args.s = s
  252. args.write(self._oprot)
  253. self._oprot.writeMessageEnd()
  254. self._oprot.trans.flush()
  255. def recv_echo(self, ):
  256. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  257. if mtype == TMessageType.EXCEPTION:
  258. x = TApplicationException()
  259. x.read(self._iprot)
  260. self._iprot.readMessageEnd()
  261. raise x
  262. result = echo_result()
  263. result.read(self._iprot)
  264. self._iprot.readMessageEnd()
  265. if result.success != None:
  266. return result.success
  267. raise TApplicationException(TApplicationException.MISSING_RESULT, "echo failed: unknown result");
  268. def dump_config(self, ):
  269. """
  270. Returns a string representation of the configuration object being used.
  271. Handy for debugging.
  272. """
  273. self.send_dump_config()
  274. return self.recv_dump_config()
  275. def send_dump_config(self, ):
  276. self._oprot.writeMessageBegin('dump_config', TMessageType.CALL, self._seqid)
  277. args = dump_config_args()
  278. args.write(self._oprot)
  279. self._oprot.writeMessageEnd()
  280. self._oprot.trans.flush()
  281. def recv_dump_config(self, ):
  282. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  283. if mtype == TMessageType.EXCEPTION:
  284. x = TApplicationException()
  285. x.read(self._iprot)
  286. self._iprot.readMessageEnd()
  287. raise x
  288. result = dump_config_result()
  289. result.read(self._iprot)
  290. self._iprot.readMessageEnd()
  291. if result.success != None:
  292. return result.success
  293. raise TApplicationException(TApplicationException.MISSING_RESULT, "dump_config failed: unknown result");
  294. def get_log(self, context):
  295. """
  296. Get the log messages related to the given context.
  297. Parameters:
  298. - context
  299. """
  300. self.send_get_log(context)
  301. return self.recv_get_log()
  302. def send_get_log(self, context):
  303. self._oprot.writeMessageBegin('get_log', TMessageType.CALL, self._seqid)
  304. args = get_log_args()
  305. args.context = context
  306. args.write(self._oprot)
  307. self._oprot.writeMessageEnd()
  308. self._oprot.trans.flush()
  309. def recv_get_log(self, ):
  310. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  311. if mtype == TMessageType.EXCEPTION:
  312. x = TApplicationException()
  313. x.read(self._iprot)
  314. self._iprot.readMessageEnd()
  315. raise x
  316. result = get_log_result()
  317. result.read(self._iprot)
  318. self._iprot.readMessageEnd()
  319. if result.success != None:
  320. return result.success
  321. if result.error != None:
  322. raise result.error
  323. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_log failed: unknown result");
  324. def get_default_configuration(self, include_hadoop):
  325. """
  326. Parameters:
  327. - include_hadoop
  328. """
  329. self.send_get_default_configuration(include_hadoop)
  330. return self.recv_get_default_configuration()
  331. def send_get_default_configuration(self, include_hadoop):
  332. self._oprot.writeMessageBegin('get_default_configuration', TMessageType.CALL, self._seqid)
  333. args = get_default_configuration_args()
  334. args.include_hadoop = include_hadoop
  335. args.write(self._oprot)
  336. self._oprot.writeMessageEnd()
  337. self._oprot.trans.flush()
  338. def recv_get_default_configuration(self, ):
  339. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  340. if mtype == TMessageType.EXCEPTION:
  341. x = TApplicationException()
  342. x.read(self._iprot)
  343. self._iprot.readMessageEnd()
  344. raise x
  345. result = get_default_configuration_result()
  346. result.read(self._iprot)
  347. self._iprot.readMessageEnd()
  348. if result.success != None:
  349. return result.success
  350. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_default_configuration failed: unknown result");
  351. class Processor(Iface, TProcessor):
  352. def __init__(self, handler):
  353. self._handler = handler
  354. self._processMap = {}
  355. self._processMap["query"] = Processor.process_query
  356. self._processMap["explain"] = Processor.process_explain
  357. self._processMap["fetch"] = Processor.process_fetch
  358. self._processMap["get_state"] = Processor.process_get_state
  359. self._processMap["get_results_metadata"] = Processor.process_get_results_metadata
  360. self._processMap["echo"] = Processor.process_echo
  361. self._processMap["dump_config"] = Processor.process_dump_config
  362. self._processMap["get_log"] = Processor.process_get_log
  363. self._processMap["get_default_configuration"] = Processor.process_get_default_configuration
  364. def process(self, iprot, oprot):
  365. (name, type, seqid) = iprot.readMessageBegin()
  366. if name not in self._processMap:
  367. iprot.skip(TType.STRUCT)
  368. iprot.readMessageEnd()
  369. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  370. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  371. x.write(oprot)
  372. oprot.writeMessageEnd()
  373. oprot.trans.flush()
  374. return
  375. else:
  376. self._processMap[name](self, seqid, iprot, oprot)
  377. return True
  378. def process_query(self, seqid, iprot, oprot):
  379. args = query_args()
  380. args.read(iprot)
  381. iprot.readMessageEnd()
  382. result = query_result()
  383. try:
  384. result.success = self._handler.query(args.query)
  385. except BeeswaxException, error:
  386. result.error = error
  387. oprot.writeMessageBegin("query", TMessageType.REPLY, seqid)
  388. result.write(oprot)
  389. oprot.writeMessageEnd()
  390. oprot.trans.flush()
  391. def process_explain(self, seqid, iprot, oprot):
  392. args = explain_args()
  393. args.read(iprot)
  394. iprot.readMessageEnd()
  395. result = explain_result()
  396. try:
  397. result.success = self._handler.explain(args.query)
  398. except BeeswaxException, error:
  399. result.error = error
  400. oprot.writeMessageBegin("explain", TMessageType.REPLY, seqid)
  401. result.write(oprot)
  402. oprot.writeMessageEnd()
  403. oprot.trans.flush()
  404. def process_fetch(self, seqid, iprot, oprot):
  405. args = fetch_args()
  406. args.read(iprot)
  407. iprot.readMessageEnd()
  408. result = fetch_result()
  409. try:
  410. result.success = self._handler.fetch(args.query_id, args.start_over)
  411. except QueryNotFoundException, error:
  412. result.error = error
  413. except BeeswaxException, error2:
  414. result.error2 = error2
  415. oprot.writeMessageBegin("fetch", TMessageType.REPLY, seqid)
  416. result.write(oprot)
  417. oprot.writeMessageEnd()
  418. oprot.trans.flush()
  419. def process_get_state(self, seqid, iprot, oprot):
  420. args = get_state_args()
  421. args.read(iprot)
  422. iprot.readMessageEnd()
  423. result = get_state_result()
  424. try:
  425. result.success = self._handler.get_state(args.handle)
  426. except QueryNotFoundException, error:
  427. result.error = error
  428. oprot.writeMessageBegin("get_state", TMessageType.REPLY, seqid)
  429. result.write(oprot)
  430. oprot.writeMessageEnd()
  431. oprot.trans.flush()
  432. def process_get_results_metadata(self, seqid, iprot, oprot):
  433. args = get_results_metadata_args()
  434. args.read(iprot)
  435. iprot.readMessageEnd()
  436. result = get_results_metadata_result()
  437. try:
  438. result.success = self._handler.get_results_metadata(args.handle)
  439. except QueryNotFoundException, error:
  440. result.error = error
  441. oprot.writeMessageBegin("get_results_metadata", TMessageType.REPLY, seqid)
  442. result.write(oprot)
  443. oprot.writeMessageEnd()
  444. oprot.trans.flush()
  445. def process_echo(self, seqid, iprot, oprot):
  446. args = echo_args()
  447. args.read(iprot)
  448. iprot.readMessageEnd()
  449. result = echo_result()
  450. result.success = self._handler.echo(args.s)
  451. oprot.writeMessageBegin("echo", TMessageType.REPLY, seqid)
  452. result.write(oprot)
  453. oprot.writeMessageEnd()
  454. oprot.trans.flush()
  455. def process_dump_config(self, seqid, iprot, oprot):
  456. args = dump_config_args()
  457. args.read(iprot)
  458. iprot.readMessageEnd()
  459. result = dump_config_result()
  460. result.success = self._handler.dump_config()
  461. oprot.writeMessageBegin("dump_config", TMessageType.REPLY, seqid)
  462. result.write(oprot)
  463. oprot.writeMessageEnd()
  464. oprot.trans.flush()
  465. def process_get_log(self, seqid, iprot, oprot):
  466. args = get_log_args()
  467. args.read(iprot)
  468. iprot.readMessageEnd()
  469. result = get_log_result()
  470. try:
  471. result.success = self._handler.get_log(args.context)
  472. except QueryNotFoundException, error:
  473. result.error = error
  474. oprot.writeMessageBegin("get_log", TMessageType.REPLY, seqid)
  475. result.write(oprot)
  476. oprot.writeMessageEnd()
  477. oprot.trans.flush()
  478. def process_get_default_configuration(self, seqid, iprot, oprot):
  479. args = get_default_configuration_args()
  480. args.read(iprot)
  481. iprot.readMessageEnd()
  482. result = get_default_configuration_result()
  483. result.success = self._handler.get_default_configuration(args.include_hadoop)
  484. oprot.writeMessageBegin("get_default_configuration", TMessageType.REPLY, seqid)
  485. result.write(oprot)
  486. oprot.writeMessageEnd()
  487. oprot.trans.flush()
  488. # HELPER FUNCTIONS AND STRUCTURES
  489. class query_args(object):
  490. """
  491. Attributes:
  492. - query
  493. """
  494. thrift_spec = (
  495. None, # 0
  496. (1, TType.STRUCT, 'query', (Query, Query.thrift_spec), None, ), # 1
  497. )
  498. def __init__(self, query=None,):
  499. self.query = query
  500. def read(self, iprot):
  501. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  502. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  503. return
  504. iprot.readStructBegin()
  505. while True:
  506. (fname, ftype, fid) = iprot.readFieldBegin()
  507. if ftype == TType.STOP:
  508. break
  509. if fid == 1:
  510. if ftype == TType.STRUCT:
  511. self.query = Query()
  512. self.query.read(iprot)
  513. else:
  514. iprot.skip(ftype)
  515. else:
  516. iprot.skip(ftype)
  517. iprot.readFieldEnd()
  518. iprot.readStructEnd()
  519. def write(self, oprot):
  520. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  521. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  522. return
  523. oprot.writeStructBegin('query_args')
  524. if self.query != None:
  525. oprot.writeFieldBegin('query', TType.STRUCT, 1)
  526. self.query.write(oprot)
  527. oprot.writeFieldEnd()
  528. oprot.writeFieldStop()
  529. oprot.writeStructEnd()
  530. def validate(self):
  531. return
  532. def __repr__(self):
  533. L = ['%s=%r' % (key, value)
  534. for key, value in self.__dict__.iteritems()]
  535. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  536. def __eq__(self, other):
  537. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  538. def __ne__(self, other):
  539. return not (self == other)
  540. class query_result(object):
  541. """
  542. Attributes:
  543. - success
  544. - error
  545. """
  546. thrift_spec = (
  547. (0, TType.STRUCT, 'success', (QueryHandle, QueryHandle.thrift_spec), None, ), # 0
  548. (1, TType.STRUCT, 'error', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 1
  549. )
  550. def __init__(self, success=None, error=None,):
  551. self.success = success
  552. self.error = error
  553. def read(self, iprot):
  554. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  555. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  556. return
  557. iprot.readStructBegin()
  558. while True:
  559. (fname, ftype, fid) = iprot.readFieldBegin()
  560. if ftype == TType.STOP:
  561. break
  562. if fid == 0:
  563. if ftype == TType.STRUCT:
  564. self.success = QueryHandle()
  565. self.success.read(iprot)
  566. else:
  567. iprot.skip(ftype)
  568. elif fid == 1:
  569. if ftype == TType.STRUCT:
  570. self.error = BeeswaxException()
  571. self.error.read(iprot)
  572. else:
  573. iprot.skip(ftype)
  574. else:
  575. iprot.skip(ftype)
  576. iprot.readFieldEnd()
  577. iprot.readStructEnd()
  578. def write(self, oprot):
  579. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  580. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  581. return
  582. oprot.writeStructBegin('query_result')
  583. if self.success != None:
  584. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  585. self.success.write(oprot)
  586. oprot.writeFieldEnd()
  587. if self.error != None:
  588. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  589. self.error.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 explain_args(object):
  604. """
  605. Attributes:
  606. - query
  607. """
  608. thrift_spec = (
  609. None, # 0
  610. (1, TType.STRUCT, 'query', (Query, Query.thrift_spec), None, ), # 1
  611. )
  612. def __init__(self, query=None,):
  613. self.query = query
  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 = Query()
  626. self.query.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('explain_args')
  638. if self.query != None:
  639. oprot.writeFieldBegin('query', TType.STRUCT, 1)
  640. self.query.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 explain_result(object):
  655. """
  656. Attributes:
  657. - success
  658. - error
  659. """
  660. thrift_spec = (
  661. (0, TType.STRUCT, 'success', (QueryExplanation, QueryExplanation.thrift_spec), None, ), # 0
  662. (1, TType.STRUCT, 'error', (BeeswaxException, 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.STRUCT:
  678. self.success = QueryExplanation()
  679. self.success.read(iprot)
  680. else:
  681. iprot.skip(ftype)
  682. elif fid == 1:
  683. if ftype == TType.STRUCT:
  684. self.error = BeeswaxException()
  685. self.error.read(iprot)
  686. else:
  687. iprot.skip(ftype)
  688. else:
  689. iprot.skip(ftype)
  690. iprot.readFieldEnd()
  691. iprot.readStructEnd()
  692. def write(self, oprot):
  693. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  694. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  695. return
  696. oprot.writeStructBegin('explain_result')
  697. if self.success != None:
  698. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  699. self.success.write(oprot)
  700. oprot.writeFieldEnd()
  701. if self.error != None:
  702. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  703. self.error.write(oprot)
  704. oprot.writeFieldEnd()
  705. oprot.writeFieldStop()
  706. oprot.writeStructEnd()
  707. def validate(self):
  708. return
  709. def __repr__(self):
  710. L = ['%s=%r' % (key, value)
  711. for key, value in self.__dict__.iteritems()]
  712. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  713. def __eq__(self, other):
  714. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  715. def __ne__(self, other):
  716. return not (self == other)
  717. class fetch_args(object):
  718. """
  719. Attributes:
  720. - query_id
  721. - start_over
  722. """
  723. thrift_spec = (
  724. None, # 0
  725. (1, TType.STRUCT, 'query_id', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  726. (2, TType.BOOL, 'start_over', None, None, ), # 2
  727. )
  728. def __init__(self, query_id=None, start_over=None,):
  729. self.query_id = query_id
  730. self.start_over = start_over
  731. def read(self, iprot):
  732. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  733. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  734. return
  735. iprot.readStructBegin()
  736. while True:
  737. (fname, ftype, fid) = iprot.readFieldBegin()
  738. if ftype == TType.STOP:
  739. break
  740. if fid == 1:
  741. if ftype == TType.STRUCT:
  742. self.query_id = QueryHandle()
  743. self.query_id.read(iprot)
  744. else:
  745. iprot.skip(ftype)
  746. elif fid == 2:
  747. if ftype == TType.BOOL:
  748. self.start_over = iprot.readBool();
  749. else:
  750. iprot.skip(ftype)
  751. else:
  752. iprot.skip(ftype)
  753. iprot.readFieldEnd()
  754. iprot.readStructEnd()
  755. def write(self, oprot):
  756. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  757. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  758. return
  759. oprot.writeStructBegin('fetch_args')
  760. if self.query_id != None:
  761. oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
  762. self.query_id.write(oprot)
  763. oprot.writeFieldEnd()
  764. if self.start_over != None:
  765. oprot.writeFieldBegin('start_over', TType.BOOL, 2)
  766. oprot.writeBool(self.start_over)
  767. oprot.writeFieldEnd()
  768. oprot.writeFieldStop()
  769. oprot.writeStructEnd()
  770. def validate(self):
  771. return
  772. def __repr__(self):
  773. L = ['%s=%r' % (key, value)
  774. for key, value in self.__dict__.iteritems()]
  775. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  776. def __eq__(self, other):
  777. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  778. def __ne__(self, other):
  779. return not (self == other)
  780. class fetch_result(object):
  781. """
  782. Attributes:
  783. - success
  784. - error
  785. - error2
  786. """
  787. thrift_spec = (
  788. (0, TType.STRUCT, 'success', (Results, Results.thrift_spec), None, ), # 0
  789. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  790. (2, TType.STRUCT, 'error2', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 2
  791. )
  792. def __init__(self, success=None, error=None, error2=None,):
  793. self.success = success
  794. self.error = error
  795. self.error2 = error2
  796. def read(self, iprot):
  797. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  798. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  799. return
  800. iprot.readStructBegin()
  801. while True:
  802. (fname, ftype, fid) = iprot.readFieldBegin()
  803. if ftype == TType.STOP:
  804. break
  805. if fid == 0:
  806. if ftype == TType.STRUCT:
  807. self.success = Results()
  808. self.success.read(iprot)
  809. else:
  810. iprot.skip(ftype)
  811. elif fid == 1:
  812. if ftype == TType.STRUCT:
  813. self.error = QueryNotFoundException()
  814. self.error.read(iprot)
  815. else:
  816. iprot.skip(ftype)
  817. elif fid == 2:
  818. if ftype == TType.STRUCT:
  819. self.error2 = BeeswaxException()
  820. self.error2.read(iprot)
  821. else:
  822. iprot.skip(ftype)
  823. else:
  824. iprot.skip(ftype)
  825. iprot.readFieldEnd()
  826. iprot.readStructEnd()
  827. def write(self, oprot):
  828. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  829. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  830. return
  831. oprot.writeStructBegin('fetch_result')
  832. if self.success != None:
  833. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  834. self.success.write(oprot)
  835. oprot.writeFieldEnd()
  836. if self.error != None:
  837. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  838. self.error.write(oprot)
  839. oprot.writeFieldEnd()
  840. if self.error2 != None:
  841. oprot.writeFieldBegin('error2', TType.STRUCT, 2)
  842. self.error2.write(oprot)
  843. oprot.writeFieldEnd()
  844. oprot.writeFieldStop()
  845. oprot.writeStructEnd()
  846. def validate(self):
  847. return
  848. def __repr__(self):
  849. L = ['%s=%r' % (key, value)
  850. for key, value in self.__dict__.iteritems()]
  851. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  852. def __eq__(self, other):
  853. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  854. def __ne__(self, other):
  855. return not (self == other)
  856. class get_state_args(object):
  857. """
  858. Attributes:
  859. - handle
  860. """
  861. thrift_spec = (
  862. None, # 0
  863. (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  864. )
  865. def __init__(self, handle=None,):
  866. self.handle = handle
  867. def read(self, iprot):
  868. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  869. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  870. return
  871. iprot.readStructBegin()
  872. while True:
  873. (fname, ftype, fid) = iprot.readFieldBegin()
  874. if ftype == TType.STOP:
  875. break
  876. if fid == 1:
  877. if ftype == TType.STRUCT:
  878. self.handle = QueryHandle()
  879. self.handle.read(iprot)
  880. else:
  881. iprot.skip(ftype)
  882. else:
  883. iprot.skip(ftype)
  884. iprot.readFieldEnd()
  885. iprot.readStructEnd()
  886. def write(self, oprot):
  887. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  888. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  889. return
  890. oprot.writeStructBegin('get_state_args')
  891. if self.handle != None:
  892. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  893. self.handle.write(oprot)
  894. oprot.writeFieldEnd()
  895. oprot.writeFieldStop()
  896. oprot.writeStructEnd()
  897. def validate(self):
  898. return
  899. def __repr__(self):
  900. L = ['%s=%r' % (key, value)
  901. for key, value in self.__dict__.iteritems()]
  902. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  903. def __eq__(self, other):
  904. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  905. def __ne__(self, other):
  906. return not (self == other)
  907. class get_state_result(object):
  908. """
  909. Attributes:
  910. - success
  911. - error
  912. """
  913. thrift_spec = (
  914. (0, TType.I32, 'success', None, None, ), # 0
  915. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  916. )
  917. def __init__(self, success=None, error=None,):
  918. self.success = success
  919. self.error = error
  920. def read(self, iprot):
  921. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  922. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  923. return
  924. iprot.readStructBegin()
  925. while True:
  926. (fname, ftype, fid) = iprot.readFieldBegin()
  927. if ftype == TType.STOP:
  928. break
  929. if fid == 0:
  930. if ftype == TType.I32:
  931. self.success = iprot.readI32();
  932. else:
  933. iprot.skip(ftype)
  934. elif fid == 1:
  935. if ftype == TType.STRUCT:
  936. self.error = QueryNotFoundException()
  937. self.error.read(iprot)
  938. else:
  939. iprot.skip(ftype)
  940. else:
  941. iprot.skip(ftype)
  942. iprot.readFieldEnd()
  943. iprot.readStructEnd()
  944. def write(self, oprot):
  945. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  946. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  947. return
  948. oprot.writeStructBegin('get_state_result')
  949. if self.success != None:
  950. oprot.writeFieldBegin('success', TType.I32, 0)
  951. oprot.writeI32(self.success)
  952. oprot.writeFieldEnd()
  953. if self.error != None:
  954. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  955. self.error.write(oprot)
  956. oprot.writeFieldEnd()
  957. oprot.writeFieldStop()
  958. oprot.writeStructEnd()
  959. def validate(self):
  960. return
  961. def __repr__(self):
  962. L = ['%s=%r' % (key, value)
  963. for key, value in self.__dict__.iteritems()]
  964. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  965. def __eq__(self, other):
  966. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  967. def __ne__(self, other):
  968. return not (self == other)
  969. class get_results_metadata_args(object):
  970. """
  971. Attributes:
  972. - handle
  973. """
  974. thrift_spec = (
  975. None, # 0
  976. (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  977. )
  978. def __init__(self, handle=None,):
  979. self.handle = handle
  980. def read(self, iprot):
  981. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  982. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  983. return
  984. iprot.readStructBegin()
  985. while True:
  986. (fname, ftype, fid) = iprot.readFieldBegin()
  987. if ftype == TType.STOP:
  988. break
  989. if fid == 1:
  990. if ftype == TType.STRUCT:
  991. self.handle = QueryHandle()
  992. self.handle.read(iprot)
  993. else:
  994. iprot.skip(ftype)
  995. else:
  996. iprot.skip(ftype)
  997. iprot.readFieldEnd()
  998. iprot.readStructEnd()
  999. def write(self, oprot):
  1000. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1001. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1002. return
  1003. oprot.writeStructBegin('get_results_metadata_args')
  1004. if self.handle != None:
  1005. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  1006. self.handle.write(oprot)
  1007. oprot.writeFieldEnd()
  1008. oprot.writeFieldStop()
  1009. oprot.writeStructEnd()
  1010. def validate(self):
  1011. return
  1012. def __repr__(self):
  1013. L = ['%s=%r' % (key, value)
  1014. for key, value in self.__dict__.iteritems()]
  1015. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1016. def __eq__(self, other):
  1017. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1018. def __ne__(self, other):
  1019. return not (self == other)
  1020. class get_results_metadata_result(object):
  1021. """
  1022. Attributes:
  1023. - success
  1024. - error
  1025. """
  1026. thrift_spec = (
  1027. (0, TType.STRUCT, 'success', (ResultsMetadata, ResultsMetadata.thrift_spec), None, ), # 0
  1028. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  1029. )
  1030. def __init__(self, success=None, error=None,):
  1031. self.success = success
  1032. self.error = error
  1033. def read(self, iprot):
  1034. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1035. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1036. return
  1037. iprot.readStructBegin()
  1038. while True:
  1039. (fname, ftype, fid) = iprot.readFieldBegin()
  1040. if ftype == TType.STOP:
  1041. break
  1042. if fid == 0:
  1043. if ftype == TType.STRUCT:
  1044. self.success = ResultsMetadata()
  1045. self.success.read(iprot)
  1046. else:
  1047. iprot.skip(ftype)
  1048. elif fid == 1:
  1049. if ftype == TType.STRUCT:
  1050. self.error = QueryNotFoundException()
  1051. self.error.read(iprot)
  1052. else:
  1053. iprot.skip(ftype)
  1054. else:
  1055. iprot.skip(ftype)
  1056. iprot.readFieldEnd()
  1057. iprot.readStructEnd()
  1058. def write(self, oprot):
  1059. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1060. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1061. return
  1062. oprot.writeStructBegin('get_results_metadata_result')
  1063. if self.success != None:
  1064. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1065. self.success.write(oprot)
  1066. oprot.writeFieldEnd()
  1067. if self.error != None:
  1068. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1069. self.error.write(oprot)
  1070. oprot.writeFieldEnd()
  1071. oprot.writeFieldStop()
  1072. oprot.writeStructEnd()
  1073. def validate(self):
  1074. return
  1075. def __repr__(self):
  1076. L = ['%s=%r' % (key, value)
  1077. for key, value in self.__dict__.iteritems()]
  1078. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1079. def __eq__(self, other):
  1080. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1081. def __ne__(self, other):
  1082. return not (self == other)
  1083. class echo_args(object):
  1084. """
  1085. Attributes:
  1086. - s
  1087. """
  1088. thrift_spec = (
  1089. None, # 0
  1090. (1, TType.STRING, 's', None, None, ), # 1
  1091. )
  1092. def __init__(self, s=None,):
  1093. self.s = s
  1094. def read(self, iprot):
  1095. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1096. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1097. return
  1098. iprot.readStructBegin()
  1099. while True:
  1100. (fname, ftype, fid) = iprot.readFieldBegin()
  1101. if ftype == TType.STOP:
  1102. break
  1103. if fid == 1:
  1104. if ftype == TType.STRING:
  1105. self.s = iprot.readString();
  1106. else:
  1107. iprot.skip(ftype)
  1108. else:
  1109. iprot.skip(ftype)
  1110. iprot.readFieldEnd()
  1111. iprot.readStructEnd()
  1112. def write(self, oprot):
  1113. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1114. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1115. return
  1116. oprot.writeStructBegin('echo_args')
  1117. if self.s != None:
  1118. oprot.writeFieldBegin('s', TType.STRING, 1)
  1119. oprot.writeString(self.s)
  1120. oprot.writeFieldEnd()
  1121. oprot.writeFieldStop()
  1122. oprot.writeStructEnd()
  1123. def validate(self):
  1124. return
  1125. def __repr__(self):
  1126. L = ['%s=%r' % (key, value)
  1127. for key, value in self.__dict__.iteritems()]
  1128. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1129. def __eq__(self, other):
  1130. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1131. def __ne__(self, other):
  1132. return not (self == other)
  1133. class echo_result(object):
  1134. """
  1135. Attributes:
  1136. - success
  1137. """
  1138. thrift_spec = (
  1139. (0, TType.STRING, 'success', None, None, ), # 0
  1140. )
  1141. def __init__(self, success=None,):
  1142. self.success = success
  1143. def read(self, iprot):
  1144. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1145. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1146. return
  1147. iprot.readStructBegin()
  1148. while True:
  1149. (fname, ftype, fid) = iprot.readFieldBegin()
  1150. if ftype == TType.STOP:
  1151. break
  1152. if fid == 0:
  1153. if ftype == TType.STRING:
  1154. self.success = iprot.readString();
  1155. else:
  1156. iprot.skip(ftype)
  1157. else:
  1158. iprot.skip(ftype)
  1159. iprot.readFieldEnd()
  1160. iprot.readStructEnd()
  1161. def write(self, oprot):
  1162. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1163. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1164. return
  1165. oprot.writeStructBegin('echo_result')
  1166. if self.success != None:
  1167. oprot.writeFieldBegin('success', TType.STRING, 0)
  1168. oprot.writeString(self.success)
  1169. oprot.writeFieldEnd()
  1170. oprot.writeFieldStop()
  1171. oprot.writeStructEnd()
  1172. def validate(self):
  1173. return
  1174. def __repr__(self):
  1175. L = ['%s=%r' % (key, value)
  1176. for key, value in self.__dict__.iteritems()]
  1177. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1178. def __eq__(self, other):
  1179. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1180. def __ne__(self, other):
  1181. return not (self == other)
  1182. class dump_config_args(object):
  1183. thrift_spec = (
  1184. )
  1185. def read(self, iprot):
  1186. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1187. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1188. return
  1189. iprot.readStructBegin()
  1190. while True:
  1191. (fname, ftype, fid) = iprot.readFieldBegin()
  1192. if ftype == TType.STOP:
  1193. break
  1194. else:
  1195. iprot.skip(ftype)
  1196. iprot.readFieldEnd()
  1197. iprot.readStructEnd()
  1198. def write(self, oprot):
  1199. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1200. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1201. return
  1202. oprot.writeStructBegin('dump_config_args')
  1203. oprot.writeFieldStop()
  1204. oprot.writeStructEnd()
  1205. def validate(self):
  1206. return
  1207. def __repr__(self):
  1208. L = ['%s=%r' % (key, value)
  1209. for key, value in self.__dict__.iteritems()]
  1210. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1211. def __eq__(self, other):
  1212. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1213. def __ne__(self, other):
  1214. return not (self == other)
  1215. class dump_config_result(object):
  1216. """
  1217. Attributes:
  1218. - success
  1219. """
  1220. thrift_spec = (
  1221. (0, TType.STRING, 'success', None, None, ), # 0
  1222. )
  1223. def __init__(self, success=None,):
  1224. self.success = success
  1225. def read(self, iprot):
  1226. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1227. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1228. return
  1229. iprot.readStructBegin()
  1230. while True:
  1231. (fname, ftype, fid) = iprot.readFieldBegin()
  1232. if ftype == TType.STOP:
  1233. break
  1234. if fid == 0:
  1235. if ftype == TType.STRING:
  1236. self.success = iprot.readString();
  1237. else:
  1238. iprot.skip(ftype)
  1239. else:
  1240. iprot.skip(ftype)
  1241. iprot.readFieldEnd()
  1242. iprot.readStructEnd()
  1243. def write(self, oprot):
  1244. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1245. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1246. return
  1247. oprot.writeStructBegin('dump_config_result')
  1248. if self.success != None:
  1249. oprot.writeFieldBegin('success', TType.STRING, 0)
  1250. oprot.writeString(self.success)
  1251. oprot.writeFieldEnd()
  1252. oprot.writeFieldStop()
  1253. oprot.writeStructEnd()
  1254. def validate(self):
  1255. return
  1256. def __repr__(self):
  1257. L = ['%s=%r' % (key, value)
  1258. for key, value in self.__dict__.iteritems()]
  1259. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1260. def __eq__(self, other):
  1261. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1262. def __ne__(self, other):
  1263. return not (self == other)
  1264. class get_log_args(object):
  1265. """
  1266. Attributes:
  1267. - context
  1268. """
  1269. thrift_spec = (
  1270. None, # 0
  1271. (1, TType.STRING, 'context', None, None, ), # 1
  1272. )
  1273. def __init__(self, context=None,):
  1274. self.context = context
  1275. def read(self, iprot):
  1276. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1277. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1278. return
  1279. iprot.readStructBegin()
  1280. while True:
  1281. (fname, ftype, fid) = iprot.readFieldBegin()
  1282. if ftype == TType.STOP:
  1283. break
  1284. if fid == 1:
  1285. if ftype == TType.STRING:
  1286. self.context = iprot.readString();
  1287. else:
  1288. iprot.skip(ftype)
  1289. else:
  1290. iprot.skip(ftype)
  1291. iprot.readFieldEnd()
  1292. iprot.readStructEnd()
  1293. def write(self, oprot):
  1294. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1295. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1296. return
  1297. oprot.writeStructBegin('get_log_args')
  1298. if self.context != None:
  1299. oprot.writeFieldBegin('context', TType.STRING, 1)
  1300. oprot.writeString(self.context)
  1301. oprot.writeFieldEnd()
  1302. oprot.writeFieldStop()
  1303. oprot.writeStructEnd()
  1304. def validate(self):
  1305. return
  1306. def __repr__(self):
  1307. L = ['%s=%r' % (key, value)
  1308. for key, value in self.__dict__.iteritems()]
  1309. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1310. def __eq__(self, other):
  1311. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1312. def __ne__(self, other):
  1313. return not (self == other)
  1314. class get_log_result(object):
  1315. """
  1316. Attributes:
  1317. - success
  1318. - error
  1319. """
  1320. thrift_spec = (
  1321. (0, TType.STRING, 'success', None, None, ), # 0
  1322. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  1323. )
  1324. def __init__(self, success=None, error=None,):
  1325. self.success = success
  1326. self.error = error
  1327. def read(self, iprot):
  1328. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1329. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1330. return
  1331. iprot.readStructBegin()
  1332. while True:
  1333. (fname, ftype, fid) = iprot.readFieldBegin()
  1334. if ftype == TType.STOP:
  1335. break
  1336. if fid == 0:
  1337. if ftype == TType.STRING:
  1338. self.success = iprot.readString();
  1339. else:
  1340. iprot.skip(ftype)
  1341. elif fid == 1:
  1342. if ftype == TType.STRUCT:
  1343. self.error = QueryNotFoundException()
  1344. self.error.read(iprot)
  1345. else:
  1346. iprot.skip(ftype)
  1347. else:
  1348. iprot.skip(ftype)
  1349. iprot.readFieldEnd()
  1350. iprot.readStructEnd()
  1351. def write(self, oprot):
  1352. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1353. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1354. return
  1355. oprot.writeStructBegin('get_log_result')
  1356. if self.success != None:
  1357. oprot.writeFieldBegin('success', TType.STRING, 0)
  1358. oprot.writeString(self.success)
  1359. oprot.writeFieldEnd()
  1360. if self.error != None:
  1361. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1362. self.error.write(oprot)
  1363. oprot.writeFieldEnd()
  1364. oprot.writeFieldStop()
  1365. oprot.writeStructEnd()
  1366. def validate(self):
  1367. return
  1368. def __repr__(self):
  1369. L = ['%s=%r' % (key, value)
  1370. for key, value in self.__dict__.iteritems()]
  1371. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1372. def __eq__(self, other):
  1373. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1374. def __ne__(self, other):
  1375. return not (self == other)
  1376. class get_default_configuration_args(object):
  1377. """
  1378. Attributes:
  1379. - include_hadoop
  1380. """
  1381. thrift_spec = (
  1382. None, # 0
  1383. (1, TType.BOOL, 'include_hadoop', None, None, ), # 1
  1384. )
  1385. def __init__(self, include_hadoop=None,):
  1386. self.include_hadoop = include_hadoop
  1387. def read(self, iprot):
  1388. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1389. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1390. return
  1391. iprot.readStructBegin()
  1392. while True:
  1393. (fname, ftype, fid) = iprot.readFieldBegin()
  1394. if ftype == TType.STOP:
  1395. break
  1396. if fid == 1:
  1397. if ftype == TType.BOOL:
  1398. self.include_hadoop = iprot.readBool();
  1399. else:
  1400. iprot.skip(ftype)
  1401. else:
  1402. iprot.skip(ftype)
  1403. iprot.readFieldEnd()
  1404. iprot.readStructEnd()
  1405. def write(self, oprot):
  1406. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1407. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1408. return
  1409. oprot.writeStructBegin('get_default_configuration_args')
  1410. if self.include_hadoop != None:
  1411. oprot.writeFieldBegin('include_hadoop', TType.BOOL, 1)
  1412. oprot.writeBool(self.include_hadoop)
  1413. oprot.writeFieldEnd()
  1414. oprot.writeFieldStop()
  1415. oprot.writeStructEnd()
  1416. def validate(self):
  1417. return
  1418. def __repr__(self):
  1419. L = ['%s=%r' % (key, value)
  1420. for key, value in self.__dict__.iteritems()]
  1421. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1422. def __eq__(self, other):
  1423. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1424. def __ne__(self, other):
  1425. return not (self == other)
  1426. class get_default_configuration_result(object):
  1427. """
  1428. Attributes:
  1429. - success
  1430. """
  1431. thrift_spec = (
  1432. (0, TType.LIST, 'success', (TType.STRUCT,(ConfigVariable, ConfigVariable.thrift_spec)), None, ), # 0
  1433. )
  1434. def __init__(self, success=None,):
  1435. self.success = success
  1436. def read(self, iprot):
  1437. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1438. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1439. return
  1440. iprot.readStructBegin()
  1441. while True:
  1442. (fname, ftype, fid) = iprot.readFieldBegin()
  1443. if ftype == TType.STOP:
  1444. break
  1445. if fid == 0:
  1446. if ftype == TType.LIST:
  1447. self.success = []
  1448. (_etype24, _size21) = iprot.readListBegin()
  1449. for _i25 in xrange(_size21):
  1450. _elem26 = ConfigVariable()
  1451. _elem26.read(iprot)
  1452. self.success.append(_elem26)
  1453. iprot.readListEnd()
  1454. else:
  1455. iprot.skip(ftype)
  1456. else:
  1457. iprot.skip(ftype)
  1458. iprot.readFieldEnd()
  1459. iprot.readStructEnd()
  1460. def write(self, oprot):
  1461. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1462. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1463. return
  1464. oprot.writeStructBegin('get_default_configuration_result')
  1465. if self.success != None:
  1466. oprot.writeFieldBegin('success', TType.LIST, 0)
  1467. oprot.writeListBegin(TType.STRUCT, len(self.success))
  1468. for iter27 in self.success:
  1469. iter27.write(oprot)
  1470. oprot.writeListEnd()
  1471. oprot.writeFieldEnd()
  1472. oprot.writeFieldStop()
  1473. oprot.writeStructEnd()
  1474. def validate(self):
  1475. return
  1476. def __repr__(self):
  1477. L = ['%s=%r' % (key, value)
  1478. for key, value in self.__dict__.iteritems()]
  1479. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1480. def __eq__(self, other):
  1481. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1482. def __ne__(self, other):
  1483. return not (self == other)