BeeswaxService.py 75 KB

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