FacebookService.py 63 KB

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