FacebookService.py 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154
  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 fb303.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. """
  23. Standard base service
  24. """
  25. def getName(self):
  26. """
  27. Returns a descriptive name of the service
  28. """
  29. pass
  30. def getVersion(self):
  31. """
  32. Returns the version of the service
  33. """
  34. pass
  35. def getStatus(self):
  36. """
  37. Gets the status of this service
  38. """
  39. pass
  40. def getStatusDetails(self):
  41. """
  42. User friendly description of status, such as why the service is in
  43. the dead or warning state, or what is being started or stopped.
  44. """
  45. pass
  46. def getCounters(self):
  47. """
  48. Gets the counters for this service
  49. """
  50. pass
  51. def getCounter(self, key):
  52. """
  53. Gets the value of a single counter
  54. Parameters:
  55. - key
  56. """
  57. pass
  58. def setOption(self, key, value):
  59. """
  60. Sets an option
  61. Parameters:
  62. - key
  63. - value
  64. """
  65. pass
  66. def getOption(self, key):
  67. """
  68. Gets an option
  69. Parameters:
  70. - key
  71. """
  72. pass
  73. def getOptions(self):
  74. """
  75. Gets all options
  76. """
  77. pass
  78. def getCpuProfile(self, profileDurationInSec):
  79. """
  80. Returns a CPU profile over the given time interval (client and server
  81. must agree on the profile format).
  82. Parameters:
  83. - profileDurationInSec
  84. """
  85. pass
  86. def aliveSince(self):
  87. """
  88. Returns the unix time that the server has been running since
  89. """
  90. pass
  91. def reinitialize(self):
  92. """
  93. Tell the server to reload its configuration, reopen log files, etc
  94. """
  95. pass
  96. def shutdown(self):
  97. """
  98. Suggest a shutdown to the server
  99. """
  100. pass
  101. class Client(Iface):
  102. """
  103. Standard base service
  104. """
  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 getName(self):
  111. """
  112. Returns a descriptive name of the service
  113. """
  114. self.send_getName()
  115. return self.recv_getName()
  116. def send_getName(self):
  117. self._oprot.writeMessageBegin('getName', TMessageType.CALL, self._seqid)
  118. args = getName_args()
  119. args.write(self._oprot)
  120. self._oprot.writeMessageEnd()
  121. self._oprot.trans.flush()
  122. def recv_getName(self):
  123. iprot = self._iprot
  124. (fname, mtype, rseqid) = iprot.readMessageBegin()
  125. if mtype == TMessageType.EXCEPTION:
  126. x = TApplicationException()
  127. x.read(iprot)
  128. iprot.readMessageEnd()
  129. raise x
  130. result = getName_result()
  131. result.read(iprot)
  132. iprot.readMessageEnd()
  133. if result.success is not None:
  134. return result.success
  135. raise TApplicationException(TApplicationException.MISSING_RESULT, "getName failed: unknown result")
  136. def getVersion(self):
  137. """
  138. Returns the version of the service
  139. """
  140. self.send_getVersion()
  141. return self.recv_getVersion()
  142. def send_getVersion(self):
  143. self._oprot.writeMessageBegin('getVersion', TMessageType.CALL, self._seqid)
  144. args = getVersion_args()
  145. args.write(self._oprot)
  146. self._oprot.writeMessageEnd()
  147. self._oprot.trans.flush()
  148. def recv_getVersion(self):
  149. iprot = self._iprot
  150. (fname, mtype, rseqid) = iprot.readMessageBegin()
  151. if mtype == TMessageType.EXCEPTION:
  152. x = TApplicationException()
  153. x.read(iprot)
  154. iprot.readMessageEnd()
  155. raise x
  156. result = getVersion_result()
  157. result.read(iprot)
  158. iprot.readMessageEnd()
  159. if result.success is not None:
  160. return result.success
  161. raise TApplicationException(TApplicationException.MISSING_RESULT, "getVersion failed: unknown result")
  162. def getStatus(self):
  163. """
  164. Gets the status of this service
  165. """
  166. self.send_getStatus()
  167. return self.recv_getStatus()
  168. def send_getStatus(self):
  169. self._oprot.writeMessageBegin('getStatus', TMessageType.CALL, self._seqid)
  170. args = getStatus_args()
  171. args.write(self._oprot)
  172. self._oprot.writeMessageEnd()
  173. self._oprot.trans.flush()
  174. def recv_getStatus(self):
  175. iprot = self._iprot
  176. (fname, mtype, rseqid) = iprot.readMessageBegin()
  177. if mtype == TMessageType.EXCEPTION:
  178. x = TApplicationException()
  179. x.read(iprot)
  180. iprot.readMessageEnd()
  181. raise x
  182. result = getStatus_result()
  183. result.read(iprot)
  184. iprot.readMessageEnd()
  185. if result.success is not None:
  186. return result.success
  187. raise TApplicationException(TApplicationException.MISSING_RESULT, "getStatus failed: unknown result")
  188. def getStatusDetails(self):
  189. """
  190. User friendly description of status, such as why the service is in
  191. the dead or warning state, or what is being started or stopped.
  192. """
  193. self.send_getStatusDetails()
  194. return self.recv_getStatusDetails()
  195. def send_getStatusDetails(self):
  196. self._oprot.writeMessageBegin('getStatusDetails', TMessageType.CALL, self._seqid)
  197. args = getStatusDetails_args()
  198. args.write(self._oprot)
  199. self._oprot.writeMessageEnd()
  200. self._oprot.trans.flush()
  201. def recv_getStatusDetails(self):
  202. iprot = self._iprot
  203. (fname, mtype, rseqid) = iprot.readMessageBegin()
  204. if mtype == TMessageType.EXCEPTION:
  205. x = TApplicationException()
  206. x.read(iprot)
  207. iprot.readMessageEnd()
  208. raise x
  209. result = getStatusDetails_result()
  210. result.read(iprot)
  211. iprot.readMessageEnd()
  212. if result.success is not None:
  213. return result.success
  214. raise TApplicationException(TApplicationException.MISSING_RESULT, "getStatusDetails failed: unknown result")
  215. def getCounters(self):
  216. """
  217. Gets the counters for this service
  218. """
  219. self.send_getCounters()
  220. return self.recv_getCounters()
  221. def send_getCounters(self):
  222. self._oprot.writeMessageBegin('getCounters', TMessageType.CALL, self._seqid)
  223. args = getCounters_args()
  224. args.write(self._oprot)
  225. self._oprot.writeMessageEnd()
  226. self._oprot.trans.flush()
  227. def recv_getCounters(self):
  228. iprot = self._iprot
  229. (fname, mtype, rseqid) = iprot.readMessageBegin()
  230. if mtype == TMessageType.EXCEPTION:
  231. x = TApplicationException()
  232. x.read(iprot)
  233. iprot.readMessageEnd()
  234. raise x
  235. result = getCounters_result()
  236. result.read(iprot)
  237. iprot.readMessageEnd()
  238. if result.success is not None:
  239. return result.success
  240. raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounters failed: unknown result")
  241. def getCounter(self, key):
  242. """
  243. Gets the value of a single counter
  244. Parameters:
  245. - key
  246. """
  247. self.send_getCounter(key)
  248. return self.recv_getCounter()
  249. def send_getCounter(self, key):
  250. self._oprot.writeMessageBegin('getCounter', TMessageType.CALL, self._seqid)
  251. args = getCounter_args()
  252. args.key = key
  253. args.write(self._oprot)
  254. self._oprot.writeMessageEnd()
  255. self._oprot.trans.flush()
  256. def recv_getCounter(self):
  257. iprot = self._iprot
  258. (fname, mtype, rseqid) = iprot.readMessageBegin()
  259. if mtype == TMessageType.EXCEPTION:
  260. x = TApplicationException()
  261. x.read(iprot)
  262. iprot.readMessageEnd()
  263. raise x
  264. result = getCounter_result()
  265. result.read(iprot)
  266. iprot.readMessageEnd()
  267. if result.success is not None:
  268. return result.success
  269. raise TApplicationException(TApplicationException.MISSING_RESULT, "getCounter failed: unknown result")
  270. def setOption(self, key, value):
  271. """
  272. Sets an option
  273. Parameters:
  274. - key
  275. - value
  276. """
  277. self.send_setOption(key, value)
  278. self.recv_setOption()
  279. def send_setOption(self, key, value):
  280. self._oprot.writeMessageBegin('setOption', TMessageType.CALL, self._seqid)
  281. args = setOption_args()
  282. args.key = key
  283. args.value = value
  284. args.write(self._oprot)
  285. self._oprot.writeMessageEnd()
  286. self._oprot.trans.flush()
  287. def recv_setOption(self):
  288. iprot = self._iprot
  289. (fname, mtype, rseqid) = iprot.readMessageBegin()
  290. if mtype == TMessageType.EXCEPTION:
  291. x = TApplicationException()
  292. x.read(iprot)
  293. iprot.readMessageEnd()
  294. raise x
  295. result = setOption_result()
  296. result.read(iprot)
  297. iprot.readMessageEnd()
  298. return
  299. def getOption(self, key):
  300. """
  301. Gets an option
  302. Parameters:
  303. - key
  304. """
  305. self.send_getOption(key)
  306. return self.recv_getOption()
  307. def send_getOption(self, key):
  308. self._oprot.writeMessageBegin('getOption', TMessageType.CALL, self._seqid)
  309. args = getOption_args()
  310. args.key = key
  311. args.write(self._oprot)
  312. self._oprot.writeMessageEnd()
  313. self._oprot.trans.flush()
  314. def recv_getOption(self):
  315. iprot = self._iprot
  316. (fname, mtype, rseqid) = iprot.readMessageBegin()
  317. if mtype == TMessageType.EXCEPTION:
  318. x = TApplicationException()
  319. x.read(iprot)
  320. iprot.readMessageEnd()
  321. raise x
  322. result = getOption_result()
  323. result.read(iprot)
  324. iprot.readMessageEnd()
  325. if result.success is not None:
  326. return result.success
  327. raise TApplicationException(TApplicationException.MISSING_RESULT, "getOption failed: unknown result")
  328. def getOptions(self):
  329. """
  330. Gets all options
  331. """
  332. self.send_getOptions()
  333. return self.recv_getOptions()
  334. def send_getOptions(self):
  335. self._oprot.writeMessageBegin('getOptions', TMessageType.CALL, self._seqid)
  336. args = getOptions_args()
  337. args.write(self._oprot)
  338. self._oprot.writeMessageEnd()
  339. self._oprot.trans.flush()
  340. def recv_getOptions(self):
  341. iprot = self._iprot
  342. (fname, mtype, rseqid) = iprot.readMessageBegin()
  343. if mtype == TMessageType.EXCEPTION:
  344. x = TApplicationException()
  345. x.read(iprot)
  346. iprot.readMessageEnd()
  347. raise x
  348. result = getOptions_result()
  349. result.read(iprot)
  350. iprot.readMessageEnd()
  351. if result.success is not None:
  352. return result.success
  353. raise TApplicationException(TApplicationException.MISSING_RESULT, "getOptions failed: unknown result")
  354. def getCpuProfile(self, profileDurationInSec):
  355. """
  356. Returns a CPU profile over the given time interval (client and server
  357. must agree on the profile format).
  358. Parameters:
  359. - profileDurationInSec
  360. """
  361. self.send_getCpuProfile(profileDurationInSec)
  362. return self.recv_getCpuProfile()
  363. def send_getCpuProfile(self, profileDurationInSec):
  364. self._oprot.writeMessageBegin('getCpuProfile', TMessageType.CALL, self._seqid)
  365. args = getCpuProfile_args()
  366. args.profileDurationInSec = profileDurationInSec
  367. args.write(self._oprot)
  368. self._oprot.writeMessageEnd()
  369. self._oprot.trans.flush()
  370. def recv_getCpuProfile(self):
  371. iprot = self._iprot
  372. (fname, mtype, rseqid) = iprot.readMessageBegin()
  373. if mtype == TMessageType.EXCEPTION:
  374. x = TApplicationException()
  375. x.read(iprot)
  376. iprot.readMessageEnd()
  377. raise x
  378. result = getCpuProfile_result()
  379. result.read(iprot)
  380. iprot.readMessageEnd()
  381. if result.success is not None:
  382. return result.success
  383. raise TApplicationException(TApplicationException.MISSING_RESULT, "getCpuProfile failed: unknown result")
  384. def aliveSince(self):
  385. """
  386. Returns the unix time that the server has been running since
  387. """
  388. self.send_aliveSince()
  389. return self.recv_aliveSince()
  390. def send_aliveSince(self):
  391. self._oprot.writeMessageBegin('aliveSince', TMessageType.CALL, self._seqid)
  392. args = aliveSince_args()
  393. args.write(self._oprot)
  394. self._oprot.writeMessageEnd()
  395. self._oprot.trans.flush()
  396. def recv_aliveSince(self):
  397. iprot = self._iprot
  398. (fname, mtype, rseqid) = iprot.readMessageBegin()
  399. if mtype == TMessageType.EXCEPTION:
  400. x = TApplicationException()
  401. x.read(iprot)
  402. iprot.readMessageEnd()
  403. raise x
  404. result = aliveSince_result()
  405. result.read(iprot)
  406. iprot.readMessageEnd()
  407. if result.success is not None:
  408. return result.success
  409. raise TApplicationException(TApplicationException.MISSING_RESULT, "aliveSince failed: unknown result")
  410. def reinitialize(self):
  411. """
  412. Tell the server to reload its configuration, reopen log files, etc
  413. """
  414. self.send_reinitialize()
  415. def send_reinitialize(self):
  416. self._oprot.writeMessageBegin('reinitialize', TMessageType.ONEWAY, self._seqid)
  417. args = reinitialize_args()
  418. args.write(self._oprot)
  419. self._oprot.writeMessageEnd()
  420. self._oprot.trans.flush()
  421. def shutdown(self):
  422. """
  423. Suggest a shutdown to the server
  424. """
  425. self.send_shutdown()
  426. def send_shutdown(self):
  427. self._oprot.writeMessageBegin('shutdown', TMessageType.ONEWAY, self._seqid)
  428. args = shutdown_args()
  429. args.write(self._oprot)
  430. self._oprot.writeMessageEnd()
  431. self._oprot.trans.flush()
  432. class Processor(Iface, TProcessor):
  433. def __init__(self, handler):
  434. self._handler = handler
  435. self._processMap = {}
  436. self._processMap["getName"] = Processor.process_getName
  437. self._processMap["getVersion"] = Processor.process_getVersion
  438. self._processMap["getStatus"] = Processor.process_getStatus
  439. self._processMap["getStatusDetails"] = Processor.process_getStatusDetails
  440. self._processMap["getCounters"] = Processor.process_getCounters
  441. self._processMap["getCounter"] = Processor.process_getCounter
  442. self._processMap["setOption"] = Processor.process_setOption
  443. self._processMap["getOption"] = Processor.process_getOption
  444. self._processMap["getOptions"] = Processor.process_getOptions
  445. self._processMap["getCpuProfile"] = Processor.process_getCpuProfile
  446. self._processMap["aliveSince"] = Processor.process_aliveSince
  447. self._processMap["reinitialize"] = Processor.process_reinitialize
  448. self._processMap["shutdown"] = Processor.process_shutdown
  449. def process(self, iprot, oprot):
  450. (name, type, seqid) = iprot.readMessageBegin()
  451. if name not in self._processMap:
  452. iprot.skip(TType.STRUCT)
  453. iprot.readMessageEnd()
  454. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  455. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  456. x.write(oprot)
  457. oprot.writeMessageEnd()
  458. oprot.trans.flush()
  459. return
  460. else:
  461. self._processMap[name](self, seqid, iprot, oprot)
  462. return True
  463. def process_getName(self, seqid, iprot, oprot):
  464. args = getName_args()
  465. args.read(iprot)
  466. iprot.readMessageEnd()
  467. result = getName_result()
  468. try:
  469. result.success = self._handler.getName()
  470. msg_type = TMessageType.REPLY
  471. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  472. raise
  473. except Exception as ex:
  474. msg_type = TMessageType.EXCEPTION
  475. logging.exception(ex)
  476. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  477. oprot.writeMessageBegin("getName", msg_type, seqid)
  478. result.write(oprot)
  479. oprot.writeMessageEnd()
  480. oprot.trans.flush()
  481. def process_getVersion(self, seqid, iprot, oprot):
  482. args = getVersion_args()
  483. args.read(iprot)
  484. iprot.readMessageEnd()
  485. result = getVersion_result()
  486. try:
  487. result.success = self._handler.getVersion()
  488. msg_type = TMessageType.REPLY
  489. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  490. raise
  491. except Exception as ex:
  492. msg_type = TMessageType.EXCEPTION
  493. logging.exception(ex)
  494. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  495. oprot.writeMessageBegin("getVersion", msg_type, seqid)
  496. result.write(oprot)
  497. oprot.writeMessageEnd()
  498. oprot.trans.flush()
  499. def process_getStatus(self, seqid, iprot, oprot):
  500. args = getStatus_args()
  501. args.read(iprot)
  502. iprot.readMessageEnd()
  503. result = getStatus_result()
  504. try:
  505. result.success = self._handler.getStatus()
  506. msg_type = TMessageType.REPLY
  507. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  508. raise
  509. except Exception as ex:
  510. msg_type = TMessageType.EXCEPTION
  511. logging.exception(ex)
  512. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  513. oprot.writeMessageBegin("getStatus", msg_type, seqid)
  514. result.write(oprot)
  515. oprot.writeMessageEnd()
  516. oprot.trans.flush()
  517. def process_getStatusDetails(self, seqid, iprot, oprot):
  518. args = getStatusDetails_args()
  519. args.read(iprot)
  520. iprot.readMessageEnd()
  521. result = getStatusDetails_result()
  522. try:
  523. result.success = self._handler.getStatusDetails()
  524. msg_type = TMessageType.REPLY
  525. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  526. raise
  527. except Exception as ex:
  528. msg_type = TMessageType.EXCEPTION
  529. logging.exception(ex)
  530. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  531. oprot.writeMessageBegin("getStatusDetails", msg_type, seqid)
  532. result.write(oprot)
  533. oprot.writeMessageEnd()
  534. oprot.trans.flush()
  535. def process_getCounters(self, seqid, iprot, oprot):
  536. args = getCounters_args()
  537. args.read(iprot)
  538. iprot.readMessageEnd()
  539. result = getCounters_result()
  540. try:
  541. result.success = self._handler.getCounters()
  542. msg_type = TMessageType.REPLY
  543. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  544. raise
  545. except Exception as ex:
  546. msg_type = TMessageType.EXCEPTION
  547. logging.exception(ex)
  548. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  549. oprot.writeMessageBegin("getCounters", msg_type, seqid)
  550. result.write(oprot)
  551. oprot.writeMessageEnd()
  552. oprot.trans.flush()
  553. def process_getCounter(self, seqid, iprot, oprot):
  554. args = getCounter_args()
  555. args.read(iprot)
  556. iprot.readMessageEnd()
  557. result = getCounter_result()
  558. try:
  559. result.success = self._handler.getCounter(args.key)
  560. msg_type = TMessageType.REPLY
  561. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  562. raise
  563. except Exception as ex:
  564. msg_type = TMessageType.EXCEPTION
  565. logging.exception(ex)
  566. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  567. oprot.writeMessageBegin("getCounter", msg_type, seqid)
  568. result.write(oprot)
  569. oprot.writeMessageEnd()
  570. oprot.trans.flush()
  571. def process_setOption(self, seqid, iprot, oprot):
  572. args = setOption_args()
  573. args.read(iprot)
  574. iprot.readMessageEnd()
  575. result = setOption_result()
  576. try:
  577. self._handler.setOption(args.key, args.value)
  578. msg_type = TMessageType.REPLY
  579. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  580. raise
  581. except Exception as ex:
  582. msg_type = TMessageType.EXCEPTION
  583. logging.exception(ex)
  584. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  585. oprot.writeMessageBegin("setOption", msg_type, seqid)
  586. result.write(oprot)
  587. oprot.writeMessageEnd()
  588. oprot.trans.flush()
  589. def process_getOption(self, seqid, iprot, oprot):
  590. args = getOption_args()
  591. args.read(iprot)
  592. iprot.readMessageEnd()
  593. result = getOption_result()
  594. try:
  595. result.success = self._handler.getOption(args.key)
  596. msg_type = TMessageType.REPLY
  597. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  598. raise
  599. except Exception as ex:
  600. msg_type = TMessageType.EXCEPTION
  601. logging.exception(ex)
  602. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  603. oprot.writeMessageBegin("getOption", msg_type, seqid)
  604. result.write(oprot)
  605. oprot.writeMessageEnd()
  606. oprot.trans.flush()
  607. def process_getOptions(self, seqid, iprot, oprot):
  608. args = getOptions_args()
  609. args.read(iprot)
  610. iprot.readMessageEnd()
  611. result = getOptions_result()
  612. try:
  613. result.success = self._handler.getOptions()
  614. msg_type = TMessageType.REPLY
  615. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  616. raise
  617. except Exception as ex:
  618. msg_type = TMessageType.EXCEPTION
  619. logging.exception(ex)
  620. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  621. oprot.writeMessageBegin("getOptions", msg_type, seqid)
  622. result.write(oprot)
  623. oprot.writeMessageEnd()
  624. oprot.trans.flush()
  625. def process_getCpuProfile(self, seqid, iprot, oprot):
  626. args = getCpuProfile_args()
  627. args.read(iprot)
  628. iprot.readMessageEnd()
  629. result = getCpuProfile_result()
  630. try:
  631. result.success = self._handler.getCpuProfile(args.profileDurationInSec)
  632. msg_type = TMessageType.REPLY
  633. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  634. raise
  635. except Exception as ex:
  636. msg_type = TMessageType.EXCEPTION
  637. logging.exception(ex)
  638. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  639. oprot.writeMessageBegin("getCpuProfile", msg_type, seqid)
  640. result.write(oprot)
  641. oprot.writeMessageEnd()
  642. oprot.trans.flush()
  643. def process_aliveSince(self, seqid, iprot, oprot):
  644. args = aliveSince_args()
  645. args.read(iprot)
  646. iprot.readMessageEnd()
  647. result = aliveSince_result()
  648. try:
  649. result.success = self._handler.aliveSince()
  650. msg_type = TMessageType.REPLY
  651. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  652. raise
  653. except Exception as ex:
  654. msg_type = TMessageType.EXCEPTION
  655. logging.exception(ex)
  656. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  657. oprot.writeMessageBegin("aliveSince", msg_type, seqid)
  658. result.write(oprot)
  659. oprot.writeMessageEnd()
  660. oprot.trans.flush()
  661. def process_reinitialize(self, seqid, iprot, oprot):
  662. args = reinitialize_args()
  663. args.read(iprot)
  664. iprot.readMessageEnd()
  665. try:
  666. self._handler.reinitialize()
  667. msg_type = TMessageType.REPLY
  668. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  669. raise
  670. except:
  671. pass
  672. def process_shutdown(self, seqid, iprot, oprot):
  673. args = shutdown_args()
  674. args.read(iprot)
  675. iprot.readMessageEnd()
  676. try:
  677. self._handler.shutdown()
  678. msg_type = TMessageType.REPLY
  679. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  680. raise
  681. except:
  682. pass
  683. # HELPER FUNCTIONS AND STRUCTURES
  684. class getName_args(object):
  685. thrift_spec = (
  686. )
  687. def read(self, iprot):
  688. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  689. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  690. return
  691. iprot.readStructBegin()
  692. while True:
  693. (fname, ftype, fid) = iprot.readFieldBegin()
  694. if ftype == TType.STOP:
  695. break
  696. else:
  697. iprot.skip(ftype)
  698. iprot.readFieldEnd()
  699. iprot.readStructEnd()
  700. def write(self, oprot):
  701. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  702. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  703. return
  704. oprot.writeStructBegin('getName_args')
  705. oprot.writeFieldStop()
  706. oprot.writeStructEnd()
  707. def validate(self):
  708. return
  709. def __hash__(self):
  710. value = 17
  711. return value
  712. def __repr__(self):
  713. L = ['%s=%r' % (key, value)
  714. for key, value in self.__dict__.items()]
  715. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  716. def __eq__(self, other):
  717. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  718. def __ne__(self, other):
  719. return not (self == other)
  720. class getName_result(object):
  721. """
  722. Attributes:
  723. - success
  724. """
  725. thrift_spec = (
  726. (0, TType.STRING, 'success', None, None, ), # 0
  727. )
  728. def __init__(self, success=None,):
  729. self.success = success
  730. def read(self, iprot):
  731. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  732. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  733. return
  734. iprot.readStructBegin()
  735. while True:
  736. (fname, ftype, fid) = iprot.readFieldBegin()
  737. if ftype == TType.STOP:
  738. break
  739. if fid == 0:
  740. if ftype == TType.STRING:
  741. self.success = iprot.readString()
  742. else:
  743. iprot.skip(ftype)
  744. else:
  745. iprot.skip(ftype)
  746. iprot.readFieldEnd()
  747. iprot.readStructEnd()
  748. def write(self, oprot):
  749. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  750. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  751. return
  752. oprot.writeStructBegin('getName_result')
  753. if self.success is not None:
  754. oprot.writeFieldBegin('success', TType.STRING, 0)
  755. oprot.writeString(self.success)
  756. oprot.writeFieldEnd()
  757. oprot.writeFieldStop()
  758. oprot.writeStructEnd()
  759. def validate(self):
  760. return
  761. def __hash__(self):
  762. value = 17
  763. value = (value * 31) ^ hash(self.success)
  764. return value
  765. def __repr__(self):
  766. L = ['%s=%r' % (key, value)
  767. for key, value in self.__dict__.items()]
  768. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  769. def __eq__(self, other):
  770. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  771. def __ne__(self, other):
  772. return not (self == other)
  773. class getVersion_args(object):
  774. thrift_spec = (
  775. )
  776. def read(self, iprot):
  777. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  778. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  779. return
  780. iprot.readStructBegin()
  781. while True:
  782. (fname, ftype, fid) = iprot.readFieldBegin()
  783. if ftype == TType.STOP:
  784. break
  785. else:
  786. iprot.skip(ftype)
  787. iprot.readFieldEnd()
  788. iprot.readStructEnd()
  789. def write(self, oprot):
  790. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  791. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  792. return
  793. oprot.writeStructBegin('getVersion_args')
  794. oprot.writeFieldStop()
  795. oprot.writeStructEnd()
  796. def validate(self):
  797. return
  798. def __hash__(self):
  799. value = 17
  800. return value
  801. def __repr__(self):
  802. L = ['%s=%r' % (key, value)
  803. for key, value in self.__dict__.items()]
  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 getVersion_result(object):
  810. """
  811. Attributes:
  812. - success
  813. """
  814. thrift_spec = (
  815. (0, TType.STRING, 'success', None, None, ), # 0
  816. )
  817. def __init__(self, success=None,):
  818. self.success = success
  819. def read(self, iprot):
  820. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  821. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  822. return
  823. iprot.readStructBegin()
  824. while True:
  825. (fname, ftype, fid) = iprot.readFieldBegin()
  826. if ftype == TType.STOP:
  827. break
  828. if fid == 0:
  829. if ftype == TType.STRING:
  830. self.success = iprot.readString()
  831. else:
  832. iprot.skip(ftype)
  833. else:
  834. iprot.skip(ftype)
  835. iprot.readFieldEnd()
  836. iprot.readStructEnd()
  837. def write(self, oprot):
  838. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  839. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  840. return
  841. oprot.writeStructBegin('getVersion_result')
  842. if self.success is not None:
  843. oprot.writeFieldBegin('success', TType.STRING, 0)
  844. oprot.writeString(self.success)
  845. oprot.writeFieldEnd()
  846. oprot.writeFieldStop()
  847. oprot.writeStructEnd()
  848. def validate(self):
  849. return
  850. def __hash__(self):
  851. value = 17
  852. value = (value * 31) ^ hash(self.success)
  853. return value
  854. def __repr__(self):
  855. L = ['%s=%r' % (key, value)
  856. for key, value in self.__dict__.items()]
  857. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  858. def __eq__(self, other):
  859. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  860. def __ne__(self, other):
  861. return not (self == other)
  862. class getStatus_args(object):
  863. thrift_spec = (
  864. )
  865. def read(self, iprot):
  866. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  867. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  868. return
  869. iprot.readStructBegin()
  870. while True:
  871. (fname, ftype, fid) = iprot.readFieldBegin()
  872. if ftype == TType.STOP:
  873. break
  874. else:
  875. iprot.skip(ftype)
  876. iprot.readFieldEnd()
  877. iprot.readStructEnd()
  878. def write(self, oprot):
  879. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  880. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  881. return
  882. oprot.writeStructBegin('getStatus_args')
  883. oprot.writeFieldStop()
  884. oprot.writeStructEnd()
  885. def validate(self):
  886. return
  887. def __hash__(self):
  888. value = 17
  889. return value
  890. def __repr__(self):
  891. L = ['%s=%r' % (key, value)
  892. for key, value in self.__dict__.items()]
  893. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  894. def __eq__(self, other):
  895. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  896. def __ne__(self, other):
  897. return not (self == other)
  898. class getStatus_result(object):
  899. """
  900. Attributes:
  901. - success
  902. """
  903. thrift_spec = (
  904. (0, TType.I32, 'success', None, None, ), # 0
  905. )
  906. def __init__(self, success=None,):
  907. self.success = success
  908. def read(self, iprot):
  909. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  910. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  911. return
  912. iprot.readStructBegin()
  913. while True:
  914. (fname, ftype, fid) = iprot.readFieldBegin()
  915. if ftype == TType.STOP:
  916. break
  917. if fid == 0:
  918. if ftype == TType.I32:
  919. self.success = iprot.readI32()
  920. else:
  921. iprot.skip(ftype)
  922. else:
  923. iprot.skip(ftype)
  924. iprot.readFieldEnd()
  925. iprot.readStructEnd()
  926. def write(self, oprot):
  927. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  928. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  929. return
  930. oprot.writeStructBegin('getStatus_result')
  931. if self.success is not None:
  932. oprot.writeFieldBegin('success', TType.I32, 0)
  933. oprot.writeI32(self.success)
  934. oprot.writeFieldEnd()
  935. oprot.writeFieldStop()
  936. oprot.writeStructEnd()
  937. def validate(self):
  938. return
  939. def __hash__(self):
  940. value = 17
  941. value = (value * 31) ^ hash(self.success)
  942. return value
  943. def __repr__(self):
  944. L = ['%s=%r' % (key, value)
  945. for key, value in self.__dict__.items()]
  946. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  947. def __eq__(self, other):
  948. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  949. def __ne__(self, other):
  950. return not (self == other)
  951. class getStatusDetails_args(object):
  952. thrift_spec = (
  953. )
  954. def read(self, iprot):
  955. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  956. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  957. return
  958. iprot.readStructBegin()
  959. while True:
  960. (fname, ftype, fid) = iprot.readFieldBegin()
  961. if ftype == TType.STOP:
  962. break
  963. else:
  964. iprot.skip(ftype)
  965. iprot.readFieldEnd()
  966. iprot.readStructEnd()
  967. def write(self, oprot):
  968. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  969. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  970. return
  971. oprot.writeStructBegin('getStatusDetails_args')
  972. oprot.writeFieldStop()
  973. oprot.writeStructEnd()
  974. def validate(self):
  975. return
  976. def __hash__(self):
  977. value = 17
  978. return value
  979. def __repr__(self):
  980. L = ['%s=%r' % (key, value)
  981. for key, value in self.__dict__.items()]
  982. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  983. def __eq__(self, other):
  984. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  985. def __ne__(self, other):
  986. return not (self == other)
  987. class getStatusDetails_result(object):
  988. """
  989. Attributes:
  990. - success
  991. """
  992. thrift_spec = (
  993. (0, TType.STRING, 'success', None, None, ), # 0
  994. )
  995. def __init__(self, success=None,):
  996. self.success = success
  997. def read(self, iprot):
  998. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  999. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1000. return
  1001. iprot.readStructBegin()
  1002. while True:
  1003. (fname, ftype, fid) = iprot.readFieldBegin()
  1004. if ftype == TType.STOP:
  1005. break
  1006. if fid == 0:
  1007. if ftype == TType.STRING:
  1008. self.success = iprot.readString()
  1009. else:
  1010. iprot.skip(ftype)
  1011. else:
  1012. iprot.skip(ftype)
  1013. iprot.readFieldEnd()
  1014. iprot.readStructEnd()
  1015. def write(self, oprot):
  1016. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1017. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1018. return
  1019. oprot.writeStructBegin('getStatusDetails_result')
  1020. if self.success is not None:
  1021. oprot.writeFieldBegin('success', TType.STRING, 0)
  1022. oprot.writeString(self.success)
  1023. oprot.writeFieldEnd()
  1024. oprot.writeFieldStop()
  1025. oprot.writeStructEnd()
  1026. def validate(self):
  1027. return
  1028. def __hash__(self):
  1029. value = 17
  1030. value = (value * 31) ^ hash(self.success)
  1031. return value
  1032. def __repr__(self):
  1033. L = ['%s=%r' % (key, value)
  1034. for key, value in self.__dict__.items()]
  1035. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1036. def __eq__(self, other):
  1037. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1038. def __ne__(self, other):
  1039. return not (self == other)
  1040. class getCounters_args(object):
  1041. thrift_spec = (
  1042. )
  1043. def read(self, iprot):
  1044. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1045. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1046. return
  1047. iprot.readStructBegin()
  1048. while True:
  1049. (fname, ftype, fid) = iprot.readFieldBegin()
  1050. if ftype == TType.STOP:
  1051. break
  1052. else:
  1053. iprot.skip(ftype)
  1054. iprot.readFieldEnd()
  1055. iprot.readStructEnd()
  1056. def write(self, oprot):
  1057. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1058. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1059. return
  1060. oprot.writeStructBegin('getCounters_args')
  1061. oprot.writeFieldStop()
  1062. oprot.writeStructEnd()
  1063. def validate(self):
  1064. return
  1065. def __hash__(self):
  1066. value = 17
  1067. return value
  1068. def __repr__(self):
  1069. L = ['%s=%r' % (key, value)
  1070. for key, value in self.__dict__.items()]
  1071. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1072. def __eq__(self, other):
  1073. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1074. def __ne__(self, other):
  1075. return not (self == other)
  1076. class getCounters_result(object):
  1077. """
  1078. Attributes:
  1079. - success
  1080. """
  1081. thrift_spec = (
  1082. (0, TType.MAP, 'success', (TType.STRING,None,TType.I64,None), None, ), # 0
  1083. )
  1084. def __init__(self, success=None,):
  1085. self.success = success
  1086. def read(self, iprot):
  1087. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1088. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1089. return
  1090. iprot.readStructBegin()
  1091. while True:
  1092. (fname, ftype, fid) = iprot.readFieldBegin()
  1093. if ftype == TType.STOP:
  1094. break
  1095. if fid == 0:
  1096. if ftype == TType.MAP:
  1097. self.success = {}
  1098. (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin()
  1099. for _i4 in range(_size0):
  1100. _key5 = iprot.readString()
  1101. _val6 = iprot.readI64()
  1102. self.success[_key5] = _val6
  1103. iprot.readMapEnd()
  1104. else:
  1105. iprot.skip(ftype)
  1106. else:
  1107. iprot.skip(ftype)
  1108. iprot.readFieldEnd()
  1109. iprot.readStructEnd()
  1110. def write(self, oprot):
  1111. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1112. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1113. return
  1114. oprot.writeStructBegin('getCounters_result')
  1115. if self.success is not None:
  1116. oprot.writeFieldBegin('success', TType.MAP, 0)
  1117. oprot.writeMapBegin(TType.STRING, TType.I64, len(self.success))
  1118. for kiter7,viter8 in list(self.success.items()):
  1119. oprot.writeString(kiter7)
  1120. oprot.writeI64(viter8)
  1121. oprot.writeMapEnd()
  1122. oprot.writeFieldEnd()
  1123. oprot.writeFieldStop()
  1124. oprot.writeStructEnd()
  1125. def validate(self):
  1126. return
  1127. def __hash__(self):
  1128. value = 17
  1129. value = (value * 31) ^ hash(self.success)
  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 getCounter_args(object):
  1140. """
  1141. Attributes:
  1142. - key
  1143. """
  1144. thrift_spec = (
  1145. None, # 0
  1146. (1, TType.STRING, 'key', None, None, ), # 1
  1147. )
  1148. def __init__(self, key=None,):
  1149. self.key = key
  1150. def read(self, iprot):
  1151. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1152. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1153. return
  1154. iprot.readStructBegin()
  1155. while True:
  1156. (fname, ftype, fid) = iprot.readFieldBegin()
  1157. if ftype == TType.STOP:
  1158. break
  1159. if fid == 1:
  1160. if ftype == TType.STRING:
  1161. self.key = iprot.readString()
  1162. else:
  1163. iprot.skip(ftype)
  1164. else:
  1165. iprot.skip(ftype)
  1166. iprot.readFieldEnd()
  1167. iprot.readStructEnd()
  1168. def write(self, oprot):
  1169. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1170. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1171. return
  1172. oprot.writeStructBegin('getCounter_args')
  1173. if self.key is not None:
  1174. oprot.writeFieldBegin('key', TType.STRING, 1)
  1175. oprot.writeString(self.key)
  1176. oprot.writeFieldEnd()
  1177. oprot.writeFieldStop()
  1178. oprot.writeStructEnd()
  1179. def validate(self):
  1180. return
  1181. def __hash__(self):
  1182. value = 17
  1183. value = (value * 31) ^ hash(self.key)
  1184. return value
  1185. def __repr__(self):
  1186. L = ['%s=%r' % (key, value)
  1187. for key, value in self.__dict__.items()]
  1188. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1189. def __eq__(self, other):
  1190. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1191. def __ne__(self, other):
  1192. return not (self == other)
  1193. class getCounter_result(object):
  1194. """
  1195. Attributes:
  1196. - success
  1197. """
  1198. thrift_spec = (
  1199. (0, TType.I64, 'success', None, None, ), # 0
  1200. )
  1201. def __init__(self, success=None,):
  1202. self.success = success
  1203. def read(self, iprot):
  1204. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1205. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1206. return
  1207. iprot.readStructBegin()
  1208. while True:
  1209. (fname, ftype, fid) = iprot.readFieldBegin()
  1210. if ftype == TType.STOP:
  1211. break
  1212. if fid == 0:
  1213. if ftype == TType.I64:
  1214. self.success = iprot.readI64()
  1215. else:
  1216. iprot.skip(ftype)
  1217. else:
  1218. iprot.skip(ftype)
  1219. iprot.readFieldEnd()
  1220. iprot.readStructEnd()
  1221. def write(self, oprot):
  1222. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1223. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1224. return
  1225. oprot.writeStructBegin('getCounter_result')
  1226. if self.success is not None:
  1227. oprot.writeFieldBegin('success', TType.I64, 0)
  1228. oprot.writeI64(self.success)
  1229. oprot.writeFieldEnd()
  1230. oprot.writeFieldStop()
  1231. oprot.writeStructEnd()
  1232. def validate(self):
  1233. return
  1234. def __hash__(self):
  1235. value = 17
  1236. value = (value * 31) ^ hash(self.success)
  1237. return value
  1238. def __repr__(self):
  1239. L = ['%s=%r' % (key, value)
  1240. for key, value in self.__dict__.items()]
  1241. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1242. def __eq__(self, other):
  1243. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1244. def __ne__(self, other):
  1245. return not (self == other)
  1246. class setOption_args(object):
  1247. """
  1248. Attributes:
  1249. - key
  1250. - value
  1251. """
  1252. thrift_spec = (
  1253. None, # 0
  1254. (1, TType.STRING, 'key', None, None, ), # 1
  1255. (2, TType.STRING, 'value', None, None, ), # 2
  1256. )
  1257. def __init__(self, key=None, value=None,):
  1258. self.key = key
  1259. self.value = value
  1260. def read(self, iprot):
  1261. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1262. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1263. return
  1264. iprot.readStructBegin()
  1265. while True:
  1266. (fname, ftype, fid) = iprot.readFieldBegin()
  1267. if ftype == TType.STOP:
  1268. break
  1269. if fid == 1:
  1270. if ftype == TType.STRING:
  1271. self.key = iprot.readString()
  1272. else:
  1273. iprot.skip(ftype)
  1274. elif fid == 2:
  1275. if ftype == TType.STRING:
  1276. self.value = iprot.readString()
  1277. else:
  1278. iprot.skip(ftype)
  1279. else:
  1280. iprot.skip(ftype)
  1281. iprot.readFieldEnd()
  1282. iprot.readStructEnd()
  1283. def write(self, oprot):
  1284. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1285. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1286. return
  1287. oprot.writeStructBegin('setOption_args')
  1288. if self.key is not None:
  1289. oprot.writeFieldBegin('key', TType.STRING, 1)
  1290. oprot.writeString(self.key)
  1291. oprot.writeFieldEnd()
  1292. if self.value is not None:
  1293. oprot.writeFieldBegin('value', TType.STRING, 2)
  1294. oprot.writeString(self.value)
  1295. oprot.writeFieldEnd()
  1296. oprot.writeFieldStop()
  1297. oprot.writeStructEnd()
  1298. def validate(self):
  1299. return
  1300. def __hash__(self):
  1301. value = 17
  1302. value = (value * 31) ^ hash(self.key)
  1303. value = (value * 31) ^ hash(self.value)
  1304. return value
  1305. def __repr__(self):
  1306. L = ['%s=%r' % (key, value)
  1307. for key, value in self.__dict__.items()]
  1308. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1309. def __eq__(self, other):
  1310. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1311. def __ne__(self, other):
  1312. return not (self == other)
  1313. class setOption_result(object):
  1314. thrift_spec = (
  1315. )
  1316. def read(self, iprot):
  1317. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1318. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1319. return
  1320. iprot.readStructBegin()
  1321. while True:
  1322. (fname, ftype, fid) = iprot.readFieldBegin()
  1323. if ftype == TType.STOP:
  1324. break
  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('setOption_result')
  1334. oprot.writeFieldStop()
  1335. oprot.writeStructEnd()
  1336. def validate(self):
  1337. return
  1338. def __hash__(self):
  1339. value = 17
  1340. return value
  1341. def __repr__(self):
  1342. L = ['%s=%r' % (key, value)
  1343. for key, value in self.__dict__.items()]
  1344. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1345. def __eq__(self, other):
  1346. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1347. def __ne__(self, other):
  1348. return not (self == other)
  1349. class getOption_args(object):
  1350. """
  1351. Attributes:
  1352. - key
  1353. """
  1354. thrift_spec = (
  1355. None, # 0
  1356. (1, TType.STRING, 'key', None, None, ), # 1
  1357. )
  1358. def __init__(self, key=None,):
  1359. self.key = key
  1360. def read(self, iprot):
  1361. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1362. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1363. return
  1364. iprot.readStructBegin()
  1365. while True:
  1366. (fname, ftype, fid) = iprot.readFieldBegin()
  1367. if ftype == TType.STOP:
  1368. break
  1369. if fid == 1:
  1370. if ftype == TType.STRING:
  1371. self.key = iprot.readString()
  1372. else:
  1373. iprot.skip(ftype)
  1374. else:
  1375. iprot.skip(ftype)
  1376. iprot.readFieldEnd()
  1377. iprot.readStructEnd()
  1378. def write(self, oprot):
  1379. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1380. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1381. return
  1382. oprot.writeStructBegin('getOption_args')
  1383. if self.key is not None:
  1384. oprot.writeFieldBegin('key', TType.STRING, 1)
  1385. oprot.writeString(self.key)
  1386. oprot.writeFieldEnd()
  1387. oprot.writeFieldStop()
  1388. oprot.writeStructEnd()
  1389. def validate(self):
  1390. return
  1391. def __hash__(self):
  1392. value = 17
  1393. value = (value * 31) ^ hash(self.key)
  1394. return value
  1395. def __repr__(self):
  1396. L = ['%s=%r' % (key, value)
  1397. for key, value in self.__dict__.items()]
  1398. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1399. def __eq__(self, other):
  1400. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1401. def __ne__(self, other):
  1402. return not (self == other)
  1403. class getOption_result(object):
  1404. """
  1405. Attributes:
  1406. - success
  1407. """
  1408. thrift_spec = (
  1409. (0, TType.STRING, 'success', None, None, ), # 0
  1410. )
  1411. def __init__(self, success=None,):
  1412. self.success = success
  1413. def read(self, iprot):
  1414. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1415. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1416. return
  1417. iprot.readStructBegin()
  1418. while True:
  1419. (fname, ftype, fid) = iprot.readFieldBegin()
  1420. if ftype == TType.STOP:
  1421. break
  1422. if fid == 0:
  1423. if ftype == TType.STRING:
  1424. self.success = iprot.readString()
  1425. else:
  1426. iprot.skip(ftype)
  1427. else:
  1428. iprot.skip(ftype)
  1429. iprot.readFieldEnd()
  1430. iprot.readStructEnd()
  1431. def write(self, oprot):
  1432. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1433. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1434. return
  1435. oprot.writeStructBegin('getOption_result')
  1436. if self.success is not None:
  1437. oprot.writeFieldBegin('success', TType.STRING, 0)
  1438. oprot.writeString(self.success)
  1439. oprot.writeFieldEnd()
  1440. oprot.writeFieldStop()
  1441. oprot.writeStructEnd()
  1442. def validate(self):
  1443. return
  1444. def __hash__(self):
  1445. value = 17
  1446. value = (value * 31) ^ hash(self.success)
  1447. return value
  1448. def __repr__(self):
  1449. L = ['%s=%r' % (key, value)
  1450. for key, value in self.__dict__.items()]
  1451. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1452. def __eq__(self, other):
  1453. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1454. def __ne__(self, other):
  1455. return not (self == other)
  1456. class getOptions_args(object):
  1457. thrift_spec = (
  1458. )
  1459. def read(self, iprot):
  1460. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1461. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1462. return
  1463. iprot.readStructBegin()
  1464. while True:
  1465. (fname, ftype, fid) = iprot.readFieldBegin()
  1466. if ftype == TType.STOP:
  1467. break
  1468. else:
  1469. iprot.skip(ftype)
  1470. iprot.readFieldEnd()
  1471. iprot.readStructEnd()
  1472. def write(self, oprot):
  1473. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1474. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1475. return
  1476. oprot.writeStructBegin('getOptions_args')
  1477. oprot.writeFieldStop()
  1478. oprot.writeStructEnd()
  1479. def validate(self):
  1480. return
  1481. def __hash__(self):
  1482. value = 17
  1483. return value
  1484. def __repr__(self):
  1485. L = ['%s=%r' % (key, value)
  1486. for key, value in self.__dict__.items()]
  1487. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1488. def __eq__(self, other):
  1489. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1490. def __ne__(self, other):
  1491. return not (self == other)
  1492. class getOptions_result(object):
  1493. """
  1494. Attributes:
  1495. - success
  1496. """
  1497. thrift_spec = (
  1498. (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
  1499. )
  1500. def __init__(self, success=None,):
  1501. self.success = success
  1502. def read(self, iprot):
  1503. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1504. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1505. return
  1506. iprot.readStructBegin()
  1507. while True:
  1508. (fname, ftype, fid) = iprot.readFieldBegin()
  1509. if ftype == TType.STOP:
  1510. break
  1511. if fid == 0:
  1512. if ftype == TType.MAP:
  1513. self.success = {}
  1514. (_ktype10, _vtype11, _size9 ) = iprot.readMapBegin()
  1515. for _i13 in range(_size9):
  1516. _key14 = iprot.readString()
  1517. _val15 = iprot.readString()
  1518. self.success[_key14] = _val15
  1519. iprot.readMapEnd()
  1520. else:
  1521. iprot.skip(ftype)
  1522. else:
  1523. iprot.skip(ftype)
  1524. iprot.readFieldEnd()
  1525. iprot.readStructEnd()
  1526. def write(self, oprot):
  1527. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1528. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1529. return
  1530. oprot.writeStructBegin('getOptions_result')
  1531. if self.success is not None:
  1532. oprot.writeFieldBegin('success', TType.MAP, 0)
  1533. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
  1534. for kiter16,viter17 in list(self.success.items()):
  1535. oprot.writeString(kiter16)
  1536. oprot.writeString(viter17)
  1537. oprot.writeMapEnd()
  1538. oprot.writeFieldEnd()
  1539. oprot.writeFieldStop()
  1540. oprot.writeStructEnd()
  1541. def validate(self):
  1542. return
  1543. def __hash__(self):
  1544. value = 17
  1545. value = (value * 31) ^ hash(self.success)
  1546. return value
  1547. def __repr__(self):
  1548. L = ['%s=%r' % (key, value)
  1549. for key, value in self.__dict__.items()]
  1550. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1551. def __eq__(self, other):
  1552. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1553. def __ne__(self, other):
  1554. return not (self == other)
  1555. class getCpuProfile_args(object):
  1556. """
  1557. Attributes:
  1558. - profileDurationInSec
  1559. """
  1560. thrift_spec = (
  1561. None, # 0
  1562. (1, TType.I32, 'profileDurationInSec', None, None, ), # 1
  1563. )
  1564. def __init__(self, profileDurationInSec=None,):
  1565. self.profileDurationInSec = profileDurationInSec
  1566. def read(self, iprot):
  1567. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1568. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1569. return
  1570. iprot.readStructBegin()
  1571. while True:
  1572. (fname, ftype, fid) = iprot.readFieldBegin()
  1573. if ftype == TType.STOP:
  1574. break
  1575. if fid == 1:
  1576. if ftype == TType.I32:
  1577. self.profileDurationInSec = iprot.readI32()
  1578. else:
  1579. iprot.skip(ftype)
  1580. else:
  1581. iprot.skip(ftype)
  1582. iprot.readFieldEnd()
  1583. iprot.readStructEnd()
  1584. def write(self, oprot):
  1585. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1586. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1587. return
  1588. oprot.writeStructBegin('getCpuProfile_args')
  1589. if self.profileDurationInSec is not None:
  1590. oprot.writeFieldBegin('profileDurationInSec', TType.I32, 1)
  1591. oprot.writeI32(self.profileDurationInSec)
  1592. oprot.writeFieldEnd()
  1593. oprot.writeFieldStop()
  1594. oprot.writeStructEnd()
  1595. def validate(self):
  1596. return
  1597. def __hash__(self):
  1598. value = 17
  1599. value = (value * 31) ^ hash(self.profileDurationInSec)
  1600. return value
  1601. def __repr__(self):
  1602. L = ['%s=%r' % (key, value)
  1603. for key, value in self.__dict__.items()]
  1604. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1605. def __eq__(self, other):
  1606. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1607. def __ne__(self, other):
  1608. return not (self == other)
  1609. class getCpuProfile_result(object):
  1610. """
  1611. Attributes:
  1612. - success
  1613. """
  1614. thrift_spec = (
  1615. (0, TType.STRING, 'success', None, None, ), # 0
  1616. )
  1617. def __init__(self, success=None,):
  1618. self.success = success
  1619. def read(self, iprot):
  1620. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1621. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1622. return
  1623. iprot.readStructBegin()
  1624. while True:
  1625. (fname, ftype, fid) = iprot.readFieldBegin()
  1626. if ftype == TType.STOP:
  1627. break
  1628. if fid == 0:
  1629. if ftype == TType.STRING:
  1630. self.success = iprot.readString()
  1631. else:
  1632. iprot.skip(ftype)
  1633. else:
  1634. iprot.skip(ftype)
  1635. iprot.readFieldEnd()
  1636. iprot.readStructEnd()
  1637. def write(self, oprot):
  1638. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1639. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1640. return
  1641. oprot.writeStructBegin('getCpuProfile_result')
  1642. if self.success is not None:
  1643. oprot.writeFieldBegin('success', TType.STRING, 0)
  1644. oprot.writeString(self.success)
  1645. oprot.writeFieldEnd()
  1646. oprot.writeFieldStop()
  1647. oprot.writeStructEnd()
  1648. def validate(self):
  1649. return
  1650. def __hash__(self):
  1651. value = 17
  1652. value = (value * 31) ^ hash(self.success)
  1653. return value
  1654. def __repr__(self):
  1655. L = ['%s=%r' % (key, value)
  1656. for key, value in self.__dict__.items()]
  1657. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1658. def __eq__(self, other):
  1659. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1660. def __ne__(self, other):
  1661. return not (self == other)
  1662. class aliveSince_args(object):
  1663. thrift_spec = (
  1664. )
  1665. def read(self, iprot):
  1666. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1667. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1668. return
  1669. iprot.readStructBegin()
  1670. while True:
  1671. (fname, ftype, fid) = iprot.readFieldBegin()
  1672. if ftype == TType.STOP:
  1673. break
  1674. else:
  1675. iprot.skip(ftype)
  1676. iprot.readFieldEnd()
  1677. iprot.readStructEnd()
  1678. def write(self, oprot):
  1679. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1680. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1681. return
  1682. oprot.writeStructBegin('aliveSince_args')
  1683. oprot.writeFieldStop()
  1684. oprot.writeStructEnd()
  1685. def validate(self):
  1686. return
  1687. def __hash__(self):
  1688. value = 17
  1689. return value
  1690. def __repr__(self):
  1691. L = ['%s=%r' % (key, value)
  1692. for key, value in self.__dict__.items()]
  1693. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1694. def __eq__(self, other):
  1695. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1696. def __ne__(self, other):
  1697. return not (self == other)
  1698. class aliveSince_result(object):
  1699. """
  1700. Attributes:
  1701. - success
  1702. """
  1703. thrift_spec = (
  1704. (0, TType.I64, 'success', None, None, ), # 0
  1705. )
  1706. def __init__(self, success=None,):
  1707. self.success = success
  1708. def read(self, iprot):
  1709. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1710. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1711. return
  1712. iprot.readStructBegin()
  1713. while True:
  1714. (fname, ftype, fid) = iprot.readFieldBegin()
  1715. if ftype == TType.STOP:
  1716. break
  1717. if fid == 0:
  1718. if ftype == TType.I64:
  1719. self.success = iprot.readI64()
  1720. else:
  1721. iprot.skip(ftype)
  1722. else:
  1723. iprot.skip(ftype)
  1724. iprot.readFieldEnd()
  1725. iprot.readStructEnd()
  1726. def write(self, oprot):
  1727. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1728. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1729. return
  1730. oprot.writeStructBegin('aliveSince_result')
  1731. if self.success is not None:
  1732. oprot.writeFieldBegin('success', TType.I64, 0)
  1733. oprot.writeI64(self.success)
  1734. oprot.writeFieldEnd()
  1735. oprot.writeFieldStop()
  1736. oprot.writeStructEnd()
  1737. def validate(self):
  1738. return
  1739. def __hash__(self):
  1740. value = 17
  1741. value = (value * 31) ^ hash(self.success)
  1742. return value
  1743. def __repr__(self):
  1744. L = ['%s=%r' % (key, value)
  1745. for key, value in self.__dict__.items()]
  1746. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1747. def __eq__(self, other):
  1748. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1749. def __ne__(self, other):
  1750. return not (self == other)
  1751. class reinitialize_args(object):
  1752. thrift_spec = (
  1753. )
  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. else:
  1764. iprot.skip(ftype)
  1765. iprot.readFieldEnd()
  1766. iprot.readStructEnd()
  1767. def write(self, oprot):
  1768. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1769. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1770. return
  1771. oprot.writeStructBegin('reinitialize_args')
  1772. oprot.writeFieldStop()
  1773. oprot.writeStructEnd()
  1774. def validate(self):
  1775. return
  1776. def __hash__(self):
  1777. value = 17
  1778. return value
  1779. def __repr__(self):
  1780. L = ['%s=%r' % (key, value)
  1781. for key, value in self.__dict__.items()]
  1782. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1783. def __eq__(self, other):
  1784. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1785. def __ne__(self, other):
  1786. return not (self == other)
  1787. class shutdown_args(object):
  1788. thrift_spec = (
  1789. )
  1790. def read(self, iprot):
  1791. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1792. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1793. return
  1794. iprot.readStructBegin()
  1795. while True:
  1796. (fname, ftype, fid) = iprot.readFieldBegin()
  1797. if ftype == TType.STOP:
  1798. break
  1799. else:
  1800. iprot.skip(ftype)
  1801. iprot.readFieldEnd()
  1802. iprot.readStructEnd()
  1803. def write(self, oprot):
  1804. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1805. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1806. return
  1807. oprot.writeStructBegin('shutdown_args')
  1808. oprot.writeFieldStop()
  1809. oprot.writeStructEnd()
  1810. def validate(self):
  1811. return
  1812. def __hash__(self):
  1813. value = 17
  1814. return value
  1815. def __repr__(self):
  1816. L = ['%s=%r' % (key, value)
  1817. for key, value in self.__dict__.items()]
  1818. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1819. def __eq__(self, other):
  1820. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1821. def __ne__(self, other):
  1822. return not (self == other)