ThriftHiveMetastore.py 149 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869
  1. #
  2. # Autogenerated by Thrift
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. from thrift.Thrift import *
  7. import fb303.FacebookService
  8. from ttypes import *
  9. from thrift.Thrift import TProcessor
  10. from thrift.transport import TTransport
  11. from thrift.protocol import TBinaryProtocol
  12. try:
  13. from thrift.protocol import fastbinary
  14. except:
  15. fastbinary = None
  16. class Iface(fb303.FacebookService.Iface):
  17. """
  18. This interface is live.
  19. """
  20. def create_database(self, name, description):
  21. """
  22. Parameters:
  23. - name
  24. - description
  25. """
  26. pass
  27. def get_database(self, name):
  28. """
  29. Parameters:
  30. - name
  31. """
  32. pass
  33. def drop_database(self, name):
  34. """
  35. Parameters:
  36. - name
  37. """
  38. pass
  39. def get_databases(self, ):
  40. pass
  41. def get_type(self, name):
  42. """
  43. Parameters:
  44. - name
  45. """
  46. pass
  47. def create_type(self, type):
  48. """
  49. Parameters:
  50. - type
  51. """
  52. pass
  53. def drop_type(self, type):
  54. """
  55. Parameters:
  56. - type
  57. """
  58. pass
  59. def get_type_all(self, name):
  60. """
  61. Parameters:
  62. - name
  63. """
  64. pass
  65. def get_fields(self, db_name, table_name):
  66. """
  67. Parameters:
  68. - db_name
  69. - table_name
  70. """
  71. pass
  72. def get_schema(self, db_name, table_name):
  73. """
  74. Parameters:
  75. - db_name
  76. - table_name
  77. """
  78. pass
  79. def create_table(self, tbl):
  80. """
  81. Parameters:
  82. - tbl
  83. """
  84. pass
  85. def drop_table(self, dbname, name, deleteData):
  86. """
  87. Parameters:
  88. - dbname
  89. - name
  90. - deleteData
  91. """
  92. pass
  93. def get_tables(self, db_name, pattern):
  94. """
  95. Parameters:
  96. - db_name
  97. - pattern
  98. """
  99. pass
  100. def get_table(self, dbname, tbl_name):
  101. """
  102. Parameters:
  103. - dbname
  104. - tbl_name
  105. """
  106. pass
  107. def alter_table(self, dbname, tbl_name, new_tbl):
  108. """
  109. Parameters:
  110. - dbname
  111. - tbl_name
  112. - new_tbl
  113. """
  114. pass
  115. def add_partition(self, new_part):
  116. """
  117. Parameters:
  118. - new_part
  119. """
  120. pass
  121. def append_partition(self, db_name, tbl_name, part_vals):
  122. """
  123. Parameters:
  124. - db_name
  125. - tbl_name
  126. - part_vals
  127. """
  128. pass
  129. def drop_partition(self, db_name, tbl_name, part_vals, deleteData):
  130. """
  131. Parameters:
  132. - db_name
  133. - tbl_name
  134. - part_vals
  135. - deleteData
  136. """
  137. pass
  138. def get_partition(self, db_name, tbl_name, part_vals):
  139. """
  140. Parameters:
  141. - db_name
  142. - tbl_name
  143. - part_vals
  144. """
  145. pass
  146. def get_partitions(self, db_name, tbl_name, max_parts):
  147. """
  148. Parameters:
  149. - db_name
  150. - tbl_name
  151. - max_parts
  152. """
  153. pass
  154. def get_partition_names(self, db_name, tbl_name, max_parts):
  155. """
  156. Parameters:
  157. - db_name
  158. - tbl_name
  159. - max_parts
  160. """
  161. pass
  162. def alter_partition(self, db_name, tbl_name, new_part):
  163. """
  164. Parameters:
  165. - db_name
  166. - tbl_name
  167. - new_part
  168. """
  169. pass
  170. def get_config_value(self, name, defaultValue):
  171. """
  172. Parameters:
  173. - name
  174. - defaultValue
  175. """
  176. pass
  177. class Client(fb303.FacebookService.Client, Iface):
  178. """
  179. This interface is live.
  180. """
  181. def __init__(self, iprot, oprot=None):
  182. fb303.FacebookService.Client.__init__(self, iprot, oprot)
  183. def create_database(self, name, description):
  184. """
  185. Parameters:
  186. - name
  187. - description
  188. """
  189. self.send_create_database(name, description)
  190. return self.recv_create_database()
  191. def send_create_database(self, name, description):
  192. self._oprot.writeMessageBegin('create_database', TMessageType.CALL, self._seqid)
  193. args = create_database_args()
  194. args.name = name
  195. args.description = description
  196. args.write(self._oprot)
  197. self._oprot.writeMessageEnd()
  198. self._oprot.trans.flush()
  199. def recv_create_database(self, ):
  200. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  201. if mtype == TMessageType.EXCEPTION:
  202. x = TApplicationException()
  203. x.read(self._iprot)
  204. self._iprot.readMessageEnd()
  205. raise x
  206. result = create_database_result()
  207. result.read(self._iprot)
  208. self._iprot.readMessageEnd()
  209. if result.success != None:
  210. return result.success
  211. if result.o1 != None:
  212. raise result.o1
  213. if result.o2 != None:
  214. raise result.o2
  215. raise TApplicationException(TApplicationException.MISSING_RESULT, "create_database failed: unknown result");
  216. def get_database(self, name):
  217. """
  218. Parameters:
  219. - name
  220. """
  221. self.send_get_database(name)
  222. return self.recv_get_database()
  223. def send_get_database(self, name):
  224. self._oprot.writeMessageBegin('get_database', TMessageType.CALL, self._seqid)
  225. args = get_database_args()
  226. args.name = name
  227. args.write(self._oprot)
  228. self._oprot.writeMessageEnd()
  229. self._oprot.trans.flush()
  230. def recv_get_database(self, ):
  231. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  232. if mtype == TMessageType.EXCEPTION:
  233. x = TApplicationException()
  234. x.read(self._iprot)
  235. self._iprot.readMessageEnd()
  236. raise x
  237. result = get_database_result()
  238. result.read(self._iprot)
  239. self._iprot.readMessageEnd()
  240. if result.success != None:
  241. return result.success
  242. if result.o1 != None:
  243. raise result.o1
  244. if result.o2 != None:
  245. raise result.o2
  246. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result");
  247. def drop_database(self, name):
  248. """
  249. Parameters:
  250. - name
  251. """
  252. self.send_drop_database(name)
  253. return self.recv_drop_database()
  254. def send_drop_database(self, name):
  255. self._oprot.writeMessageBegin('drop_database', TMessageType.CALL, self._seqid)
  256. args = drop_database_args()
  257. args.name = name
  258. args.write(self._oprot)
  259. self._oprot.writeMessageEnd()
  260. self._oprot.trans.flush()
  261. def recv_drop_database(self, ):
  262. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  263. if mtype == TMessageType.EXCEPTION:
  264. x = TApplicationException()
  265. x.read(self._iprot)
  266. self._iprot.readMessageEnd()
  267. raise x
  268. result = drop_database_result()
  269. result.read(self._iprot)
  270. self._iprot.readMessageEnd()
  271. if result.success != None:
  272. return result.success
  273. if result.o2 != None:
  274. raise result.o2
  275. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_database failed: unknown result");
  276. def get_databases(self, ):
  277. self.send_get_databases()
  278. return self.recv_get_databases()
  279. def send_get_databases(self, ):
  280. self._oprot.writeMessageBegin('get_databases', TMessageType.CALL, self._seqid)
  281. args = get_databases_args()
  282. args.write(self._oprot)
  283. self._oprot.writeMessageEnd()
  284. self._oprot.trans.flush()
  285. def recv_get_databases(self, ):
  286. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  287. if mtype == TMessageType.EXCEPTION:
  288. x = TApplicationException()
  289. x.read(self._iprot)
  290. self._iprot.readMessageEnd()
  291. raise x
  292. result = get_databases_result()
  293. result.read(self._iprot)
  294. self._iprot.readMessageEnd()
  295. if result.success != None:
  296. return result.success
  297. if result.o1 != None:
  298. raise result.o1
  299. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result");
  300. def get_type(self, name):
  301. """
  302. Parameters:
  303. - name
  304. """
  305. self.send_get_type(name)
  306. return self.recv_get_type()
  307. def send_get_type(self, name):
  308. self._oprot.writeMessageBegin('get_type', TMessageType.CALL, self._seqid)
  309. args = get_type_args()
  310. args.name = name
  311. args.write(self._oprot)
  312. self._oprot.writeMessageEnd()
  313. self._oprot.trans.flush()
  314. def recv_get_type(self, ):
  315. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  316. if mtype == TMessageType.EXCEPTION:
  317. x = TApplicationException()
  318. x.read(self._iprot)
  319. self._iprot.readMessageEnd()
  320. raise x
  321. result = get_type_result()
  322. result.read(self._iprot)
  323. self._iprot.readMessageEnd()
  324. if result.success != None:
  325. return result.success
  326. if result.o2 != None:
  327. raise result.o2
  328. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result");
  329. def create_type(self, type):
  330. """
  331. Parameters:
  332. - type
  333. """
  334. self.send_create_type(type)
  335. return self.recv_create_type()
  336. def send_create_type(self, type):
  337. self._oprot.writeMessageBegin('create_type', TMessageType.CALL, self._seqid)
  338. args = create_type_args()
  339. args.type = type
  340. args.write(self._oprot)
  341. self._oprot.writeMessageEnd()
  342. self._oprot.trans.flush()
  343. def recv_create_type(self, ):
  344. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  345. if mtype == TMessageType.EXCEPTION:
  346. x = TApplicationException()
  347. x.read(self._iprot)
  348. self._iprot.readMessageEnd()
  349. raise x
  350. result = create_type_result()
  351. result.read(self._iprot)
  352. self._iprot.readMessageEnd()
  353. if result.success != None:
  354. return result.success
  355. if result.o1 != None:
  356. raise result.o1
  357. if result.o2 != None:
  358. raise result.o2
  359. if result.o3 != None:
  360. raise result.o3
  361. raise TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result");
  362. def drop_type(self, type):
  363. """
  364. Parameters:
  365. - type
  366. """
  367. self.send_drop_type(type)
  368. return self.recv_drop_type()
  369. def send_drop_type(self, type):
  370. self._oprot.writeMessageBegin('drop_type', TMessageType.CALL, self._seqid)
  371. args = drop_type_args()
  372. args.type = type
  373. args.write(self._oprot)
  374. self._oprot.writeMessageEnd()
  375. self._oprot.trans.flush()
  376. def recv_drop_type(self, ):
  377. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  378. if mtype == TMessageType.EXCEPTION:
  379. x = TApplicationException()
  380. x.read(self._iprot)
  381. self._iprot.readMessageEnd()
  382. raise x
  383. result = drop_type_result()
  384. result.read(self._iprot)
  385. self._iprot.readMessageEnd()
  386. if result.success != None:
  387. return result.success
  388. if result.o2 != None:
  389. raise result.o2
  390. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result");
  391. def get_type_all(self, name):
  392. """
  393. Parameters:
  394. - name
  395. """
  396. self.send_get_type_all(name)
  397. return self.recv_get_type_all()
  398. def send_get_type_all(self, name):
  399. self._oprot.writeMessageBegin('get_type_all', TMessageType.CALL, self._seqid)
  400. args = get_type_all_args()
  401. args.name = name
  402. args.write(self._oprot)
  403. self._oprot.writeMessageEnd()
  404. self._oprot.trans.flush()
  405. def recv_get_type_all(self, ):
  406. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  407. if mtype == TMessageType.EXCEPTION:
  408. x = TApplicationException()
  409. x.read(self._iprot)
  410. self._iprot.readMessageEnd()
  411. raise x
  412. result = get_type_all_result()
  413. result.read(self._iprot)
  414. self._iprot.readMessageEnd()
  415. if result.success != None:
  416. return result.success
  417. if result.o2 != None:
  418. raise result.o2
  419. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result");
  420. def get_fields(self, db_name, table_name):
  421. """
  422. Parameters:
  423. - db_name
  424. - table_name
  425. """
  426. self.send_get_fields(db_name, table_name)
  427. return self.recv_get_fields()
  428. def send_get_fields(self, db_name, table_name):
  429. self._oprot.writeMessageBegin('get_fields', TMessageType.CALL, self._seqid)
  430. args = get_fields_args()
  431. args.db_name = db_name
  432. args.table_name = table_name
  433. args.write(self._oprot)
  434. self._oprot.writeMessageEnd()
  435. self._oprot.trans.flush()
  436. def recv_get_fields(self, ):
  437. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  438. if mtype == TMessageType.EXCEPTION:
  439. x = TApplicationException()
  440. x.read(self._iprot)
  441. self._iprot.readMessageEnd()
  442. raise x
  443. result = get_fields_result()
  444. result.read(self._iprot)
  445. self._iprot.readMessageEnd()
  446. if result.success != None:
  447. return result.success
  448. if result.o1 != None:
  449. raise result.o1
  450. if result.o2 != None:
  451. raise result.o2
  452. if result.o3 != None:
  453. raise result.o3
  454. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields failed: unknown result");
  455. def get_schema(self, db_name, table_name):
  456. """
  457. Parameters:
  458. - db_name
  459. - table_name
  460. """
  461. self.send_get_schema(db_name, table_name)
  462. return self.recv_get_schema()
  463. def send_get_schema(self, db_name, table_name):
  464. self._oprot.writeMessageBegin('get_schema', TMessageType.CALL, self._seqid)
  465. args = get_schema_args()
  466. args.db_name = db_name
  467. args.table_name = table_name
  468. args.write(self._oprot)
  469. self._oprot.writeMessageEnd()
  470. self._oprot.trans.flush()
  471. def recv_get_schema(self, ):
  472. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  473. if mtype == TMessageType.EXCEPTION:
  474. x = TApplicationException()
  475. x.read(self._iprot)
  476. self._iprot.readMessageEnd()
  477. raise x
  478. result = get_schema_result()
  479. result.read(self._iprot)
  480. self._iprot.readMessageEnd()
  481. if result.success != None:
  482. return result.success
  483. if result.o1 != None:
  484. raise result.o1
  485. if result.o2 != None:
  486. raise result.o2
  487. if result.o3 != None:
  488. raise result.o3
  489. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema failed: unknown result");
  490. def create_table(self, tbl):
  491. """
  492. Parameters:
  493. - tbl
  494. """
  495. self.send_create_table(tbl)
  496. self.recv_create_table()
  497. def send_create_table(self, tbl):
  498. self._oprot.writeMessageBegin('create_table', TMessageType.CALL, self._seqid)
  499. args = create_table_args()
  500. args.tbl = tbl
  501. args.write(self._oprot)
  502. self._oprot.writeMessageEnd()
  503. self._oprot.trans.flush()
  504. def recv_create_table(self, ):
  505. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  506. if mtype == TMessageType.EXCEPTION:
  507. x = TApplicationException()
  508. x.read(self._iprot)
  509. self._iprot.readMessageEnd()
  510. raise x
  511. result = create_table_result()
  512. result.read(self._iprot)
  513. self._iprot.readMessageEnd()
  514. if result.o1 != None:
  515. raise result.o1
  516. if result.o2 != None:
  517. raise result.o2
  518. if result.o3 != None:
  519. raise result.o3
  520. if result.o4 != None:
  521. raise result.o4
  522. return
  523. def drop_table(self, dbname, name, deleteData):
  524. """
  525. Parameters:
  526. - dbname
  527. - name
  528. - deleteData
  529. """
  530. self.send_drop_table(dbname, name, deleteData)
  531. self.recv_drop_table()
  532. def send_drop_table(self, dbname, name, deleteData):
  533. self._oprot.writeMessageBegin('drop_table', TMessageType.CALL, self._seqid)
  534. args = drop_table_args()
  535. args.dbname = dbname
  536. args.name = name
  537. args.deleteData = deleteData
  538. args.write(self._oprot)
  539. self._oprot.writeMessageEnd()
  540. self._oprot.trans.flush()
  541. def recv_drop_table(self, ):
  542. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  543. if mtype == TMessageType.EXCEPTION:
  544. x = TApplicationException()
  545. x.read(self._iprot)
  546. self._iprot.readMessageEnd()
  547. raise x
  548. result = drop_table_result()
  549. result.read(self._iprot)
  550. self._iprot.readMessageEnd()
  551. if result.o1 != None:
  552. raise result.o1
  553. if result.o3 != None:
  554. raise result.o3
  555. return
  556. def get_tables(self, db_name, pattern):
  557. """
  558. Parameters:
  559. - db_name
  560. - pattern
  561. """
  562. self.send_get_tables(db_name, pattern)
  563. return self.recv_get_tables()
  564. def send_get_tables(self, db_name, pattern):
  565. self._oprot.writeMessageBegin('get_tables', TMessageType.CALL, self._seqid)
  566. args = get_tables_args()
  567. args.db_name = db_name
  568. args.pattern = pattern
  569. args.write(self._oprot)
  570. self._oprot.writeMessageEnd()
  571. self._oprot.trans.flush()
  572. def recv_get_tables(self, ):
  573. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  574. if mtype == TMessageType.EXCEPTION:
  575. x = TApplicationException()
  576. x.read(self._iprot)
  577. self._iprot.readMessageEnd()
  578. raise x
  579. result = get_tables_result()
  580. result.read(self._iprot)
  581. self._iprot.readMessageEnd()
  582. if result.success != None:
  583. return result.success
  584. if result.o1 != None:
  585. raise result.o1
  586. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result");
  587. def get_table(self, dbname, tbl_name):
  588. """
  589. Parameters:
  590. - dbname
  591. - tbl_name
  592. """
  593. self.send_get_table(dbname, tbl_name)
  594. return self.recv_get_table()
  595. def send_get_table(self, dbname, tbl_name):
  596. self._oprot.writeMessageBegin('get_table', TMessageType.CALL, self._seqid)
  597. args = get_table_args()
  598. args.dbname = dbname
  599. args.tbl_name = tbl_name
  600. args.write(self._oprot)
  601. self._oprot.writeMessageEnd()
  602. self._oprot.trans.flush()
  603. def recv_get_table(self, ):
  604. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  605. if mtype == TMessageType.EXCEPTION:
  606. x = TApplicationException()
  607. x.read(self._iprot)
  608. self._iprot.readMessageEnd()
  609. raise x
  610. result = get_table_result()
  611. result.read(self._iprot)
  612. self._iprot.readMessageEnd()
  613. if result.success != None:
  614. return result.success
  615. if result.o1 != None:
  616. raise result.o1
  617. if result.o2 != None:
  618. raise result.o2
  619. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table failed: unknown result");
  620. def alter_table(self, dbname, tbl_name, new_tbl):
  621. """
  622. Parameters:
  623. - dbname
  624. - tbl_name
  625. - new_tbl
  626. """
  627. self.send_alter_table(dbname, tbl_name, new_tbl)
  628. self.recv_alter_table()
  629. def send_alter_table(self, dbname, tbl_name, new_tbl):
  630. self._oprot.writeMessageBegin('alter_table', TMessageType.CALL, self._seqid)
  631. args = alter_table_args()
  632. args.dbname = dbname
  633. args.tbl_name = tbl_name
  634. args.new_tbl = new_tbl
  635. args.write(self._oprot)
  636. self._oprot.writeMessageEnd()
  637. self._oprot.trans.flush()
  638. def recv_alter_table(self, ):
  639. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  640. if mtype == TMessageType.EXCEPTION:
  641. x = TApplicationException()
  642. x.read(self._iprot)
  643. self._iprot.readMessageEnd()
  644. raise x
  645. result = alter_table_result()
  646. result.read(self._iprot)
  647. self._iprot.readMessageEnd()
  648. if result.o1 != None:
  649. raise result.o1
  650. if result.o2 != None:
  651. raise result.o2
  652. return
  653. def add_partition(self, new_part):
  654. """
  655. Parameters:
  656. - new_part
  657. """
  658. self.send_add_partition(new_part)
  659. return self.recv_add_partition()
  660. def send_add_partition(self, new_part):
  661. self._oprot.writeMessageBegin('add_partition', TMessageType.CALL, self._seqid)
  662. args = add_partition_args()
  663. args.new_part = new_part
  664. args.write(self._oprot)
  665. self._oprot.writeMessageEnd()
  666. self._oprot.trans.flush()
  667. def recv_add_partition(self, ):
  668. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  669. if mtype == TMessageType.EXCEPTION:
  670. x = TApplicationException()
  671. x.read(self._iprot)
  672. self._iprot.readMessageEnd()
  673. raise x
  674. result = add_partition_result()
  675. result.read(self._iprot)
  676. self._iprot.readMessageEnd()
  677. if result.success != None:
  678. return result.success
  679. if result.o1 != None:
  680. raise result.o1
  681. if result.o2 != None:
  682. raise result.o2
  683. if result.o3 != None:
  684. raise result.o3
  685. raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partition failed: unknown result");
  686. def append_partition(self, db_name, tbl_name, part_vals):
  687. """
  688. Parameters:
  689. - db_name
  690. - tbl_name
  691. - part_vals
  692. """
  693. self.send_append_partition(db_name, tbl_name, part_vals)
  694. return self.recv_append_partition()
  695. def send_append_partition(self, db_name, tbl_name, part_vals):
  696. self._oprot.writeMessageBegin('append_partition', TMessageType.CALL, self._seqid)
  697. args = append_partition_args()
  698. args.db_name = db_name
  699. args.tbl_name = tbl_name
  700. args.part_vals = part_vals
  701. args.write(self._oprot)
  702. self._oprot.writeMessageEnd()
  703. self._oprot.trans.flush()
  704. def recv_append_partition(self, ):
  705. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  706. if mtype == TMessageType.EXCEPTION:
  707. x = TApplicationException()
  708. x.read(self._iprot)
  709. self._iprot.readMessageEnd()
  710. raise x
  711. result = append_partition_result()
  712. result.read(self._iprot)
  713. self._iprot.readMessageEnd()
  714. if result.success != None:
  715. return result.success
  716. if result.o1 != None:
  717. raise result.o1
  718. if result.o2 != None:
  719. raise result.o2
  720. if result.o3 != None:
  721. raise result.o3
  722. raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition failed: unknown result");
  723. def drop_partition(self, db_name, tbl_name, part_vals, deleteData):
  724. """
  725. Parameters:
  726. - db_name
  727. - tbl_name
  728. - part_vals
  729. - deleteData
  730. """
  731. self.send_drop_partition(db_name, tbl_name, part_vals, deleteData)
  732. return self.recv_drop_partition()
  733. def send_drop_partition(self, db_name, tbl_name, part_vals, deleteData):
  734. self._oprot.writeMessageBegin('drop_partition', TMessageType.CALL, self._seqid)
  735. args = drop_partition_args()
  736. args.db_name = db_name
  737. args.tbl_name = tbl_name
  738. args.part_vals = part_vals
  739. args.deleteData = deleteData
  740. args.write(self._oprot)
  741. self._oprot.writeMessageEnd()
  742. self._oprot.trans.flush()
  743. def recv_drop_partition(self, ):
  744. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  745. if mtype == TMessageType.EXCEPTION:
  746. x = TApplicationException()
  747. x.read(self._iprot)
  748. self._iprot.readMessageEnd()
  749. raise x
  750. result = drop_partition_result()
  751. result.read(self._iprot)
  752. self._iprot.readMessageEnd()
  753. if result.success != None:
  754. return result.success
  755. if result.o1 != None:
  756. raise result.o1
  757. if result.o2 != None:
  758. raise result.o2
  759. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result");
  760. def get_partition(self, db_name, tbl_name, part_vals):
  761. """
  762. Parameters:
  763. - db_name
  764. - tbl_name
  765. - part_vals
  766. """
  767. self.send_get_partition(db_name, tbl_name, part_vals)
  768. return self.recv_get_partition()
  769. def send_get_partition(self, db_name, tbl_name, part_vals):
  770. self._oprot.writeMessageBegin('get_partition', TMessageType.CALL, self._seqid)
  771. args = get_partition_args()
  772. args.db_name = db_name
  773. args.tbl_name = tbl_name
  774. args.part_vals = part_vals
  775. args.write(self._oprot)
  776. self._oprot.writeMessageEnd()
  777. self._oprot.trans.flush()
  778. def recv_get_partition(self, ):
  779. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  780. if mtype == TMessageType.EXCEPTION:
  781. x = TApplicationException()
  782. x.read(self._iprot)
  783. self._iprot.readMessageEnd()
  784. raise x
  785. result = get_partition_result()
  786. result.read(self._iprot)
  787. self._iprot.readMessageEnd()
  788. if result.success != None:
  789. return result.success
  790. if result.o1 != None:
  791. raise result.o1
  792. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result");
  793. def get_partitions(self, db_name, tbl_name, max_parts):
  794. """
  795. Parameters:
  796. - db_name
  797. - tbl_name
  798. - max_parts
  799. """
  800. self.send_get_partitions(db_name, tbl_name, max_parts)
  801. return self.recv_get_partitions()
  802. def send_get_partitions(self, db_name, tbl_name, max_parts):
  803. self._oprot.writeMessageBegin('get_partitions', TMessageType.CALL, self._seqid)
  804. args = get_partitions_args()
  805. args.db_name = db_name
  806. args.tbl_name = tbl_name
  807. args.max_parts = max_parts
  808. args.write(self._oprot)
  809. self._oprot.writeMessageEnd()
  810. self._oprot.trans.flush()
  811. def recv_get_partitions(self, ):
  812. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  813. if mtype == TMessageType.EXCEPTION:
  814. x = TApplicationException()
  815. x.read(self._iprot)
  816. self._iprot.readMessageEnd()
  817. raise x
  818. result = get_partitions_result()
  819. result.read(self._iprot)
  820. self._iprot.readMessageEnd()
  821. if result.success != None:
  822. return result.success
  823. if result.o1 != None:
  824. raise result.o1
  825. if result.o2 != None:
  826. raise result.o2
  827. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result");
  828. def get_partition_names(self, db_name, tbl_name, max_parts):
  829. """
  830. Parameters:
  831. - db_name
  832. - tbl_name
  833. - max_parts
  834. """
  835. self.send_get_partition_names(db_name, tbl_name, max_parts)
  836. return self.recv_get_partition_names()
  837. def send_get_partition_names(self, db_name, tbl_name, max_parts):
  838. self._oprot.writeMessageBegin('get_partition_names', TMessageType.CALL, self._seqid)
  839. args = get_partition_names_args()
  840. args.db_name = db_name
  841. args.tbl_name = tbl_name
  842. args.max_parts = max_parts
  843. args.write(self._oprot)
  844. self._oprot.writeMessageEnd()
  845. self._oprot.trans.flush()
  846. def recv_get_partition_names(self, ):
  847. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  848. if mtype == TMessageType.EXCEPTION:
  849. x = TApplicationException()
  850. x.read(self._iprot)
  851. self._iprot.readMessageEnd()
  852. raise x
  853. result = get_partition_names_result()
  854. result.read(self._iprot)
  855. self._iprot.readMessageEnd()
  856. if result.success != None:
  857. return result.success
  858. if result.o2 != None:
  859. raise result.o2
  860. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result");
  861. def alter_partition(self, db_name, tbl_name, new_part):
  862. """
  863. Parameters:
  864. - db_name
  865. - tbl_name
  866. - new_part
  867. """
  868. self.send_alter_partition(db_name, tbl_name, new_part)
  869. self.recv_alter_partition()
  870. def send_alter_partition(self, db_name, tbl_name, new_part):
  871. self._oprot.writeMessageBegin('alter_partition', TMessageType.CALL, self._seqid)
  872. args = alter_partition_args()
  873. args.db_name = db_name
  874. args.tbl_name = tbl_name
  875. args.new_part = new_part
  876. args.write(self._oprot)
  877. self._oprot.writeMessageEnd()
  878. self._oprot.trans.flush()
  879. def recv_alter_partition(self, ):
  880. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  881. if mtype == TMessageType.EXCEPTION:
  882. x = TApplicationException()
  883. x.read(self._iprot)
  884. self._iprot.readMessageEnd()
  885. raise x
  886. result = alter_partition_result()
  887. result.read(self._iprot)
  888. self._iprot.readMessageEnd()
  889. if result.o1 != None:
  890. raise result.o1
  891. if result.o2 != None:
  892. raise result.o2
  893. return
  894. def get_config_value(self, name, defaultValue):
  895. """
  896. Parameters:
  897. - name
  898. - defaultValue
  899. """
  900. self.send_get_config_value(name, defaultValue)
  901. return self.recv_get_config_value()
  902. def send_get_config_value(self, name, defaultValue):
  903. self._oprot.writeMessageBegin('get_config_value', TMessageType.CALL, self._seqid)
  904. args = get_config_value_args()
  905. args.name = name
  906. args.defaultValue = defaultValue
  907. args.write(self._oprot)
  908. self._oprot.writeMessageEnd()
  909. self._oprot.trans.flush()
  910. def recv_get_config_value(self, ):
  911. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  912. if mtype == TMessageType.EXCEPTION:
  913. x = TApplicationException()
  914. x.read(self._iprot)
  915. self._iprot.readMessageEnd()
  916. raise x
  917. result = get_config_value_result()
  918. result.read(self._iprot)
  919. self._iprot.readMessageEnd()
  920. if result.success != None:
  921. return result.success
  922. if result.o1 != None:
  923. raise result.o1
  924. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result");
  925. class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
  926. def __init__(self, handler):
  927. fb303.FacebookService.Processor.__init__(self, handler)
  928. self._processMap["create_database"] = Processor.process_create_database
  929. self._processMap["get_database"] = Processor.process_get_database
  930. self._processMap["drop_database"] = Processor.process_drop_database
  931. self._processMap["get_databases"] = Processor.process_get_databases
  932. self._processMap["get_type"] = Processor.process_get_type
  933. self._processMap["create_type"] = Processor.process_create_type
  934. self._processMap["drop_type"] = Processor.process_drop_type
  935. self._processMap["get_type_all"] = Processor.process_get_type_all
  936. self._processMap["get_fields"] = Processor.process_get_fields
  937. self._processMap["get_schema"] = Processor.process_get_schema
  938. self._processMap["create_table"] = Processor.process_create_table
  939. self._processMap["drop_table"] = Processor.process_drop_table
  940. self._processMap["get_tables"] = Processor.process_get_tables
  941. self._processMap["get_table"] = Processor.process_get_table
  942. self._processMap["alter_table"] = Processor.process_alter_table
  943. self._processMap["add_partition"] = Processor.process_add_partition
  944. self._processMap["append_partition"] = Processor.process_append_partition
  945. self._processMap["drop_partition"] = Processor.process_drop_partition
  946. self._processMap["get_partition"] = Processor.process_get_partition
  947. self._processMap["get_partitions"] = Processor.process_get_partitions
  948. self._processMap["get_partition_names"] = Processor.process_get_partition_names
  949. self._processMap["alter_partition"] = Processor.process_alter_partition
  950. self._processMap["get_config_value"] = Processor.process_get_config_value
  951. def process(self, iprot, oprot):
  952. (name, type, seqid) = iprot.readMessageBegin()
  953. if name not in self._processMap:
  954. iprot.skip(TType.STRUCT)
  955. iprot.readMessageEnd()
  956. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  957. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  958. x.write(oprot)
  959. oprot.writeMessageEnd()
  960. oprot.trans.flush()
  961. return
  962. else:
  963. self._processMap[name](self, seqid, iprot, oprot)
  964. return True
  965. def process_create_database(self, seqid, iprot, oprot):
  966. args = create_database_args()
  967. args.read(iprot)
  968. iprot.readMessageEnd()
  969. result = create_database_result()
  970. try:
  971. result.success = self._handler.create_database(args.name, args.description)
  972. except AlreadyExistsException, o1:
  973. result.o1 = o1
  974. except MetaException, o2:
  975. result.o2 = o2
  976. oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid)
  977. result.write(oprot)
  978. oprot.writeMessageEnd()
  979. oprot.trans.flush()
  980. def process_get_database(self, seqid, iprot, oprot):
  981. args = get_database_args()
  982. args.read(iprot)
  983. iprot.readMessageEnd()
  984. result = get_database_result()
  985. try:
  986. result.success = self._handler.get_database(args.name)
  987. except NoSuchObjectException, o1:
  988. result.o1 = o1
  989. except MetaException, o2:
  990. result.o2 = o2
  991. oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid)
  992. result.write(oprot)
  993. oprot.writeMessageEnd()
  994. oprot.trans.flush()
  995. def process_drop_database(self, seqid, iprot, oprot):
  996. args = drop_database_args()
  997. args.read(iprot)
  998. iprot.readMessageEnd()
  999. result = drop_database_result()
  1000. try:
  1001. result.success = self._handler.drop_database(args.name)
  1002. except MetaException, o2:
  1003. result.o2 = o2
  1004. oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid)
  1005. result.write(oprot)
  1006. oprot.writeMessageEnd()
  1007. oprot.trans.flush()
  1008. def process_get_databases(self, seqid, iprot, oprot):
  1009. args = get_databases_args()
  1010. args.read(iprot)
  1011. iprot.readMessageEnd()
  1012. result = get_databases_result()
  1013. try:
  1014. result.success = self._handler.get_databases()
  1015. except MetaException, o1:
  1016. result.o1 = o1
  1017. oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid)
  1018. result.write(oprot)
  1019. oprot.writeMessageEnd()
  1020. oprot.trans.flush()
  1021. def process_get_type(self, seqid, iprot, oprot):
  1022. args = get_type_args()
  1023. args.read(iprot)
  1024. iprot.readMessageEnd()
  1025. result = get_type_result()
  1026. try:
  1027. result.success = self._handler.get_type(args.name)
  1028. except MetaException, o2:
  1029. result.o2 = o2
  1030. oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid)
  1031. result.write(oprot)
  1032. oprot.writeMessageEnd()
  1033. oprot.trans.flush()
  1034. def process_create_type(self, seqid, iprot, oprot):
  1035. args = create_type_args()
  1036. args.read(iprot)
  1037. iprot.readMessageEnd()
  1038. result = create_type_result()
  1039. try:
  1040. result.success = self._handler.create_type(args.type)
  1041. except AlreadyExistsException, o1:
  1042. result.o1 = o1
  1043. except InvalidObjectException, o2:
  1044. result.o2 = o2
  1045. except MetaException, o3:
  1046. result.o3 = o3
  1047. oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid)
  1048. result.write(oprot)
  1049. oprot.writeMessageEnd()
  1050. oprot.trans.flush()
  1051. def process_drop_type(self, seqid, iprot, oprot):
  1052. args = drop_type_args()
  1053. args.read(iprot)
  1054. iprot.readMessageEnd()
  1055. result = drop_type_result()
  1056. try:
  1057. result.success = self._handler.drop_type(args.type)
  1058. except MetaException, o2:
  1059. result.o2 = o2
  1060. oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid)
  1061. result.write(oprot)
  1062. oprot.writeMessageEnd()
  1063. oprot.trans.flush()
  1064. def process_get_type_all(self, seqid, iprot, oprot):
  1065. args = get_type_all_args()
  1066. args.read(iprot)
  1067. iprot.readMessageEnd()
  1068. result = get_type_all_result()
  1069. try:
  1070. result.success = self._handler.get_type_all(args.name)
  1071. except MetaException, o2:
  1072. result.o2 = o2
  1073. oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid)
  1074. result.write(oprot)
  1075. oprot.writeMessageEnd()
  1076. oprot.trans.flush()
  1077. def process_get_fields(self, seqid, iprot, oprot):
  1078. args = get_fields_args()
  1079. args.read(iprot)
  1080. iprot.readMessageEnd()
  1081. result = get_fields_result()
  1082. try:
  1083. result.success = self._handler.get_fields(args.db_name, args.table_name)
  1084. except MetaException, o1:
  1085. result.o1 = o1
  1086. except UnknownTableException, o2:
  1087. result.o2 = o2
  1088. except UnknownDBException, o3:
  1089. result.o3 = o3
  1090. oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid)
  1091. result.write(oprot)
  1092. oprot.writeMessageEnd()
  1093. oprot.trans.flush()
  1094. def process_get_schema(self, seqid, iprot, oprot):
  1095. args = get_schema_args()
  1096. args.read(iprot)
  1097. iprot.readMessageEnd()
  1098. result = get_schema_result()
  1099. try:
  1100. result.success = self._handler.get_schema(args.db_name, args.table_name)
  1101. except MetaException, o1:
  1102. result.o1 = o1
  1103. except UnknownTableException, o2:
  1104. result.o2 = o2
  1105. except UnknownDBException, o3:
  1106. result.o3 = o3
  1107. oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid)
  1108. result.write(oprot)
  1109. oprot.writeMessageEnd()
  1110. oprot.trans.flush()
  1111. def process_create_table(self, seqid, iprot, oprot):
  1112. args = create_table_args()
  1113. args.read(iprot)
  1114. iprot.readMessageEnd()
  1115. result = create_table_result()
  1116. try:
  1117. self._handler.create_table(args.tbl)
  1118. except AlreadyExistsException, o1:
  1119. result.o1 = o1
  1120. except InvalidObjectException, o2:
  1121. result.o2 = o2
  1122. except MetaException, o3:
  1123. result.o3 = o3
  1124. except NoSuchObjectException, o4:
  1125. result.o4 = o4
  1126. oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid)
  1127. result.write(oprot)
  1128. oprot.writeMessageEnd()
  1129. oprot.trans.flush()
  1130. def process_drop_table(self, seqid, iprot, oprot):
  1131. args = drop_table_args()
  1132. args.read(iprot)
  1133. iprot.readMessageEnd()
  1134. result = drop_table_result()
  1135. try:
  1136. self._handler.drop_table(args.dbname, args.name, args.deleteData)
  1137. except NoSuchObjectException, o1:
  1138. result.o1 = o1
  1139. except MetaException, o3:
  1140. result.o3 = o3
  1141. oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid)
  1142. result.write(oprot)
  1143. oprot.writeMessageEnd()
  1144. oprot.trans.flush()
  1145. def process_get_tables(self, seqid, iprot, oprot):
  1146. args = get_tables_args()
  1147. args.read(iprot)
  1148. iprot.readMessageEnd()
  1149. result = get_tables_result()
  1150. try:
  1151. result.success = self._handler.get_tables(args.db_name, args.pattern)
  1152. except MetaException, o1:
  1153. result.o1 = o1
  1154. oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid)
  1155. result.write(oprot)
  1156. oprot.writeMessageEnd()
  1157. oprot.trans.flush()
  1158. def process_get_table(self, seqid, iprot, oprot):
  1159. args = get_table_args()
  1160. args.read(iprot)
  1161. iprot.readMessageEnd()
  1162. result = get_table_result()
  1163. try:
  1164. result.success = self._handler.get_table(args.dbname, args.tbl_name)
  1165. except MetaException, o1:
  1166. result.o1 = o1
  1167. except NoSuchObjectException, o2:
  1168. result.o2 = o2
  1169. oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid)
  1170. result.write(oprot)
  1171. oprot.writeMessageEnd()
  1172. oprot.trans.flush()
  1173. def process_alter_table(self, seqid, iprot, oprot):
  1174. args = alter_table_args()
  1175. args.read(iprot)
  1176. iprot.readMessageEnd()
  1177. result = alter_table_result()
  1178. try:
  1179. self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl)
  1180. except InvalidOperationException, o1:
  1181. result.o1 = o1
  1182. except MetaException, o2:
  1183. result.o2 = o2
  1184. oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid)
  1185. result.write(oprot)
  1186. oprot.writeMessageEnd()
  1187. oprot.trans.flush()
  1188. def process_add_partition(self, seqid, iprot, oprot):
  1189. args = add_partition_args()
  1190. args.read(iprot)
  1191. iprot.readMessageEnd()
  1192. result = add_partition_result()
  1193. try:
  1194. result.success = self._handler.add_partition(args.new_part)
  1195. except InvalidObjectException, o1:
  1196. result.o1 = o1
  1197. except AlreadyExistsException, o2:
  1198. result.o2 = o2
  1199. except MetaException, o3:
  1200. result.o3 = o3
  1201. oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid)
  1202. result.write(oprot)
  1203. oprot.writeMessageEnd()
  1204. oprot.trans.flush()
  1205. def process_append_partition(self, seqid, iprot, oprot):
  1206. args = append_partition_args()
  1207. args.read(iprot)
  1208. iprot.readMessageEnd()
  1209. result = append_partition_result()
  1210. try:
  1211. result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals)
  1212. except InvalidObjectException, o1:
  1213. result.o1 = o1
  1214. except AlreadyExistsException, o2:
  1215. result.o2 = o2
  1216. except MetaException, o3:
  1217. result.o3 = o3
  1218. oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid)
  1219. result.write(oprot)
  1220. oprot.writeMessageEnd()
  1221. oprot.trans.flush()
  1222. def process_drop_partition(self, seqid, iprot, oprot):
  1223. args = drop_partition_args()
  1224. args.read(iprot)
  1225. iprot.readMessageEnd()
  1226. result = drop_partition_result()
  1227. try:
  1228. result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData)
  1229. except NoSuchObjectException, o1:
  1230. result.o1 = o1
  1231. except MetaException, o2:
  1232. result.o2 = o2
  1233. oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid)
  1234. result.write(oprot)
  1235. oprot.writeMessageEnd()
  1236. oprot.trans.flush()
  1237. def process_get_partition(self, seqid, iprot, oprot):
  1238. args = get_partition_args()
  1239. args.read(iprot)
  1240. iprot.readMessageEnd()
  1241. result = get_partition_result()
  1242. try:
  1243. result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals)
  1244. except MetaException, o1:
  1245. result.o1 = o1
  1246. oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid)
  1247. result.write(oprot)
  1248. oprot.writeMessageEnd()
  1249. oprot.trans.flush()
  1250. def process_get_partitions(self, seqid, iprot, oprot):
  1251. args = get_partitions_args()
  1252. args.read(iprot)
  1253. iprot.readMessageEnd()
  1254. result = get_partitions_result()
  1255. try:
  1256. result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts)
  1257. except NoSuchObjectException, o1:
  1258. result.o1 = o1
  1259. except MetaException, o2:
  1260. result.o2 = o2
  1261. oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid)
  1262. result.write(oprot)
  1263. oprot.writeMessageEnd()
  1264. oprot.trans.flush()
  1265. def process_get_partition_names(self, seqid, iprot, oprot):
  1266. args = get_partition_names_args()
  1267. args.read(iprot)
  1268. iprot.readMessageEnd()
  1269. result = get_partition_names_result()
  1270. try:
  1271. result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts)
  1272. except MetaException, o2:
  1273. result.o2 = o2
  1274. oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid)
  1275. result.write(oprot)
  1276. oprot.writeMessageEnd()
  1277. oprot.trans.flush()
  1278. def process_alter_partition(self, seqid, iprot, oprot):
  1279. args = alter_partition_args()
  1280. args.read(iprot)
  1281. iprot.readMessageEnd()
  1282. result = alter_partition_result()
  1283. try:
  1284. self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part)
  1285. except InvalidOperationException, o1:
  1286. result.o1 = o1
  1287. except MetaException, o2:
  1288. result.o2 = o2
  1289. oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid)
  1290. result.write(oprot)
  1291. oprot.writeMessageEnd()
  1292. oprot.trans.flush()
  1293. def process_get_config_value(self, seqid, iprot, oprot):
  1294. args = get_config_value_args()
  1295. args.read(iprot)
  1296. iprot.readMessageEnd()
  1297. result = get_config_value_result()
  1298. try:
  1299. result.success = self._handler.get_config_value(args.name, args.defaultValue)
  1300. except ConfigValSecurityException, o1:
  1301. result.o1 = o1
  1302. oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid)
  1303. result.write(oprot)
  1304. oprot.writeMessageEnd()
  1305. oprot.trans.flush()
  1306. # HELPER FUNCTIONS AND STRUCTURES
  1307. class create_database_args(object):
  1308. """
  1309. Attributes:
  1310. - name
  1311. - description
  1312. """
  1313. thrift_spec = (
  1314. None, # 0
  1315. (1, TType.STRING, 'name', None, None, ), # 1
  1316. (2, TType.STRING, 'description', None, None, ), # 2
  1317. )
  1318. def __init__(self, name=None, description=None,):
  1319. self.name = name
  1320. self.description = description
  1321. def read(self, iprot):
  1322. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1323. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1324. return
  1325. iprot.readStructBegin()
  1326. while True:
  1327. (fname, ftype, fid) = iprot.readFieldBegin()
  1328. if ftype == TType.STOP:
  1329. break
  1330. if fid == 1:
  1331. if ftype == TType.STRING:
  1332. self.name = iprot.readString();
  1333. else:
  1334. iprot.skip(ftype)
  1335. elif fid == 2:
  1336. if ftype == TType.STRING:
  1337. self.description = iprot.readString();
  1338. else:
  1339. iprot.skip(ftype)
  1340. else:
  1341. iprot.skip(ftype)
  1342. iprot.readFieldEnd()
  1343. iprot.readStructEnd()
  1344. def write(self, oprot):
  1345. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1346. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1347. return
  1348. oprot.writeStructBegin('create_database_args')
  1349. if self.name != None:
  1350. oprot.writeFieldBegin('name', TType.STRING, 1)
  1351. oprot.writeString(self.name)
  1352. oprot.writeFieldEnd()
  1353. if self.description != None:
  1354. oprot.writeFieldBegin('description', TType.STRING, 2)
  1355. oprot.writeString(self.description)
  1356. oprot.writeFieldEnd()
  1357. oprot.writeFieldStop()
  1358. oprot.writeStructEnd()
  1359. def __repr__(self):
  1360. L = ['%s=%r' % (key, value)
  1361. for key, value in self.__dict__.iteritems()]
  1362. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1363. def __eq__(self, other):
  1364. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1365. def __ne__(self, other):
  1366. return not (self == other)
  1367. class create_database_result(object):
  1368. """
  1369. Attributes:
  1370. - success
  1371. - o1
  1372. - o2
  1373. """
  1374. thrift_spec = (
  1375. (0, TType.BOOL, 'success', None, None, ), # 0
  1376. (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
  1377. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  1378. )
  1379. def __init__(self, success=None, o1=None, o2=None,):
  1380. self.success = success
  1381. self.o1 = o1
  1382. self.o2 = o2
  1383. def read(self, iprot):
  1384. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1385. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1386. return
  1387. iprot.readStructBegin()
  1388. while True:
  1389. (fname, ftype, fid) = iprot.readFieldBegin()
  1390. if ftype == TType.STOP:
  1391. break
  1392. if fid == 0:
  1393. if ftype == TType.BOOL:
  1394. self.success = iprot.readBool();
  1395. else:
  1396. iprot.skip(ftype)
  1397. elif fid == 1:
  1398. if ftype == TType.STRUCT:
  1399. self.o1 = AlreadyExistsException()
  1400. self.o1.read(iprot)
  1401. else:
  1402. iprot.skip(ftype)
  1403. elif fid == 2:
  1404. if ftype == TType.STRUCT:
  1405. self.o2 = MetaException()
  1406. self.o2.read(iprot)
  1407. else:
  1408. iprot.skip(ftype)
  1409. else:
  1410. iprot.skip(ftype)
  1411. iprot.readFieldEnd()
  1412. iprot.readStructEnd()
  1413. def write(self, oprot):
  1414. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1415. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1416. return
  1417. oprot.writeStructBegin('create_database_result')
  1418. if self.success != None:
  1419. oprot.writeFieldBegin('success', TType.BOOL, 0)
  1420. oprot.writeBool(self.success)
  1421. oprot.writeFieldEnd()
  1422. if self.o1 != None:
  1423. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  1424. self.o1.write(oprot)
  1425. oprot.writeFieldEnd()
  1426. if self.o2 != None:
  1427. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  1428. self.o2.write(oprot)
  1429. oprot.writeFieldEnd()
  1430. oprot.writeFieldStop()
  1431. oprot.writeStructEnd()
  1432. def __repr__(self):
  1433. L = ['%s=%r' % (key, value)
  1434. for key, value in self.__dict__.iteritems()]
  1435. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1436. def __eq__(self, other):
  1437. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1438. def __ne__(self, other):
  1439. return not (self == other)
  1440. class get_database_args(object):
  1441. """
  1442. Attributes:
  1443. - name
  1444. """
  1445. thrift_spec = (
  1446. None, # 0
  1447. (1, TType.STRING, 'name', None, None, ), # 1
  1448. )
  1449. def __init__(self, name=None,):
  1450. self.name = name
  1451. def read(self, iprot):
  1452. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1453. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1454. return
  1455. iprot.readStructBegin()
  1456. while True:
  1457. (fname, ftype, fid) = iprot.readFieldBegin()
  1458. if ftype == TType.STOP:
  1459. break
  1460. if fid == 1:
  1461. if ftype == TType.STRING:
  1462. self.name = iprot.readString();
  1463. else:
  1464. iprot.skip(ftype)
  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('get_database_args')
  1474. if self.name != None:
  1475. oprot.writeFieldBegin('name', TType.STRING, 1)
  1476. oprot.writeString(self.name)
  1477. oprot.writeFieldEnd()
  1478. oprot.writeFieldStop()
  1479. oprot.writeStructEnd()
  1480. def __repr__(self):
  1481. L = ['%s=%r' % (key, value)
  1482. for key, value in self.__dict__.iteritems()]
  1483. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1484. def __eq__(self, other):
  1485. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1486. def __ne__(self, other):
  1487. return not (self == other)
  1488. class get_database_result(object):
  1489. """
  1490. Attributes:
  1491. - success
  1492. - o1
  1493. - o2
  1494. """
  1495. thrift_spec = (
  1496. (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0
  1497. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  1498. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  1499. )
  1500. def __init__(self, success=None, o1=None, o2=None,):
  1501. self.success = success
  1502. self.o1 = o1
  1503. self.o2 = o2
  1504. def read(self, iprot):
  1505. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1506. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1507. return
  1508. iprot.readStructBegin()
  1509. while True:
  1510. (fname, ftype, fid) = iprot.readFieldBegin()
  1511. if ftype == TType.STOP:
  1512. break
  1513. if fid == 0:
  1514. if ftype == TType.STRUCT:
  1515. self.success = Database()
  1516. self.success.read(iprot)
  1517. else:
  1518. iprot.skip(ftype)
  1519. elif fid == 1:
  1520. if ftype == TType.STRUCT:
  1521. self.o1 = NoSuchObjectException()
  1522. self.o1.read(iprot)
  1523. else:
  1524. iprot.skip(ftype)
  1525. elif fid == 2:
  1526. if ftype == TType.STRUCT:
  1527. self.o2 = MetaException()
  1528. self.o2.read(iprot)
  1529. else:
  1530. iprot.skip(ftype)
  1531. else:
  1532. iprot.skip(ftype)
  1533. iprot.readFieldEnd()
  1534. iprot.readStructEnd()
  1535. def write(self, oprot):
  1536. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1537. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1538. return
  1539. oprot.writeStructBegin('get_database_result')
  1540. if self.success != None:
  1541. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1542. self.success.write(oprot)
  1543. oprot.writeFieldEnd()
  1544. if self.o1 != None:
  1545. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  1546. self.o1.write(oprot)
  1547. oprot.writeFieldEnd()
  1548. if self.o2 != None:
  1549. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  1550. self.o2.write(oprot)
  1551. oprot.writeFieldEnd()
  1552. oprot.writeFieldStop()
  1553. oprot.writeStructEnd()
  1554. def __repr__(self):
  1555. L = ['%s=%r' % (key, value)
  1556. for key, value in self.__dict__.iteritems()]
  1557. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1558. def __eq__(self, other):
  1559. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1560. def __ne__(self, other):
  1561. return not (self == other)
  1562. class drop_database_args(object):
  1563. """
  1564. Attributes:
  1565. - name
  1566. """
  1567. thrift_spec = (
  1568. None, # 0
  1569. (1, TType.STRING, 'name', None, None, ), # 1
  1570. )
  1571. def __init__(self, name=None,):
  1572. self.name = name
  1573. def read(self, iprot):
  1574. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1575. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1576. return
  1577. iprot.readStructBegin()
  1578. while True:
  1579. (fname, ftype, fid) = iprot.readFieldBegin()
  1580. if ftype == TType.STOP:
  1581. break
  1582. if fid == 1:
  1583. if ftype == TType.STRING:
  1584. self.name = iprot.readString();
  1585. else:
  1586. iprot.skip(ftype)
  1587. else:
  1588. iprot.skip(ftype)
  1589. iprot.readFieldEnd()
  1590. iprot.readStructEnd()
  1591. def write(self, oprot):
  1592. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1593. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1594. return
  1595. oprot.writeStructBegin('drop_database_args')
  1596. if self.name != None:
  1597. oprot.writeFieldBegin('name', TType.STRING, 1)
  1598. oprot.writeString(self.name)
  1599. oprot.writeFieldEnd()
  1600. oprot.writeFieldStop()
  1601. oprot.writeStructEnd()
  1602. def __repr__(self):
  1603. L = ['%s=%r' % (key, value)
  1604. for key, value in self.__dict__.iteritems()]
  1605. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1606. def __eq__(self, other):
  1607. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1608. def __ne__(self, other):
  1609. return not (self == other)
  1610. class drop_database_result(object):
  1611. """
  1612. Attributes:
  1613. - success
  1614. - o2
  1615. """
  1616. thrift_spec = (
  1617. (0, TType.BOOL, 'success', None, None, ), # 0
  1618. None, # 1
  1619. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  1620. )
  1621. def __init__(self, success=None, o2=None,):
  1622. self.success = success
  1623. self.o2 = o2
  1624. def read(self, iprot):
  1625. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1626. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1627. return
  1628. iprot.readStructBegin()
  1629. while True:
  1630. (fname, ftype, fid) = iprot.readFieldBegin()
  1631. if ftype == TType.STOP:
  1632. break
  1633. if fid == 0:
  1634. if ftype == TType.BOOL:
  1635. self.success = iprot.readBool();
  1636. else:
  1637. iprot.skip(ftype)
  1638. elif fid == 2:
  1639. if ftype == TType.STRUCT:
  1640. self.o2 = MetaException()
  1641. self.o2.read(iprot)
  1642. else:
  1643. iprot.skip(ftype)
  1644. else:
  1645. iprot.skip(ftype)
  1646. iprot.readFieldEnd()
  1647. iprot.readStructEnd()
  1648. def write(self, oprot):
  1649. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1650. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1651. return
  1652. oprot.writeStructBegin('drop_database_result')
  1653. if self.success != None:
  1654. oprot.writeFieldBegin('success', TType.BOOL, 0)
  1655. oprot.writeBool(self.success)
  1656. oprot.writeFieldEnd()
  1657. if self.o2 != None:
  1658. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  1659. self.o2.write(oprot)
  1660. oprot.writeFieldEnd()
  1661. oprot.writeFieldStop()
  1662. oprot.writeStructEnd()
  1663. def __repr__(self):
  1664. L = ['%s=%r' % (key, value)
  1665. for key, value in self.__dict__.iteritems()]
  1666. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1667. def __eq__(self, other):
  1668. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1669. def __ne__(self, other):
  1670. return not (self == other)
  1671. class get_databases_args(object):
  1672. thrift_spec = (
  1673. )
  1674. def read(self, iprot):
  1675. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1676. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1677. return
  1678. iprot.readStructBegin()
  1679. while True:
  1680. (fname, ftype, fid) = iprot.readFieldBegin()
  1681. if ftype == TType.STOP:
  1682. break
  1683. else:
  1684. iprot.skip(ftype)
  1685. iprot.readFieldEnd()
  1686. iprot.readStructEnd()
  1687. def write(self, oprot):
  1688. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1689. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1690. return
  1691. oprot.writeStructBegin('get_databases_args')
  1692. oprot.writeFieldStop()
  1693. oprot.writeStructEnd()
  1694. def __repr__(self):
  1695. L = ['%s=%r' % (key, value)
  1696. for key, value in self.__dict__.iteritems()]
  1697. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1698. def __eq__(self, other):
  1699. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1700. def __ne__(self, other):
  1701. return not (self == other)
  1702. class get_databases_result(object):
  1703. """
  1704. Attributes:
  1705. - success
  1706. - o1
  1707. """
  1708. thrift_spec = (
  1709. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  1710. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  1711. )
  1712. def __init__(self, success=None, o1=None,):
  1713. self.success = success
  1714. self.o1 = o1
  1715. def read(self, iprot):
  1716. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1717. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1718. return
  1719. iprot.readStructBegin()
  1720. while True:
  1721. (fname, ftype, fid) = iprot.readFieldBegin()
  1722. if ftype == TType.STOP:
  1723. break
  1724. if fid == 0:
  1725. if ftype == TType.LIST:
  1726. self.success = []
  1727. (_etype104, _size101) = iprot.readListBegin()
  1728. for _i105 in xrange(_size101):
  1729. _elem106 = iprot.readString();
  1730. self.success.append(_elem106)
  1731. iprot.readListEnd()
  1732. else:
  1733. iprot.skip(ftype)
  1734. elif fid == 1:
  1735. if ftype == TType.STRUCT:
  1736. self.o1 = MetaException()
  1737. self.o1.read(iprot)
  1738. else:
  1739. iprot.skip(ftype)
  1740. else:
  1741. iprot.skip(ftype)
  1742. iprot.readFieldEnd()
  1743. iprot.readStructEnd()
  1744. def write(self, oprot):
  1745. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1746. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1747. return
  1748. oprot.writeStructBegin('get_databases_result')
  1749. if self.success != None:
  1750. oprot.writeFieldBegin('success', TType.LIST, 0)
  1751. oprot.writeListBegin(TType.STRING, len(self.success))
  1752. for iter107 in self.success:
  1753. oprot.writeString(iter107)
  1754. oprot.writeListEnd()
  1755. oprot.writeFieldEnd()
  1756. if self.o1 != None:
  1757. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  1758. self.o1.write(oprot)
  1759. oprot.writeFieldEnd()
  1760. oprot.writeFieldStop()
  1761. oprot.writeStructEnd()
  1762. def __repr__(self):
  1763. L = ['%s=%r' % (key, value)
  1764. for key, value in self.__dict__.iteritems()]
  1765. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1766. def __eq__(self, other):
  1767. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1768. def __ne__(self, other):
  1769. return not (self == other)
  1770. class get_type_args(object):
  1771. """
  1772. Attributes:
  1773. - name
  1774. """
  1775. thrift_spec = (
  1776. None, # 0
  1777. (1, TType.STRING, 'name', None, None, ), # 1
  1778. )
  1779. def __init__(self, name=None,):
  1780. self.name = name
  1781. def read(self, iprot):
  1782. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1783. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1784. return
  1785. iprot.readStructBegin()
  1786. while True:
  1787. (fname, ftype, fid) = iprot.readFieldBegin()
  1788. if ftype == TType.STOP:
  1789. break
  1790. if fid == 1:
  1791. if ftype == TType.STRING:
  1792. self.name = iprot.readString();
  1793. else:
  1794. iprot.skip(ftype)
  1795. else:
  1796. iprot.skip(ftype)
  1797. iprot.readFieldEnd()
  1798. iprot.readStructEnd()
  1799. def write(self, oprot):
  1800. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1801. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1802. return
  1803. oprot.writeStructBegin('get_type_args')
  1804. if self.name != None:
  1805. oprot.writeFieldBegin('name', TType.STRING, 1)
  1806. oprot.writeString(self.name)
  1807. oprot.writeFieldEnd()
  1808. oprot.writeFieldStop()
  1809. oprot.writeStructEnd()
  1810. def __repr__(self):
  1811. L = ['%s=%r' % (key, value)
  1812. for key, value in self.__dict__.iteritems()]
  1813. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1814. def __eq__(self, other):
  1815. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1816. def __ne__(self, other):
  1817. return not (self == other)
  1818. class get_type_result(object):
  1819. """
  1820. Attributes:
  1821. - success
  1822. - o2
  1823. """
  1824. thrift_spec = (
  1825. (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0
  1826. (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
  1827. )
  1828. def __init__(self, success=None, o2=None,):
  1829. self.success = success
  1830. self.o2 = o2
  1831. def read(self, iprot):
  1832. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1833. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1834. return
  1835. iprot.readStructBegin()
  1836. while True:
  1837. (fname, ftype, fid) = iprot.readFieldBegin()
  1838. if ftype == TType.STOP:
  1839. break
  1840. if fid == 0:
  1841. if ftype == TType.STRUCT:
  1842. self.success = Type()
  1843. self.success.read(iprot)
  1844. else:
  1845. iprot.skip(ftype)
  1846. elif fid == 1:
  1847. if ftype == TType.STRUCT:
  1848. self.o2 = MetaException()
  1849. self.o2.read(iprot)
  1850. else:
  1851. iprot.skip(ftype)
  1852. else:
  1853. iprot.skip(ftype)
  1854. iprot.readFieldEnd()
  1855. iprot.readStructEnd()
  1856. def write(self, oprot):
  1857. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1858. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1859. return
  1860. oprot.writeStructBegin('get_type_result')
  1861. if self.success != None:
  1862. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1863. self.success.write(oprot)
  1864. oprot.writeFieldEnd()
  1865. if self.o2 != None:
  1866. oprot.writeFieldBegin('o2', TType.STRUCT, 1)
  1867. self.o2.write(oprot)
  1868. oprot.writeFieldEnd()
  1869. oprot.writeFieldStop()
  1870. oprot.writeStructEnd()
  1871. def __repr__(self):
  1872. L = ['%s=%r' % (key, value)
  1873. for key, value in self.__dict__.iteritems()]
  1874. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1875. def __eq__(self, other):
  1876. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1877. def __ne__(self, other):
  1878. return not (self == other)
  1879. class create_type_args(object):
  1880. """
  1881. Attributes:
  1882. - type
  1883. """
  1884. thrift_spec = (
  1885. None, # 0
  1886. (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1
  1887. )
  1888. def __init__(self, type=None,):
  1889. self.type = type
  1890. def read(self, iprot):
  1891. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1892. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1893. return
  1894. iprot.readStructBegin()
  1895. while True:
  1896. (fname, ftype, fid) = iprot.readFieldBegin()
  1897. if ftype == TType.STOP:
  1898. break
  1899. if fid == 1:
  1900. if ftype == TType.STRUCT:
  1901. self.type = Type()
  1902. self.type.read(iprot)
  1903. else:
  1904. iprot.skip(ftype)
  1905. else:
  1906. iprot.skip(ftype)
  1907. iprot.readFieldEnd()
  1908. iprot.readStructEnd()
  1909. def write(self, oprot):
  1910. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1911. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1912. return
  1913. oprot.writeStructBegin('create_type_args')
  1914. if self.type != None:
  1915. oprot.writeFieldBegin('type', TType.STRUCT, 1)
  1916. self.type.write(oprot)
  1917. oprot.writeFieldEnd()
  1918. oprot.writeFieldStop()
  1919. oprot.writeStructEnd()
  1920. def __repr__(self):
  1921. L = ['%s=%r' % (key, value)
  1922. for key, value in self.__dict__.iteritems()]
  1923. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1924. def __eq__(self, other):
  1925. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1926. def __ne__(self, other):
  1927. return not (self == other)
  1928. class create_type_result(object):
  1929. """
  1930. Attributes:
  1931. - success
  1932. - o1
  1933. - o2
  1934. - o3
  1935. """
  1936. thrift_spec = (
  1937. (0, TType.BOOL, 'success', None, None, ), # 0
  1938. (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
  1939. (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2
  1940. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  1941. )
  1942. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  1943. self.success = success
  1944. self.o1 = o1
  1945. self.o2 = o2
  1946. self.o3 = o3
  1947. def read(self, iprot):
  1948. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1949. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1950. return
  1951. iprot.readStructBegin()
  1952. while True:
  1953. (fname, ftype, fid) = iprot.readFieldBegin()
  1954. if ftype == TType.STOP:
  1955. break
  1956. if fid == 0:
  1957. if ftype == TType.BOOL:
  1958. self.success = iprot.readBool();
  1959. else:
  1960. iprot.skip(ftype)
  1961. elif fid == 1:
  1962. if ftype == TType.STRUCT:
  1963. self.o1 = AlreadyExistsException()
  1964. self.o1.read(iprot)
  1965. else:
  1966. iprot.skip(ftype)
  1967. elif fid == 2:
  1968. if ftype == TType.STRUCT:
  1969. self.o2 = InvalidObjectException()
  1970. self.o2.read(iprot)
  1971. else:
  1972. iprot.skip(ftype)
  1973. elif fid == 3:
  1974. if ftype == TType.STRUCT:
  1975. self.o3 = MetaException()
  1976. self.o3.read(iprot)
  1977. else:
  1978. iprot.skip(ftype)
  1979. else:
  1980. iprot.skip(ftype)
  1981. iprot.readFieldEnd()
  1982. iprot.readStructEnd()
  1983. def write(self, oprot):
  1984. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1985. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1986. return
  1987. oprot.writeStructBegin('create_type_result')
  1988. if self.success != None:
  1989. oprot.writeFieldBegin('success', TType.BOOL, 0)
  1990. oprot.writeBool(self.success)
  1991. oprot.writeFieldEnd()
  1992. if self.o1 != None:
  1993. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  1994. self.o1.write(oprot)
  1995. oprot.writeFieldEnd()
  1996. if self.o2 != None:
  1997. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  1998. self.o2.write(oprot)
  1999. oprot.writeFieldEnd()
  2000. if self.o3 != None:
  2001. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  2002. self.o3.write(oprot)
  2003. oprot.writeFieldEnd()
  2004. oprot.writeFieldStop()
  2005. oprot.writeStructEnd()
  2006. def __repr__(self):
  2007. L = ['%s=%r' % (key, value)
  2008. for key, value in self.__dict__.iteritems()]
  2009. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2010. def __eq__(self, other):
  2011. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2012. def __ne__(self, other):
  2013. return not (self == other)
  2014. class drop_type_args(object):
  2015. """
  2016. Attributes:
  2017. - type
  2018. """
  2019. thrift_spec = (
  2020. None, # 0
  2021. (1, TType.STRING, 'type', None, None, ), # 1
  2022. )
  2023. def __init__(self, type=None,):
  2024. self.type = type
  2025. def read(self, iprot):
  2026. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2027. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2028. return
  2029. iprot.readStructBegin()
  2030. while True:
  2031. (fname, ftype, fid) = iprot.readFieldBegin()
  2032. if ftype == TType.STOP:
  2033. break
  2034. if fid == 1:
  2035. if ftype == TType.STRING:
  2036. self.type = iprot.readString();
  2037. else:
  2038. iprot.skip(ftype)
  2039. else:
  2040. iprot.skip(ftype)
  2041. iprot.readFieldEnd()
  2042. iprot.readStructEnd()
  2043. def write(self, oprot):
  2044. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2045. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2046. return
  2047. oprot.writeStructBegin('drop_type_args')
  2048. if self.type != None:
  2049. oprot.writeFieldBegin('type', TType.STRING, 1)
  2050. oprot.writeString(self.type)
  2051. oprot.writeFieldEnd()
  2052. oprot.writeFieldStop()
  2053. oprot.writeStructEnd()
  2054. def __repr__(self):
  2055. L = ['%s=%r' % (key, value)
  2056. for key, value in self.__dict__.iteritems()]
  2057. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2058. def __eq__(self, other):
  2059. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2060. def __ne__(self, other):
  2061. return not (self == other)
  2062. class drop_type_result(object):
  2063. """
  2064. Attributes:
  2065. - success
  2066. - o2
  2067. """
  2068. thrift_spec = (
  2069. (0, TType.BOOL, 'success', None, None, ), # 0
  2070. (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
  2071. )
  2072. def __init__(self, success=None, o2=None,):
  2073. self.success = success
  2074. self.o2 = o2
  2075. def read(self, iprot):
  2076. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2077. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2078. return
  2079. iprot.readStructBegin()
  2080. while True:
  2081. (fname, ftype, fid) = iprot.readFieldBegin()
  2082. if ftype == TType.STOP:
  2083. break
  2084. if fid == 0:
  2085. if ftype == TType.BOOL:
  2086. self.success = iprot.readBool();
  2087. else:
  2088. iprot.skip(ftype)
  2089. elif fid == 1:
  2090. if ftype == TType.STRUCT:
  2091. self.o2 = MetaException()
  2092. self.o2.read(iprot)
  2093. else:
  2094. iprot.skip(ftype)
  2095. else:
  2096. iprot.skip(ftype)
  2097. iprot.readFieldEnd()
  2098. iprot.readStructEnd()
  2099. def write(self, oprot):
  2100. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2101. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2102. return
  2103. oprot.writeStructBegin('drop_type_result')
  2104. if self.success != None:
  2105. oprot.writeFieldBegin('success', TType.BOOL, 0)
  2106. oprot.writeBool(self.success)
  2107. oprot.writeFieldEnd()
  2108. if self.o2 != None:
  2109. oprot.writeFieldBegin('o2', TType.STRUCT, 1)
  2110. self.o2.write(oprot)
  2111. oprot.writeFieldEnd()
  2112. oprot.writeFieldStop()
  2113. oprot.writeStructEnd()
  2114. def __repr__(self):
  2115. L = ['%s=%r' % (key, value)
  2116. for key, value in self.__dict__.iteritems()]
  2117. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2118. def __eq__(self, other):
  2119. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2120. def __ne__(self, other):
  2121. return not (self == other)
  2122. class get_type_all_args(object):
  2123. """
  2124. Attributes:
  2125. - name
  2126. """
  2127. thrift_spec = (
  2128. None, # 0
  2129. (1, TType.STRING, 'name', None, None, ), # 1
  2130. )
  2131. def __init__(self, name=None,):
  2132. self.name = name
  2133. def read(self, iprot):
  2134. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2135. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2136. return
  2137. iprot.readStructBegin()
  2138. while True:
  2139. (fname, ftype, fid) = iprot.readFieldBegin()
  2140. if ftype == TType.STOP:
  2141. break
  2142. if fid == 1:
  2143. if ftype == TType.STRING:
  2144. self.name = iprot.readString();
  2145. else:
  2146. iprot.skip(ftype)
  2147. else:
  2148. iprot.skip(ftype)
  2149. iprot.readFieldEnd()
  2150. iprot.readStructEnd()
  2151. def write(self, oprot):
  2152. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2153. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2154. return
  2155. oprot.writeStructBegin('get_type_all_args')
  2156. if self.name != None:
  2157. oprot.writeFieldBegin('name', TType.STRING, 1)
  2158. oprot.writeString(self.name)
  2159. oprot.writeFieldEnd()
  2160. oprot.writeFieldStop()
  2161. oprot.writeStructEnd()
  2162. def __repr__(self):
  2163. L = ['%s=%r' % (key, value)
  2164. for key, value in self.__dict__.iteritems()]
  2165. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2166. def __eq__(self, other):
  2167. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2168. def __ne__(self, other):
  2169. return not (self == other)
  2170. class get_type_all_result(object):
  2171. """
  2172. Attributes:
  2173. - success
  2174. - o2
  2175. """
  2176. thrift_spec = (
  2177. (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0
  2178. (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
  2179. )
  2180. def __init__(self, success=None, o2=None,):
  2181. self.success = success
  2182. self.o2 = o2
  2183. def read(self, iprot):
  2184. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2185. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2186. return
  2187. iprot.readStructBegin()
  2188. while True:
  2189. (fname, ftype, fid) = iprot.readFieldBegin()
  2190. if ftype == TType.STOP:
  2191. break
  2192. if fid == 0:
  2193. if ftype == TType.MAP:
  2194. self.success = {}
  2195. (_ktype109, _vtype110, _size108 ) = iprot.readMapBegin()
  2196. for _i112 in xrange(_size108):
  2197. _key113 = iprot.readString();
  2198. _val114 = Type()
  2199. _val114.read(iprot)
  2200. self.success[_key113] = _val114
  2201. iprot.readMapEnd()
  2202. else:
  2203. iprot.skip(ftype)
  2204. elif fid == 1:
  2205. if ftype == TType.STRUCT:
  2206. self.o2 = MetaException()
  2207. self.o2.read(iprot)
  2208. else:
  2209. iprot.skip(ftype)
  2210. else:
  2211. iprot.skip(ftype)
  2212. iprot.readFieldEnd()
  2213. iprot.readStructEnd()
  2214. def write(self, oprot):
  2215. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2216. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2217. return
  2218. oprot.writeStructBegin('get_type_all_result')
  2219. if self.success != None:
  2220. oprot.writeFieldBegin('success', TType.MAP, 0)
  2221. oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
  2222. for kiter115,viter116 in self.success.items():
  2223. oprot.writeString(kiter115)
  2224. viter116.write(oprot)
  2225. oprot.writeMapEnd()
  2226. oprot.writeFieldEnd()
  2227. if self.o2 != None:
  2228. oprot.writeFieldBegin('o2', TType.STRUCT, 1)
  2229. self.o2.write(oprot)
  2230. oprot.writeFieldEnd()
  2231. oprot.writeFieldStop()
  2232. oprot.writeStructEnd()
  2233. def __repr__(self):
  2234. L = ['%s=%r' % (key, value)
  2235. for key, value in self.__dict__.iteritems()]
  2236. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2237. def __eq__(self, other):
  2238. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2239. def __ne__(self, other):
  2240. return not (self == other)
  2241. class get_fields_args(object):
  2242. """
  2243. Attributes:
  2244. - db_name
  2245. - table_name
  2246. """
  2247. thrift_spec = (
  2248. None, # 0
  2249. (1, TType.STRING, 'db_name', None, None, ), # 1
  2250. (2, TType.STRING, 'table_name', None, None, ), # 2
  2251. )
  2252. def __init__(self, db_name=None, table_name=None,):
  2253. self.db_name = db_name
  2254. self.table_name = table_name
  2255. def read(self, iprot):
  2256. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2257. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2258. return
  2259. iprot.readStructBegin()
  2260. while True:
  2261. (fname, ftype, fid) = iprot.readFieldBegin()
  2262. if ftype == TType.STOP:
  2263. break
  2264. if fid == 1:
  2265. if ftype == TType.STRING:
  2266. self.db_name = iprot.readString();
  2267. else:
  2268. iprot.skip(ftype)
  2269. elif fid == 2:
  2270. if ftype == TType.STRING:
  2271. self.table_name = iprot.readString();
  2272. else:
  2273. iprot.skip(ftype)
  2274. else:
  2275. iprot.skip(ftype)
  2276. iprot.readFieldEnd()
  2277. iprot.readStructEnd()
  2278. def write(self, oprot):
  2279. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2280. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2281. return
  2282. oprot.writeStructBegin('get_fields_args')
  2283. if self.db_name != None:
  2284. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  2285. oprot.writeString(self.db_name)
  2286. oprot.writeFieldEnd()
  2287. if self.table_name != None:
  2288. oprot.writeFieldBegin('table_name', TType.STRING, 2)
  2289. oprot.writeString(self.table_name)
  2290. oprot.writeFieldEnd()
  2291. oprot.writeFieldStop()
  2292. oprot.writeStructEnd()
  2293. def __repr__(self):
  2294. L = ['%s=%r' % (key, value)
  2295. for key, value in self.__dict__.iteritems()]
  2296. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2297. def __eq__(self, other):
  2298. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2299. def __ne__(self, other):
  2300. return not (self == other)
  2301. class get_fields_result(object):
  2302. """
  2303. Attributes:
  2304. - success
  2305. - o1
  2306. - o2
  2307. - o3
  2308. """
  2309. thrift_spec = (
  2310. (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0
  2311. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  2312. (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2
  2313. (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3
  2314. )
  2315. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  2316. self.success = success
  2317. self.o1 = o1
  2318. self.o2 = o2
  2319. self.o3 = o3
  2320. def read(self, iprot):
  2321. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2322. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2323. return
  2324. iprot.readStructBegin()
  2325. while True:
  2326. (fname, ftype, fid) = iprot.readFieldBegin()
  2327. if ftype == TType.STOP:
  2328. break
  2329. if fid == 0:
  2330. if ftype == TType.LIST:
  2331. self.success = []
  2332. (_etype120, _size117) = iprot.readListBegin()
  2333. for _i121 in xrange(_size117):
  2334. _elem122 = FieldSchema()
  2335. _elem122.read(iprot)
  2336. self.success.append(_elem122)
  2337. iprot.readListEnd()
  2338. else:
  2339. iprot.skip(ftype)
  2340. elif fid == 1:
  2341. if ftype == TType.STRUCT:
  2342. self.o1 = MetaException()
  2343. self.o1.read(iprot)
  2344. else:
  2345. iprot.skip(ftype)
  2346. elif fid == 2:
  2347. if ftype == TType.STRUCT:
  2348. self.o2 = UnknownTableException()
  2349. self.o2.read(iprot)
  2350. else:
  2351. iprot.skip(ftype)
  2352. elif fid == 3:
  2353. if ftype == TType.STRUCT:
  2354. self.o3 = UnknownDBException()
  2355. self.o3.read(iprot)
  2356. else:
  2357. iprot.skip(ftype)
  2358. else:
  2359. iprot.skip(ftype)
  2360. iprot.readFieldEnd()
  2361. iprot.readStructEnd()
  2362. def write(self, oprot):
  2363. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2364. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2365. return
  2366. oprot.writeStructBegin('get_fields_result')
  2367. if self.success != None:
  2368. oprot.writeFieldBegin('success', TType.LIST, 0)
  2369. oprot.writeListBegin(TType.STRUCT, len(self.success))
  2370. for iter123 in self.success:
  2371. iter123.write(oprot)
  2372. oprot.writeListEnd()
  2373. oprot.writeFieldEnd()
  2374. if self.o1 != None:
  2375. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2376. self.o1.write(oprot)
  2377. oprot.writeFieldEnd()
  2378. if self.o2 != None:
  2379. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  2380. self.o2.write(oprot)
  2381. oprot.writeFieldEnd()
  2382. if self.o3 != None:
  2383. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  2384. self.o3.write(oprot)
  2385. oprot.writeFieldEnd()
  2386. oprot.writeFieldStop()
  2387. oprot.writeStructEnd()
  2388. def __repr__(self):
  2389. L = ['%s=%r' % (key, value)
  2390. for key, value in self.__dict__.iteritems()]
  2391. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2392. def __eq__(self, other):
  2393. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2394. def __ne__(self, other):
  2395. return not (self == other)
  2396. class get_schema_args(object):
  2397. """
  2398. Attributes:
  2399. - db_name
  2400. - table_name
  2401. """
  2402. thrift_spec = (
  2403. None, # 0
  2404. (1, TType.STRING, 'db_name', None, None, ), # 1
  2405. (2, TType.STRING, 'table_name', None, None, ), # 2
  2406. )
  2407. def __init__(self, db_name=None, table_name=None,):
  2408. self.db_name = db_name
  2409. self.table_name = table_name
  2410. def read(self, iprot):
  2411. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2412. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2413. return
  2414. iprot.readStructBegin()
  2415. while True:
  2416. (fname, ftype, fid) = iprot.readFieldBegin()
  2417. if ftype == TType.STOP:
  2418. break
  2419. if fid == 1:
  2420. if ftype == TType.STRING:
  2421. self.db_name = iprot.readString();
  2422. else:
  2423. iprot.skip(ftype)
  2424. elif fid == 2:
  2425. if ftype == TType.STRING:
  2426. self.table_name = iprot.readString();
  2427. else:
  2428. iprot.skip(ftype)
  2429. else:
  2430. iprot.skip(ftype)
  2431. iprot.readFieldEnd()
  2432. iprot.readStructEnd()
  2433. def write(self, oprot):
  2434. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2435. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2436. return
  2437. oprot.writeStructBegin('get_schema_args')
  2438. if self.db_name != None:
  2439. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  2440. oprot.writeString(self.db_name)
  2441. oprot.writeFieldEnd()
  2442. if self.table_name != None:
  2443. oprot.writeFieldBegin('table_name', TType.STRING, 2)
  2444. oprot.writeString(self.table_name)
  2445. oprot.writeFieldEnd()
  2446. oprot.writeFieldStop()
  2447. oprot.writeStructEnd()
  2448. def __repr__(self):
  2449. L = ['%s=%r' % (key, value)
  2450. for key, value in self.__dict__.iteritems()]
  2451. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2452. def __eq__(self, other):
  2453. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2454. def __ne__(self, other):
  2455. return not (self == other)
  2456. class get_schema_result(object):
  2457. """
  2458. Attributes:
  2459. - success
  2460. - o1
  2461. - o2
  2462. - o3
  2463. """
  2464. thrift_spec = (
  2465. (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0
  2466. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  2467. (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2
  2468. (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3
  2469. )
  2470. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  2471. self.success = success
  2472. self.o1 = o1
  2473. self.o2 = o2
  2474. self.o3 = o3
  2475. def read(self, iprot):
  2476. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2477. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2478. return
  2479. iprot.readStructBegin()
  2480. while True:
  2481. (fname, ftype, fid) = iprot.readFieldBegin()
  2482. if ftype == TType.STOP:
  2483. break
  2484. if fid == 0:
  2485. if ftype == TType.LIST:
  2486. self.success = []
  2487. (_etype127, _size124) = iprot.readListBegin()
  2488. for _i128 in xrange(_size124):
  2489. _elem129 = FieldSchema()
  2490. _elem129.read(iprot)
  2491. self.success.append(_elem129)
  2492. iprot.readListEnd()
  2493. else:
  2494. iprot.skip(ftype)
  2495. elif fid == 1:
  2496. if ftype == TType.STRUCT:
  2497. self.o1 = MetaException()
  2498. self.o1.read(iprot)
  2499. else:
  2500. iprot.skip(ftype)
  2501. elif fid == 2:
  2502. if ftype == TType.STRUCT:
  2503. self.o2 = UnknownTableException()
  2504. self.o2.read(iprot)
  2505. else:
  2506. iprot.skip(ftype)
  2507. elif fid == 3:
  2508. if ftype == TType.STRUCT:
  2509. self.o3 = UnknownDBException()
  2510. self.o3.read(iprot)
  2511. else:
  2512. iprot.skip(ftype)
  2513. else:
  2514. iprot.skip(ftype)
  2515. iprot.readFieldEnd()
  2516. iprot.readStructEnd()
  2517. def write(self, oprot):
  2518. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2519. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2520. return
  2521. oprot.writeStructBegin('get_schema_result')
  2522. if self.success != None:
  2523. oprot.writeFieldBegin('success', TType.LIST, 0)
  2524. oprot.writeListBegin(TType.STRUCT, len(self.success))
  2525. for iter130 in self.success:
  2526. iter130.write(oprot)
  2527. oprot.writeListEnd()
  2528. oprot.writeFieldEnd()
  2529. if self.o1 != None:
  2530. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2531. self.o1.write(oprot)
  2532. oprot.writeFieldEnd()
  2533. if self.o2 != None:
  2534. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  2535. self.o2.write(oprot)
  2536. oprot.writeFieldEnd()
  2537. if self.o3 != None:
  2538. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  2539. self.o3.write(oprot)
  2540. oprot.writeFieldEnd()
  2541. oprot.writeFieldStop()
  2542. oprot.writeStructEnd()
  2543. def __repr__(self):
  2544. L = ['%s=%r' % (key, value)
  2545. for key, value in self.__dict__.iteritems()]
  2546. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2547. def __eq__(self, other):
  2548. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2549. def __ne__(self, other):
  2550. return not (self == other)
  2551. class create_table_args(object):
  2552. """
  2553. Attributes:
  2554. - tbl
  2555. """
  2556. thrift_spec = (
  2557. None, # 0
  2558. (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1
  2559. )
  2560. def __init__(self, tbl=None,):
  2561. self.tbl = tbl
  2562. def read(self, iprot):
  2563. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2564. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2565. return
  2566. iprot.readStructBegin()
  2567. while True:
  2568. (fname, ftype, fid) = iprot.readFieldBegin()
  2569. if ftype == TType.STOP:
  2570. break
  2571. if fid == 1:
  2572. if ftype == TType.STRUCT:
  2573. self.tbl = Table()
  2574. self.tbl.read(iprot)
  2575. else:
  2576. iprot.skip(ftype)
  2577. else:
  2578. iprot.skip(ftype)
  2579. iprot.readFieldEnd()
  2580. iprot.readStructEnd()
  2581. def write(self, oprot):
  2582. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2583. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2584. return
  2585. oprot.writeStructBegin('create_table_args')
  2586. if self.tbl != None:
  2587. oprot.writeFieldBegin('tbl', TType.STRUCT, 1)
  2588. self.tbl.write(oprot)
  2589. oprot.writeFieldEnd()
  2590. oprot.writeFieldStop()
  2591. oprot.writeStructEnd()
  2592. def __repr__(self):
  2593. L = ['%s=%r' % (key, value)
  2594. for key, value in self.__dict__.iteritems()]
  2595. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2596. def __eq__(self, other):
  2597. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2598. def __ne__(self, other):
  2599. return not (self == other)
  2600. class create_table_result(object):
  2601. """
  2602. Attributes:
  2603. - o1
  2604. - o2
  2605. - o3
  2606. - o4
  2607. """
  2608. thrift_spec = (
  2609. None, # 0
  2610. (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
  2611. (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2
  2612. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  2613. (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4
  2614. )
  2615. def __init__(self, o1=None, o2=None, o3=None, o4=None,):
  2616. self.o1 = o1
  2617. self.o2 = o2
  2618. self.o3 = o3
  2619. self.o4 = o4
  2620. def read(self, iprot):
  2621. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2622. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2623. return
  2624. iprot.readStructBegin()
  2625. while True:
  2626. (fname, ftype, fid) = iprot.readFieldBegin()
  2627. if ftype == TType.STOP:
  2628. break
  2629. if fid == 1:
  2630. if ftype == TType.STRUCT:
  2631. self.o1 = AlreadyExistsException()
  2632. self.o1.read(iprot)
  2633. else:
  2634. iprot.skip(ftype)
  2635. elif fid == 2:
  2636. if ftype == TType.STRUCT:
  2637. self.o2 = InvalidObjectException()
  2638. self.o2.read(iprot)
  2639. else:
  2640. iprot.skip(ftype)
  2641. elif fid == 3:
  2642. if ftype == TType.STRUCT:
  2643. self.o3 = MetaException()
  2644. self.o3.read(iprot)
  2645. else:
  2646. iprot.skip(ftype)
  2647. elif fid == 4:
  2648. if ftype == TType.STRUCT:
  2649. self.o4 = NoSuchObjectException()
  2650. self.o4.read(iprot)
  2651. else:
  2652. iprot.skip(ftype)
  2653. else:
  2654. iprot.skip(ftype)
  2655. iprot.readFieldEnd()
  2656. iprot.readStructEnd()
  2657. def write(self, oprot):
  2658. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2659. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2660. return
  2661. oprot.writeStructBegin('create_table_result')
  2662. if self.o1 != None:
  2663. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2664. self.o1.write(oprot)
  2665. oprot.writeFieldEnd()
  2666. if self.o2 != None:
  2667. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  2668. self.o2.write(oprot)
  2669. oprot.writeFieldEnd()
  2670. if self.o3 != None:
  2671. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  2672. self.o3.write(oprot)
  2673. oprot.writeFieldEnd()
  2674. if self.o4 != None:
  2675. oprot.writeFieldBegin('o4', TType.STRUCT, 4)
  2676. self.o4.write(oprot)
  2677. oprot.writeFieldEnd()
  2678. oprot.writeFieldStop()
  2679. oprot.writeStructEnd()
  2680. def __repr__(self):
  2681. L = ['%s=%r' % (key, value)
  2682. for key, value in self.__dict__.iteritems()]
  2683. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2684. def __eq__(self, other):
  2685. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2686. def __ne__(self, other):
  2687. return not (self == other)
  2688. class drop_table_args(object):
  2689. """
  2690. Attributes:
  2691. - dbname
  2692. - name
  2693. - deleteData
  2694. """
  2695. thrift_spec = (
  2696. None, # 0
  2697. (1, TType.STRING, 'dbname', None, None, ), # 1
  2698. (2, TType.STRING, 'name', None, None, ), # 2
  2699. (3, TType.BOOL, 'deleteData', None, None, ), # 3
  2700. )
  2701. def __init__(self, dbname=None, name=None, deleteData=None,):
  2702. self.dbname = dbname
  2703. self.name = name
  2704. self.deleteData = deleteData
  2705. def read(self, iprot):
  2706. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2707. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2708. return
  2709. iprot.readStructBegin()
  2710. while True:
  2711. (fname, ftype, fid) = iprot.readFieldBegin()
  2712. if ftype == TType.STOP:
  2713. break
  2714. if fid == 1:
  2715. if ftype == TType.STRING:
  2716. self.dbname = iprot.readString();
  2717. else:
  2718. iprot.skip(ftype)
  2719. elif fid == 2:
  2720. if ftype == TType.STRING:
  2721. self.name = iprot.readString();
  2722. else:
  2723. iprot.skip(ftype)
  2724. elif fid == 3:
  2725. if ftype == TType.BOOL:
  2726. self.deleteData = iprot.readBool();
  2727. else:
  2728. iprot.skip(ftype)
  2729. else:
  2730. iprot.skip(ftype)
  2731. iprot.readFieldEnd()
  2732. iprot.readStructEnd()
  2733. def write(self, oprot):
  2734. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2735. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2736. return
  2737. oprot.writeStructBegin('drop_table_args')
  2738. if self.dbname != None:
  2739. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  2740. oprot.writeString(self.dbname)
  2741. oprot.writeFieldEnd()
  2742. if self.name != None:
  2743. oprot.writeFieldBegin('name', TType.STRING, 2)
  2744. oprot.writeString(self.name)
  2745. oprot.writeFieldEnd()
  2746. if self.deleteData != None:
  2747. oprot.writeFieldBegin('deleteData', TType.BOOL, 3)
  2748. oprot.writeBool(self.deleteData)
  2749. oprot.writeFieldEnd()
  2750. oprot.writeFieldStop()
  2751. oprot.writeStructEnd()
  2752. def __repr__(self):
  2753. L = ['%s=%r' % (key, value)
  2754. for key, value in self.__dict__.iteritems()]
  2755. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2756. def __eq__(self, other):
  2757. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2758. def __ne__(self, other):
  2759. return not (self == other)
  2760. class drop_table_result(object):
  2761. """
  2762. Attributes:
  2763. - o1
  2764. - o3
  2765. """
  2766. thrift_spec = (
  2767. None, # 0
  2768. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  2769. (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2
  2770. )
  2771. def __init__(self, o1=None, o3=None,):
  2772. self.o1 = o1
  2773. self.o3 = o3
  2774. def read(self, iprot):
  2775. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2776. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2777. return
  2778. iprot.readStructBegin()
  2779. while True:
  2780. (fname, ftype, fid) = iprot.readFieldBegin()
  2781. if ftype == TType.STOP:
  2782. break
  2783. if fid == 1:
  2784. if ftype == TType.STRUCT:
  2785. self.o1 = NoSuchObjectException()
  2786. self.o1.read(iprot)
  2787. else:
  2788. iprot.skip(ftype)
  2789. elif fid == 2:
  2790. if ftype == TType.STRUCT:
  2791. self.o3 = MetaException()
  2792. self.o3.read(iprot)
  2793. else:
  2794. iprot.skip(ftype)
  2795. else:
  2796. iprot.skip(ftype)
  2797. iprot.readFieldEnd()
  2798. iprot.readStructEnd()
  2799. def write(self, oprot):
  2800. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2801. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2802. return
  2803. oprot.writeStructBegin('drop_table_result')
  2804. if self.o1 != None:
  2805. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2806. self.o1.write(oprot)
  2807. oprot.writeFieldEnd()
  2808. if self.o3 != None:
  2809. oprot.writeFieldBegin('o3', TType.STRUCT, 2)
  2810. self.o3.write(oprot)
  2811. oprot.writeFieldEnd()
  2812. oprot.writeFieldStop()
  2813. oprot.writeStructEnd()
  2814. def __repr__(self):
  2815. L = ['%s=%r' % (key, value)
  2816. for key, value in self.__dict__.iteritems()]
  2817. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2818. def __eq__(self, other):
  2819. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2820. def __ne__(self, other):
  2821. return not (self == other)
  2822. class get_tables_args(object):
  2823. """
  2824. Attributes:
  2825. - db_name
  2826. - pattern
  2827. """
  2828. thrift_spec = (
  2829. None, # 0
  2830. (1, TType.STRING, 'db_name', None, None, ), # 1
  2831. (2, TType.STRING, 'pattern', None, None, ), # 2
  2832. )
  2833. def __init__(self, db_name=None, pattern=None,):
  2834. self.db_name = db_name
  2835. self.pattern = pattern
  2836. def read(self, iprot):
  2837. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2838. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2839. return
  2840. iprot.readStructBegin()
  2841. while True:
  2842. (fname, ftype, fid) = iprot.readFieldBegin()
  2843. if ftype == TType.STOP:
  2844. break
  2845. if fid == 1:
  2846. if ftype == TType.STRING:
  2847. self.db_name = iprot.readString();
  2848. else:
  2849. iprot.skip(ftype)
  2850. elif fid == 2:
  2851. if ftype == TType.STRING:
  2852. self.pattern = iprot.readString();
  2853. else:
  2854. iprot.skip(ftype)
  2855. else:
  2856. iprot.skip(ftype)
  2857. iprot.readFieldEnd()
  2858. iprot.readStructEnd()
  2859. def write(self, oprot):
  2860. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2861. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2862. return
  2863. oprot.writeStructBegin('get_tables_args')
  2864. if self.db_name != None:
  2865. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  2866. oprot.writeString(self.db_name)
  2867. oprot.writeFieldEnd()
  2868. if self.pattern != None:
  2869. oprot.writeFieldBegin('pattern', TType.STRING, 2)
  2870. oprot.writeString(self.pattern)
  2871. oprot.writeFieldEnd()
  2872. oprot.writeFieldStop()
  2873. oprot.writeStructEnd()
  2874. def __repr__(self):
  2875. L = ['%s=%r' % (key, value)
  2876. for key, value in self.__dict__.iteritems()]
  2877. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2878. def __eq__(self, other):
  2879. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2880. def __ne__(self, other):
  2881. return not (self == other)
  2882. class get_tables_result(object):
  2883. """
  2884. Attributes:
  2885. - success
  2886. - o1
  2887. """
  2888. thrift_spec = (
  2889. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  2890. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  2891. )
  2892. def __init__(self, success=None, o1=None,):
  2893. self.success = success
  2894. self.o1 = o1
  2895. def read(self, iprot):
  2896. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2897. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2898. return
  2899. iprot.readStructBegin()
  2900. while True:
  2901. (fname, ftype, fid) = iprot.readFieldBegin()
  2902. if ftype == TType.STOP:
  2903. break
  2904. if fid == 0:
  2905. if ftype == TType.LIST:
  2906. self.success = []
  2907. (_etype134, _size131) = iprot.readListBegin()
  2908. for _i135 in xrange(_size131):
  2909. _elem136 = iprot.readString();
  2910. self.success.append(_elem136)
  2911. iprot.readListEnd()
  2912. else:
  2913. iprot.skip(ftype)
  2914. elif fid == 1:
  2915. if ftype == TType.STRUCT:
  2916. self.o1 = MetaException()
  2917. self.o1.read(iprot)
  2918. else:
  2919. iprot.skip(ftype)
  2920. else:
  2921. iprot.skip(ftype)
  2922. iprot.readFieldEnd()
  2923. iprot.readStructEnd()
  2924. def write(self, oprot):
  2925. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2926. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2927. return
  2928. oprot.writeStructBegin('get_tables_result')
  2929. if self.success != None:
  2930. oprot.writeFieldBegin('success', TType.LIST, 0)
  2931. oprot.writeListBegin(TType.STRING, len(self.success))
  2932. for iter137 in self.success:
  2933. oprot.writeString(iter137)
  2934. oprot.writeListEnd()
  2935. oprot.writeFieldEnd()
  2936. if self.o1 != None:
  2937. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2938. self.o1.write(oprot)
  2939. oprot.writeFieldEnd()
  2940. oprot.writeFieldStop()
  2941. oprot.writeStructEnd()
  2942. def __repr__(self):
  2943. L = ['%s=%r' % (key, value)
  2944. for key, value in self.__dict__.iteritems()]
  2945. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2946. def __eq__(self, other):
  2947. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2948. def __ne__(self, other):
  2949. return not (self == other)
  2950. class get_table_args(object):
  2951. """
  2952. Attributes:
  2953. - dbname
  2954. - tbl_name
  2955. """
  2956. thrift_spec = (
  2957. None, # 0
  2958. (1, TType.STRING, 'dbname', None, None, ), # 1
  2959. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  2960. )
  2961. def __init__(self, dbname=None, tbl_name=None,):
  2962. self.dbname = dbname
  2963. self.tbl_name = tbl_name
  2964. def read(self, iprot):
  2965. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2966. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2967. return
  2968. iprot.readStructBegin()
  2969. while True:
  2970. (fname, ftype, fid) = iprot.readFieldBegin()
  2971. if ftype == TType.STOP:
  2972. break
  2973. if fid == 1:
  2974. if ftype == TType.STRING:
  2975. self.dbname = iprot.readString();
  2976. else:
  2977. iprot.skip(ftype)
  2978. elif fid == 2:
  2979. if ftype == TType.STRING:
  2980. self.tbl_name = iprot.readString();
  2981. else:
  2982. iprot.skip(ftype)
  2983. else:
  2984. iprot.skip(ftype)
  2985. iprot.readFieldEnd()
  2986. iprot.readStructEnd()
  2987. def write(self, oprot):
  2988. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2989. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2990. return
  2991. oprot.writeStructBegin('get_table_args')
  2992. if self.dbname != None:
  2993. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  2994. oprot.writeString(self.dbname)
  2995. oprot.writeFieldEnd()
  2996. if self.tbl_name != None:
  2997. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  2998. oprot.writeString(self.tbl_name)
  2999. oprot.writeFieldEnd()
  3000. oprot.writeFieldStop()
  3001. oprot.writeStructEnd()
  3002. def __repr__(self):
  3003. L = ['%s=%r' % (key, value)
  3004. for key, value in self.__dict__.iteritems()]
  3005. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3006. def __eq__(self, other):
  3007. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3008. def __ne__(self, other):
  3009. return not (self == other)
  3010. class get_table_result(object):
  3011. """
  3012. Attributes:
  3013. - success
  3014. - o1
  3015. - o2
  3016. """
  3017. thrift_spec = (
  3018. (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0
  3019. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  3020. (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
  3021. )
  3022. def __init__(self, success=None, o1=None, o2=None,):
  3023. self.success = success
  3024. self.o1 = o1
  3025. self.o2 = o2
  3026. def read(self, iprot):
  3027. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3028. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3029. return
  3030. iprot.readStructBegin()
  3031. while True:
  3032. (fname, ftype, fid) = iprot.readFieldBegin()
  3033. if ftype == TType.STOP:
  3034. break
  3035. if fid == 0:
  3036. if ftype == TType.STRUCT:
  3037. self.success = Table()
  3038. self.success.read(iprot)
  3039. else:
  3040. iprot.skip(ftype)
  3041. elif fid == 1:
  3042. if ftype == TType.STRUCT:
  3043. self.o1 = MetaException()
  3044. self.o1.read(iprot)
  3045. else:
  3046. iprot.skip(ftype)
  3047. elif fid == 2:
  3048. if ftype == TType.STRUCT:
  3049. self.o2 = NoSuchObjectException()
  3050. self.o2.read(iprot)
  3051. else:
  3052. iprot.skip(ftype)
  3053. else:
  3054. iprot.skip(ftype)
  3055. iprot.readFieldEnd()
  3056. iprot.readStructEnd()
  3057. def write(self, oprot):
  3058. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3059. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3060. return
  3061. oprot.writeStructBegin('get_table_result')
  3062. if self.success != None:
  3063. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3064. self.success.write(oprot)
  3065. oprot.writeFieldEnd()
  3066. if self.o1 != None:
  3067. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3068. self.o1.write(oprot)
  3069. oprot.writeFieldEnd()
  3070. if self.o2 != None:
  3071. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3072. self.o2.write(oprot)
  3073. oprot.writeFieldEnd()
  3074. oprot.writeFieldStop()
  3075. oprot.writeStructEnd()
  3076. def __repr__(self):
  3077. L = ['%s=%r' % (key, value)
  3078. for key, value in self.__dict__.iteritems()]
  3079. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3080. def __eq__(self, other):
  3081. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3082. def __ne__(self, other):
  3083. return not (self == other)
  3084. class alter_table_args(object):
  3085. """
  3086. Attributes:
  3087. - dbname
  3088. - tbl_name
  3089. - new_tbl
  3090. """
  3091. thrift_spec = (
  3092. None, # 0
  3093. (1, TType.STRING, 'dbname', None, None, ), # 1
  3094. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3095. (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3
  3096. )
  3097. def __init__(self, dbname=None, tbl_name=None, new_tbl=None,):
  3098. self.dbname = dbname
  3099. self.tbl_name = tbl_name
  3100. self.new_tbl = new_tbl
  3101. def read(self, iprot):
  3102. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3103. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3104. return
  3105. iprot.readStructBegin()
  3106. while True:
  3107. (fname, ftype, fid) = iprot.readFieldBegin()
  3108. if ftype == TType.STOP:
  3109. break
  3110. if fid == 1:
  3111. if ftype == TType.STRING:
  3112. self.dbname = iprot.readString();
  3113. else:
  3114. iprot.skip(ftype)
  3115. elif fid == 2:
  3116. if ftype == TType.STRING:
  3117. self.tbl_name = iprot.readString();
  3118. else:
  3119. iprot.skip(ftype)
  3120. elif fid == 3:
  3121. if ftype == TType.STRUCT:
  3122. self.new_tbl = Table()
  3123. self.new_tbl.read(iprot)
  3124. else:
  3125. iprot.skip(ftype)
  3126. else:
  3127. iprot.skip(ftype)
  3128. iprot.readFieldEnd()
  3129. iprot.readStructEnd()
  3130. def write(self, oprot):
  3131. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3132. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3133. return
  3134. oprot.writeStructBegin('alter_table_args')
  3135. if self.dbname != None:
  3136. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  3137. oprot.writeString(self.dbname)
  3138. oprot.writeFieldEnd()
  3139. if self.tbl_name != None:
  3140. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3141. oprot.writeString(self.tbl_name)
  3142. oprot.writeFieldEnd()
  3143. if self.new_tbl != None:
  3144. oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3)
  3145. self.new_tbl.write(oprot)
  3146. oprot.writeFieldEnd()
  3147. oprot.writeFieldStop()
  3148. oprot.writeStructEnd()
  3149. def __repr__(self):
  3150. L = ['%s=%r' % (key, value)
  3151. for key, value in self.__dict__.iteritems()]
  3152. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3153. def __eq__(self, other):
  3154. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3155. def __ne__(self, other):
  3156. return not (self == other)
  3157. class alter_table_result(object):
  3158. """
  3159. Attributes:
  3160. - o1
  3161. - o2
  3162. """
  3163. thrift_spec = (
  3164. None, # 0
  3165. (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1
  3166. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  3167. )
  3168. def __init__(self, o1=None, o2=None,):
  3169. self.o1 = o1
  3170. self.o2 = o2
  3171. def read(self, iprot):
  3172. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3173. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3174. return
  3175. iprot.readStructBegin()
  3176. while True:
  3177. (fname, ftype, fid) = iprot.readFieldBegin()
  3178. if ftype == TType.STOP:
  3179. break
  3180. if fid == 1:
  3181. if ftype == TType.STRUCT:
  3182. self.o1 = InvalidOperationException()
  3183. self.o1.read(iprot)
  3184. else:
  3185. iprot.skip(ftype)
  3186. elif fid == 2:
  3187. if ftype == TType.STRUCT:
  3188. self.o2 = MetaException()
  3189. self.o2.read(iprot)
  3190. else:
  3191. iprot.skip(ftype)
  3192. else:
  3193. iprot.skip(ftype)
  3194. iprot.readFieldEnd()
  3195. iprot.readStructEnd()
  3196. def write(self, oprot):
  3197. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3198. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3199. return
  3200. oprot.writeStructBegin('alter_table_result')
  3201. if self.o1 != None:
  3202. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3203. self.o1.write(oprot)
  3204. oprot.writeFieldEnd()
  3205. if self.o2 != None:
  3206. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3207. self.o2.write(oprot)
  3208. oprot.writeFieldEnd()
  3209. oprot.writeFieldStop()
  3210. oprot.writeStructEnd()
  3211. def __repr__(self):
  3212. L = ['%s=%r' % (key, value)
  3213. for key, value in self.__dict__.iteritems()]
  3214. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3215. def __eq__(self, other):
  3216. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3217. def __ne__(self, other):
  3218. return not (self == other)
  3219. class add_partition_args(object):
  3220. """
  3221. Attributes:
  3222. - new_part
  3223. """
  3224. thrift_spec = (
  3225. None, # 0
  3226. (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1
  3227. )
  3228. def __init__(self, new_part=None,):
  3229. self.new_part = new_part
  3230. def read(self, iprot):
  3231. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3232. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3233. return
  3234. iprot.readStructBegin()
  3235. while True:
  3236. (fname, ftype, fid) = iprot.readFieldBegin()
  3237. if ftype == TType.STOP:
  3238. break
  3239. if fid == 1:
  3240. if ftype == TType.STRUCT:
  3241. self.new_part = Partition()
  3242. self.new_part.read(iprot)
  3243. else:
  3244. iprot.skip(ftype)
  3245. else:
  3246. iprot.skip(ftype)
  3247. iprot.readFieldEnd()
  3248. iprot.readStructEnd()
  3249. def write(self, oprot):
  3250. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3251. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3252. return
  3253. oprot.writeStructBegin('add_partition_args')
  3254. if self.new_part != None:
  3255. oprot.writeFieldBegin('new_part', TType.STRUCT, 1)
  3256. self.new_part.write(oprot)
  3257. oprot.writeFieldEnd()
  3258. oprot.writeFieldStop()
  3259. oprot.writeStructEnd()
  3260. def __repr__(self):
  3261. L = ['%s=%r' % (key, value)
  3262. for key, value in self.__dict__.iteritems()]
  3263. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3264. def __eq__(self, other):
  3265. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3266. def __ne__(self, other):
  3267. return not (self == other)
  3268. class add_partition_result(object):
  3269. """
  3270. Attributes:
  3271. - success
  3272. - o1
  3273. - o2
  3274. - o3
  3275. """
  3276. thrift_spec = (
  3277. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  3278. (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1
  3279. (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2
  3280. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  3281. )
  3282. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  3283. self.success = success
  3284. self.o1 = o1
  3285. self.o2 = o2
  3286. self.o3 = o3
  3287. def read(self, iprot):
  3288. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3289. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3290. return
  3291. iprot.readStructBegin()
  3292. while True:
  3293. (fname, ftype, fid) = iprot.readFieldBegin()
  3294. if ftype == TType.STOP:
  3295. break
  3296. if fid == 0:
  3297. if ftype == TType.STRUCT:
  3298. self.success = Partition()
  3299. self.success.read(iprot)
  3300. else:
  3301. iprot.skip(ftype)
  3302. elif fid == 1:
  3303. if ftype == TType.STRUCT:
  3304. self.o1 = InvalidObjectException()
  3305. self.o1.read(iprot)
  3306. else:
  3307. iprot.skip(ftype)
  3308. elif fid == 2:
  3309. if ftype == TType.STRUCT:
  3310. self.o2 = AlreadyExistsException()
  3311. self.o2.read(iprot)
  3312. else:
  3313. iprot.skip(ftype)
  3314. elif fid == 3:
  3315. if ftype == TType.STRUCT:
  3316. self.o3 = MetaException()
  3317. self.o3.read(iprot)
  3318. else:
  3319. iprot.skip(ftype)
  3320. else:
  3321. iprot.skip(ftype)
  3322. iprot.readFieldEnd()
  3323. iprot.readStructEnd()
  3324. def write(self, oprot):
  3325. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3326. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3327. return
  3328. oprot.writeStructBegin('add_partition_result')
  3329. if self.success != None:
  3330. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3331. self.success.write(oprot)
  3332. oprot.writeFieldEnd()
  3333. if self.o1 != None:
  3334. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3335. self.o1.write(oprot)
  3336. oprot.writeFieldEnd()
  3337. if self.o2 != None:
  3338. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3339. self.o2.write(oprot)
  3340. oprot.writeFieldEnd()
  3341. if self.o3 != None:
  3342. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  3343. self.o3.write(oprot)
  3344. oprot.writeFieldEnd()
  3345. oprot.writeFieldStop()
  3346. oprot.writeStructEnd()
  3347. def __repr__(self):
  3348. L = ['%s=%r' % (key, value)
  3349. for key, value in self.__dict__.iteritems()]
  3350. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3351. def __eq__(self, other):
  3352. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3353. def __ne__(self, other):
  3354. return not (self == other)
  3355. class append_partition_args(object):
  3356. """
  3357. Attributes:
  3358. - db_name
  3359. - tbl_name
  3360. - part_vals
  3361. """
  3362. thrift_spec = (
  3363. None, # 0
  3364. (1, TType.STRING, 'db_name', None, None, ), # 1
  3365. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3366. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  3367. )
  3368. def __init__(self, db_name=None, tbl_name=None, part_vals=None,):
  3369. self.db_name = db_name
  3370. self.tbl_name = tbl_name
  3371. self.part_vals = part_vals
  3372. def read(self, iprot):
  3373. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3374. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3375. return
  3376. iprot.readStructBegin()
  3377. while True:
  3378. (fname, ftype, fid) = iprot.readFieldBegin()
  3379. if ftype == TType.STOP:
  3380. break
  3381. if fid == 1:
  3382. if ftype == TType.STRING:
  3383. self.db_name = iprot.readString();
  3384. else:
  3385. iprot.skip(ftype)
  3386. elif fid == 2:
  3387. if ftype == TType.STRING:
  3388. self.tbl_name = iprot.readString();
  3389. else:
  3390. iprot.skip(ftype)
  3391. elif fid == 3:
  3392. if ftype == TType.LIST:
  3393. self.part_vals = []
  3394. (_etype141, _size138) = iprot.readListBegin()
  3395. for _i142 in xrange(_size138):
  3396. _elem143 = iprot.readString();
  3397. self.part_vals.append(_elem143)
  3398. iprot.readListEnd()
  3399. else:
  3400. iprot.skip(ftype)
  3401. else:
  3402. iprot.skip(ftype)
  3403. iprot.readFieldEnd()
  3404. iprot.readStructEnd()
  3405. def write(self, oprot):
  3406. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3407. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3408. return
  3409. oprot.writeStructBegin('append_partition_args')
  3410. if self.db_name != None:
  3411. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  3412. oprot.writeString(self.db_name)
  3413. oprot.writeFieldEnd()
  3414. if self.tbl_name != None:
  3415. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3416. oprot.writeString(self.tbl_name)
  3417. oprot.writeFieldEnd()
  3418. if self.part_vals != None:
  3419. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  3420. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  3421. for iter144 in self.part_vals:
  3422. oprot.writeString(iter144)
  3423. oprot.writeListEnd()
  3424. oprot.writeFieldEnd()
  3425. oprot.writeFieldStop()
  3426. oprot.writeStructEnd()
  3427. def __repr__(self):
  3428. L = ['%s=%r' % (key, value)
  3429. for key, value in self.__dict__.iteritems()]
  3430. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3431. def __eq__(self, other):
  3432. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3433. def __ne__(self, other):
  3434. return not (self == other)
  3435. class append_partition_result(object):
  3436. """
  3437. Attributes:
  3438. - success
  3439. - o1
  3440. - o2
  3441. - o3
  3442. """
  3443. thrift_spec = (
  3444. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  3445. (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1
  3446. (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2
  3447. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  3448. )
  3449. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  3450. self.success = success
  3451. self.o1 = o1
  3452. self.o2 = o2
  3453. self.o3 = o3
  3454. def read(self, iprot):
  3455. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3456. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3457. return
  3458. iprot.readStructBegin()
  3459. while True:
  3460. (fname, ftype, fid) = iprot.readFieldBegin()
  3461. if ftype == TType.STOP:
  3462. break
  3463. if fid == 0:
  3464. if ftype == TType.STRUCT:
  3465. self.success = Partition()
  3466. self.success.read(iprot)
  3467. else:
  3468. iprot.skip(ftype)
  3469. elif fid == 1:
  3470. if ftype == TType.STRUCT:
  3471. self.o1 = InvalidObjectException()
  3472. self.o1.read(iprot)
  3473. else:
  3474. iprot.skip(ftype)
  3475. elif fid == 2:
  3476. if ftype == TType.STRUCT:
  3477. self.o2 = AlreadyExistsException()
  3478. self.o2.read(iprot)
  3479. else:
  3480. iprot.skip(ftype)
  3481. elif fid == 3:
  3482. if ftype == TType.STRUCT:
  3483. self.o3 = MetaException()
  3484. self.o3.read(iprot)
  3485. else:
  3486. iprot.skip(ftype)
  3487. else:
  3488. iprot.skip(ftype)
  3489. iprot.readFieldEnd()
  3490. iprot.readStructEnd()
  3491. def write(self, oprot):
  3492. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3493. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3494. return
  3495. oprot.writeStructBegin('append_partition_result')
  3496. if self.success != None:
  3497. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3498. self.success.write(oprot)
  3499. oprot.writeFieldEnd()
  3500. if self.o1 != None:
  3501. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3502. self.o1.write(oprot)
  3503. oprot.writeFieldEnd()
  3504. if self.o2 != None:
  3505. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3506. self.o2.write(oprot)
  3507. oprot.writeFieldEnd()
  3508. if self.o3 != None:
  3509. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  3510. self.o3.write(oprot)
  3511. oprot.writeFieldEnd()
  3512. oprot.writeFieldStop()
  3513. oprot.writeStructEnd()
  3514. def __repr__(self):
  3515. L = ['%s=%r' % (key, value)
  3516. for key, value in self.__dict__.iteritems()]
  3517. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3518. def __eq__(self, other):
  3519. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3520. def __ne__(self, other):
  3521. return not (self == other)
  3522. class drop_partition_args(object):
  3523. """
  3524. Attributes:
  3525. - db_name
  3526. - tbl_name
  3527. - part_vals
  3528. - deleteData
  3529. """
  3530. thrift_spec = (
  3531. None, # 0
  3532. (1, TType.STRING, 'db_name', None, None, ), # 1
  3533. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3534. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  3535. (4, TType.BOOL, 'deleteData', None, None, ), # 4
  3536. )
  3537. def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,):
  3538. self.db_name = db_name
  3539. self.tbl_name = tbl_name
  3540. self.part_vals = part_vals
  3541. self.deleteData = deleteData
  3542. def read(self, iprot):
  3543. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3544. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3545. return
  3546. iprot.readStructBegin()
  3547. while True:
  3548. (fname, ftype, fid) = iprot.readFieldBegin()
  3549. if ftype == TType.STOP:
  3550. break
  3551. if fid == 1:
  3552. if ftype == TType.STRING:
  3553. self.db_name = iprot.readString();
  3554. else:
  3555. iprot.skip(ftype)
  3556. elif fid == 2:
  3557. if ftype == TType.STRING:
  3558. self.tbl_name = iprot.readString();
  3559. else:
  3560. iprot.skip(ftype)
  3561. elif fid == 3:
  3562. if ftype == TType.LIST:
  3563. self.part_vals = []
  3564. (_etype148, _size145) = iprot.readListBegin()
  3565. for _i149 in xrange(_size145):
  3566. _elem150 = iprot.readString();
  3567. self.part_vals.append(_elem150)
  3568. iprot.readListEnd()
  3569. else:
  3570. iprot.skip(ftype)
  3571. elif fid == 4:
  3572. if ftype == TType.BOOL:
  3573. self.deleteData = iprot.readBool();
  3574. else:
  3575. iprot.skip(ftype)
  3576. else:
  3577. iprot.skip(ftype)
  3578. iprot.readFieldEnd()
  3579. iprot.readStructEnd()
  3580. def write(self, oprot):
  3581. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3582. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3583. return
  3584. oprot.writeStructBegin('drop_partition_args')
  3585. if self.db_name != None:
  3586. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  3587. oprot.writeString(self.db_name)
  3588. oprot.writeFieldEnd()
  3589. if self.tbl_name != None:
  3590. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3591. oprot.writeString(self.tbl_name)
  3592. oprot.writeFieldEnd()
  3593. if self.part_vals != None:
  3594. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  3595. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  3596. for iter151 in self.part_vals:
  3597. oprot.writeString(iter151)
  3598. oprot.writeListEnd()
  3599. oprot.writeFieldEnd()
  3600. if self.deleteData != None:
  3601. oprot.writeFieldBegin('deleteData', TType.BOOL, 4)
  3602. oprot.writeBool(self.deleteData)
  3603. oprot.writeFieldEnd()
  3604. oprot.writeFieldStop()
  3605. oprot.writeStructEnd()
  3606. def __repr__(self):
  3607. L = ['%s=%r' % (key, value)
  3608. for key, value in self.__dict__.iteritems()]
  3609. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3610. def __eq__(self, other):
  3611. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3612. def __ne__(self, other):
  3613. return not (self == other)
  3614. class drop_partition_result(object):
  3615. """
  3616. Attributes:
  3617. - success
  3618. - o1
  3619. - o2
  3620. """
  3621. thrift_spec = (
  3622. (0, TType.BOOL, 'success', None, None, ), # 0
  3623. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  3624. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  3625. )
  3626. def __init__(self, success=None, o1=None, o2=None,):
  3627. self.success = success
  3628. self.o1 = o1
  3629. self.o2 = o2
  3630. def read(self, iprot):
  3631. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3632. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3633. return
  3634. iprot.readStructBegin()
  3635. while True:
  3636. (fname, ftype, fid) = iprot.readFieldBegin()
  3637. if ftype == TType.STOP:
  3638. break
  3639. if fid == 0:
  3640. if ftype == TType.BOOL:
  3641. self.success = iprot.readBool();
  3642. else:
  3643. iprot.skip(ftype)
  3644. elif fid == 1:
  3645. if ftype == TType.STRUCT:
  3646. self.o1 = NoSuchObjectException()
  3647. self.o1.read(iprot)
  3648. else:
  3649. iprot.skip(ftype)
  3650. elif fid == 2:
  3651. if ftype == TType.STRUCT:
  3652. self.o2 = MetaException()
  3653. self.o2.read(iprot)
  3654. else:
  3655. iprot.skip(ftype)
  3656. else:
  3657. iprot.skip(ftype)
  3658. iprot.readFieldEnd()
  3659. iprot.readStructEnd()
  3660. def write(self, oprot):
  3661. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3662. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3663. return
  3664. oprot.writeStructBegin('drop_partition_result')
  3665. if self.success != None:
  3666. oprot.writeFieldBegin('success', TType.BOOL, 0)
  3667. oprot.writeBool(self.success)
  3668. oprot.writeFieldEnd()
  3669. if self.o1 != None:
  3670. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3671. self.o1.write(oprot)
  3672. oprot.writeFieldEnd()
  3673. if self.o2 != None:
  3674. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3675. self.o2.write(oprot)
  3676. oprot.writeFieldEnd()
  3677. oprot.writeFieldStop()
  3678. oprot.writeStructEnd()
  3679. def __repr__(self):
  3680. L = ['%s=%r' % (key, value)
  3681. for key, value in self.__dict__.iteritems()]
  3682. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3683. def __eq__(self, other):
  3684. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3685. def __ne__(self, other):
  3686. return not (self == other)
  3687. class get_partition_args(object):
  3688. """
  3689. Attributes:
  3690. - db_name
  3691. - tbl_name
  3692. - part_vals
  3693. """
  3694. thrift_spec = (
  3695. None, # 0
  3696. (1, TType.STRING, 'db_name', None, None, ), # 1
  3697. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3698. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  3699. )
  3700. def __init__(self, db_name=None, tbl_name=None, part_vals=None,):
  3701. self.db_name = db_name
  3702. self.tbl_name = tbl_name
  3703. self.part_vals = part_vals
  3704. def read(self, iprot):
  3705. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3706. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3707. return
  3708. iprot.readStructBegin()
  3709. while True:
  3710. (fname, ftype, fid) = iprot.readFieldBegin()
  3711. if ftype == TType.STOP:
  3712. break
  3713. if fid == 1:
  3714. if ftype == TType.STRING:
  3715. self.db_name = iprot.readString();
  3716. else:
  3717. iprot.skip(ftype)
  3718. elif fid == 2:
  3719. if ftype == TType.STRING:
  3720. self.tbl_name = iprot.readString();
  3721. else:
  3722. iprot.skip(ftype)
  3723. elif fid == 3:
  3724. if ftype == TType.LIST:
  3725. self.part_vals = []
  3726. (_etype155, _size152) = iprot.readListBegin()
  3727. for _i156 in xrange(_size152):
  3728. _elem157 = iprot.readString();
  3729. self.part_vals.append(_elem157)
  3730. iprot.readListEnd()
  3731. else:
  3732. iprot.skip(ftype)
  3733. else:
  3734. iprot.skip(ftype)
  3735. iprot.readFieldEnd()
  3736. iprot.readStructEnd()
  3737. def write(self, oprot):
  3738. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3739. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3740. return
  3741. oprot.writeStructBegin('get_partition_args')
  3742. if self.db_name != None:
  3743. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  3744. oprot.writeString(self.db_name)
  3745. oprot.writeFieldEnd()
  3746. if self.tbl_name != None:
  3747. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3748. oprot.writeString(self.tbl_name)
  3749. oprot.writeFieldEnd()
  3750. if self.part_vals != None:
  3751. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  3752. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  3753. for iter158 in self.part_vals:
  3754. oprot.writeString(iter158)
  3755. oprot.writeListEnd()
  3756. oprot.writeFieldEnd()
  3757. oprot.writeFieldStop()
  3758. oprot.writeStructEnd()
  3759. def __repr__(self):
  3760. L = ['%s=%r' % (key, value)
  3761. for key, value in self.__dict__.iteritems()]
  3762. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3763. def __eq__(self, other):
  3764. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3765. def __ne__(self, other):
  3766. return not (self == other)
  3767. class get_partition_result(object):
  3768. """
  3769. Attributes:
  3770. - success
  3771. - o1
  3772. """
  3773. thrift_spec = (
  3774. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  3775. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  3776. )
  3777. def __init__(self, success=None, o1=None,):
  3778. self.success = success
  3779. self.o1 = o1
  3780. def read(self, iprot):
  3781. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3782. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3783. return
  3784. iprot.readStructBegin()
  3785. while True:
  3786. (fname, ftype, fid) = iprot.readFieldBegin()
  3787. if ftype == TType.STOP:
  3788. break
  3789. if fid == 0:
  3790. if ftype == TType.STRUCT:
  3791. self.success = Partition()
  3792. self.success.read(iprot)
  3793. else:
  3794. iprot.skip(ftype)
  3795. elif fid == 1:
  3796. if ftype == TType.STRUCT:
  3797. self.o1 = MetaException()
  3798. self.o1.read(iprot)
  3799. else:
  3800. iprot.skip(ftype)
  3801. else:
  3802. iprot.skip(ftype)
  3803. iprot.readFieldEnd()
  3804. iprot.readStructEnd()
  3805. def write(self, oprot):
  3806. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3807. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3808. return
  3809. oprot.writeStructBegin('get_partition_result')
  3810. if self.success != None:
  3811. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3812. self.success.write(oprot)
  3813. oprot.writeFieldEnd()
  3814. if self.o1 != None:
  3815. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3816. self.o1.write(oprot)
  3817. oprot.writeFieldEnd()
  3818. oprot.writeFieldStop()
  3819. oprot.writeStructEnd()
  3820. def __repr__(self):
  3821. L = ['%s=%r' % (key, value)
  3822. for key, value in self.__dict__.iteritems()]
  3823. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3824. def __eq__(self, other):
  3825. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3826. def __ne__(self, other):
  3827. return not (self == other)
  3828. class get_partitions_args(object):
  3829. """
  3830. Attributes:
  3831. - db_name
  3832. - tbl_name
  3833. - max_parts
  3834. """
  3835. thrift_spec = (
  3836. None, # 0
  3837. (1, TType.STRING, 'db_name', None, None, ), # 1
  3838. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3839. (3, TType.I16, 'max_parts', None, -1, ), # 3
  3840. )
  3841. def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],):
  3842. self.db_name = db_name
  3843. self.tbl_name = tbl_name
  3844. self.max_parts = max_parts
  3845. def read(self, iprot):
  3846. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3847. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3848. return
  3849. iprot.readStructBegin()
  3850. while True:
  3851. (fname, ftype, fid) = iprot.readFieldBegin()
  3852. if ftype == TType.STOP:
  3853. break
  3854. if fid == 1:
  3855. if ftype == TType.STRING:
  3856. self.db_name = iprot.readString();
  3857. else:
  3858. iprot.skip(ftype)
  3859. elif fid == 2:
  3860. if ftype == TType.STRING:
  3861. self.tbl_name = iprot.readString();
  3862. else:
  3863. iprot.skip(ftype)
  3864. elif fid == 3:
  3865. if ftype == TType.I16:
  3866. self.max_parts = iprot.readI16();
  3867. else:
  3868. iprot.skip(ftype)
  3869. else:
  3870. iprot.skip(ftype)
  3871. iprot.readFieldEnd()
  3872. iprot.readStructEnd()
  3873. def write(self, oprot):
  3874. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3875. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3876. return
  3877. oprot.writeStructBegin('get_partitions_args')
  3878. if self.db_name != None:
  3879. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  3880. oprot.writeString(self.db_name)
  3881. oprot.writeFieldEnd()
  3882. if self.tbl_name != None:
  3883. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3884. oprot.writeString(self.tbl_name)
  3885. oprot.writeFieldEnd()
  3886. if self.max_parts != None:
  3887. oprot.writeFieldBegin('max_parts', TType.I16, 3)
  3888. oprot.writeI16(self.max_parts)
  3889. oprot.writeFieldEnd()
  3890. oprot.writeFieldStop()
  3891. oprot.writeStructEnd()
  3892. def __repr__(self):
  3893. L = ['%s=%r' % (key, value)
  3894. for key, value in self.__dict__.iteritems()]
  3895. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3896. def __eq__(self, other):
  3897. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3898. def __ne__(self, other):
  3899. return not (self == other)
  3900. class get_partitions_result(object):
  3901. """
  3902. Attributes:
  3903. - success
  3904. - o1
  3905. - o2
  3906. """
  3907. thrift_spec = (
  3908. (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0
  3909. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  3910. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  3911. )
  3912. def __init__(self, success=None, o1=None, o2=None,):
  3913. self.success = success
  3914. self.o1 = o1
  3915. self.o2 = o2
  3916. def read(self, iprot):
  3917. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3918. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3919. return
  3920. iprot.readStructBegin()
  3921. while True:
  3922. (fname, ftype, fid) = iprot.readFieldBegin()
  3923. if ftype == TType.STOP:
  3924. break
  3925. if fid == 0:
  3926. if ftype == TType.LIST:
  3927. self.success = []
  3928. (_etype162, _size159) = iprot.readListBegin()
  3929. for _i163 in xrange(_size159):
  3930. _elem164 = Partition()
  3931. _elem164.read(iprot)
  3932. self.success.append(_elem164)
  3933. iprot.readListEnd()
  3934. else:
  3935. iprot.skip(ftype)
  3936. elif fid == 1:
  3937. if ftype == TType.STRUCT:
  3938. self.o1 = NoSuchObjectException()
  3939. self.o1.read(iprot)
  3940. else:
  3941. iprot.skip(ftype)
  3942. elif fid == 2:
  3943. if ftype == TType.STRUCT:
  3944. self.o2 = MetaException()
  3945. self.o2.read(iprot)
  3946. else:
  3947. iprot.skip(ftype)
  3948. else:
  3949. iprot.skip(ftype)
  3950. iprot.readFieldEnd()
  3951. iprot.readStructEnd()
  3952. def write(self, oprot):
  3953. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3954. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3955. return
  3956. oprot.writeStructBegin('get_partitions_result')
  3957. if self.success != None:
  3958. oprot.writeFieldBegin('success', TType.LIST, 0)
  3959. oprot.writeListBegin(TType.STRUCT, len(self.success))
  3960. for iter165 in self.success:
  3961. iter165.write(oprot)
  3962. oprot.writeListEnd()
  3963. oprot.writeFieldEnd()
  3964. if self.o1 != None:
  3965. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3966. self.o1.write(oprot)
  3967. oprot.writeFieldEnd()
  3968. if self.o2 != None:
  3969. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3970. self.o2.write(oprot)
  3971. oprot.writeFieldEnd()
  3972. oprot.writeFieldStop()
  3973. oprot.writeStructEnd()
  3974. def __repr__(self):
  3975. L = ['%s=%r' % (key, value)
  3976. for key, value in self.__dict__.iteritems()]
  3977. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3978. def __eq__(self, other):
  3979. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3980. def __ne__(self, other):
  3981. return not (self == other)
  3982. class get_partition_names_args(object):
  3983. """
  3984. Attributes:
  3985. - db_name
  3986. - tbl_name
  3987. - max_parts
  3988. """
  3989. thrift_spec = (
  3990. None, # 0
  3991. (1, TType.STRING, 'db_name', None, None, ), # 1
  3992. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3993. (3, TType.I16, 'max_parts', None, -1, ), # 3
  3994. )
  3995. def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],):
  3996. self.db_name = db_name
  3997. self.tbl_name = tbl_name
  3998. self.max_parts = max_parts
  3999. def read(self, iprot):
  4000. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4001. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4002. return
  4003. iprot.readStructBegin()
  4004. while True:
  4005. (fname, ftype, fid) = iprot.readFieldBegin()
  4006. if ftype == TType.STOP:
  4007. break
  4008. if fid == 1:
  4009. if ftype == TType.STRING:
  4010. self.db_name = iprot.readString();
  4011. else:
  4012. iprot.skip(ftype)
  4013. elif fid == 2:
  4014. if ftype == TType.STRING:
  4015. self.tbl_name = iprot.readString();
  4016. else:
  4017. iprot.skip(ftype)
  4018. elif fid == 3:
  4019. if ftype == TType.I16:
  4020. self.max_parts = iprot.readI16();
  4021. else:
  4022. iprot.skip(ftype)
  4023. else:
  4024. iprot.skip(ftype)
  4025. iprot.readFieldEnd()
  4026. iprot.readStructEnd()
  4027. def write(self, oprot):
  4028. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4029. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4030. return
  4031. oprot.writeStructBegin('get_partition_names_args')
  4032. if self.db_name != None:
  4033. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  4034. oprot.writeString(self.db_name)
  4035. oprot.writeFieldEnd()
  4036. if self.tbl_name != None:
  4037. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  4038. oprot.writeString(self.tbl_name)
  4039. oprot.writeFieldEnd()
  4040. if self.max_parts != None:
  4041. oprot.writeFieldBegin('max_parts', TType.I16, 3)
  4042. oprot.writeI16(self.max_parts)
  4043. oprot.writeFieldEnd()
  4044. oprot.writeFieldStop()
  4045. oprot.writeStructEnd()
  4046. def __repr__(self):
  4047. L = ['%s=%r' % (key, value)
  4048. for key, value in self.__dict__.iteritems()]
  4049. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4050. def __eq__(self, other):
  4051. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4052. def __ne__(self, other):
  4053. return not (self == other)
  4054. class get_partition_names_result(object):
  4055. """
  4056. Attributes:
  4057. - success
  4058. - o2
  4059. """
  4060. thrift_spec = (
  4061. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  4062. (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
  4063. )
  4064. def __init__(self, success=None, o2=None,):
  4065. self.success = success
  4066. self.o2 = o2
  4067. def read(self, iprot):
  4068. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4069. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4070. return
  4071. iprot.readStructBegin()
  4072. while True:
  4073. (fname, ftype, fid) = iprot.readFieldBegin()
  4074. if ftype == TType.STOP:
  4075. break
  4076. if fid == 0:
  4077. if ftype == TType.LIST:
  4078. self.success = []
  4079. (_etype169, _size166) = iprot.readListBegin()
  4080. for _i170 in xrange(_size166):
  4081. _elem171 = iprot.readString();
  4082. self.success.append(_elem171)
  4083. iprot.readListEnd()
  4084. else:
  4085. iprot.skip(ftype)
  4086. elif fid == 1:
  4087. if ftype == TType.STRUCT:
  4088. self.o2 = MetaException()
  4089. self.o2.read(iprot)
  4090. else:
  4091. iprot.skip(ftype)
  4092. else:
  4093. iprot.skip(ftype)
  4094. iprot.readFieldEnd()
  4095. iprot.readStructEnd()
  4096. def write(self, oprot):
  4097. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4098. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4099. return
  4100. oprot.writeStructBegin('get_partition_names_result')
  4101. if self.success != None:
  4102. oprot.writeFieldBegin('success', TType.LIST, 0)
  4103. oprot.writeListBegin(TType.STRING, len(self.success))
  4104. for iter172 in self.success:
  4105. oprot.writeString(iter172)
  4106. oprot.writeListEnd()
  4107. oprot.writeFieldEnd()
  4108. if self.o2 != None:
  4109. oprot.writeFieldBegin('o2', TType.STRUCT, 1)
  4110. self.o2.write(oprot)
  4111. oprot.writeFieldEnd()
  4112. oprot.writeFieldStop()
  4113. oprot.writeStructEnd()
  4114. def __repr__(self):
  4115. L = ['%s=%r' % (key, value)
  4116. for key, value in self.__dict__.iteritems()]
  4117. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4118. def __eq__(self, other):
  4119. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4120. def __ne__(self, other):
  4121. return not (self == other)
  4122. class alter_partition_args(object):
  4123. """
  4124. Attributes:
  4125. - db_name
  4126. - tbl_name
  4127. - new_part
  4128. """
  4129. thrift_spec = (
  4130. None, # 0
  4131. (1, TType.STRING, 'db_name', None, None, ), # 1
  4132. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  4133. (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3
  4134. )
  4135. def __init__(self, db_name=None, tbl_name=None, new_part=None,):
  4136. self.db_name = db_name
  4137. self.tbl_name = tbl_name
  4138. self.new_part = new_part
  4139. def read(self, iprot):
  4140. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4141. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4142. return
  4143. iprot.readStructBegin()
  4144. while True:
  4145. (fname, ftype, fid) = iprot.readFieldBegin()
  4146. if ftype == TType.STOP:
  4147. break
  4148. if fid == 1:
  4149. if ftype == TType.STRING:
  4150. self.db_name = iprot.readString();
  4151. else:
  4152. iprot.skip(ftype)
  4153. elif fid == 2:
  4154. if ftype == TType.STRING:
  4155. self.tbl_name = iprot.readString();
  4156. else:
  4157. iprot.skip(ftype)
  4158. elif fid == 3:
  4159. if ftype == TType.STRUCT:
  4160. self.new_part = Partition()
  4161. self.new_part.read(iprot)
  4162. else:
  4163. iprot.skip(ftype)
  4164. else:
  4165. iprot.skip(ftype)
  4166. iprot.readFieldEnd()
  4167. iprot.readStructEnd()
  4168. def write(self, oprot):
  4169. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4170. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4171. return
  4172. oprot.writeStructBegin('alter_partition_args')
  4173. if self.db_name != None:
  4174. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  4175. oprot.writeString(self.db_name)
  4176. oprot.writeFieldEnd()
  4177. if self.tbl_name != None:
  4178. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  4179. oprot.writeString(self.tbl_name)
  4180. oprot.writeFieldEnd()
  4181. if self.new_part != None:
  4182. oprot.writeFieldBegin('new_part', TType.STRUCT, 3)
  4183. self.new_part.write(oprot)
  4184. oprot.writeFieldEnd()
  4185. oprot.writeFieldStop()
  4186. oprot.writeStructEnd()
  4187. def __repr__(self):
  4188. L = ['%s=%r' % (key, value)
  4189. for key, value in self.__dict__.iteritems()]
  4190. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4191. def __eq__(self, other):
  4192. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4193. def __ne__(self, other):
  4194. return not (self == other)
  4195. class alter_partition_result(object):
  4196. """
  4197. Attributes:
  4198. - o1
  4199. - o2
  4200. """
  4201. thrift_spec = (
  4202. None, # 0
  4203. (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1
  4204. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  4205. )
  4206. def __init__(self, o1=None, o2=None,):
  4207. self.o1 = o1
  4208. self.o2 = o2
  4209. def read(self, iprot):
  4210. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4211. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4212. return
  4213. iprot.readStructBegin()
  4214. while True:
  4215. (fname, ftype, fid) = iprot.readFieldBegin()
  4216. if ftype == TType.STOP:
  4217. break
  4218. if fid == 1:
  4219. if ftype == TType.STRUCT:
  4220. self.o1 = InvalidOperationException()
  4221. self.o1.read(iprot)
  4222. else:
  4223. iprot.skip(ftype)
  4224. elif fid == 2:
  4225. if ftype == TType.STRUCT:
  4226. self.o2 = MetaException()
  4227. self.o2.read(iprot)
  4228. else:
  4229. iprot.skip(ftype)
  4230. else:
  4231. iprot.skip(ftype)
  4232. iprot.readFieldEnd()
  4233. iprot.readStructEnd()
  4234. def write(self, oprot):
  4235. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4236. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4237. return
  4238. oprot.writeStructBegin('alter_partition_result')
  4239. if self.o1 != None:
  4240. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4241. self.o1.write(oprot)
  4242. oprot.writeFieldEnd()
  4243. if self.o2 != None:
  4244. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  4245. self.o2.write(oprot)
  4246. oprot.writeFieldEnd()
  4247. oprot.writeFieldStop()
  4248. oprot.writeStructEnd()
  4249. def __repr__(self):
  4250. L = ['%s=%r' % (key, value)
  4251. for key, value in self.__dict__.iteritems()]
  4252. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4253. def __eq__(self, other):
  4254. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4255. def __ne__(self, other):
  4256. return not (self == other)
  4257. class get_config_value_args(object):
  4258. """
  4259. Attributes:
  4260. - name
  4261. - defaultValue
  4262. """
  4263. thrift_spec = (
  4264. None, # 0
  4265. (1, TType.STRING, 'name', None, None, ), # 1
  4266. (2, TType.STRING, 'defaultValue', None, None, ), # 2
  4267. )
  4268. def __init__(self, name=None, defaultValue=None,):
  4269. self.name = name
  4270. self.defaultValue = defaultValue
  4271. def read(self, iprot):
  4272. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4273. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4274. return
  4275. iprot.readStructBegin()
  4276. while True:
  4277. (fname, ftype, fid) = iprot.readFieldBegin()
  4278. if ftype == TType.STOP:
  4279. break
  4280. if fid == 1:
  4281. if ftype == TType.STRING:
  4282. self.name = iprot.readString();
  4283. else:
  4284. iprot.skip(ftype)
  4285. elif fid == 2:
  4286. if ftype == TType.STRING:
  4287. self.defaultValue = iprot.readString();
  4288. else:
  4289. iprot.skip(ftype)
  4290. else:
  4291. iprot.skip(ftype)
  4292. iprot.readFieldEnd()
  4293. iprot.readStructEnd()
  4294. def write(self, oprot):
  4295. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4296. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4297. return
  4298. oprot.writeStructBegin('get_config_value_args')
  4299. if self.name != None:
  4300. oprot.writeFieldBegin('name', TType.STRING, 1)
  4301. oprot.writeString(self.name)
  4302. oprot.writeFieldEnd()
  4303. if self.defaultValue != None:
  4304. oprot.writeFieldBegin('defaultValue', TType.STRING, 2)
  4305. oprot.writeString(self.defaultValue)
  4306. oprot.writeFieldEnd()
  4307. oprot.writeFieldStop()
  4308. oprot.writeStructEnd()
  4309. def __repr__(self):
  4310. L = ['%s=%r' % (key, value)
  4311. for key, value in self.__dict__.iteritems()]
  4312. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4313. def __eq__(self, other):
  4314. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4315. def __ne__(self, other):
  4316. return not (self == other)
  4317. class get_config_value_result(object):
  4318. """
  4319. Attributes:
  4320. - success
  4321. - o1
  4322. """
  4323. thrift_spec = (
  4324. (0, TType.STRING, 'success', None, None, ), # 0
  4325. (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1
  4326. )
  4327. def __init__(self, success=None, o1=None,):
  4328. self.success = success
  4329. self.o1 = o1
  4330. def read(self, iprot):
  4331. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4332. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4333. return
  4334. iprot.readStructBegin()
  4335. while True:
  4336. (fname, ftype, fid) = iprot.readFieldBegin()
  4337. if ftype == TType.STOP:
  4338. break
  4339. if fid == 0:
  4340. if ftype == TType.STRING:
  4341. self.success = iprot.readString();
  4342. else:
  4343. iprot.skip(ftype)
  4344. elif fid == 1:
  4345. if ftype == TType.STRUCT:
  4346. self.o1 = ConfigValSecurityException()
  4347. self.o1.read(iprot)
  4348. else:
  4349. iprot.skip(ftype)
  4350. else:
  4351. iprot.skip(ftype)
  4352. iprot.readFieldEnd()
  4353. iprot.readStructEnd()
  4354. def write(self, oprot):
  4355. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4356. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4357. return
  4358. oprot.writeStructBegin('get_config_value_result')
  4359. if self.success != None:
  4360. oprot.writeFieldBegin('success', TType.STRING, 0)
  4361. oprot.writeString(self.success)
  4362. oprot.writeFieldEnd()
  4363. if self.o1 != None:
  4364. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4365. self.o1.write(oprot)
  4366. oprot.writeFieldEnd()
  4367. oprot.writeFieldStop()
  4368. oprot.writeStructEnd()
  4369. def __repr__(self):
  4370. L = ['%s=%r' % (key, value)
  4371. for key, value in self.__dict__.iteritems()]
  4372. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4373. def __eq__(self, other):
  4374. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4375. def __ne__(self, other):
  4376. return not (self == other)