BeeswaxService.py 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296
  1. #
  2. # Autogenerated by Thrift Compiler (0.9.0)
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. # options string: py:new_style
  7. #
  8. from thrift.Thrift import TType, TMessageType, TException, TApplicationException
  9. from ttypes import *
  10. from thrift.Thrift import TProcessor
  11. from thrift.transport import TTransport
  12. from thrift.protocol import TBinaryProtocol, TProtocol
  13. try:
  14. from thrift.protocol import fastbinary
  15. except:
  16. fastbinary = None
  17. class Iface(object):
  18. def query(self, query):
  19. """
  20. Submit a query and return a handle (QueryHandle). The query runs asynchronously.
  21. Parameters:
  22. - query
  23. """
  24. pass
  25. def executeAndWait(self, query, clientCtx):
  26. """
  27. run a query synchronously and return a handle (QueryHandle).
  28. Parameters:
  29. - query
  30. - clientCtx
  31. """
  32. pass
  33. def explain(self, query):
  34. """
  35. Get the query plan for a query.
  36. Parameters:
  37. - query
  38. """
  39. pass
  40. def fetch(self, query_id, start_over, fetch_size):
  41. """
  42. Get the results of a query. This is non-blocking. Caller should check
  43. Results.ready to determine if the results are in yet. The call requests
  44. the batch size of fetch.
  45. Parameters:
  46. - query_id
  47. - start_over
  48. - fetch_size
  49. """
  50. pass
  51. def get_state(self, handle):
  52. """
  53. Get the state of the query
  54. Parameters:
  55. - handle
  56. """
  57. pass
  58. def get_results_metadata(self, handle):
  59. """
  60. Get the result metadata
  61. Parameters:
  62. - handle
  63. """
  64. pass
  65. def echo(self, s):
  66. """
  67. Used to test connection to server. A "noop" command.
  68. Parameters:
  69. - s
  70. """
  71. pass
  72. def dump_config(self, ):
  73. """
  74. Returns a string representation of the configuration object being used.
  75. Handy for debugging.
  76. """
  77. pass
  78. def get_log(self, context):
  79. """
  80. Get the log messages related to the given context.
  81. Parameters:
  82. - context
  83. """
  84. pass
  85. def get_default_configuration(self, include_hadoop):
  86. """
  87. Parameters:
  88. - include_hadoop
  89. """
  90. pass
  91. def close(self, handle):
  92. """
  93. Parameters:
  94. - handle
  95. """
  96. pass
  97. def clean(self, log_context):
  98. """
  99. Parameters:
  100. - log_context
  101. """
  102. pass
  103. class Client(Iface):
  104. def __init__(self, iprot, oprot=None):
  105. self._iprot = self._oprot = iprot
  106. if oprot is not None:
  107. self._oprot = oprot
  108. self._seqid = 0
  109. def query(self, query):
  110. """
  111. Submit a query and return a handle (QueryHandle). The query runs asynchronously.
  112. Parameters:
  113. - query
  114. """
  115. self.send_query(query)
  116. return self.recv_query()
  117. def send_query(self, query):
  118. self._oprot.writeMessageBegin('query', TMessageType.CALL, self._seqid)
  119. args = query_args()
  120. args.query = query
  121. args.write(self._oprot)
  122. self._oprot.writeMessageEnd()
  123. self._oprot.trans.flush()
  124. def recv_query(self, ):
  125. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  126. if mtype == TMessageType.EXCEPTION:
  127. x = TApplicationException()
  128. x.read(self._iprot)
  129. self._iprot.readMessageEnd()
  130. raise x
  131. result = query_result()
  132. result.read(self._iprot)
  133. self._iprot.readMessageEnd()
  134. if result.success is not None:
  135. return result.success
  136. if result.error is not None:
  137. raise result.error
  138. raise TApplicationException(TApplicationException.MISSING_RESULT, "query failed: unknown result");
  139. def executeAndWait(self, query, clientCtx):
  140. """
  141. run a query synchronously and return a handle (QueryHandle).
  142. Parameters:
  143. - query
  144. - clientCtx
  145. """
  146. self.send_executeAndWait(query, clientCtx)
  147. return self.recv_executeAndWait()
  148. def send_executeAndWait(self, query, clientCtx):
  149. self._oprot.writeMessageBegin('executeAndWait', TMessageType.CALL, self._seqid)
  150. args = executeAndWait_args()
  151. args.query = query
  152. args.clientCtx = clientCtx
  153. args.write(self._oprot)
  154. self._oprot.writeMessageEnd()
  155. self._oprot.trans.flush()
  156. def recv_executeAndWait(self, ):
  157. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  158. if mtype == TMessageType.EXCEPTION:
  159. x = TApplicationException()
  160. x.read(self._iprot)
  161. self._iprot.readMessageEnd()
  162. raise x
  163. result = executeAndWait_result()
  164. result.read(self._iprot)
  165. self._iprot.readMessageEnd()
  166. if result.success is not None:
  167. return result.success
  168. if result.error is not None:
  169. raise result.error
  170. raise TApplicationException(TApplicationException.MISSING_RESULT, "executeAndWait failed: unknown result");
  171. def explain(self, query):
  172. """
  173. Get the query plan for a query.
  174. Parameters:
  175. - query
  176. """
  177. self.send_explain(query)
  178. return self.recv_explain()
  179. def send_explain(self, query):
  180. self._oprot.writeMessageBegin('explain', TMessageType.CALL, self._seqid)
  181. args = explain_args()
  182. args.query = query
  183. args.write(self._oprot)
  184. self._oprot.writeMessageEnd()
  185. self._oprot.trans.flush()
  186. def recv_explain(self, ):
  187. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  188. if mtype == TMessageType.EXCEPTION:
  189. x = TApplicationException()
  190. x.read(self._iprot)
  191. self._iprot.readMessageEnd()
  192. raise x
  193. result = explain_result()
  194. result.read(self._iprot)
  195. self._iprot.readMessageEnd()
  196. if result.success is not None:
  197. return result.success
  198. if result.error is not None:
  199. raise result.error
  200. raise TApplicationException(TApplicationException.MISSING_RESULT, "explain failed: unknown result");
  201. def fetch(self, query_id, start_over, fetch_size):
  202. """
  203. Get the results of a query. This is non-blocking. Caller should check
  204. Results.ready to determine if the results are in yet. The call requests
  205. the batch size of fetch.
  206. Parameters:
  207. - query_id
  208. - start_over
  209. - fetch_size
  210. """
  211. self.send_fetch(query_id, start_over, fetch_size)
  212. return self.recv_fetch()
  213. def send_fetch(self, query_id, start_over, fetch_size):
  214. self._oprot.writeMessageBegin('fetch', TMessageType.CALL, self._seqid)
  215. args = fetch_args()
  216. args.query_id = query_id
  217. args.start_over = start_over
  218. args.fetch_size = fetch_size
  219. args.write(self._oprot)
  220. self._oprot.writeMessageEnd()
  221. self._oprot.trans.flush()
  222. def recv_fetch(self, ):
  223. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  224. if mtype == TMessageType.EXCEPTION:
  225. x = TApplicationException()
  226. x.read(self._iprot)
  227. self._iprot.readMessageEnd()
  228. raise x
  229. result = fetch_result()
  230. result.read(self._iprot)
  231. self._iprot.readMessageEnd()
  232. if result.success is not None:
  233. return result.success
  234. if result.error is not None:
  235. raise result.error
  236. if result.error2 is not None:
  237. raise result.error2
  238. raise TApplicationException(TApplicationException.MISSING_RESULT, "fetch failed: unknown result");
  239. def get_state(self, handle):
  240. """
  241. Get the state of the query
  242. Parameters:
  243. - handle
  244. """
  245. self.send_get_state(handle)
  246. return self.recv_get_state()
  247. def send_get_state(self, handle):
  248. self._oprot.writeMessageBegin('get_state', TMessageType.CALL, self._seqid)
  249. args = get_state_args()
  250. args.handle = handle
  251. args.write(self._oprot)
  252. self._oprot.writeMessageEnd()
  253. self._oprot.trans.flush()
  254. def recv_get_state(self, ):
  255. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  256. if mtype == TMessageType.EXCEPTION:
  257. x = TApplicationException()
  258. x.read(self._iprot)
  259. self._iprot.readMessageEnd()
  260. raise x
  261. result = get_state_result()
  262. result.read(self._iprot)
  263. self._iprot.readMessageEnd()
  264. if result.success is not None:
  265. return result.success
  266. if result.error is not None:
  267. raise result.error
  268. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_state failed: unknown result");
  269. def get_results_metadata(self, handle):
  270. """
  271. Get the result metadata
  272. Parameters:
  273. - handle
  274. """
  275. self.send_get_results_metadata(handle)
  276. return self.recv_get_results_metadata()
  277. def send_get_results_metadata(self, handle):
  278. self._oprot.writeMessageBegin('get_results_metadata', TMessageType.CALL, self._seqid)
  279. args = get_results_metadata_args()
  280. args.handle = handle
  281. args.write(self._oprot)
  282. self._oprot.writeMessageEnd()
  283. self._oprot.trans.flush()
  284. def recv_get_results_metadata(self, ):
  285. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  286. if mtype == TMessageType.EXCEPTION:
  287. x = TApplicationException()
  288. x.read(self._iprot)
  289. self._iprot.readMessageEnd()
  290. raise x
  291. result = get_results_metadata_result()
  292. result.read(self._iprot)
  293. self._iprot.readMessageEnd()
  294. if result.success is not None:
  295. return result.success
  296. if result.error is not None:
  297. raise result.error
  298. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_results_metadata failed: unknown result");
  299. def echo(self, s):
  300. """
  301. Used to test connection to server. A "noop" command.
  302. Parameters:
  303. - s
  304. """
  305. self.send_echo(s)
  306. return self.recv_echo()
  307. def send_echo(self, s):
  308. self._oprot.writeMessageBegin('echo', TMessageType.CALL, self._seqid)
  309. args = echo_args()
  310. args.s = s
  311. args.write(self._oprot)
  312. self._oprot.writeMessageEnd()
  313. self._oprot.trans.flush()
  314. def recv_echo(self, ):
  315. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  316. if mtype == TMessageType.EXCEPTION:
  317. x = TApplicationException()
  318. x.read(self._iprot)
  319. self._iprot.readMessageEnd()
  320. raise x
  321. result = echo_result()
  322. result.read(self._iprot)
  323. self._iprot.readMessageEnd()
  324. if result.success is not None:
  325. return result.success
  326. raise TApplicationException(TApplicationException.MISSING_RESULT, "echo failed: unknown result");
  327. def dump_config(self, ):
  328. """
  329. Returns a string representation of the configuration object being used.
  330. Handy for debugging.
  331. """
  332. self.send_dump_config()
  333. return self.recv_dump_config()
  334. def send_dump_config(self, ):
  335. self._oprot.writeMessageBegin('dump_config', TMessageType.CALL, self._seqid)
  336. args = dump_config_args()
  337. args.write(self._oprot)
  338. self._oprot.writeMessageEnd()
  339. self._oprot.trans.flush()
  340. def recv_dump_config(self, ):
  341. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  342. if mtype == TMessageType.EXCEPTION:
  343. x = TApplicationException()
  344. x.read(self._iprot)
  345. self._iprot.readMessageEnd()
  346. raise x
  347. result = dump_config_result()
  348. result.read(self._iprot)
  349. self._iprot.readMessageEnd()
  350. if result.success is not None:
  351. return result.success
  352. raise TApplicationException(TApplicationException.MISSING_RESULT, "dump_config failed: unknown result");
  353. def get_log(self, context):
  354. """
  355. Get the log messages related to the given context.
  356. Parameters:
  357. - context
  358. """
  359. self.send_get_log(context)
  360. return self.recv_get_log()
  361. def send_get_log(self, context):
  362. self._oprot.writeMessageBegin('get_log', TMessageType.CALL, self._seqid)
  363. args = get_log_args()
  364. args.context = context
  365. args.write(self._oprot)
  366. self._oprot.writeMessageEnd()
  367. self._oprot.trans.flush()
  368. def recv_get_log(self, ):
  369. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  370. if mtype == TMessageType.EXCEPTION:
  371. x = TApplicationException()
  372. x.read(self._iprot)
  373. self._iprot.readMessageEnd()
  374. raise x
  375. result = get_log_result()
  376. result.read(self._iprot)
  377. self._iprot.readMessageEnd()
  378. if result.success is not None:
  379. return result.success
  380. if result.error is not None:
  381. raise result.error
  382. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_log failed: unknown result");
  383. def get_default_configuration(self, include_hadoop):
  384. """
  385. Parameters:
  386. - include_hadoop
  387. """
  388. self.send_get_default_configuration(include_hadoop)
  389. return self.recv_get_default_configuration()
  390. def send_get_default_configuration(self, include_hadoop):
  391. self._oprot.writeMessageBegin('get_default_configuration', TMessageType.CALL, self._seqid)
  392. args = get_default_configuration_args()
  393. args.include_hadoop = include_hadoop
  394. args.write(self._oprot)
  395. self._oprot.writeMessageEnd()
  396. self._oprot.trans.flush()
  397. def recv_get_default_configuration(self, ):
  398. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  399. if mtype == TMessageType.EXCEPTION:
  400. x = TApplicationException()
  401. x.read(self._iprot)
  402. self._iprot.readMessageEnd()
  403. raise x
  404. result = get_default_configuration_result()
  405. result.read(self._iprot)
  406. self._iprot.readMessageEnd()
  407. if result.success is not None:
  408. return result.success
  409. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_default_configuration failed: unknown result");
  410. def close(self, handle):
  411. """
  412. Parameters:
  413. - handle
  414. """
  415. self.send_close(handle)
  416. self.recv_close()
  417. def send_close(self, handle):
  418. self._oprot.writeMessageBegin('close', TMessageType.CALL, self._seqid)
  419. args = close_args()
  420. args.handle = handle
  421. args.write(self._oprot)
  422. self._oprot.writeMessageEnd()
  423. self._oprot.trans.flush()
  424. def recv_close(self, ):
  425. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  426. if mtype == TMessageType.EXCEPTION:
  427. x = TApplicationException()
  428. x.read(self._iprot)
  429. self._iprot.readMessageEnd()
  430. raise x
  431. result = close_result()
  432. result.read(self._iprot)
  433. self._iprot.readMessageEnd()
  434. if result.error is not None:
  435. raise result.error
  436. if result.error2 is not None:
  437. raise result.error2
  438. return
  439. def clean(self, log_context):
  440. """
  441. Parameters:
  442. - log_context
  443. """
  444. self.send_clean(log_context)
  445. self.recv_clean()
  446. def send_clean(self, log_context):
  447. self._oprot.writeMessageBegin('clean', TMessageType.CALL, self._seqid)
  448. args = clean_args()
  449. args.log_context = log_context
  450. args.write(self._oprot)
  451. self._oprot.writeMessageEnd()
  452. self._oprot.trans.flush()
  453. def recv_clean(self, ):
  454. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  455. if mtype == TMessageType.EXCEPTION:
  456. x = TApplicationException()
  457. x.read(self._iprot)
  458. self._iprot.readMessageEnd()
  459. raise x
  460. result = clean_result()
  461. result.read(self._iprot)
  462. self._iprot.readMessageEnd()
  463. return
  464. class Processor(Iface, TProcessor):
  465. def __init__(self, handler):
  466. self._handler = handler
  467. self._processMap = {}
  468. self._processMap["query"] = Processor.process_query
  469. self._processMap["executeAndWait"] = Processor.process_executeAndWait
  470. self._processMap["explain"] = Processor.process_explain
  471. self._processMap["fetch"] = Processor.process_fetch
  472. self._processMap["get_state"] = Processor.process_get_state
  473. self._processMap["get_results_metadata"] = Processor.process_get_results_metadata
  474. self._processMap["echo"] = Processor.process_echo
  475. self._processMap["dump_config"] = Processor.process_dump_config
  476. self._processMap["get_log"] = Processor.process_get_log
  477. self._processMap["get_default_configuration"] = Processor.process_get_default_configuration
  478. self._processMap["close"] = Processor.process_close
  479. self._processMap["clean"] = Processor.process_clean
  480. def process(self, iprot, oprot):
  481. (name, type, seqid) = iprot.readMessageBegin()
  482. if name not in self._processMap:
  483. iprot.skip(TType.STRUCT)
  484. iprot.readMessageEnd()
  485. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  486. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  487. x.write(oprot)
  488. oprot.writeMessageEnd()
  489. oprot.trans.flush()
  490. return
  491. else:
  492. self._processMap[name](self, seqid, iprot, oprot)
  493. return True
  494. def process_query(self, seqid, iprot, oprot):
  495. args = query_args()
  496. args.read(iprot)
  497. iprot.readMessageEnd()
  498. result = query_result()
  499. try:
  500. result.success = self._handler.query(args.query)
  501. except BeeswaxException, error:
  502. result.error = error
  503. oprot.writeMessageBegin("query", TMessageType.REPLY, seqid)
  504. result.write(oprot)
  505. oprot.writeMessageEnd()
  506. oprot.trans.flush()
  507. def process_executeAndWait(self, seqid, iprot, oprot):
  508. args = executeAndWait_args()
  509. args.read(iprot)
  510. iprot.readMessageEnd()
  511. result = executeAndWait_result()
  512. try:
  513. result.success = self._handler.executeAndWait(args.query, args.clientCtx)
  514. except BeeswaxException, error:
  515. result.error = error
  516. oprot.writeMessageBegin("executeAndWait", TMessageType.REPLY, seqid)
  517. result.write(oprot)
  518. oprot.writeMessageEnd()
  519. oprot.trans.flush()
  520. def process_explain(self, seqid, iprot, oprot):
  521. args = explain_args()
  522. args.read(iprot)
  523. iprot.readMessageEnd()
  524. result = explain_result()
  525. try:
  526. result.success = self._handler.explain(args.query)
  527. except BeeswaxException, error:
  528. result.error = error
  529. oprot.writeMessageBegin("explain", TMessageType.REPLY, seqid)
  530. result.write(oprot)
  531. oprot.writeMessageEnd()
  532. oprot.trans.flush()
  533. def process_fetch(self, seqid, iprot, oprot):
  534. args = fetch_args()
  535. args.read(iprot)
  536. iprot.readMessageEnd()
  537. result = fetch_result()
  538. try:
  539. result.success = self._handler.fetch(args.query_id, args.start_over, args.fetch_size)
  540. except QueryNotFoundException, error:
  541. result.error = error
  542. except BeeswaxException, error2:
  543. result.error2 = error2
  544. oprot.writeMessageBegin("fetch", TMessageType.REPLY, seqid)
  545. result.write(oprot)
  546. oprot.writeMessageEnd()
  547. oprot.trans.flush()
  548. def process_get_state(self, seqid, iprot, oprot):
  549. args = get_state_args()
  550. args.read(iprot)
  551. iprot.readMessageEnd()
  552. result = get_state_result()
  553. try:
  554. result.success = self._handler.get_state(args.handle)
  555. except QueryNotFoundException, error:
  556. result.error = error
  557. oprot.writeMessageBegin("get_state", TMessageType.REPLY, seqid)
  558. result.write(oprot)
  559. oprot.writeMessageEnd()
  560. oprot.trans.flush()
  561. def process_get_results_metadata(self, seqid, iprot, oprot):
  562. args = get_results_metadata_args()
  563. args.read(iprot)
  564. iprot.readMessageEnd()
  565. result = get_results_metadata_result()
  566. try:
  567. result.success = self._handler.get_results_metadata(args.handle)
  568. except QueryNotFoundException, error:
  569. result.error = error
  570. oprot.writeMessageBegin("get_results_metadata", TMessageType.REPLY, seqid)
  571. result.write(oprot)
  572. oprot.writeMessageEnd()
  573. oprot.trans.flush()
  574. def process_echo(self, seqid, iprot, oprot):
  575. args = echo_args()
  576. args.read(iprot)
  577. iprot.readMessageEnd()
  578. result = echo_result()
  579. result.success = self._handler.echo(args.s)
  580. oprot.writeMessageBegin("echo", TMessageType.REPLY, seqid)
  581. result.write(oprot)
  582. oprot.writeMessageEnd()
  583. oprot.trans.flush()
  584. def process_dump_config(self, seqid, iprot, oprot):
  585. args = dump_config_args()
  586. args.read(iprot)
  587. iprot.readMessageEnd()
  588. result = dump_config_result()
  589. result.success = self._handler.dump_config()
  590. oprot.writeMessageBegin("dump_config", TMessageType.REPLY, seqid)
  591. result.write(oprot)
  592. oprot.writeMessageEnd()
  593. oprot.trans.flush()
  594. def process_get_log(self, seqid, iprot, oprot):
  595. args = get_log_args()
  596. args.read(iprot)
  597. iprot.readMessageEnd()
  598. result = get_log_result()
  599. try:
  600. result.success = self._handler.get_log(args.context)
  601. except QueryNotFoundException, error:
  602. result.error = error
  603. oprot.writeMessageBegin("get_log", TMessageType.REPLY, seqid)
  604. result.write(oprot)
  605. oprot.writeMessageEnd()
  606. oprot.trans.flush()
  607. def process_get_default_configuration(self, seqid, iprot, oprot):
  608. args = get_default_configuration_args()
  609. args.read(iprot)
  610. iprot.readMessageEnd()
  611. result = get_default_configuration_result()
  612. result.success = self._handler.get_default_configuration(args.include_hadoop)
  613. oprot.writeMessageBegin("get_default_configuration", TMessageType.REPLY, seqid)
  614. result.write(oprot)
  615. oprot.writeMessageEnd()
  616. oprot.trans.flush()
  617. def process_close(self, seqid, iprot, oprot):
  618. args = close_args()
  619. args.read(iprot)
  620. iprot.readMessageEnd()
  621. result = close_result()
  622. try:
  623. self._handler.close(args.handle)
  624. except QueryNotFoundException, error:
  625. result.error = error
  626. except BeeswaxException, error2:
  627. result.error2 = error2
  628. oprot.writeMessageBegin("close", TMessageType.REPLY, seqid)
  629. result.write(oprot)
  630. oprot.writeMessageEnd()
  631. oprot.trans.flush()
  632. def process_clean(self, seqid, iprot, oprot):
  633. args = clean_args()
  634. args.read(iprot)
  635. iprot.readMessageEnd()
  636. result = clean_result()
  637. self._handler.clean(args.log_context)
  638. oprot.writeMessageBegin("clean", TMessageType.REPLY, seqid)
  639. result.write(oprot)
  640. oprot.writeMessageEnd()
  641. oprot.trans.flush()
  642. # HELPER FUNCTIONS AND STRUCTURES
  643. class query_args(object):
  644. """
  645. Attributes:
  646. - query
  647. """
  648. thrift_spec = (
  649. None, # 0
  650. (1, TType.STRUCT, 'query', (Query, Query.thrift_spec), None, ), # 1
  651. )
  652. def __init__(self, query=None,):
  653. self.query = query
  654. def read(self, iprot):
  655. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  656. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  657. return
  658. iprot.readStructBegin()
  659. while True:
  660. (fname, ftype, fid) = iprot.readFieldBegin()
  661. if ftype == TType.STOP:
  662. break
  663. if fid == 1:
  664. if ftype == TType.STRUCT:
  665. self.query = Query()
  666. self.query.read(iprot)
  667. else:
  668. iprot.skip(ftype)
  669. else:
  670. iprot.skip(ftype)
  671. iprot.readFieldEnd()
  672. iprot.readStructEnd()
  673. def write(self, oprot):
  674. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  675. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  676. return
  677. oprot.writeStructBegin('query_args')
  678. if self.query is not None:
  679. oprot.writeFieldBegin('query', TType.STRUCT, 1)
  680. self.query.write(oprot)
  681. oprot.writeFieldEnd()
  682. oprot.writeFieldStop()
  683. oprot.writeStructEnd()
  684. def validate(self):
  685. return
  686. def __repr__(self):
  687. L = ['%s=%r' % (key, value)
  688. for key, value in self.__dict__.iteritems()]
  689. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  690. def __eq__(self, other):
  691. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  692. def __ne__(self, other):
  693. return not (self == other)
  694. class query_result(object):
  695. """
  696. Attributes:
  697. - success
  698. - error
  699. """
  700. thrift_spec = (
  701. (0, TType.STRUCT, 'success', (QueryHandle, QueryHandle.thrift_spec), None, ), # 0
  702. (1, TType.STRUCT, 'error', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 1
  703. )
  704. def __init__(self, success=None, error=None,):
  705. self.success = success
  706. self.error = error
  707. def read(self, iprot):
  708. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  709. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  710. return
  711. iprot.readStructBegin()
  712. while True:
  713. (fname, ftype, fid) = iprot.readFieldBegin()
  714. if ftype == TType.STOP:
  715. break
  716. if fid == 0:
  717. if ftype == TType.STRUCT:
  718. self.success = QueryHandle()
  719. self.success.read(iprot)
  720. else:
  721. iprot.skip(ftype)
  722. elif fid == 1:
  723. if ftype == TType.STRUCT:
  724. self.error = BeeswaxException()
  725. self.error.read(iprot)
  726. else:
  727. iprot.skip(ftype)
  728. else:
  729. iprot.skip(ftype)
  730. iprot.readFieldEnd()
  731. iprot.readStructEnd()
  732. def write(self, oprot):
  733. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  734. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  735. return
  736. oprot.writeStructBegin('query_result')
  737. if self.success is not None:
  738. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  739. self.success.write(oprot)
  740. oprot.writeFieldEnd()
  741. if self.error is not None:
  742. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  743. self.error.write(oprot)
  744. oprot.writeFieldEnd()
  745. oprot.writeFieldStop()
  746. oprot.writeStructEnd()
  747. def validate(self):
  748. return
  749. def __repr__(self):
  750. L = ['%s=%r' % (key, value)
  751. for key, value in self.__dict__.iteritems()]
  752. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  753. def __eq__(self, other):
  754. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  755. def __ne__(self, other):
  756. return not (self == other)
  757. class executeAndWait_args(object):
  758. """
  759. Attributes:
  760. - query
  761. - clientCtx
  762. """
  763. thrift_spec = (
  764. None, # 0
  765. (1, TType.STRUCT, 'query', (Query, Query.thrift_spec), None, ), # 1
  766. (2, TType.STRING, 'clientCtx', None, None, ), # 2
  767. )
  768. def __init__(self, query=None, clientCtx=None,):
  769. self.query = query
  770. self.clientCtx = clientCtx
  771. def read(self, iprot):
  772. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  773. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  774. return
  775. iprot.readStructBegin()
  776. while True:
  777. (fname, ftype, fid) = iprot.readFieldBegin()
  778. if ftype == TType.STOP:
  779. break
  780. if fid == 1:
  781. if ftype == TType.STRUCT:
  782. self.query = Query()
  783. self.query.read(iprot)
  784. else:
  785. iprot.skip(ftype)
  786. elif fid == 2:
  787. if ftype == TType.STRING:
  788. self.clientCtx = iprot.readString();
  789. else:
  790. iprot.skip(ftype)
  791. else:
  792. iprot.skip(ftype)
  793. iprot.readFieldEnd()
  794. iprot.readStructEnd()
  795. def write(self, oprot):
  796. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  797. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  798. return
  799. oprot.writeStructBegin('executeAndWait_args')
  800. if self.query is not None:
  801. oprot.writeFieldBegin('query', TType.STRUCT, 1)
  802. self.query.write(oprot)
  803. oprot.writeFieldEnd()
  804. if self.clientCtx is not None:
  805. oprot.writeFieldBegin('clientCtx', TType.STRING, 2)
  806. oprot.writeString(self.clientCtx)
  807. oprot.writeFieldEnd()
  808. oprot.writeFieldStop()
  809. oprot.writeStructEnd()
  810. def validate(self):
  811. return
  812. def __repr__(self):
  813. L = ['%s=%r' % (key, value)
  814. for key, value in self.__dict__.iteritems()]
  815. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  816. def __eq__(self, other):
  817. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  818. def __ne__(self, other):
  819. return not (self == other)
  820. class executeAndWait_result(object):
  821. """
  822. Attributes:
  823. - success
  824. - error
  825. """
  826. thrift_spec = (
  827. (0, TType.STRUCT, 'success', (QueryHandle, QueryHandle.thrift_spec), None, ), # 0
  828. (1, TType.STRUCT, 'error', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 1
  829. )
  830. def __init__(self, success=None, error=None,):
  831. self.success = success
  832. self.error = error
  833. def read(self, iprot):
  834. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  835. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  836. return
  837. iprot.readStructBegin()
  838. while True:
  839. (fname, ftype, fid) = iprot.readFieldBegin()
  840. if ftype == TType.STOP:
  841. break
  842. if fid == 0:
  843. if ftype == TType.STRUCT:
  844. self.success = QueryHandle()
  845. self.success.read(iprot)
  846. else:
  847. iprot.skip(ftype)
  848. elif fid == 1:
  849. if ftype == TType.STRUCT:
  850. self.error = BeeswaxException()
  851. self.error.read(iprot)
  852. else:
  853. iprot.skip(ftype)
  854. else:
  855. iprot.skip(ftype)
  856. iprot.readFieldEnd()
  857. iprot.readStructEnd()
  858. def write(self, oprot):
  859. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  860. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  861. return
  862. oprot.writeStructBegin('executeAndWait_result')
  863. if self.success is not None:
  864. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  865. self.success.write(oprot)
  866. oprot.writeFieldEnd()
  867. if self.error is not None:
  868. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  869. self.error.write(oprot)
  870. oprot.writeFieldEnd()
  871. oprot.writeFieldStop()
  872. oprot.writeStructEnd()
  873. def validate(self):
  874. return
  875. def __repr__(self):
  876. L = ['%s=%r' % (key, value)
  877. for key, value in self.__dict__.iteritems()]
  878. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  879. def __eq__(self, other):
  880. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  881. def __ne__(self, other):
  882. return not (self == other)
  883. class explain_args(object):
  884. """
  885. Attributes:
  886. - query
  887. """
  888. thrift_spec = (
  889. None, # 0
  890. (1, TType.STRUCT, 'query', (Query, Query.thrift_spec), None, ), # 1
  891. )
  892. def __init__(self, query=None,):
  893. self.query = query
  894. def read(self, iprot):
  895. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  896. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  897. return
  898. iprot.readStructBegin()
  899. while True:
  900. (fname, ftype, fid) = iprot.readFieldBegin()
  901. if ftype == TType.STOP:
  902. break
  903. if fid == 1:
  904. if ftype == TType.STRUCT:
  905. self.query = Query()
  906. self.query.read(iprot)
  907. else:
  908. iprot.skip(ftype)
  909. else:
  910. iprot.skip(ftype)
  911. iprot.readFieldEnd()
  912. iprot.readStructEnd()
  913. def write(self, oprot):
  914. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  915. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  916. return
  917. oprot.writeStructBegin('explain_args')
  918. if self.query is not None:
  919. oprot.writeFieldBegin('query', TType.STRUCT, 1)
  920. self.query.write(oprot)
  921. oprot.writeFieldEnd()
  922. oprot.writeFieldStop()
  923. oprot.writeStructEnd()
  924. def validate(self):
  925. return
  926. def __repr__(self):
  927. L = ['%s=%r' % (key, value)
  928. for key, value in self.__dict__.iteritems()]
  929. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  930. def __eq__(self, other):
  931. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  932. def __ne__(self, other):
  933. return not (self == other)
  934. class explain_result(object):
  935. """
  936. Attributes:
  937. - success
  938. - error
  939. """
  940. thrift_spec = (
  941. (0, TType.STRUCT, 'success', (QueryExplanation, QueryExplanation.thrift_spec), None, ), # 0
  942. (1, TType.STRUCT, 'error', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 1
  943. )
  944. def __init__(self, success=None, error=None,):
  945. self.success = success
  946. self.error = error
  947. def read(self, iprot):
  948. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  949. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  950. return
  951. iprot.readStructBegin()
  952. while True:
  953. (fname, ftype, fid) = iprot.readFieldBegin()
  954. if ftype == TType.STOP:
  955. break
  956. if fid == 0:
  957. if ftype == TType.STRUCT:
  958. self.success = QueryExplanation()
  959. self.success.read(iprot)
  960. else:
  961. iprot.skip(ftype)
  962. elif fid == 1:
  963. if ftype == TType.STRUCT:
  964. self.error = BeeswaxException()
  965. self.error.read(iprot)
  966. else:
  967. iprot.skip(ftype)
  968. else:
  969. iprot.skip(ftype)
  970. iprot.readFieldEnd()
  971. iprot.readStructEnd()
  972. def write(self, oprot):
  973. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  974. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  975. return
  976. oprot.writeStructBegin('explain_result')
  977. if self.success is not None:
  978. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  979. self.success.write(oprot)
  980. oprot.writeFieldEnd()
  981. if self.error is not None:
  982. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  983. self.error.write(oprot)
  984. oprot.writeFieldEnd()
  985. oprot.writeFieldStop()
  986. oprot.writeStructEnd()
  987. def validate(self):
  988. return
  989. def __repr__(self):
  990. L = ['%s=%r' % (key, value)
  991. for key, value in self.__dict__.iteritems()]
  992. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  993. def __eq__(self, other):
  994. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  995. def __ne__(self, other):
  996. return not (self == other)
  997. class fetch_args(object):
  998. """
  999. Attributes:
  1000. - query_id
  1001. - start_over
  1002. - fetch_size
  1003. """
  1004. thrift_spec = (
  1005. None, # 0
  1006. (1, TType.STRUCT, 'query_id', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  1007. (2, TType.BOOL, 'start_over', None, None, ), # 2
  1008. (3, TType.I32, 'fetch_size', None, -1, ), # 3
  1009. )
  1010. def __init__(self, query_id=None, start_over=None, fetch_size=thrift_spec[3][4],):
  1011. self.query_id = query_id
  1012. self.start_over = start_over
  1013. self.fetch_size = fetch_size
  1014. def read(self, iprot):
  1015. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1016. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1017. return
  1018. iprot.readStructBegin()
  1019. while True:
  1020. (fname, ftype, fid) = iprot.readFieldBegin()
  1021. if ftype == TType.STOP:
  1022. break
  1023. if fid == 1:
  1024. if ftype == TType.STRUCT:
  1025. self.query_id = QueryHandle()
  1026. self.query_id.read(iprot)
  1027. else:
  1028. iprot.skip(ftype)
  1029. elif fid == 2:
  1030. if ftype == TType.BOOL:
  1031. self.start_over = iprot.readBool();
  1032. else:
  1033. iprot.skip(ftype)
  1034. elif fid == 3:
  1035. if ftype == TType.I32:
  1036. self.fetch_size = iprot.readI32();
  1037. else:
  1038. iprot.skip(ftype)
  1039. else:
  1040. iprot.skip(ftype)
  1041. iprot.readFieldEnd()
  1042. iprot.readStructEnd()
  1043. def write(self, oprot):
  1044. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1045. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1046. return
  1047. oprot.writeStructBegin('fetch_args')
  1048. if self.query_id is not None:
  1049. oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
  1050. self.query_id.write(oprot)
  1051. oprot.writeFieldEnd()
  1052. if self.start_over is not None:
  1053. oprot.writeFieldBegin('start_over', TType.BOOL, 2)
  1054. oprot.writeBool(self.start_over)
  1055. oprot.writeFieldEnd()
  1056. if self.fetch_size is not None:
  1057. oprot.writeFieldBegin('fetch_size', TType.I32, 3)
  1058. oprot.writeI32(self.fetch_size)
  1059. oprot.writeFieldEnd()
  1060. oprot.writeFieldStop()
  1061. oprot.writeStructEnd()
  1062. def validate(self):
  1063. return
  1064. def __repr__(self):
  1065. L = ['%s=%r' % (key, value)
  1066. for key, value in self.__dict__.iteritems()]
  1067. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1068. def __eq__(self, other):
  1069. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1070. def __ne__(self, other):
  1071. return not (self == other)
  1072. class fetch_result(object):
  1073. """
  1074. Attributes:
  1075. - success
  1076. - error
  1077. - error2
  1078. """
  1079. thrift_spec = (
  1080. (0, TType.STRUCT, 'success', (Results, Results.thrift_spec), None, ), # 0
  1081. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  1082. (2, TType.STRUCT, 'error2', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 2
  1083. )
  1084. def __init__(self, success=None, error=None, error2=None,):
  1085. self.success = success
  1086. self.error = error
  1087. self.error2 = error2
  1088. def read(self, iprot):
  1089. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1090. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1091. return
  1092. iprot.readStructBegin()
  1093. while True:
  1094. (fname, ftype, fid) = iprot.readFieldBegin()
  1095. if ftype == TType.STOP:
  1096. break
  1097. if fid == 0:
  1098. if ftype == TType.STRUCT:
  1099. self.success = Results()
  1100. self.success.read(iprot)
  1101. else:
  1102. iprot.skip(ftype)
  1103. elif fid == 1:
  1104. if ftype == TType.STRUCT:
  1105. self.error = QueryNotFoundException()
  1106. self.error.read(iprot)
  1107. else:
  1108. iprot.skip(ftype)
  1109. elif fid == 2:
  1110. if ftype == TType.STRUCT:
  1111. self.error2 = BeeswaxException()
  1112. self.error2.read(iprot)
  1113. else:
  1114. iprot.skip(ftype)
  1115. else:
  1116. iprot.skip(ftype)
  1117. iprot.readFieldEnd()
  1118. iprot.readStructEnd()
  1119. def write(self, oprot):
  1120. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1121. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1122. return
  1123. oprot.writeStructBegin('fetch_result')
  1124. if self.success is not None:
  1125. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1126. self.success.write(oprot)
  1127. oprot.writeFieldEnd()
  1128. if self.error is not None:
  1129. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1130. self.error.write(oprot)
  1131. oprot.writeFieldEnd()
  1132. if self.error2 is not None:
  1133. oprot.writeFieldBegin('error2', TType.STRUCT, 2)
  1134. self.error2.write(oprot)
  1135. oprot.writeFieldEnd()
  1136. oprot.writeFieldStop()
  1137. oprot.writeStructEnd()
  1138. def validate(self):
  1139. return
  1140. def __repr__(self):
  1141. L = ['%s=%r' % (key, value)
  1142. for key, value in self.__dict__.iteritems()]
  1143. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1144. def __eq__(self, other):
  1145. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1146. def __ne__(self, other):
  1147. return not (self == other)
  1148. class get_state_args(object):
  1149. """
  1150. Attributes:
  1151. - handle
  1152. """
  1153. thrift_spec = (
  1154. None, # 0
  1155. (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  1156. )
  1157. def __init__(self, handle=None,):
  1158. self.handle = handle
  1159. def read(self, iprot):
  1160. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1161. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1162. return
  1163. iprot.readStructBegin()
  1164. while True:
  1165. (fname, ftype, fid) = iprot.readFieldBegin()
  1166. if ftype == TType.STOP:
  1167. break
  1168. if fid == 1:
  1169. if ftype == TType.STRUCT:
  1170. self.handle = QueryHandle()
  1171. self.handle.read(iprot)
  1172. else:
  1173. iprot.skip(ftype)
  1174. else:
  1175. iprot.skip(ftype)
  1176. iprot.readFieldEnd()
  1177. iprot.readStructEnd()
  1178. def write(self, oprot):
  1179. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1180. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1181. return
  1182. oprot.writeStructBegin('get_state_args')
  1183. if self.handle is not None:
  1184. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  1185. self.handle.write(oprot)
  1186. oprot.writeFieldEnd()
  1187. oprot.writeFieldStop()
  1188. oprot.writeStructEnd()
  1189. def validate(self):
  1190. return
  1191. def __repr__(self):
  1192. L = ['%s=%r' % (key, value)
  1193. for key, value in self.__dict__.iteritems()]
  1194. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1195. def __eq__(self, other):
  1196. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1197. def __ne__(self, other):
  1198. return not (self == other)
  1199. class get_state_result(object):
  1200. """
  1201. Attributes:
  1202. - success
  1203. - error
  1204. """
  1205. thrift_spec = (
  1206. (0, TType.I32, 'success', None, None, ), # 0
  1207. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  1208. )
  1209. def __init__(self, success=None, error=None,):
  1210. self.success = success
  1211. self.error = error
  1212. def read(self, iprot):
  1213. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1214. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1215. return
  1216. iprot.readStructBegin()
  1217. while True:
  1218. (fname, ftype, fid) = iprot.readFieldBegin()
  1219. if ftype == TType.STOP:
  1220. break
  1221. if fid == 0:
  1222. if ftype == TType.I32:
  1223. self.success = iprot.readI32();
  1224. else:
  1225. iprot.skip(ftype)
  1226. elif fid == 1:
  1227. if ftype == TType.STRUCT:
  1228. self.error = QueryNotFoundException()
  1229. self.error.read(iprot)
  1230. else:
  1231. iprot.skip(ftype)
  1232. else:
  1233. iprot.skip(ftype)
  1234. iprot.readFieldEnd()
  1235. iprot.readStructEnd()
  1236. def write(self, oprot):
  1237. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1238. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1239. return
  1240. oprot.writeStructBegin('get_state_result')
  1241. if self.success is not None:
  1242. oprot.writeFieldBegin('success', TType.I32, 0)
  1243. oprot.writeI32(self.success)
  1244. oprot.writeFieldEnd()
  1245. if self.error is not None:
  1246. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1247. self.error.write(oprot)
  1248. oprot.writeFieldEnd()
  1249. oprot.writeFieldStop()
  1250. oprot.writeStructEnd()
  1251. def validate(self):
  1252. return
  1253. def __repr__(self):
  1254. L = ['%s=%r' % (key, value)
  1255. for key, value in self.__dict__.iteritems()]
  1256. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1257. def __eq__(self, other):
  1258. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1259. def __ne__(self, other):
  1260. return not (self == other)
  1261. class get_results_metadata_args(object):
  1262. """
  1263. Attributes:
  1264. - handle
  1265. """
  1266. thrift_spec = (
  1267. None, # 0
  1268. (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  1269. )
  1270. def __init__(self, handle=None,):
  1271. self.handle = handle
  1272. def read(self, iprot):
  1273. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1274. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1275. return
  1276. iprot.readStructBegin()
  1277. while True:
  1278. (fname, ftype, fid) = iprot.readFieldBegin()
  1279. if ftype == TType.STOP:
  1280. break
  1281. if fid == 1:
  1282. if ftype == TType.STRUCT:
  1283. self.handle = QueryHandle()
  1284. self.handle.read(iprot)
  1285. else:
  1286. iprot.skip(ftype)
  1287. else:
  1288. iprot.skip(ftype)
  1289. iprot.readFieldEnd()
  1290. iprot.readStructEnd()
  1291. def write(self, oprot):
  1292. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1293. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1294. return
  1295. oprot.writeStructBegin('get_results_metadata_args')
  1296. if self.handle is not None:
  1297. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  1298. self.handle.write(oprot)
  1299. oprot.writeFieldEnd()
  1300. oprot.writeFieldStop()
  1301. oprot.writeStructEnd()
  1302. def validate(self):
  1303. return
  1304. def __repr__(self):
  1305. L = ['%s=%r' % (key, value)
  1306. for key, value in self.__dict__.iteritems()]
  1307. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1308. def __eq__(self, other):
  1309. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1310. def __ne__(self, other):
  1311. return not (self == other)
  1312. class get_results_metadata_result(object):
  1313. """
  1314. Attributes:
  1315. - success
  1316. - error
  1317. """
  1318. thrift_spec = (
  1319. (0, TType.STRUCT, 'success', (ResultsMetadata, ResultsMetadata.thrift_spec), None, ), # 0
  1320. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  1321. )
  1322. def __init__(self, success=None, error=None,):
  1323. self.success = success
  1324. self.error = error
  1325. def read(self, iprot):
  1326. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1327. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1328. return
  1329. iprot.readStructBegin()
  1330. while True:
  1331. (fname, ftype, fid) = iprot.readFieldBegin()
  1332. if ftype == TType.STOP:
  1333. break
  1334. if fid == 0:
  1335. if ftype == TType.STRUCT:
  1336. self.success = ResultsMetadata()
  1337. self.success.read(iprot)
  1338. else:
  1339. iprot.skip(ftype)
  1340. elif fid == 1:
  1341. if ftype == TType.STRUCT:
  1342. self.error = QueryNotFoundException()
  1343. self.error.read(iprot)
  1344. else:
  1345. iprot.skip(ftype)
  1346. else:
  1347. iprot.skip(ftype)
  1348. iprot.readFieldEnd()
  1349. iprot.readStructEnd()
  1350. def write(self, oprot):
  1351. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1352. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1353. return
  1354. oprot.writeStructBegin('get_results_metadata_result')
  1355. if self.success is not None:
  1356. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1357. self.success.write(oprot)
  1358. oprot.writeFieldEnd()
  1359. if self.error is not None:
  1360. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1361. self.error.write(oprot)
  1362. oprot.writeFieldEnd()
  1363. oprot.writeFieldStop()
  1364. oprot.writeStructEnd()
  1365. def validate(self):
  1366. return
  1367. def __repr__(self):
  1368. L = ['%s=%r' % (key, value)
  1369. for key, value in self.__dict__.iteritems()]
  1370. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1371. def __eq__(self, other):
  1372. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1373. def __ne__(self, other):
  1374. return not (self == other)
  1375. class echo_args(object):
  1376. """
  1377. Attributes:
  1378. - s
  1379. """
  1380. thrift_spec = (
  1381. None, # 0
  1382. (1, TType.STRING, 's', None, None, ), # 1
  1383. )
  1384. def __init__(self, s=None,):
  1385. self.s = s
  1386. def read(self, iprot):
  1387. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1388. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1389. return
  1390. iprot.readStructBegin()
  1391. while True:
  1392. (fname, ftype, fid) = iprot.readFieldBegin()
  1393. if ftype == TType.STOP:
  1394. break
  1395. if fid == 1:
  1396. if ftype == TType.STRING:
  1397. self.s = iprot.readString();
  1398. else:
  1399. iprot.skip(ftype)
  1400. else:
  1401. iprot.skip(ftype)
  1402. iprot.readFieldEnd()
  1403. iprot.readStructEnd()
  1404. def write(self, oprot):
  1405. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1406. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1407. return
  1408. oprot.writeStructBegin('echo_args')
  1409. if self.s is not None:
  1410. oprot.writeFieldBegin('s', TType.STRING, 1)
  1411. oprot.writeString(self.s)
  1412. oprot.writeFieldEnd()
  1413. oprot.writeFieldStop()
  1414. oprot.writeStructEnd()
  1415. def validate(self):
  1416. return
  1417. def __repr__(self):
  1418. L = ['%s=%r' % (key, value)
  1419. for key, value in self.__dict__.iteritems()]
  1420. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1421. def __eq__(self, other):
  1422. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1423. def __ne__(self, other):
  1424. return not (self == other)
  1425. class echo_result(object):
  1426. """
  1427. Attributes:
  1428. - success
  1429. """
  1430. thrift_spec = (
  1431. (0, TType.STRING, 'success', None, None, ), # 0
  1432. )
  1433. def __init__(self, success=None,):
  1434. self.success = success
  1435. def read(self, iprot):
  1436. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1437. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1438. return
  1439. iprot.readStructBegin()
  1440. while True:
  1441. (fname, ftype, fid) = iprot.readFieldBegin()
  1442. if ftype == TType.STOP:
  1443. break
  1444. if fid == 0:
  1445. if ftype == TType.STRING:
  1446. self.success = iprot.readString();
  1447. else:
  1448. iprot.skip(ftype)
  1449. else:
  1450. iprot.skip(ftype)
  1451. iprot.readFieldEnd()
  1452. iprot.readStructEnd()
  1453. def write(self, oprot):
  1454. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1455. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1456. return
  1457. oprot.writeStructBegin('echo_result')
  1458. if self.success is not None:
  1459. oprot.writeFieldBegin('success', TType.STRING, 0)
  1460. oprot.writeString(self.success)
  1461. oprot.writeFieldEnd()
  1462. oprot.writeFieldStop()
  1463. oprot.writeStructEnd()
  1464. def validate(self):
  1465. return
  1466. def __repr__(self):
  1467. L = ['%s=%r' % (key, value)
  1468. for key, value in self.__dict__.iteritems()]
  1469. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1470. def __eq__(self, other):
  1471. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1472. def __ne__(self, other):
  1473. return not (self == other)
  1474. class dump_config_args(object):
  1475. thrift_spec = (
  1476. )
  1477. def read(self, iprot):
  1478. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1479. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1480. return
  1481. iprot.readStructBegin()
  1482. while True:
  1483. (fname, ftype, fid) = iprot.readFieldBegin()
  1484. if ftype == TType.STOP:
  1485. break
  1486. else:
  1487. iprot.skip(ftype)
  1488. iprot.readFieldEnd()
  1489. iprot.readStructEnd()
  1490. def write(self, oprot):
  1491. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1492. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1493. return
  1494. oprot.writeStructBegin('dump_config_args')
  1495. oprot.writeFieldStop()
  1496. oprot.writeStructEnd()
  1497. def validate(self):
  1498. return
  1499. def __repr__(self):
  1500. L = ['%s=%r' % (key, value)
  1501. for key, value in self.__dict__.iteritems()]
  1502. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1503. def __eq__(self, other):
  1504. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1505. def __ne__(self, other):
  1506. return not (self == other)
  1507. class dump_config_result(object):
  1508. """
  1509. Attributes:
  1510. - success
  1511. """
  1512. thrift_spec = (
  1513. (0, TType.STRING, 'success', None, None, ), # 0
  1514. )
  1515. def __init__(self, success=None,):
  1516. self.success = success
  1517. def read(self, iprot):
  1518. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1519. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1520. return
  1521. iprot.readStructBegin()
  1522. while True:
  1523. (fname, ftype, fid) = iprot.readFieldBegin()
  1524. if ftype == TType.STOP:
  1525. break
  1526. if fid == 0:
  1527. if ftype == TType.STRING:
  1528. self.success = iprot.readString();
  1529. else:
  1530. iprot.skip(ftype)
  1531. else:
  1532. iprot.skip(ftype)
  1533. iprot.readFieldEnd()
  1534. iprot.readStructEnd()
  1535. def write(self, oprot):
  1536. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1537. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1538. return
  1539. oprot.writeStructBegin('dump_config_result')
  1540. if self.success is not None:
  1541. oprot.writeFieldBegin('success', TType.STRING, 0)
  1542. oprot.writeString(self.success)
  1543. oprot.writeFieldEnd()
  1544. oprot.writeFieldStop()
  1545. oprot.writeStructEnd()
  1546. def validate(self):
  1547. return
  1548. def __repr__(self):
  1549. L = ['%s=%r' % (key, value)
  1550. for key, value in self.__dict__.iteritems()]
  1551. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1552. def __eq__(self, other):
  1553. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1554. def __ne__(self, other):
  1555. return not (self == other)
  1556. class get_log_args(object):
  1557. """
  1558. Attributes:
  1559. - context
  1560. """
  1561. thrift_spec = (
  1562. None, # 0
  1563. (1, TType.STRING, 'context', None, None, ), # 1
  1564. )
  1565. def __init__(self, context=None,):
  1566. self.context = context
  1567. def read(self, iprot):
  1568. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1569. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1570. return
  1571. iprot.readStructBegin()
  1572. while True:
  1573. (fname, ftype, fid) = iprot.readFieldBegin()
  1574. if ftype == TType.STOP:
  1575. break
  1576. if fid == 1:
  1577. if ftype == TType.STRING:
  1578. self.context = iprot.readString();
  1579. else:
  1580. iprot.skip(ftype)
  1581. else:
  1582. iprot.skip(ftype)
  1583. iprot.readFieldEnd()
  1584. iprot.readStructEnd()
  1585. def write(self, oprot):
  1586. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1587. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1588. return
  1589. oprot.writeStructBegin('get_log_args')
  1590. if self.context is not None:
  1591. oprot.writeFieldBegin('context', TType.STRING, 1)
  1592. oprot.writeString(self.context)
  1593. oprot.writeFieldEnd()
  1594. oprot.writeFieldStop()
  1595. oprot.writeStructEnd()
  1596. def validate(self):
  1597. return
  1598. def __repr__(self):
  1599. L = ['%s=%r' % (key, value)
  1600. for key, value in self.__dict__.iteritems()]
  1601. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1602. def __eq__(self, other):
  1603. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1604. def __ne__(self, other):
  1605. return not (self == other)
  1606. class get_log_result(object):
  1607. """
  1608. Attributes:
  1609. - success
  1610. - error
  1611. """
  1612. thrift_spec = (
  1613. (0, TType.STRING, 'success', None, None, ), # 0
  1614. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  1615. )
  1616. def __init__(self, success=None, error=None,):
  1617. self.success = success
  1618. self.error = error
  1619. def read(self, iprot):
  1620. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1621. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1622. return
  1623. iprot.readStructBegin()
  1624. while True:
  1625. (fname, ftype, fid) = iprot.readFieldBegin()
  1626. if ftype == TType.STOP:
  1627. break
  1628. if fid == 0:
  1629. if ftype == TType.STRING:
  1630. self.success = iprot.readString();
  1631. else:
  1632. iprot.skip(ftype)
  1633. elif fid == 1:
  1634. if ftype == TType.STRUCT:
  1635. self.error = QueryNotFoundException()
  1636. self.error.read(iprot)
  1637. else:
  1638. iprot.skip(ftype)
  1639. else:
  1640. iprot.skip(ftype)
  1641. iprot.readFieldEnd()
  1642. iprot.readStructEnd()
  1643. def write(self, oprot):
  1644. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1645. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1646. return
  1647. oprot.writeStructBegin('get_log_result')
  1648. if self.success is not None:
  1649. oprot.writeFieldBegin('success', TType.STRING, 0)
  1650. oprot.writeString(self.success)
  1651. oprot.writeFieldEnd()
  1652. if self.error is not None:
  1653. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1654. self.error.write(oprot)
  1655. oprot.writeFieldEnd()
  1656. oprot.writeFieldStop()
  1657. oprot.writeStructEnd()
  1658. def validate(self):
  1659. return
  1660. def __repr__(self):
  1661. L = ['%s=%r' % (key, value)
  1662. for key, value in self.__dict__.iteritems()]
  1663. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1664. def __eq__(self, other):
  1665. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1666. def __ne__(self, other):
  1667. return not (self == other)
  1668. class get_default_configuration_args(object):
  1669. """
  1670. Attributes:
  1671. - include_hadoop
  1672. """
  1673. thrift_spec = (
  1674. None, # 0
  1675. (1, TType.BOOL, 'include_hadoop', None, None, ), # 1
  1676. )
  1677. def __init__(self, include_hadoop=None,):
  1678. self.include_hadoop = include_hadoop
  1679. def read(self, iprot):
  1680. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1681. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1682. return
  1683. iprot.readStructBegin()
  1684. while True:
  1685. (fname, ftype, fid) = iprot.readFieldBegin()
  1686. if ftype == TType.STOP:
  1687. break
  1688. if fid == 1:
  1689. if ftype == TType.BOOL:
  1690. self.include_hadoop = iprot.readBool();
  1691. else:
  1692. iprot.skip(ftype)
  1693. else:
  1694. iprot.skip(ftype)
  1695. iprot.readFieldEnd()
  1696. iprot.readStructEnd()
  1697. def write(self, oprot):
  1698. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1699. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1700. return
  1701. oprot.writeStructBegin('get_default_configuration_args')
  1702. if self.include_hadoop is not None:
  1703. oprot.writeFieldBegin('include_hadoop', TType.BOOL, 1)
  1704. oprot.writeBool(self.include_hadoop)
  1705. oprot.writeFieldEnd()
  1706. oprot.writeFieldStop()
  1707. oprot.writeStructEnd()
  1708. def validate(self):
  1709. return
  1710. def __repr__(self):
  1711. L = ['%s=%r' % (key, value)
  1712. for key, value in self.__dict__.iteritems()]
  1713. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1714. def __eq__(self, other):
  1715. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1716. def __ne__(self, other):
  1717. return not (self == other)
  1718. class get_default_configuration_result(object):
  1719. """
  1720. Attributes:
  1721. - success
  1722. """
  1723. thrift_spec = (
  1724. (0, TType.LIST, 'success', (TType.STRUCT,(ConfigVariable, ConfigVariable.thrift_spec)), None, ), # 0
  1725. )
  1726. def __init__(self, success=None,):
  1727. self.success = success
  1728. def read(self, iprot):
  1729. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1730. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1731. return
  1732. iprot.readStructBegin()
  1733. while True:
  1734. (fname, ftype, fid) = iprot.readFieldBegin()
  1735. if ftype == TType.STOP:
  1736. break
  1737. if fid == 0:
  1738. if ftype == TType.LIST:
  1739. self.success = []
  1740. (_etype24, _size21) = iprot.readListBegin()
  1741. for _i25 in xrange(_size21):
  1742. _elem26 = ConfigVariable()
  1743. _elem26.read(iprot)
  1744. self.success.append(_elem26)
  1745. iprot.readListEnd()
  1746. else:
  1747. iprot.skip(ftype)
  1748. else:
  1749. iprot.skip(ftype)
  1750. iprot.readFieldEnd()
  1751. iprot.readStructEnd()
  1752. def write(self, oprot):
  1753. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1754. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1755. return
  1756. oprot.writeStructBegin('get_default_configuration_result')
  1757. if self.success is not None:
  1758. oprot.writeFieldBegin('success', TType.LIST, 0)
  1759. oprot.writeListBegin(TType.STRUCT, len(self.success))
  1760. for iter27 in self.success:
  1761. iter27.write(oprot)
  1762. oprot.writeListEnd()
  1763. oprot.writeFieldEnd()
  1764. oprot.writeFieldStop()
  1765. oprot.writeStructEnd()
  1766. def validate(self):
  1767. return
  1768. def __repr__(self):
  1769. L = ['%s=%r' % (key, value)
  1770. for key, value in self.__dict__.iteritems()]
  1771. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1772. def __eq__(self, other):
  1773. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1774. def __ne__(self, other):
  1775. return not (self == other)
  1776. class close_args(object):
  1777. """
  1778. Attributes:
  1779. - handle
  1780. """
  1781. thrift_spec = (
  1782. None, # 0
  1783. (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
  1784. )
  1785. def __init__(self, handle=None,):
  1786. self.handle = handle
  1787. def read(self, iprot):
  1788. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1789. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1790. return
  1791. iprot.readStructBegin()
  1792. while True:
  1793. (fname, ftype, fid) = iprot.readFieldBegin()
  1794. if ftype == TType.STOP:
  1795. break
  1796. if fid == 1:
  1797. if ftype == TType.STRUCT:
  1798. self.handle = QueryHandle()
  1799. self.handle.read(iprot)
  1800. else:
  1801. iprot.skip(ftype)
  1802. else:
  1803. iprot.skip(ftype)
  1804. iprot.readFieldEnd()
  1805. iprot.readStructEnd()
  1806. def write(self, oprot):
  1807. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1808. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1809. return
  1810. oprot.writeStructBegin('close_args')
  1811. if self.handle is not None:
  1812. oprot.writeFieldBegin('handle', TType.STRUCT, 1)
  1813. self.handle.write(oprot)
  1814. oprot.writeFieldEnd()
  1815. oprot.writeFieldStop()
  1816. oprot.writeStructEnd()
  1817. def validate(self):
  1818. return
  1819. def __repr__(self):
  1820. L = ['%s=%r' % (key, value)
  1821. for key, value in self.__dict__.iteritems()]
  1822. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1823. def __eq__(self, other):
  1824. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1825. def __ne__(self, other):
  1826. return not (self == other)
  1827. class close_result(object):
  1828. """
  1829. Attributes:
  1830. - error
  1831. - error2
  1832. """
  1833. thrift_spec = (
  1834. None, # 0
  1835. (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
  1836. (2, TType.STRUCT, 'error2', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 2
  1837. )
  1838. def __init__(self, error=None, error2=None,):
  1839. self.error = error
  1840. self.error2 = error2
  1841. def read(self, iprot):
  1842. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1843. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1844. return
  1845. iprot.readStructBegin()
  1846. while True:
  1847. (fname, ftype, fid) = iprot.readFieldBegin()
  1848. if ftype == TType.STOP:
  1849. break
  1850. if fid == 1:
  1851. if ftype == TType.STRUCT:
  1852. self.error = QueryNotFoundException()
  1853. self.error.read(iprot)
  1854. else:
  1855. iprot.skip(ftype)
  1856. elif fid == 2:
  1857. if ftype == TType.STRUCT:
  1858. self.error2 = BeeswaxException()
  1859. self.error2.read(iprot)
  1860. else:
  1861. iprot.skip(ftype)
  1862. else:
  1863. iprot.skip(ftype)
  1864. iprot.readFieldEnd()
  1865. iprot.readStructEnd()
  1866. def write(self, oprot):
  1867. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1868. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1869. return
  1870. oprot.writeStructBegin('close_result')
  1871. if self.error is not None:
  1872. oprot.writeFieldBegin('error', TType.STRUCT, 1)
  1873. self.error.write(oprot)
  1874. oprot.writeFieldEnd()
  1875. if self.error2 is not None:
  1876. oprot.writeFieldBegin('error2', TType.STRUCT, 2)
  1877. self.error2.write(oprot)
  1878. oprot.writeFieldEnd()
  1879. oprot.writeFieldStop()
  1880. oprot.writeStructEnd()
  1881. def validate(self):
  1882. return
  1883. def __repr__(self):
  1884. L = ['%s=%r' % (key, value)
  1885. for key, value in self.__dict__.iteritems()]
  1886. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1887. def __eq__(self, other):
  1888. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1889. def __ne__(self, other):
  1890. return not (self == other)
  1891. class clean_args(object):
  1892. """
  1893. Attributes:
  1894. - log_context
  1895. """
  1896. thrift_spec = (
  1897. None, # 0
  1898. (1, TType.STRING, 'log_context', None, None, ), # 1
  1899. )
  1900. def __init__(self, log_context=None,):
  1901. self.log_context = log_context
  1902. def read(self, iprot):
  1903. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1904. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1905. return
  1906. iprot.readStructBegin()
  1907. while True:
  1908. (fname, ftype, fid) = iprot.readFieldBegin()
  1909. if ftype == TType.STOP:
  1910. break
  1911. if fid == 1:
  1912. if ftype == TType.STRING:
  1913. self.log_context = iprot.readString();
  1914. else:
  1915. iprot.skip(ftype)
  1916. else:
  1917. iprot.skip(ftype)
  1918. iprot.readFieldEnd()
  1919. iprot.readStructEnd()
  1920. def write(self, oprot):
  1921. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1922. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1923. return
  1924. oprot.writeStructBegin('clean_args')
  1925. if self.log_context is not None:
  1926. oprot.writeFieldBegin('log_context', TType.STRING, 1)
  1927. oprot.writeString(self.log_context)
  1928. oprot.writeFieldEnd()
  1929. oprot.writeFieldStop()
  1930. oprot.writeStructEnd()
  1931. def validate(self):
  1932. return
  1933. def __repr__(self):
  1934. L = ['%s=%r' % (key, value)
  1935. for key, value in self.__dict__.iteritems()]
  1936. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1937. def __eq__(self, other):
  1938. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1939. def __ne__(self, other):
  1940. return not (self == other)
  1941. class clean_result(object):
  1942. thrift_spec = (
  1943. )
  1944. def read(self, iprot):
  1945. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1946. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1947. return
  1948. iprot.readStructBegin()
  1949. while True:
  1950. (fname, ftype, fid) = iprot.readFieldBegin()
  1951. if ftype == TType.STOP:
  1952. break
  1953. else:
  1954. iprot.skip(ftype)
  1955. iprot.readFieldEnd()
  1956. iprot.readStructEnd()
  1957. def write(self, oprot):
  1958. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1959. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1960. return
  1961. oprot.writeStructBegin('clean_result')
  1962. oprot.writeFieldStop()
  1963. oprot.writeStructEnd()
  1964. def validate(self):
  1965. return
  1966. def __repr__(self):
  1967. L = ['%s=%r' % (key, value)
  1968. for key, value in self.__dict__.iteritems()]
  1969. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1970. def __eq__(self, other):
  1971. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1972. def __ne__(self, other):
  1973. return not (self == other)