BeeswaxService.py 75 KB

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