FacebookService.py 70 KB

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