BeeswaxService.py 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660
  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
  11. try:
  12. from thrift.protocol import fastbinary
  13. except:
  14. fastbinary = None
  15. class Iface:
  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 __repr__(self):
  531. L = ['%s=%r' % (key, value)
  532. for key, value in self.__dict__.iteritems()]
  533. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  534. def __eq__(self, other):
  535. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  536. def __ne__(self, other):
  537. return not (self == other)
  538. class query_result(object):
  539. """
  540. Attributes:
  541. - success
  542. - error
  543. """
  544. thrift_spec = (
  545. (0, TType.STRUCT, 'success', (QueryHandle, QueryHandle.thrift_spec), None, ), # 0
  546. (1, TType.STRUCT, 'error', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 1
  547. )
  548. def __init__(self, success=None, error=None,):
  549. self.success = success
  550. self.error = error
  551. def read(self, iprot):
  552. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  553. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  554. return
  555. iprot.readStructBegin()
  556. while True:
  557. (fname, ftype, fid) = iprot.readFieldBegin()
  558. if ftype == TType.STOP:
  559. break
  560. if fid == 0:
  561. if ftype == TType.STRUCT:
  562. self.success = QueryHandle()
  563. self.success.read(iprot)
  564. else:
  565. iprot.skip(ftype)
  566. elif fid == 1:
  567. if ftype == TType.STRUCT:
  568. self.error = BeeswaxException()
  569. self.error.read(iprot)
  570. else:
  571. iprot.skip(ftype)
  572. else:
  573. iprot.skip(ftype)
  574. iprot.readFieldEnd()
  575. iprot.readStructEnd()
  576. def write(self, oprot):
  577. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  578. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  579. return
  580. oprot.writeStructBegin('query_result')
  581. if self.success != None:
  582. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  583. self.success.write(oprot)
  584. oprot.writeFieldEnd()
  585. if self.error != None:
  586. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  587. self.error.write(oprot)
  588. oprot.writeFieldEnd()
  589. oprot.writeFieldStop()
  590. oprot.writeStructEnd()
  591. def __repr__(self):
  592. L = ['%s=%r' % (key, value)
  593. for key, value in self.__dict__.iteritems()]
  594. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  595. def __eq__(self, other):
  596. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  597. def __ne__(self, other):
  598. return not (self == other)
  599. class explain_args(object):
  600. """
  601. Attributes:
  602. - query
  603. """
  604. thrift_spec = (
  605. None, # 0
  606. (1, TType.STRUCT, 'query', (Query, Query.thrift_spec), None, ), # 1
  607. )
  608. def __init__(self, query=None,):
  609. self.query = query
  610. def read(self, iprot):
  611. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  612. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  613. return
  614. iprot.readStructBegin()
  615. while True:
  616. (fname, ftype, fid) = iprot.readFieldBegin()
  617. if ftype == TType.STOP:
  618. break
  619. if fid == 1:
  620. if ftype == TType.STRUCT:
  621. self.query = Query()
  622. self.query.read(iprot)
  623. else:
  624. iprot.skip(ftype)
  625. else:
  626. iprot.skip(ftype)
  627. iprot.readFieldEnd()
  628. iprot.readStructEnd()
  629. def write(self, oprot):
  630. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  631. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  632. return
  633. oprot.writeStructBegin('explain_args')
  634. if self.query != None:
  635. oprot.writeFieldBegin('query', TType.STRUCT, 1)
  636. self.query.write(oprot)
  637. oprot.writeFieldEnd()
  638. oprot.writeFieldStop()
  639. oprot.writeStructEnd()
  640. def __repr__(self):
  641. L = ['%s=%r' % (key, value)
  642. for key, value in self.__dict__.iteritems()]
  643. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  644. def __eq__(self, other):
  645. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  646. def __ne__(self, other):
  647. return not (self == other)
  648. class explain_result(object):
  649. """
  650. Attributes:
  651. - success
  652. - error
  653. """
  654. thrift_spec = (
  655. (0, TType.STRUCT, 'success', (QueryExplanation, QueryExplanation.thrift_spec), None, ), # 0
  656. (1, TType.STRUCT, 'error', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 1
  657. )
  658. def __init__(self, success=None, error=None,):
  659. self.success = success
  660. self.error = error
  661. def read(self, iprot):
  662. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  663. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  664. return
  665. iprot.readStructBegin()
  666. while True:
  667. (fname, ftype, fid) = iprot.readFieldBegin()
  668. if ftype == TType.STOP:
  669. break
  670. if fid == 0:
  671. if ftype == TType.STRUCT:
  672. self.success = QueryExplanation()
  673. self.success.read(iprot)
  674. else:
  675. iprot.skip(ftype)
  676. elif fid == 1:
  677. if ftype == TType.STRUCT:
  678. self.error = BeeswaxException()
  679. self.error.read(iprot)
  680. else:
  681. iprot.skip(ftype)
  682. else:
  683. iprot.skip(ftype)
  684. iprot.readFieldEnd()
  685. iprot.readStructEnd()
  686. def write(self, oprot):
  687. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  688. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  689. return
  690. oprot.writeStructBegin('explain_result')
  691. if self.success != None:
  692. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  693. self.success.write(oprot)
  694. oprot.writeFieldEnd()
  695. if self.error != None:
  696. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  697. self.error.write(oprot)
  698. oprot.writeFieldEnd()
  699. oprot.writeFieldStop()
  700. oprot.writeStructEnd()
  701. def __repr__(self):
  702. L = ['%s=%r' % (key, value)
  703. for key, value in self.__dict__.iteritems()]
  704. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  705. def __eq__(self, other):
  706. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  707. def __ne__(self, other):
  708. return not (self == other)
  709. class fetch_args(object):
  710. """
  711. Attributes:
  712. - query_id
  713. - start_over
  714. """
  715. thrift_spec = (
  716. None, # 0
  717. (1, TType.STRUCT, 'query_id', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  718. (2, TType.BOOL, 'start_over', None, None, ), # 2
  719. )
  720. def __init__(self, query_id=None, start_over=None,):
  721. self.query_id = query_id
  722. self.start_over = start_over
  723. def read(self, iprot):
  724. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  725. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  726. return
  727. iprot.readStructBegin()
  728. while True:
  729. (fname, ftype, fid) = iprot.readFieldBegin()
  730. if ftype == TType.STOP:
  731. break
  732. if fid == 1:
  733. if ftype == TType.STRUCT:
  734. self.query_id = QueryHandle()
  735. self.query_id.read(iprot)
  736. else:
  737. iprot.skip(ftype)
  738. elif fid == 2:
  739. if ftype == TType.BOOL:
  740. self.start_over = iprot.readBool();
  741. else:
  742. iprot.skip(ftype)
  743. else:
  744. iprot.skip(ftype)
  745. iprot.readFieldEnd()
  746. iprot.readStructEnd()
  747. def write(self, oprot):
  748. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  749. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  750. return
  751. oprot.writeStructBegin('fetch_args')
  752. if self.query_id != None:
  753. oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
  754. self.query_id.write(oprot)
  755. oprot.writeFieldEnd()
  756. if self.start_over != None:
  757. oprot.writeFieldBegin('start_over', TType.BOOL, 2)
  758. oprot.writeBool(self.start_over)
  759. oprot.writeFieldEnd()
  760. oprot.writeFieldStop()
  761. oprot.writeStructEnd()
  762. def __repr__(self):
  763. L = ['%s=%r' % (key, value)
  764. for key, value in self.__dict__.iteritems()]
  765. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  766. def __eq__(self, other):
  767. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  768. def __ne__(self, other):
  769. return not (self == other)
  770. class fetch_result(object):
  771. """
  772. Attributes:
  773. - success
  774. - error
  775. - error2
  776. """
  777. thrift_spec = (
  778. (0, TType.STRUCT, 'success', (Results, Results.thrift_spec), None, ), # 0
  779. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  780. (2, TType.STRUCT, 'error2', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 2
  781. )
  782. def __init__(self, success=None, error=None, error2=None,):
  783. self.success = success
  784. self.error = error
  785. self.error2 = error2
  786. def read(self, iprot):
  787. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  788. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  789. return
  790. iprot.readStructBegin()
  791. while True:
  792. (fname, ftype, fid) = iprot.readFieldBegin()
  793. if ftype == TType.STOP:
  794. break
  795. if fid == 0:
  796. if ftype == TType.STRUCT:
  797. self.success = Results()
  798. self.success.read(iprot)
  799. else:
  800. iprot.skip(ftype)
  801. elif fid == 1:
  802. if ftype == TType.STRUCT:
  803. self.error = QueryNotFoundException()
  804. self.error.read(iprot)
  805. else:
  806. iprot.skip(ftype)
  807. elif fid == 2:
  808. if ftype == TType.STRUCT:
  809. self.error2 = BeeswaxException()
  810. self.error2.read(iprot)
  811. else:
  812. iprot.skip(ftype)
  813. else:
  814. iprot.skip(ftype)
  815. iprot.readFieldEnd()
  816. iprot.readStructEnd()
  817. def write(self, oprot):
  818. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  819. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  820. return
  821. oprot.writeStructBegin('fetch_result')
  822. if self.success != None:
  823. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  824. self.success.write(oprot)
  825. oprot.writeFieldEnd()
  826. if self.error != None:
  827. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  828. self.error.write(oprot)
  829. oprot.writeFieldEnd()
  830. if self.error2 != None:
  831. oprot.writeFieldBegin('error2', TType.STRUCT, 2)
  832. self.error2.write(oprot)
  833. oprot.writeFieldEnd()
  834. oprot.writeFieldStop()
  835. oprot.writeStructEnd()
  836. def __repr__(self):
  837. L = ['%s=%r' % (key, value)
  838. for key, value in self.__dict__.iteritems()]
  839. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  840. def __eq__(self, other):
  841. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  842. def __ne__(self, other):
  843. return not (self == other)
  844. class get_state_args(object):
  845. """
  846. Attributes:
  847. - handle
  848. """
  849. thrift_spec = (
  850. None, # 0
  851. (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  852. )
  853. def __init__(self, handle=None,):
  854. self.handle = handle
  855. def read(self, iprot):
  856. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  857. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  858. return
  859. iprot.readStructBegin()
  860. while True:
  861. (fname, ftype, fid) = iprot.readFieldBegin()
  862. if ftype == TType.STOP:
  863. break
  864. if fid == 1:
  865. if ftype == TType.STRUCT:
  866. self.handle = QueryHandle()
  867. self.handle.read(iprot)
  868. else:
  869. iprot.skip(ftype)
  870. else:
  871. iprot.skip(ftype)
  872. iprot.readFieldEnd()
  873. iprot.readStructEnd()
  874. def write(self, oprot):
  875. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  876. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  877. return
  878. oprot.writeStructBegin('get_state_args')
  879. if self.handle != None:
  880. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  881. self.handle.write(oprot)
  882. oprot.writeFieldEnd()
  883. oprot.writeFieldStop()
  884. oprot.writeStructEnd()
  885. def __repr__(self):
  886. L = ['%s=%r' % (key, value)
  887. for key, value in self.__dict__.iteritems()]
  888. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  889. def __eq__(self, other):
  890. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  891. def __ne__(self, other):
  892. return not (self == other)
  893. class get_state_result(object):
  894. """
  895. Attributes:
  896. - success
  897. - error
  898. """
  899. thrift_spec = (
  900. (0, TType.I32, 'success', None, None, ), # 0
  901. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  902. )
  903. def __init__(self, success=None, error=None,):
  904. self.success = success
  905. self.error = error
  906. def read(self, iprot):
  907. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  908. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  909. return
  910. iprot.readStructBegin()
  911. while True:
  912. (fname, ftype, fid) = iprot.readFieldBegin()
  913. if ftype == TType.STOP:
  914. break
  915. if fid == 0:
  916. if ftype == TType.I32:
  917. self.success = iprot.readI32();
  918. else:
  919. iprot.skip(ftype)
  920. elif fid == 1:
  921. if ftype == TType.STRUCT:
  922. self.error = QueryNotFoundException()
  923. self.error.read(iprot)
  924. else:
  925. iprot.skip(ftype)
  926. else:
  927. iprot.skip(ftype)
  928. iprot.readFieldEnd()
  929. iprot.readStructEnd()
  930. def write(self, oprot):
  931. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  932. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  933. return
  934. oprot.writeStructBegin('get_state_result')
  935. if self.success != None:
  936. oprot.writeFieldBegin('success', TType.I32, 0)
  937. oprot.writeI32(self.success)
  938. oprot.writeFieldEnd()
  939. if self.error != None:
  940. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  941. self.error.write(oprot)
  942. oprot.writeFieldEnd()
  943. oprot.writeFieldStop()
  944. oprot.writeStructEnd()
  945. def __repr__(self):
  946. L = ['%s=%r' % (key, value)
  947. for key, value in self.__dict__.iteritems()]
  948. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  949. def __eq__(self, other):
  950. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  951. def __ne__(self, other):
  952. return not (self == other)
  953. class get_results_metadata_args(object):
  954. """
  955. Attributes:
  956. - handle
  957. """
  958. thrift_spec = (
  959. None, # 0
  960. (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  961. )
  962. def __init__(self, handle=None,):
  963. self.handle = handle
  964. def read(self, iprot):
  965. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  966. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  967. return
  968. iprot.readStructBegin()
  969. while True:
  970. (fname, ftype, fid) = iprot.readFieldBegin()
  971. if ftype == TType.STOP:
  972. break
  973. if fid == 1:
  974. if ftype == TType.STRUCT:
  975. self.handle = QueryHandle()
  976. self.handle.read(iprot)
  977. else:
  978. iprot.skip(ftype)
  979. else:
  980. iprot.skip(ftype)
  981. iprot.readFieldEnd()
  982. iprot.readStructEnd()
  983. def write(self, oprot):
  984. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  985. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  986. return
  987. oprot.writeStructBegin('get_results_metadata_args')
  988. if self.handle != None:
  989. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  990. self.handle.write(oprot)
  991. oprot.writeFieldEnd()
  992. oprot.writeFieldStop()
  993. oprot.writeStructEnd()
  994. def __repr__(self):
  995. L = ['%s=%r' % (key, value)
  996. for key, value in self.__dict__.iteritems()]
  997. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  998. def __eq__(self, other):
  999. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1000. def __ne__(self, other):
  1001. return not (self == other)
  1002. class get_results_metadata_result(object):
  1003. """
  1004. Attributes:
  1005. - success
  1006. - error
  1007. """
  1008. thrift_spec = (
  1009. (0, TType.STRUCT, 'success', (ResultsMetadata, ResultsMetadata.thrift_spec), None, ), # 0
  1010. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  1011. )
  1012. def __init__(self, success=None, error=None,):
  1013. self.success = success
  1014. self.error = error
  1015. def read(self, iprot):
  1016. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1017. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1018. return
  1019. iprot.readStructBegin()
  1020. while True:
  1021. (fname, ftype, fid) = iprot.readFieldBegin()
  1022. if ftype == TType.STOP:
  1023. break
  1024. if fid == 0:
  1025. if ftype == TType.STRUCT:
  1026. self.success = ResultsMetadata()
  1027. self.success.read(iprot)
  1028. else:
  1029. iprot.skip(ftype)
  1030. elif fid == 1:
  1031. if ftype == TType.STRUCT:
  1032. self.error = QueryNotFoundException()
  1033. self.error.read(iprot)
  1034. else:
  1035. iprot.skip(ftype)
  1036. else:
  1037. iprot.skip(ftype)
  1038. iprot.readFieldEnd()
  1039. iprot.readStructEnd()
  1040. def write(self, oprot):
  1041. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1042. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1043. return
  1044. oprot.writeStructBegin('get_results_metadata_result')
  1045. if self.success != None:
  1046. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1047. self.success.write(oprot)
  1048. oprot.writeFieldEnd()
  1049. if self.error != None:
  1050. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1051. self.error.write(oprot)
  1052. oprot.writeFieldEnd()
  1053. oprot.writeFieldStop()
  1054. oprot.writeStructEnd()
  1055. def __repr__(self):
  1056. L = ['%s=%r' % (key, value)
  1057. for key, value in self.__dict__.iteritems()]
  1058. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1059. def __eq__(self, other):
  1060. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1061. def __ne__(self, other):
  1062. return not (self == other)
  1063. class echo_args(object):
  1064. """
  1065. Attributes:
  1066. - s
  1067. """
  1068. thrift_spec = (
  1069. None, # 0
  1070. (1, TType.STRING, 's', None, None, ), # 1
  1071. )
  1072. def __init__(self, s=None,):
  1073. self.s = s
  1074. def read(self, iprot):
  1075. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1076. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1077. return
  1078. iprot.readStructBegin()
  1079. while True:
  1080. (fname, ftype, fid) = iprot.readFieldBegin()
  1081. if ftype == TType.STOP:
  1082. break
  1083. if fid == 1:
  1084. if ftype == TType.STRING:
  1085. self.s = iprot.readString();
  1086. else:
  1087. iprot.skip(ftype)
  1088. else:
  1089. iprot.skip(ftype)
  1090. iprot.readFieldEnd()
  1091. iprot.readStructEnd()
  1092. def write(self, oprot):
  1093. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1094. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1095. return
  1096. oprot.writeStructBegin('echo_args')
  1097. if self.s != None:
  1098. oprot.writeFieldBegin('s', TType.STRING, 1)
  1099. oprot.writeString(self.s)
  1100. oprot.writeFieldEnd()
  1101. oprot.writeFieldStop()
  1102. oprot.writeStructEnd()
  1103. def __repr__(self):
  1104. L = ['%s=%r' % (key, value)
  1105. for key, value in self.__dict__.iteritems()]
  1106. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1107. def __eq__(self, other):
  1108. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1109. def __ne__(self, other):
  1110. return not (self == other)
  1111. class echo_result(object):
  1112. """
  1113. Attributes:
  1114. - success
  1115. """
  1116. thrift_spec = (
  1117. (0, TType.STRING, 'success', None, None, ), # 0
  1118. )
  1119. def __init__(self, success=None,):
  1120. self.success = success
  1121. def read(self, iprot):
  1122. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1123. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1124. return
  1125. iprot.readStructBegin()
  1126. while True:
  1127. (fname, ftype, fid) = iprot.readFieldBegin()
  1128. if ftype == TType.STOP:
  1129. break
  1130. if fid == 0:
  1131. if ftype == TType.STRING:
  1132. self.success = iprot.readString();
  1133. else:
  1134. iprot.skip(ftype)
  1135. else:
  1136. iprot.skip(ftype)
  1137. iprot.readFieldEnd()
  1138. iprot.readStructEnd()
  1139. def write(self, oprot):
  1140. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1141. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1142. return
  1143. oprot.writeStructBegin('echo_result')
  1144. if self.success != None:
  1145. oprot.writeFieldBegin('success', TType.STRING, 0)
  1146. oprot.writeString(self.success)
  1147. oprot.writeFieldEnd()
  1148. oprot.writeFieldStop()
  1149. oprot.writeStructEnd()
  1150. def __repr__(self):
  1151. L = ['%s=%r' % (key, value)
  1152. for key, value in self.__dict__.iteritems()]
  1153. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1154. def __eq__(self, other):
  1155. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1156. def __ne__(self, other):
  1157. return not (self == other)
  1158. class dump_config_args(object):
  1159. thrift_spec = (
  1160. )
  1161. def read(self, iprot):
  1162. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1163. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1164. return
  1165. iprot.readStructBegin()
  1166. while True:
  1167. (fname, ftype, fid) = iprot.readFieldBegin()
  1168. if ftype == TType.STOP:
  1169. break
  1170. else:
  1171. iprot.skip(ftype)
  1172. iprot.readFieldEnd()
  1173. iprot.readStructEnd()
  1174. def write(self, oprot):
  1175. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1176. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1177. return
  1178. oprot.writeStructBegin('dump_config_args')
  1179. oprot.writeFieldStop()
  1180. oprot.writeStructEnd()
  1181. def __repr__(self):
  1182. L = ['%s=%r' % (key, value)
  1183. for key, value in self.__dict__.iteritems()]
  1184. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1185. def __eq__(self, other):
  1186. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1187. def __ne__(self, other):
  1188. return not (self == other)
  1189. class dump_config_result(object):
  1190. """
  1191. Attributes:
  1192. - success
  1193. """
  1194. thrift_spec = (
  1195. (0, TType.STRING, 'success', None, None, ), # 0
  1196. )
  1197. def __init__(self, success=None,):
  1198. self.success = success
  1199. def read(self, iprot):
  1200. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1201. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1202. return
  1203. iprot.readStructBegin()
  1204. while True:
  1205. (fname, ftype, fid) = iprot.readFieldBegin()
  1206. if ftype == TType.STOP:
  1207. break
  1208. if fid == 0:
  1209. if ftype == TType.STRING:
  1210. self.success = iprot.readString();
  1211. else:
  1212. iprot.skip(ftype)
  1213. else:
  1214. iprot.skip(ftype)
  1215. iprot.readFieldEnd()
  1216. iprot.readStructEnd()
  1217. def write(self, oprot):
  1218. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1219. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1220. return
  1221. oprot.writeStructBegin('dump_config_result')
  1222. if self.success != None:
  1223. oprot.writeFieldBegin('success', TType.STRING, 0)
  1224. oprot.writeString(self.success)
  1225. oprot.writeFieldEnd()
  1226. oprot.writeFieldStop()
  1227. oprot.writeStructEnd()
  1228. def __repr__(self):
  1229. L = ['%s=%r' % (key, value)
  1230. for key, value in self.__dict__.iteritems()]
  1231. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1232. def __eq__(self, other):
  1233. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1234. def __ne__(self, other):
  1235. return not (self == other)
  1236. class get_log_args(object):
  1237. """
  1238. Attributes:
  1239. - context
  1240. """
  1241. thrift_spec = (
  1242. None, # 0
  1243. (1, TType.STRING, 'context', None, None, ), # 1
  1244. )
  1245. def __init__(self, context=None,):
  1246. self.context = context
  1247. def read(self, iprot):
  1248. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1249. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1250. return
  1251. iprot.readStructBegin()
  1252. while True:
  1253. (fname, ftype, fid) = iprot.readFieldBegin()
  1254. if ftype == TType.STOP:
  1255. break
  1256. if fid == 1:
  1257. if ftype == TType.STRING:
  1258. self.context = iprot.readString();
  1259. else:
  1260. iprot.skip(ftype)
  1261. else:
  1262. iprot.skip(ftype)
  1263. iprot.readFieldEnd()
  1264. iprot.readStructEnd()
  1265. def write(self, oprot):
  1266. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1267. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1268. return
  1269. oprot.writeStructBegin('get_log_args')
  1270. if self.context != None:
  1271. oprot.writeFieldBegin('context', TType.STRING, 1)
  1272. oprot.writeString(self.context)
  1273. oprot.writeFieldEnd()
  1274. oprot.writeFieldStop()
  1275. oprot.writeStructEnd()
  1276. def __repr__(self):
  1277. L = ['%s=%r' % (key, value)
  1278. for key, value in self.__dict__.iteritems()]
  1279. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1280. def __eq__(self, other):
  1281. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1282. def __ne__(self, other):
  1283. return not (self == other)
  1284. class get_log_result(object):
  1285. """
  1286. Attributes:
  1287. - success
  1288. - error
  1289. """
  1290. thrift_spec = (
  1291. (0, TType.STRING, 'success', None, None, ), # 0
  1292. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  1293. )
  1294. def __init__(self, success=None, error=None,):
  1295. self.success = success
  1296. self.error = error
  1297. def read(self, iprot):
  1298. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1299. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1300. return
  1301. iprot.readStructBegin()
  1302. while True:
  1303. (fname, ftype, fid) = iprot.readFieldBegin()
  1304. if ftype == TType.STOP:
  1305. break
  1306. if fid == 0:
  1307. if ftype == TType.STRING:
  1308. self.success = iprot.readString();
  1309. else:
  1310. iprot.skip(ftype)
  1311. elif fid == 1:
  1312. if ftype == TType.STRUCT:
  1313. self.error = QueryNotFoundException()
  1314. self.error.read(iprot)
  1315. else:
  1316. iprot.skip(ftype)
  1317. else:
  1318. iprot.skip(ftype)
  1319. iprot.readFieldEnd()
  1320. iprot.readStructEnd()
  1321. def write(self, oprot):
  1322. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1323. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1324. return
  1325. oprot.writeStructBegin('get_log_result')
  1326. if self.success != None:
  1327. oprot.writeFieldBegin('success', TType.STRING, 0)
  1328. oprot.writeString(self.success)
  1329. oprot.writeFieldEnd()
  1330. if self.error != None:
  1331. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1332. self.error.write(oprot)
  1333. oprot.writeFieldEnd()
  1334. oprot.writeFieldStop()
  1335. oprot.writeStructEnd()
  1336. def __repr__(self):
  1337. L = ['%s=%r' % (key, value)
  1338. for key, value in self.__dict__.iteritems()]
  1339. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1340. def __eq__(self, other):
  1341. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1342. def __ne__(self, other):
  1343. return not (self == other)
  1344. class get_default_configuration_args(object):
  1345. """
  1346. Attributes:
  1347. - include_hadoop
  1348. """
  1349. thrift_spec = (
  1350. None, # 0
  1351. (1, TType.BOOL, 'include_hadoop', None, None, ), # 1
  1352. )
  1353. def __init__(self, include_hadoop=None,):
  1354. self.include_hadoop = include_hadoop
  1355. def read(self, iprot):
  1356. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1357. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1358. return
  1359. iprot.readStructBegin()
  1360. while True:
  1361. (fname, ftype, fid) = iprot.readFieldBegin()
  1362. if ftype == TType.STOP:
  1363. break
  1364. if fid == 1:
  1365. if ftype == TType.BOOL:
  1366. self.include_hadoop = iprot.readBool();
  1367. else:
  1368. iprot.skip(ftype)
  1369. else:
  1370. iprot.skip(ftype)
  1371. iprot.readFieldEnd()
  1372. iprot.readStructEnd()
  1373. def write(self, oprot):
  1374. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1375. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1376. return
  1377. oprot.writeStructBegin('get_default_configuration_args')
  1378. if self.include_hadoop != None:
  1379. oprot.writeFieldBegin('include_hadoop', TType.BOOL, 1)
  1380. oprot.writeBool(self.include_hadoop)
  1381. oprot.writeFieldEnd()
  1382. oprot.writeFieldStop()
  1383. oprot.writeStructEnd()
  1384. def __repr__(self):
  1385. L = ['%s=%r' % (key, value)
  1386. for key, value in self.__dict__.iteritems()]
  1387. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1388. def __eq__(self, other):
  1389. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1390. def __ne__(self, other):
  1391. return not (self == other)
  1392. class get_default_configuration_result(object):
  1393. """
  1394. Attributes:
  1395. - success
  1396. """
  1397. thrift_spec = (
  1398. (0, TType.LIST, 'success', (TType.STRUCT,(ConfigVariable, ConfigVariable.thrift_spec)), None, ), # 0
  1399. )
  1400. def __init__(self, success=None,):
  1401. self.success = success
  1402. def read(self, iprot):
  1403. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1404. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1405. return
  1406. iprot.readStructBegin()
  1407. while True:
  1408. (fname, ftype, fid) = iprot.readFieldBegin()
  1409. if ftype == TType.STOP:
  1410. break
  1411. if fid == 0:
  1412. if ftype == TType.LIST:
  1413. self.success = []
  1414. (_etype31, _size28) = iprot.readListBegin()
  1415. for _i32 in xrange(_size28):
  1416. _elem33 = ConfigVariable()
  1417. _elem33.read(iprot)
  1418. self.success.append(_elem33)
  1419. iprot.readListEnd()
  1420. else:
  1421. iprot.skip(ftype)
  1422. else:
  1423. iprot.skip(ftype)
  1424. iprot.readFieldEnd()
  1425. iprot.readStructEnd()
  1426. def write(self, oprot):
  1427. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1428. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1429. return
  1430. oprot.writeStructBegin('get_default_configuration_result')
  1431. if self.success != None:
  1432. oprot.writeFieldBegin('success', TType.LIST, 0)
  1433. oprot.writeListBegin(TType.STRUCT, len(self.success))
  1434. for iter34 in self.success:
  1435. iter34.write(oprot)
  1436. oprot.writeListEnd()
  1437. oprot.writeFieldEnd()
  1438. oprot.writeFieldStop()
  1439. oprot.writeStructEnd()
  1440. def __repr__(self):
  1441. L = ['%s=%r' % (key, value)
  1442. for key, value in self.__dict__.iteritems()]
  1443. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1444. def __eq__(self, other):
  1445. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1446. def __ne__(self, other):
  1447. return not (self == other)