BeeswaxService.py 68 KB

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