ThriftHiveMetastore.py 151 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005
  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, TProtocol
  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 validate(self):
  1360. return
  1361. def __repr__(self):
  1362. L = ['%s=%r' % (key, value)
  1363. for key, value in self.__dict__.iteritems()]
  1364. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1365. def __eq__(self, other):
  1366. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1367. def __ne__(self, other):
  1368. return not (self == other)
  1369. class create_database_result(object):
  1370. """
  1371. Attributes:
  1372. - success
  1373. - o1
  1374. - o2
  1375. """
  1376. thrift_spec = (
  1377. (0, TType.BOOL, 'success', None, None, ), # 0
  1378. (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
  1379. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  1380. )
  1381. def __init__(self, success=None, o1=None, o2=None,):
  1382. self.success = success
  1383. self.o1 = o1
  1384. self.o2 = o2
  1385. def read(self, iprot):
  1386. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1387. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1388. return
  1389. iprot.readStructBegin()
  1390. while True:
  1391. (fname, ftype, fid) = iprot.readFieldBegin()
  1392. if ftype == TType.STOP:
  1393. break
  1394. if fid == 0:
  1395. if ftype == TType.BOOL:
  1396. self.success = iprot.readBool();
  1397. else:
  1398. iprot.skip(ftype)
  1399. elif fid == 1:
  1400. if ftype == TType.STRUCT:
  1401. self.o1 = AlreadyExistsException()
  1402. self.o1.read(iprot)
  1403. else:
  1404. iprot.skip(ftype)
  1405. elif fid == 2:
  1406. if ftype == TType.STRUCT:
  1407. self.o2 = MetaException()
  1408. self.o2.read(iprot)
  1409. else:
  1410. iprot.skip(ftype)
  1411. else:
  1412. iprot.skip(ftype)
  1413. iprot.readFieldEnd()
  1414. iprot.readStructEnd()
  1415. def write(self, oprot):
  1416. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1417. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1418. return
  1419. oprot.writeStructBegin('create_database_result')
  1420. if self.success != None:
  1421. oprot.writeFieldBegin('success', TType.BOOL, 0)
  1422. oprot.writeBool(self.success)
  1423. oprot.writeFieldEnd()
  1424. if self.o1 != None:
  1425. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  1426. self.o1.write(oprot)
  1427. oprot.writeFieldEnd()
  1428. if self.o2 != None:
  1429. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  1430. self.o2.write(oprot)
  1431. oprot.writeFieldEnd()
  1432. oprot.writeFieldStop()
  1433. oprot.writeStructEnd()
  1434. def validate(self):
  1435. return
  1436. def __repr__(self):
  1437. L = ['%s=%r' % (key, value)
  1438. for key, value in self.__dict__.iteritems()]
  1439. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1440. def __eq__(self, other):
  1441. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1442. def __ne__(self, other):
  1443. return not (self == other)
  1444. class get_database_args(object):
  1445. """
  1446. Attributes:
  1447. - name
  1448. """
  1449. thrift_spec = (
  1450. None, # 0
  1451. (1, TType.STRING, 'name', None, None, ), # 1
  1452. )
  1453. def __init__(self, name=None,):
  1454. self.name = name
  1455. def read(self, iprot):
  1456. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1457. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1458. return
  1459. iprot.readStructBegin()
  1460. while True:
  1461. (fname, ftype, fid) = iprot.readFieldBegin()
  1462. if ftype == TType.STOP:
  1463. break
  1464. if fid == 1:
  1465. if ftype == TType.STRING:
  1466. self.name = iprot.readString();
  1467. else:
  1468. iprot.skip(ftype)
  1469. else:
  1470. iprot.skip(ftype)
  1471. iprot.readFieldEnd()
  1472. iprot.readStructEnd()
  1473. def write(self, oprot):
  1474. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1475. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1476. return
  1477. oprot.writeStructBegin('get_database_args')
  1478. if self.name != None:
  1479. oprot.writeFieldBegin('name', TType.STRING, 1)
  1480. oprot.writeString(self.name)
  1481. oprot.writeFieldEnd()
  1482. oprot.writeFieldStop()
  1483. oprot.writeStructEnd()
  1484. def validate(self):
  1485. return
  1486. def __repr__(self):
  1487. L = ['%s=%r' % (key, value)
  1488. for key, value in self.__dict__.iteritems()]
  1489. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1490. def __eq__(self, other):
  1491. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1492. def __ne__(self, other):
  1493. return not (self == other)
  1494. class get_database_result(object):
  1495. """
  1496. Attributes:
  1497. - success
  1498. - o1
  1499. - o2
  1500. """
  1501. thrift_spec = (
  1502. (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0
  1503. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  1504. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  1505. )
  1506. def __init__(self, success=None, o1=None, o2=None,):
  1507. self.success = success
  1508. self.o1 = o1
  1509. self.o2 = o2
  1510. def read(self, iprot):
  1511. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1512. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1513. return
  1514. iprot.readStructBegin()
  1515. while True:
  1516. (fname, ftype, fid) = iprot.readFieldBegin()
  1517. if ftype == TType.STOP:
  1518. break
  1519. if fid == 0:
  1520. if ftype == TType.STRUCT:
  1521. self.success = Database()
  1522. self.success.read(iprot)
  1523. else:
  1524. iprot.skip(ftype)
  1525. elif fid == 1:
  1526. if ftype == TType.STRUCT:
  1527. self.o1 = NoSuchObjectException()
  1528. self.o1.read(iprot)
  1529. else:
  1530. iprot.skip(ftype)
  1531. elif fid == 2:
  1532. if ftype == TType.STRUCT:
  1533. self.o2 = MetaException()
  1534. self.o2.read(iprot)
  1535. else:
  1536. iprot.skip(ftype)
  1537. else:
  1538. iprot.skip(ftype)
  1539. iprot.readFieldEnd()
  1540. iprot.readStructEnd()
  1541. def write(self, oprot):
  1542. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1543. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1544. return
  1545. oprot.writeStructBegin('get_database_result')
  1546. if self.success != None:
  1547. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1548. self.success.write(oprot)
  1549. oprot.writeFieldEnd()
  1550. if self.o1 != None:
  1551. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  1552. self.o1.write(oprot)
  1553. oprot.writeFieldEnd()
  1554. if self.o2 != None:
  1555. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  1556. self.o2.write(oprot)
  1557. oprot.writeFieldEnd()
  1558. oprot.writeFieldStop()
  1559. oprot.writeStructEnd()
  1560. def validate(self):
  1561. return
  1562. def __repr__(self):
  1563. L = ['%s=%r' % (key, value)
  1564. for key, value in self.__dict__.iteritems()]
  1565. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1566. def __eq__(self, other):
  1567. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1568. def __ne__(self, other):
  1569. return not (self == other)
  1570. class drop_database_args(object):
  1571. """
  1572. Attributes:
  1573. - name
  1574. """
  1575. thrift_spec = (
  1576. None, # 0
  1577. (1, TType.STRING, 'name', None, None, ), # 1
  1578. )
  1579. def __init__(self, name=None,):
  1580. self.name = name
  1581. def read(self, iprot):
  1582. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1583. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1584. return
  1585. iprot.readStructBegin()
  1586. while True:
  1587. (fname, ftype, fid) = iprot.readFieldBegin()
  1588. if ftype == TType.STOP:
  1589. break
  1590. if fid == 1:
  1591. if ftype == TType.STRING:
  1592. self.name = iprot.readString();
  1593. else:
  1594. iprot.skip(ftype)
  1595. else:
  1596. iprot.skip(ftype)
  1597. iprot.readFieldEnd()
  1598. iprot.readStructEnd()
  1599. def write(self, oprot):
  1600. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1601. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1602. return
  1603. oprot.writeStructBegin('drop_database_args')
  1604. if self.name != None:
  1605. oprot.writeFieldBegin('name', TType.STRING, 1)
  1606. oprot.writeString(self.name)
  1607. oprot.writeFieldEnd()
  1608. oprot.writeFieldStop()
  1609. oprot.writeStructEnd()
  1610. def validate(self):
  1611. return
  1612. def __repr__(self):
  1613. L = ['%s=%r' % (key, value)
  1614. for key, value in self.__dict__.iteritems()]
  1615. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1616. def __eq__(self, other):
  1617. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1618. def __ne__(self, other):
  1619. return not (self == other)
  1620. class drop_database_result(object):
  1621. """
  1622. Attributes:
  1623. - success
  1624. - o2
  1625. """
  1626. thrift_spec = (
  1627. (0, TType.BOOL, 'success', None, None, ), # 0
  1628. None, # 1
  1629. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  1630. )
  1631. def __init__(self, success=None, o2=None,):
  1632. self.success = success
  1633. self.o2 = o2
  1634. def read(self, iprot):
  1635. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1636. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1637. return
  1638. iprot.readStructBegin()
  1639. while True:
  1640. (fname, ftype, fid) = iprot.readFieldBegin()
  1641. if ftype == TType.STOP:
  1642. break
  1643. if fid == 0:
  1644. if ftype == TType.BOOL:
  1645. self.success = iprot.readBool();
  1646. else:
  1647. iprot.skip(ftype)
  1648. elif fid == 2:
  1649. if ftype == TType.STRUCT:
  1650. self.o2 = MetaException()
  1651. self.o2.read(iprot)
  1652. else:
  1653. iprot.skip(ftype)
  1654. else:
  1655. iprot.skip(ftype)
  1656. iprot.readFieldEnd()
  1657. iprot.readStructEnd()
  1658. def write(self, oprot):
  1659. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1660. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1661. return
  1662. oprot.writeStructBegin('drop_database_result')
  1663. if self.success != None:
  1664. oprot.writeFieldBegin('success', TType.BOOL, 0)
  1665. oprot.writeBool(self.success)
  1666. oprot.writeFieldEnd()
  1667. if self.o2 != None:
  1668. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  1669. self.o2.write(oprot)
  1670. oprot.writeFieldEnd()
  1671. oprot.writeFieldStop()
  1672. oprot.writeStructEnd()
  1673. def validate(self):
  1674. return
  1675. def __repr__(self):
  1676. L = ['%s=%r' % (key, value)
  1677. for key, value in self.__dict__.iteritems()]
  1678. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1679. def __eq__(self, other):
  1680. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1681. def __ne__(self, other):
  1682. return not (self == other)
  1683. class get_databases_args(object):
  1684. thrift_spec = (
  1685. )
  1686. def read(self, iprot):
  1687. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1688. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1689. return
  1690. iprot.readStructBegin()
  1691. while True:
  1692. (fname, ftype, fid) = iprot.readFieldBegin()
  1693. if ftype == TType.STOP:
  1694. break
  1695. else:
  1696. iprot.skip(ftype)
  1697. iprot.readFieldEnd()
  1698. iprot.readStructEnd()
  1699. def write(self, oprot):
  1700. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1701. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1702. return
  1703. oprot.writeStructBegin('get_databases_args')
  1704. oprot.writeFieldStop()
  1705. oprot.writeStructEnd()
  1706. def validate(self):
  1707. return
  1708. def __repr__(self):
  1709. L = ['%s=%r' % (key, value)
  1710. for key, value in self.__dict__.iteritems()]
  1711. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1712. def __eq__(self, other):
  1713. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1714. def __ne__(self, other):
  1715. return not (self == other)
  1716. class get_databases_result(object):
  1717. """
  1718. Attributes:
  1719. - success
  1720. - o1
  1721. """
  1722. thrift_spec = (
  1723. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  1724. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  1725. )
  1726. def __init__(self, success=None, o1=None,):
  1727. self.success = success
  1728. self.o1 = o1
  1729. def read(self, iprot):
  1730. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1731. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1732. return
  1733. iprot.readStructBegin()
  1734. while True:
  1735. (fname, ftype, fid) = iprot.readFieldBegin()
  1736. if ftype == TType.STOP:
  1737. break
  1738. if fid == 0:
  1739. if ftype == TType.LIST:
  1740. self.success = []
  1741. (_etype104, _size101) = iprot.readListBegin()
  1742. for _i105 in xrange(_size101):
  1743. _elem106 = iprot.readString();
  1744. self.success.append(_elem106)
  1745. iprot.readListEnd()
  1746. else:
  1747. iprot.skip(ftype)
  1748. elif fid == 1:
  1749. if ftype == TType.STRUCT:
  1750. self.o1 = MetaException()
  1751. self.o1.read(iprot)
  1752. else:
  1753. iprot.skip(ftype)
  1754. else:
  1755. iprot.skip(ftype)
  1756. iprot.readFieldEnd()
  1757. iprot.readStructEnd()
  1758. def write(self, oprot):
  1759. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1760. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1761. return
  1762. oprot.writeStructBegin('get_databases_result')
  1763. if self.success != None:
  1764. oprot.writeFieldBegin('success', TType.LIST, 0)
  1765. oprot.writeListBegin(TType.STRING, len(self.success))
  1766. for iter107 in self.success:
  1767. oprot.writeString(iter107)
  1768. oprot.writeListEnd()
  1769. oprot.writeFieldEnd()
  1770. if self.o1 != None:
  1771. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  1772. self.o1.write(oprot)
  1773. oprot.writeFieldEnd()
  1774. oprot.writeFieldStop()
  1775. oprot.writeStructEnd()
  1776. def validate(self):
  1777. return
  1778. def __repr__(self):
  1779. L = ['%s=%r' % (key, value)
  1780. for key, value in self.__dict__.iteritems()]
  1781. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1782. def __eq__(self, other):
  1783. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1784. def __ne__(self, other):
  1785. return not (self == other)
  1786. class get_type_args(object):
  1787. """
  1788. Attributes:
  1789. - name
  1790. """
  1791. thrift_spec = (
  1792. None, # 0
  1793. (1, TType.STRING, 'name', None, None, ), # 1
  1794. )
  1795. def __init__(self, name=None,):
  1796. self.name = name
  1797. def read(self, iprot):
  1798. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1799. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1800. return
  1801. iprot.readStructBegin()
  1802. while True:
  1803. (fname, ftype, fid) = iprot.readFieldBegin()
  1804. if ftype == TType.STOP:
  1805. break
  1806. if fid == 1:
  1807. if ftype == TType.STRING:
  1808. self.name = iprot.readString();
  1809. else:
  1810. iprot.skip(ftype)
  1811. else:
  1812. iprot.skip(ftype)
  1813. iprot.readFieldEnd()
  1814. iprot.readStructEnd()
  1815. def write(self, oprot):
  1816. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1817. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1818. return
  1819. oprot.writeStructBegin('get_type_args')
  1820. if self.name != None:
  1821. oprot.writeFieldBegin('name', TType.STRING, 1)
  1822. oprot.writeString(self.name)
  1823. oprot.writeFieldEnd()
  1824. oprot.writeFieldStop()
  1825. oprot.writeStructEnd()
  1826. def validate(self):
  1827. return
  1828. def __repr__(self):
  1829. L = ['%s=%r' % (key, value)
  1830. for key, value in self.__dict__.iteritems()]
  1831. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1832. def __eq__(self, other):
  1833. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1834. def __ne__(self, other):
  1835. return not (self == other)
  1836. class get_type_result(object):
  1837. """
  1838. Attributes:
  1839. - success
  1840. - o2
  1841. """
  1842. thrift_spec = (
  1843. (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0
  1844. (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
  1845. )
  1846. def __init__(self, success=None, o2=None,):
  1847. self.success = success
  1848. self.o2 = o2
  1849. def read(self, iprot):
  1850. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1851. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1852. return
  1853. iprot.readStructBegin()
  1854. while True:
  1855. (fname, ftype, fid) = iprot.readFieldBegin()
  1856. if ftype == TType.STOP:
  1857. break
  1858. if fid == 0:
  1859. if ftype == TType.STRUCT:
  1860. self.success = Type()
  1861. self.success.read(iprot)
  1862. else:
  1863. iprot.skip(ftype)
  1864. elif fid == 1:
  1865. if ftype == TType.STRUCT:
  1866. self.o2 = MetaException()
  1867. self.o2.read(iprot)
  1868. else:
  1869. iprot.skip(ftype)
  1870. else:
  1871. iprot.skip(ftype)
  1872. iprot.readFieldEnd()
  1873. iprot.readStructEnd()
  1874. def write(self, oprot):
  1875. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1876. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1877. return
  1878. oprot.writeStructBegin('get_type_result')
  1879. if self.success != None:
  1880. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1881. self.success.write(oprot)
  1882. oprot.writeFieldEnd()
  1883. if self.o2 != None:
  1884. oprot.writeFieldBegin('o2', TType.STRUCT, 1)
  1885. self.o2.write(oprot)
  1886. oprot.writeFieldEnd()
  1887. oprot.writeFieldStop()
  1888. oprot.writeStructEnd()
  1889. def validate(self):
  1890. return
  1891. def __repr__(self):
  1892. L = ['%s=%r' % (key, value)
  1893. for key, value in self.__dict__.iteritems()]
  1894. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1895. def __eq__(self, other):
  1896. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1897. def __ne__(self, other):
  1898. return not (self == other)
  1899. class create_type_args(object):
  1900. """
  1901. Attributes:
  1902. - type
  1903. """
  1904. thrift_spec = (
  1905. None, # 0
  1906. (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1
  1907. )
  1908. def __init__(self, type=None,):
  1909. self.type = type
  1910. def read(self, iprot):
  1911. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1912. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1913. return
  1914. iprot.readStructBegin()
  1915. while True:
  1916. (fname, ftype, fid) = iprot.readFieldBegin()
  1917. if ftype == TType.STOP:
  1918. break
  1919. if fid == 1:
  1920. if ftype == TType.STRUCT:
  1921. self.type = Type()
  1922. self.type.read(iprot)
  1923. else:
  1924. iprot.skip(ftype)
  1925. else:
  1926. iprot.skip(ftype)
  1927. iprot.readFieldEnd()
  1928. iprot.readStructEnd()
  1929. def write(self, oprot):
  1930. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1931. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1932. return
  1933. oprot.writeStructBegin('create_type_args')
  1934. if self.type != None:
  1935. oprot.writeFieldBegin('type', TType.STRUCT, 1)
  1936. self.type.write(oprot)
  1937. oprot.writeFieldEnd()
  1938. oprot.writeFieldStop()
  1939. oprot.writeStructEnd()
  1940. def validate(self):
  1941. return
  1942. def __repr__(self):
  1943. L = ['%s=%r' % (key, value)
  1944. for key, value in self.__dict__.iteritems()]
  1945. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1946. def __eq__(self, other):
  1947. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1948. def __ne__(self, other):
  1949. return not (self == other)
  1950. class create_type_result(object):
  1951. """
  1952. Attributes:
  1953. - success
  1954. - o1
  1955. - o2
  1956. - o3
  1957. """
  1958. thrift_spec = (
  1959. (0, TType.BOOL, 'success', None, None, ), # 0
  1960. (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
  1961. (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2
  1962. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  1963. )
  1964. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  1965. self.success = success
  1966. self.o1 = o1
  1967. self.o2 = o2
  1968. self.o3 = o3
  1969. def read(self, iprot):
  1970. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1971. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1972. return
  1973. iprot.readStructBegin()
  1974. while True:
  1975. (fname, ftype, fid) = iprot.readFieldBegin()
  1976. if ftype == TType.STOP:
  1977. break
  1978. if fid == 0:
  1979. if ftype == TType.BOOL:
  1980. self.success = iprot.readBool();
  1981. else:
  1982. iprot.skip(ftype)
  1983. elif fid == 1:
  1984. if ftype == TType.STRUCT:
  1985. self.o1 = AlreadyExistsException()
  1986. self.o1.read(iprot)
  1987. else:
  1988. iprot.skip(ftype)
  1989. elif fid == 2:
  1990. if ftype == TType.STRUCT:
  1991. self.o2 = InvalidObjectException()
  1992. self.o2.read(iprot)
  1993. else:
  1994. iprot.skip(ftype)
  1995. elif fid == 3:
  1996. if ftype == TType.STRUCT:
  1997. self.o3 = MetaException()
  1998. self.o3.read(iprot)
  1999. else:
  2000. iprot.skip(ftype)
  2001. else:
  2002. iprot.skip(ftype)
  2003. iprot.readFieldEnd()
  2004. iprot.readStructEnd()
  2005. def write(self, oprot):
  2006. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2007. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2008. return
  2009. oprot.writeStructBegin('create_type_result')
  2010. if self.success != None:
  2011. oprot.writeFieldBegin('success', TType.BOOL, 0)
  2012. oprot.writeBool(self.success)
  2013. oprot.writeFieldEnd()
  2014. if self.o1 != None:
  2015. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2016. self.o1.write(oprot)
  2017. oprot.writeFieldEnd()
  2018. if self.o2 != None:
  2019. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  2020. self.o2.write(oprot)
  2021. oprot.writeFieldEnd()
  2022. if self.o3 != None:
  2023. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  2024. self.o3.write(oprot)
  2025. oprot.writeFieldEnd()
  2026. oprot.writeFieldStop()
  2027. oprot.writeStructEnd()
  2028. def validate(self):
  2029. return
  2030. def __repr__(self):
  2031. L = ['%s=%r' % (key, value)
  2032. for key, value in self.__dict__.iteritems()]
  2033. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2034. def __eq__(self, other):
  2035. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2036. def __ne__(self, other):
  2037. return not (self == other)
  2038. class drop_type_args(object):
  2039. """
  2040. Attributes:
  2041. - type
  2042. """
  2043. thrift_spec = (
  2044. None, # 0
  2045. (1, TType.STRING, 'type', None, None, ), # 1
  2046. )
  2047. def __init__(self, type=None,):
  2048. self.type = type
  2049. def read(self, iprot):
  2050. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2051. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2052. return
  2053. iprot.readStructBegin()
  2054. while True:
  2055. (fname, ftype, fid) = iprot.readFieldBegin()
  2056. if ftype == TType.STOP:
  2057. break
  2058. if fid == 1:
  2059. if ftype == TType.STRING:
  2060. self.type = iprot.readString();
  2061. else:
  2062. iprot.skip(ftype)
  2063. else:
  2064. iprot.skip(ftype)
  2065. iprot.readFieldEnd()
  2066. iprot.readStructEnd()
  2067. def write(self, oprot):
  2068. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2069. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2070. return
  2071. oprot.writeStructBegin('drop_type_args')
  2072. if self.type != None:
  2073. oprot.writeFieldBegin('type', TType.STRING, 1)
  2074. oprot.writeString(self.type)
  2075. oprot.writeFieldEnd()
  2076. oprot.writeFieldStop()
  2077. oprot.writeStructEnd()
  2078. def validate(self):
  2079. return
  2080. def __repr__(self):
  2081. L = ['%s=%r' % (key, value)
  2082. for key, value in self.__dict__.iteritems()]
  2083. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2084. def __eq__(self, other):
  2085. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2086. def __ne__(self, other):
  2087. return not (self == other)
  2088. class drop_type_result(object):
  2089. """
  2090. Attributes:
  2091. - success
  2092. - o2
  2093. """
  2094. thrift_spec = (
  2095. (0, TType.BOOL, 'success', None, None, ), # 0
  2096. (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
  2097. )
  2098. def __init__(self, success=None, o2=None,):
  2099. self.success = success
  2100. self.o2 = o2
  2101. def read(self, iprot):
  2102. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2103. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2104. return
  2105. iprot.readStructBegin()
  2106. while True:
  2107. (fname, ftype, fid) = iprot.readFieldBegin()
  2108. if ftype == TType.STOP:
  2109. break
  2110. if fid == 0:
  2111. if ftype == TType.BOOL:
  2112. self.success = iprot.readBool();
  2113. else:
  2114. iprot.skip(ftype)
  2115. elif fid == 1:
  2116. if ftype == TType.STRUCT:
  2117. self.o2 = MetaException()
  2118. self.o2.read(iprot)
  2119. else:
  2120. iprot.skip(ftype)
  2121. else:
  2122. iprot.skip(ftype)
  2123. iprot.readFieldEnd()
  2124. iprot.readStructEnd()
  2125. def write(self, oprot):
  2126. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2127. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2128. return
  2129. oprot.writeStructBegin('drop_type_result')
  2130. if self.success != None:
  2131. oprot.writeFieldBegin('success', TType.BOOL, 0)
  2132. oprot.writeBool(self.success)
  2133. oprot.writeFieldEnd()
  2134. if self.o2 != None:
  2135. oprot.writeFieldBegin('o2', TType.STRUCT, 1)
  2136. self.o2.write(oprot)
  2137. oprot.writeFieldEnd()
  2138. oprot.writeFieldStop()
  2139. oprot.writeStructEnd()
  2140. def validate(self):
  2141. return
  2142. def __repr__(self):
  2143. L = ['%s=%r' % (key, value)
  2144. for key, value in self.__dict__.iteritems()]
  2145. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2146. def __eq__(self, other):
  2147. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2148. def __ne__(self, other):
  2149. return not (self == other)
  2150. class get_type_all_args(object):
  2151. """
  2152. Attributes:
  2153. - name
  2154. """
  2155. thrift_spec = (
  2156. None, # 0
  2157. (1, TType.STRING, 'name', None, None, ), # 1
  2158. )
  2159. def __init__(self, name=None,):
  2160. self.name = name
  2161. def read(self, iprot):
  2162. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2163. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2164. return
  2165. iprot.readStructBegin()
  2166. while True:
  2167. (fname, ftype, fid) = iprot.readFieldBegin()
  2168. if ftype == TType.STOP:
  2169. break
  2170. if fid == 1:
  2171. if ftype == TType.STRING:
  2172. self.name = iprot.readString();
  2173. else:
  2174. iprot.skip(ftype)
  2175. else:
  2176. iprot.skip(ftype)
  2177. iprot.readFieldEnd()
  2178. iprot.readStructEnd()
  2179. def write(self, oprot):
  2180. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2181. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2182. return
  2183. oprot.writeStructBegin('get_type_all_args')
  2184. if self.name != None:
  2185. oprot.writeFieldBegin('name', TType.STRING, 1)
  2186. oprot.writeString(self.name)
  2187. oprot.writeFieldEnd()
  2188. oprot.writeFieldStop()
  2189. oprot.writeStructEnd()
  2190. def validate(self):
  2191. return
  2192. def __repr__(self):
  2193. L = ['%s=%r' % (key, value)
  2194. for key, value in self.__dict__.iteritems()]
  2195. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2196. def __eq__(self, other):
  2197. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2198. def __ne__(self, other):
  2199. return not (self == other)
  2200. class get_type_all_result(object):
  2201. """
  2202. Attributes:
  2203. - success
  2204. - o2
  2205. """
  2206. thrift_spec = (
  2207. (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0
  2208. (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
  2209. )
  2210. def __init__(self, success=None, o2=None,):
  2211. self.success = success
  2212. self.o2 = o2
  2213. def read(self, iprot):
  2214. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2215. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2216. return
  2217. iprot.readStructBegin()
  2218. while True:
  2219. (fname, ftype, fid) = iprot.readFieldBegin()
  2220. if ftype == TType.STOP:
  2221. break
  2222. if fid == 0:
  2223. if ftype == TType.MAP:
  2224. self.success = {}
  2225. (_ktype109, _vtype110, _size108 ) = iprot.readMapBegin()
  2226. for _i112 in xrange(_size108):
  2227. _key113 = iprot.readString();
  2228. _val114 = Type()
  2229. _val114.read(iprot)
  2230. self.success[_key113] = _val114
  2231. iprot.readMapEnd()
  2232. else:
  2233. iprot.skip(ftype)
  2234. elif fid == 1:
  2235. if ftype == TType.STRUCT:
  2236. self.o2 = MetaException()
  2237. self.o2.read(iprot)
  2238. else:
  2239. iprot.skip(ftype)
  2240. else:
  2241. iprot.skip(ftype)
  2242. iprot.readFieldEnd()
  2243. iprot.readStructEnd()
  2244. def write(self, oprot):
  2245. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2246. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2247. return
  2248. oprot.writeStructBegin('get_type_all_result')
  2249. if self.success != None:
  2250. oprot.writeFieldBegin('success', TType.MAP, 0)
  2251. oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
  2252. for kiter115,viter116 in self.success.items():
  2253. oprot.writeString(kiter115)
  2254. viter116.write(oprot)
  2255. oprot.writeMapEnd()
  2256. oprot.writeFieldEnd()
  2257. if self.o2 != None:
  2258. oprot.writeFieldBegin('o2', TType.STRUCT, 1)
  2259. self.o2.write(oprot)
  2260. oprot.writeFieldEnd()
  2261. oprot.writeFieldStop()
  2262. oprot.writeStructEnd()
  2263. def validate(self):
  2264. return
  2265. def __repr__(self):
  2266. L = ['%s=%r' % (key, value)
  2267. for key, value in self.__dict__.iteritems()]
  2268. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2269. def __eq__(self, other):
  2270. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2271. def __ne__(self, other):
  2272. return not (self == other)
  2273. class get_fields_args(object):
  2274. """
  2275. Attributes:
  2276. - db_name
  2277. - table_name
  2278. """
  2279. thrift_spec = (
  2280. None, # 0
  2281. (1, TType.STRING, 'db_name', None, None, ), # 1
  2282. (2, TType.STRING, 'table_name', None, None, ), # 2
  2283. )
  2284. def __init__(self, db_name=None, table_name=None,):
  2285. self.db_name = db_name
  2286. self.table_name = table_name
  2287. def read(self, iprot):
  2288. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2289. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2290. return
  2291. iprot.readStructBegin()
  2292. while True:
  2293. (fname, ftype, fid) = iprot.readFieldBegin()
  2294. if ftype == TType.STOP:
  2295. break
  2296. if fid == 1:
  2297. if ftype == TType.STRING:
  2298. self.db_name = iprot.readString();
  2299. else:
  2300. iprot.skip(ftype)
  2301. elif fid == 2:
  2302. if ftype == TType.STRING:
  2303. self.table_name = iprot.readString();
  2304. else:
  2305. iprot.skip(ftype)
  2306. else:
  2307. iprot.skip(ftype)
  2308. iprot.readFieldEnd()
  2309. iprot.readStructEnd()
  2310. def write(self, oprot):
  2311. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2312. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2313. return
  2314. oprot.writeStructBegin('get_fields_args')
  2315. if self.db_name != None:
  2316. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  2317. oprot.writeString(self.db_name)
  2318. oprot.writeFieldEnd()
  2319. if self.table_name != None:
  2320. oprot.writeFieldBegin('table_name', TType.STRING, 2)
  2321. oprot.writeString(self.table_name)
  2322. oprot.writeFieldEnd()
  2323. oprot.writeFieldStop()
  2324. oprot.writeStructEnd()
  2325. def validate(self):
  2326. return
  2327. def __repr__(self):
  2328. L = ['%s=%r' % (key, value)
  2329. for key, value in self.__dict__.iteritems()]
  2330. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2331. def __eq__(self, other):
  2332. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2333. def __ne__(self, other):
  2334. return not (self == other)
  2335. class get_fields_result(object):
  2336. """
  2337. Attributes:
  2338. - success
  2339. - o1
  2340. - o2
  2341. - o3
  2342. """
  2343. thrift_spec = (
  2344. (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0
  2345. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  2346. (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2
  2347. (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3
  2348. )
  2349. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  2350. self.success = success
  2351. self.o1 = o1
  2352. self.o2 = o2
  2353. self.o3 = o3
  2354. def read(self, iprot):
  2355. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2356. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2357. return
  2358. iprot.readStructBegin()
  2359. while True:
  2360. (fname, ftype, fid) = iprot.readFieldBegin()
  2361. if ftype == TType.STOP:
  2362. break
  2363. if fid == 0:
  2364. if ftype == TType.LIST:
  2365. self.success = []
  2366. (_etype120, _size117) = iprot.readListBegin()
  2367. for _i121 in xrange(_size117):
  2368. _elem122 = FieldSchema()
  2369. _elem122.read(iprot)
  2370. self.success.append(_elem122)
  2371. iprot.readListEnd()
  2372. else:
  2373. iprot.skip(ftype)
  2374. elif fid == 1:
  2375. if ftype == TType.STRUCT:
  2376. self.o1 = MetaException()
  2377. self.o1.read(iprot)
  2378. else:
  2379. iprot.skip(ftype)
  2380. elif fid == 2:
  2381. if ftype == TType.STRUCT:
  2382. self.o2 = UnknownTableException()
  2383. self.o2.read(iprot)
  2384. else:
  2385. iprot.skip(ftype)
  2386. elif fid == 3:
  2387. if ftype == TType.STRUCT:
  2388. self.o3 = UnknownDBException()
  2389. self.o3.read(iprot)
  2390. else:
  2391. iprot.skip(ftype)
  2392. else:
  2393. iprot.skip(ftype)
  2394. iprot.readFieldEnd()
  2395. iprot.readStructEnd()
  2396. def write(self, oprot):
  2397. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2398. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2399. return
  2400. oprot.writeStructBegin('get_fields_result')
  2401. if self.success != None:
  2402. oprot.writeFieldBegin('success', TType.LIST, 0)
  2403. oprot.writeListBegin(TType.STRUCT, len(self.success))
  2404. for iter123 in self.success:
  2405. iter123.write(oprot)
  2406. oprot.writeListEnd()
  2407. oprot.writeFieldEnd()
  2408. if self.o1 != None:
  2409. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2410. self.o1.write(oprot)
  2411. oprot.writeFieldEnd()
  2412. if self.o2 != None:
  2413. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  2414. self.o2.write(oprot)
  2415. oprot.writeFieldEnd()
  2416. if self.o3 != None:
  2417. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  2418. self.o3.write(oprot)
  2419. oprot.writeFieldEnd()
  2420. oprot.writeFieldStop()
  2421. oprot.writeStructEnd()
  2422. def validate(self):
  2423. return
  2424. def __repr__(self):
  2425. L = ['%s=%r' % (key, value)
  2426. for key, value in self.__dict__.iteritems()]
  2427. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2428. def __eq__(self, other):
  2429. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2430. def __ne__(self, other):
  2431. return not (self == other)
  2432. class get_schema_args(object):
  2433. """
  2434. Attributes:
  2435. - db_name
  2436. - table_name
  2437. """
  2438. thrift_spec = (
  2439. None, # 0
  2440. (1, TType.STRING, 'db_name', None, None, ), # 1
  2441. (2, TType.STRING, 'table_name', None, None, ), # 2
  2442. )
  2443. def __init__(self, db_name=None, table_name=None,):
  2444. self.db_name = db_name
  2445. self.table_name = table_name
  2446. def read(self, iprot):
  2447. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2448. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2449. return
  2450. iprot.readStructBegin()
  2451. while True:
  2452. (fname, ftype, fid) = iprot.readFieldBegin()
  2453. if ftype == TType.STOP:
  2454. break
  2455. if fid == 1:
  2456. if ftype == TType.STRING:
  2457. self.db_name = iprot.readString();
  2458. else:
  2459. iprot.skip(ftype)
  2460. elif fid == 2:
  2461. if ftype == TType.STRING:
  2462. self.table_name = iprot.readString();
  2463. else:
  2464. iprot.skip(ftype)
  2465. else:
  2466. iprot.skip(ftype)
  2467. iprot.readFieldEnd()
  2468. iprot.readStructEnd()
  2469. def write(self, oprot):
  2470. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2471. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2472. return
  2473. oprot.writeStructBegin('get_schema_args')
  2474. if self.db_name != None:
  2475. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  2476. oprot.writeString(self.db_name)
  2477. oprot.writeFieldEnd()
  2478. if self.table_name != None:
  2479. oprot.writeFieldBegin('table_name', TType.STRING, 2)
  2480. oprot.writeString(self.table_name)
  2481. oprot.writeFieldEnd()
  2482. oprot.writeFieldStop()
  2483. oprot.writeStructEnd()
  2484. def validate(self):
  2485. return
  2486. def __repr__(self):
  2487. L = ['%s=%r' % (key, value)
  2488. for key, value in self.__dict__.iteritems()]
  2489. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2490. def __eq__(self, other):
  2491. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2492. def __ne__(self, other):
  2493. return not (self == other)
  2494. class get_schema_result(object):
  2495. """
  2496. Attributes:
  2497. - success
  2498. - o1
  2499. - o2
  2500. - o3
  2501. """
  2502. thrift_spec = (
  2503. (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0
  2504. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  2505. (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2
  2506. (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3
  2507. )
  2508. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  2509. self.success = success
  2510. self.o1 = o1
  2511. self.o2 = o2
  2512. self.o3 = o3
  2513. def read(self, iprot):
  2514. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2515. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2516. return
  2517. iprot.readStructBegin()
  2518. while True:
  2519. (fname, ftype, fid) = iprot.readFieldBegin()
  2520. if ftype == TType.STOP:
  2521. break
  2522. if fid == 0:
  2523. if ftype == TType.LIST:
  2524. self.success = []
  2525. (_etype127, _size124) = iprot.readListBegin()
  2526. for _i128 in xrange(_size124):
  2527. _elem129 = FieldSchema()
  2528. _elem129.read(iprot)
  2529. self.success.append(_elem129)
  2530. iprot.readListEnd()
  2531. else:
  2532. iprot.skip(ftype)
  2533. elif fid == 1:
  2534. if ftype == TType.STRUCT:
  2535. self.o1 = MetaException()
  2536. self.o1.read(iprot)
  2537. else:
  2538. iprot.skip(ftype)
  2539. elif fid == 2:
  2540. if ftype == TType.STRUCT:
  2541. self.o2 = UnknownTableException()
  2542. self.o2.read(iprot)
  2543. else:
  2544. iprot.skip(ftype)
  2545. elif fid == 3:
  2546. if ftype == TType.STRUCT:
  2547. self.o3 = UnknownDBException()
  2548. self.o3.read(iprot)
  2549. else:
  2550. iprot.skip(ftype)
  2551. else:
  2552. iprot.skip(ftype)
  2553. iprot.readFieldEnd()
  2554. iprot.readStructEnd()
  2555. def write(self, oprot):
  2556. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2557. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2558. return
  2559. oprot.writeStructBegin('get_schema_result')
  2560. if self.success != None:
  2561. oprot.writeFieldBegin('success', TType.LIST, 0)
  2562. oprot.writeListBegin(TType.STRUCT, len(self.success))
  2563. for iter130 in self.success:
  2564. iter130.write(oprot)
  2565. oprot.writeListEnd()
  2566. oprot.writeFieldEnd()
  2567. if self.o1 != None:
  2568. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2569. self.o1.write(oprot)
  2570. oprot.writeFieldEnd()
  2571. if self.o2 != None:
  2572. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  2573. self.o2.write(oprot)
  2574. oprot.writeFieldEnd()
  2575. if self.o3 != None:
  2576. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  2577. self.o3.write(oprot)
  2578. oprot.writeFieldEnd()
  2579. oprot.writeFieldStop()
  2580. oprot.writeStructEnd()
  2581. def validate(self):
  2582. return
  2583. def __repr__(self):
  2584. L = ['%s=%r' % (key, value)
  2585. for key, value in self.__dict__.iteritems()]
  2586. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2587. def __eq__(self, other):
  2588. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2589. def __ne__(self, other):
  2590. return not (self == other)
  2591. class create_table_args(object):
  2592. """
  2593. Attributes:
  2594. - tbl
  2595. """
  2596. thrift_spec = (
  2597. None, # 0
  2598. (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1
  2599. )
  2600. def __init__(self, tbl=None,):
  2601. self.tbl = tbl
  2602. def read(self, iprot):
  2603. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2604. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2605. return
  2606. iprot.readStructBegin()
  2607. while True:
  2608. (fname, ftype, fid) = iprot.readFieldBegin()
  2609. if ftype == TType.STOP:
  2610. break
  2611. if fid == 1:
  2612. if ftype == TType.STRUCT:
  2613. self.tbl = Table()
  2614. self.tbl.read(iprot)
  2615. else:
  2616. iprot.skip(ftype)
  2617. else:
  2618. iprot.skip(ftype)
  2619. iprot.readFieldEnd()
  2620. iprot.readStructEnd()
  2621. def write(self, oprot):
  2622. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2623. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2624. return
  2625. oprot.writeStructBegin('create_table_args')
  2626. if self.tbl != None:
  2627. oprot.writeFieldBegin('tbl', TType.STRUCT, 1)
  2628. self.tbl.write(oprot)
  2629. oprot.writeFieldEnd()
  2630. oprot.writeFieldStop()
  2631. oprot.writeStructEnd()
  2632. def validate(self):
  2633. return
  2634. def __repr__(self):
  2635. L = ['%s=%r' % (key, value)
  2636. for key, value in self.__dict__.iteritems()]
  2637. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2638. def __eq__(self, other):
  2639. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2640. def __ne__(self, other):
  2641. return not (self == other)
  2642. class create_table_result(object):
  2643. """
  2644. Attributes:
  2645. - o1
  2646. - o2
  2647. - o3
  2648. - o4
  2649. """
  2650. thrift_spec = (
  2651. None, # 0
  2652. (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
  2653. (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2
  2654. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  2655. (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4
  2656. )
  2657. def __init__(self, o1=None, o2=None, o3=None, o4=None,):
  2658. self.o1 = o1
  2659. self.o2 = o2
  2660. self.o3 = o3
  2661. self.o4 = o4
  2662. def read(self, iprot):
  2663. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2664. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2665. return
  2666. iprot.readStructBegin()
  2667. while True:
  2668. (fname, ftype, fid) = iprot.readFieldBegin()
  2669. if ftype == TType.STOP:
  2670. break
  2671. if fid == 1:
  2672. if ftype == TType.STRUCT:
  2673. self.o1 = AlreadyExistsException()
  2674. self.o1.read(iprot)
  2675. else:
  2676. iprot.skip(ftype)
  2677. elif fid == 2:
  2678. if ftype == TType.STRUCT:
  2679. self.o2 = InvalidObjectException()
  2680. self.o2.read(iprot)
  2681. else:
  2682. iprot.skip(ftype)
  2683. elif fid == 3:
  2684. if ftype == TType.STRUCT:
  2685. self.o3 = MetaException()
  2686. self.o3.read(iprot)
  2687. else:
  2688. iprot.skip(ftype)
  2689. elif fid == 4:
  2690. if ftype == TType.STRUCT:
  2691. self.o4 = NoSuchObjectException()
  2692. self.o4.read(iprot)
  2693. else:
  2694. iprot.skip(ftype)
  2695. else:
  2696. iprot.skip(ftype)
  2697. iprot.readFieldEnd()
  2698. iprot.readStructEnd()
  2699. def write(self, oprot):
  2700. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2701. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2702. return
  2703. oprot.writeStructBegin('create_table_result')
  2704. if self.o1 != None:
  2705. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2706. self.o1.write(oprot)
  2707. oprot.writeFieldEnd()
  2708. if self.o2 != None:
  2709. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  2710. self.o2.write(oprot)
  2711. oprot.writeFieldEnd()
  2712. if self.o3 != None:
  2713. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  2714. self.o3.write(oprot)
  2715. oprot.writeFieldEnd()
  2716. if self.o4 != None:
  2717. oprot.writeFieldBegin('o4', TType.STRUCT, 4)
  2718. self.o4.write(oprot)
  2719. oprot.writeFieldEnd()
  2720. oprot.writeFieldStop()
  2721. oprot.writeStructEnd()
  2722. def validate(self):
  2723. return
  2724. def __repr__(self):
  2725. L = ['%s=%r' % (key, value)
  2726. for key, value in self.__dict__.iteritems()]
  2727. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2728. def __eq__(self, other):
  2729. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2730. def __ne__(self, other):
  2731. return not (self == other)
  2732. class drop_table_args(object):
  2733. """
  2734. Attributes:
  2735. - dbname
  2736. - name
  2737. - deleteData
  2738. """
  2739. thrift_spec = (
  2740. None, # 0
  2741. (1, TType.STRING, 'dbname', None, None, ), # 1
  2742. (2, TType.STRING, 'name', None, None, ), # 2
  2743. (3, TType.BOOL, 'deleteData', None, None, ), # 3
  2744. )
  2745. def __init__(self, dbname=None, name=None, deleteData=None,):
  2746. self.dbname = dbname
  2747. self.name = name
  2748. self.deleteData = deleteData
  2749. def read(self, iprot):
  2750. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2751. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2752. return
  2753. iprot.readStructBegin()
  2754. while True:
  2755. (fname, ftype, fid) = iprot.readFieldBegin()
  2756. if ftype == TType.STOP:
  2757. break
  2758. if fid == 1:
  2759. if ftype == TType.STRING:
  2760. self.dbname = iprot.readString();
  2761. else:
  2762. iprot.skip(ftype)
  2763. elif fid == 2:
  2764. if ftype == TType.STRING:
  2765. self.name = iprot.readString();
  2766. else:
  2767. iprot.skip(ftype)
  2768. elif fid == 3:
  2769. if ftype == TType.BOOL:
  2770. self.deleteData = iprot.readBool();
  2771. else:
  2772. iprot.skip(ftype)
  2773. else:
  2774. iprot.skip(ftype)
  2775. iprot.readFieldEnd()
  2776. iprot.readStructEnd()
  2777. def write(self, oprot):
  2778. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2779. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2780. return
  2781. oprot.writeStructBegin('drop_table_args')
  2782. if self.dbname != None:
  2783. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  2784. oprot.writeString(self.dbname)
  2785. oprot.writeFieldEnd()
  2786. if self.name != None:
  2787. oprot.writeFieldBegin('name', TType.STRING, 2)
  2788. oprot.writeString(self.name)
  2789. oprot.writeFieldEnd()
  2790. if self.deleteData != None:
  2791. oprot.writeFieldBegin('deleteData', TType.BOOL, 3)
  2792. oprot.writeBool(self.deleteData)
  2793. oprot.writeFieldEnd()
  2794. oprot.writeFieldStop()
  2795. oprot.writeStructEnd()
  2796. def validate(self):
  2797. return
  2798. def __repr__(self):
  2799. L = ['%s=%r' % (key, value)
  2800. for key, value in self.__dict__.iteritems()]
  2801. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2802. def __eq__(self, other):
  2803. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2804. def __ne__(self, other):
  2805. return not (self == other)
  2806. class drop_table_result(object):
  2807. """
  2808. Attributes:
  2809. - o1
  2810. - o3
  2811. """
  2812. thrift_spec = (
  2813. None, # 0
  2814. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  2815. (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2
  2816. )
  2817. def __init__(self, o1=None, o3=None,):
  2818. self.o1 = o1
  2819. self.o3 = o3
  2820. def read(self, iprot):
  2821. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2822. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2823. return
  2824. iprot.readStructBegin()
  2825. while True:
  2826. (fname, ftype, fid) = iprot.readFieldBegin()
  2827. if ftype == TType.STOP:
  2828. break
  2829. if fid == 1:
  2830. if ftype == TType.STRUCT:
  2831. self.o1 = NoSuchObjectException()
  2832. self.o1.read(iprot)
  2833. else:
  2834. iprot.skip(ftype)
  2835. elif fid == 2:
  2836. if ftype == TType.STRUCT:
  2837. self.o3 = MetaException()
  2838. self.o3.read(iprot)
  2839. else:
  2840. iprot.skip(ftype)
  2841. else:
  2842. iprot.skip(ftype)
  2843. iprot.readFieldEnd()
  2844. iprot.readStructEnd()
  2845. def write(self, oprot):
  2846. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2847. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2848. return
  2849. oprot.writeStructBegin('drop_table_result')
  2850. if self.o1 != None:
  2851. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2852. self.o1.write(oprot)
  2853. oprot.writeFieldEnd()
  2854. if self.o3 != None:
  2855. oprot.writeFieldBegin('o3', TType.STRUCT, 2)
  2856. self.o3.write(oprot)
  2857. oprot.writeFieldEnd()
  2858. oprot.writeFieldStop()
  2859. oprot.writeStructEnd()
  2860. def validate(self):
  2861. return
  2862. def __repr__(self):
  2863. L = ['%s=%r' % (key, value)
  2864. for key, value in self.__dict__.iteritems()]
  2865. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2866. def __eq__(self, other):
  2867. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2868. def __ne__(self, other):
  2869. return not (self == other)
  2870. class get_tables_args(object):
  2871. """
  2872. Attributes:
  2873. - db_name
  2874. - pattern
  2875. """
  2876. thrift_spec = (
  2877. None, # 0
  2878. (1, TType.STRING, 'db_name', None, None, ), # 1
  2879. (2, TType.STRING, 'pattern', None, None, ), # 2
  2880. )
  2881. def __init__(self, db_name=None, pattern=None,):
  2882. self.db_name = db_name
  2883. self.pattern = pattern
  2884. def read(self, iprot):
  2885. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2886. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2887. return
  2888. iprot.readStructBegin()
  2889. while True:
  2890. (fname, ftype, fid) = iprot.readFieldBegin()
  2891. if ftype == TType.STOP:
  2892. break
  2893. if fid == 1:
  2894. if ftype == TType.STRING:
  2895. self.db_name = iprot.readString();
  2896. else:
  2897. iprot.skip(ftype)
  2898. elif fid == 2:
  2899. if ftype == TType.STRING:
  2900. self.pattern = iprot.readString();
  2901. else:
  2902. iprot.skip(ftype)
  2903. else:
  2904. iprot.skip(ftype)
  2905. iprot.readFieldEnd()
  2906. iprot.readStructEnd()
  2907. def write(self, oprot):
  2908. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2909. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2910. return
  2911. oprot.writeStructBegin('get_tables_args')
  2912. if self.db_name != None:
  2913. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  2914. oprot.writeString(self.db_name)
  2915. oprot.writeFieldEnd()
  2916. if self.pattern != None:
  2917. oprot.writeFieldBegin('pattern', TType.STRING, 2)
  2918. oprot.writeString(self.pattern)
  2919. oprot.writeFieldEnd()
  2920. oprot.writeFieldStop()
  2921. oprot.writeStructEnd()
  2922. def validate(self):
  2923. return
  2924. def __repr__(self):
  2925. L = ['%s=%r' % (key, value)
  2926. for key, value in self.__dict__.iteritems()]
  2927. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2928. def __eq__(self, other):
  2929. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2930. def __ne__(self, other):
  2931. return not (self == other)
  2932. class get_tables_result(object):
  2933. """
  2934. Attributes:
  2935. - success
  2936. - o1
  2937. """
  2938. thrift_spec = (
  2939. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  2940. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  2941. )
  2942. def __init__(self, success=None, o1=None,):
  2943. self.success = success
  2944. self.o1 = o1
  2945. def read(self, iprot):
  2946. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2947. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2948. return
  2949. iprot.readStructBegin()
  2950. while True:
  2951. (fname, ftype, fid) = iprot.readFieldBegin()
  2952. if ftype == TType.STOP:
  2953. break
  2954. if fid == 0:
  2955. if ftype == TType.LIST:
  2956. self.success = []
  2957. (_etype134, _size131) = iprot.readListBegin()
  2958. for _i135 in xrange(_size131):
  2959. _elem136 = iprot.readString();
  2960. self.success.append(_elem136)
  2961. iprot.readListEnd()
  2962. else:
  2963. iprot.skip(ftype)
  2964. elif fid == 1:
  2965. if ftype == TType.STRUCT:
  2966. self.o1 = MetaException()
  2967. self.o1.read(iprot)
  2968. else:
  2969. iprot.skip(ftype)
  2970. else:
  2971. iprot.skip(ftype)
  2972. iprot.readFieldEnd()
  2973. iprot.readStructEnd()
  2974. def write(self, oprot):
  2975. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2976. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2977. return
  2978. oprot.writeStructBegin('get_tables_result')
  2979. if self.success != None:
  2980. oprot.writeFieldBegin('success', TType.LIST, 0)
  2981. oprot.writeListBegin(TType.STRING, len(self.success))
  2982. for iter137 in self.success:
  2983. oprot.writeString(iter137)
  2984. oprot.writeListEnd()
  2985. oprot.writeFieldEnd()
  2986. if self.o1 != None:
  2987. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  2988. self.o1.write(oprot)
  2989. oprot.writeFieldEnd()
  2990. oprot.writeFieldStop()
  2991. oprot.writeStructEnd()
  2992. def validate(self):
  2993. return
  2994. def __repr__(self):
  2995. L = ['%s=%r' % (key, value)
  2996. for key, value in self.__dict__.iteritems()]
  2997. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2998. def __eq__(self, other):
  2999. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3000. def __ne__(self, other):
  3001. return not (self == other)
  3002. class get_table_args(object):
  3003. """
  3004. Attributes:
  3005. - dbname
  3006. - tbl_name
  3007. """
  3008. thrift_spec = (
  3009. None, # 0
  3010. (1, TType.STRING, 'dbname', None, None, ), # 1
  3011. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3012. )
  3013. def __init__(self, dbname=None, tbl_name=None,):
  3014. self.dbname = dbname
  3015. self.tbl_name = tbl_name
  3016. def read(self, iprot):
  3017. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3018. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3019. return
  3020. iprot.readStructBegin()
  3021. while True:
  3022. (fname, ftype, fid) = iprot.readFieldBegin()
  3023. if ftype == TType.STOP:
  3024. break
  3025. if fid == 1:
  3026. if ftype == TType.STRING:
  3027. self.dbname = iprot.readString();
  3028. else:
  3029. iprot.skip(ftype)
  3030. elif fid == 2:
  3031. if ftype == TType.STRING:
  3032. self.tbl_name = iprot.readString();
  3033. else:
  3034. iprot.skip(ftype)
  3035. else:
  3036. iprot.skip(ftype)
  3037. iprot.readFieldEnd()
  3038. iprot.readStructEnd()
  3039. def write(self, oprot):
  3040. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3041. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3042. return
  3043. oprot.writeStructBegin('get_table_args')
  3044. if self.dbname != None:
  3045. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  3046. oprot.writeString(self.dbname)
  3047. oprot.writeFieldEnd()
  3048. if self.tbl_name != None:
  3049. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3050. oprot.writeString(self.tbl_name)
  3051. oprot.writeFieldEnd()
  3052. oprot.writeFieldStop()
  3053. oprot.writeStructEnd()
  3054. def validate(self):
  3055. return
  3056. def __repr__(self):
  3057. L = ['%s=%r' % (key, value)
  3058. for key, value in self.__dict__.iteritems()]
  3059. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3060. def __eq__(self, other):
  3061. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3062. def __ne__(self, other):
  3063. return not (self == other)
  3064. class get_table_result(object):
  3065. """
  3066. Attributes:
  3067. - success
  3068. - o1
  3069. - o2
  3070. """
  3071. thrift_spec = (
  3072. (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0
  3073. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  3074. (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
  3075. )
  3076. def __init__(self, success=None, o1=None, o2=None,):
  3077. self.success = success
  3078. self.o1 = o1
  3079. self.o2 = o2
  3080. def read(self, iprot):
  3081. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3082. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3083. return
  3084. iprot.readStructBegin()
  3085. while True:
  3086. (fname, ftype, fid) = iprot.readFieldBegin()
  3087. if ftype == TType.STOP:
  3088. break
  3089. if fid == 0:
  3090. if ftype == TType.STRUCT:
  3091. self.success = Table()
  3092. self.success.read(iprot)
  3093. else:
  3094. iprot.skip(ftype)
  3095. elif fid == 1:
  3096. if ftype == TType.STRUCT:
  3097. self.o1 = MetaException()
  3098. self.o1.read(iprot)
  3099. else:
  3100. iprot.skip(ftype)
  3101. elif fid == 2:
  3102. if ftype == TType.STRUCT:
  3103. self.o2 = NoSuchObjectException()
  3104. self.o2.read(iprot)
  3105. else:
  3106. iprot.skip(ftype)
  3107. else:
  3108. iprot.skip(ftype)
  3109. iprot.readFieldEnd()
  3110. iprot.readStructEnd()
  3111. def write(self, oprot):
  3112. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3113. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3114. return
  3115. oprot.writeStructBegin('get_table_result')
  3116. if self.success != None:
  3117. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3118. self.success.write(oprot)
  3119. oprot.writeFieldEnd()
  3120. if self.o1 != None:
  3121. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3122. self.o1.write(oprot)
  3123. oprot.writeFieldEnd()
  3124. if self.o2 != None:
  3125. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3126. self.o2.write(oprot)
  3127. oprot.writeFieldEnd()
  3128. oprot.writeFieldStop()
  3129. oprot.writeStructEnd()
  3130. def validate(self):
  3131. return
  3132. def __repr__(self):
  3133. L = ['%s=%r' % (key, value)
  3134. for key, value in self.__dict__.iteritems()]
  3135. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3136. def __eq__(self, other):
  3137. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3138. def __ne__(self, other):
  3139. return not (self == other)
  3140. class alter_table_args(object):
  3141. """
  3142. Attributes:
  3143. - dbname
  3144. - tbl_name
  3145. - new_tbl
  3146. """
  3147. thrift_spec = (
  3148. None, # 0
  3149. (1, TType.STRING, 'dbname', None, None, ), # 1
  3150. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3151. (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3
  3152. )
  3153. def __init__(self, dbname=None, tbl_name=None, new_tbl=None,):
  3154. self.dbname = dbname
  3155. self.tbl_name = tbl_name
  3156. self.new_tbl = new_tbl
  3157. def read(self, iprot):
  3158. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3159. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3160. return
  3161. iprot.readStructBegin()
  3162. while True:
  3163. (fname, ftype, fid) = iprot.readFieldBegin()
  3164. if ftype == TType.STOP:
  3165. break
  3166. if fid == 1:
  3167. if ftype == TType.STRING:
  3168. self.dbname = iprot.readString();
  3169. else:
  3170. iprot.skip(ftype)
  3171. elif fid == 2:
  3172. if ftype == TType.STRING:
  3173. self.tbl_name = iprot.readString();
  3174. else:
  3175. iprot.skip(ftype)
  3176. elif fid == 3:
  3177. if ftype == TType.STRUCT:
  3178. self.new_tbl = Table()
  3179. self.new_tbl.read(iprot)
  3180. else:
  3181. iprot.skip(ftype)
  3182. else:
  3183. iprot.skip(ftype)
  3184. iprot.readFieldEnd()
  3185. iprot.readStructEnd()
  3186. def write(self, oprot):
  3187. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3188. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3189. return
  3190. oprot.writeStructBegin('alter_table_args')
  3191. if self.dbname != None:
  3192. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  3193. oprot.writeString(self.dbname)
  3194. oprot.writeFieldEnd()
  3195. if self.tbl_name != None:
  3196. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3197. oprot.writeString(self.tbl_name)
  3198. oprot.writeFieldEnd()
  3199. if self.new_tbl != None:
  3200. oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3)
  3201. self.new_tbl.write(oprot)
  3202. oprot.writeFieldEnd()
  3203. oprot.writeFieldStop()
  3204. oprot.writeStructEnd()
  3205. def validate(self):
  3206. return
  3207. def __repr__(self):
  3208. L = ['%s=%r' % (key, value)
  3209. for key, value in self.__dict__.iteritems()]
  3210. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3211. def __eq__(self, other):
  3212. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3213. def __ne__(self, other):
  3214. return not (self == other)
  3215. class alter_table_result(object):
  3216. """
  3217. Attributes:
  3218. - o1
  3219. - o2
  3220. """
  3221. thrift_spec = (
  3222. None, # 0
  3223. (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1
  3224. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  3225. )
  3226. def __init__(self, o1=None, o2=None,):
  3227. self.o1 = o1
  3228. self.o2 = o2
  3229. def read(self, iprot):
  3230. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3231. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3232. return
  3233. iprot.readStructBegin()
  3234. while True:
  3235. (fname, ftype, fid) = iprot.readFieldBegin()
  3236. if ftype == TType.STOP:
  3237. break
  3238. if fid == 1:
  3239. if ftype == TType.STRUCT:
  3240. self.o1 = InvalidOperationException()
  3241. self.o1.read(iprot)
  3242. else:
  3243. iprot.skip(ftype)
  3244. elif fid == 2:
  3245. if ftype == TType.STRUCT:
  3246. self.o2 = MetaException()
  3247. self.o2.read(iprot)
  3248. else:
  3249. iprot.skip(ftype)
  3250. else:
  3251. iprot.skip(ftype)
  3252. iprot.readFieldEnd()
  3253. iprot.readStructEnd()
  3254. def write(self, oprot):
  3255. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3256. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3257. return
  3258. oprot.writeStructBegin('alter_table_result')
  3259. if self.o1 != None:
  3260. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3261. self.o1.write(oprot)
  3262. oprot.writeFieldEnd()
  3263. if self.o2 != None:
  3264. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3265. self.o2.write(oprot)
  3266. oprot.writeFieldEnd()
  3267. oprot.writeFieldStop()
  3268. oprot.writeStructEnd()
  3269. def validate(self):
  3270. return
  3271. def __repr__(self):
  3272. L = ['%s=%r' % (key, value)
  3273. for key, value in self.__dict__.iteritems()]
  3274. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3275. def __eq__(self, other):
  3276. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3277. def __ne__(self, other):
  3278. return not (self == other)
  3279. class add_partition_args(object):
  3280. """
  3281. Attributes:
  3282. - new_part
  3283. """
  3284. thrift_spec = (
  3285. None, # 0
  3286. (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1
  3287. )
  3288. def __init__(self, new_part=None,):
  3289. self.new_part = new_part
  3290. def read(self, iprot):
  3291. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3292. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3293. return
  3294. iprot.readStructBegin()
  3295. while True:
  3296. (fname, ftype, fid) = iprot.readFieldBegin()
  3297. if ftype == TType.STOP:
  3298. break
  3299. if fid == 1:
  3300. if ftype == TType.STRUCT:
  3301. self.new_part = Partition()
  3302. self.new_part.read(iprot)
  3303. else:
  3304. iprot.skip(ftype)
  3305. else:
  3306. iprot.skip(ftype)
  3307. iprot.readFieldEnd()
  3308. iprot.readStructEnd()
  3309. def write(self, oprot):
  3310. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3311. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3312. return
  3313. oprot.writeStructBegin('add_partition_args')
  3314. if self.new_part != None:
  3315. oprot.writeFieldBegin('new_part', TType.STRUCT, 1)
  3316. self.new_part.write(oprot)
  3317. oprot.writeFieldEnd()
  3318. oprot.writeFieldStop()
  3319. oprot.writeStructEnd()
  3320. def validate(self):
  3321. return
  3322. def __repr__(self):
  3323. L = ['%s=%r' % (key, value)
  3324. for key, value in self.__dict__.iteritems()]
  3325. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3326. def __eq__(self, other):
  3327. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3328. def __ne__(self, other):
  3329. return not (self == other)
  3330. class add_partition_result(object):
  3331. """
  3332. Attributes:
  3333. - success
  3334. - o1
  3335. - o2
  3336. - o3
  3337. """
  3338. thrift_spec = (
  3339. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  3340. (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1
  3341. (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2
  3342. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  3343. )
  3344. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  3345. self.success = success
  3346. self.o1 = o1
  3347. self.o2 = o2
  3348. self.o3 = o3
  3349. def read(self, iprot):
  3350. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3351. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3352. return
  3353. iprot.readStructBegin()
  3354. while True:
  3355. (fname, ftype, fid) = iprot.readFieldBegin()
  3356. if ftype == TType.STOP:
  3357. break
  3358. if fid == 0:
  3359. if ftype == TType.STRUCT:
  3360. self.success = Partition()
  3361. self.success.read(iprot)
  3362. else:
  3363. iprot.skip(ftype)
  3364. elif fid == 1:
  3365. if ftype == TType.STRUCT:
  3366. self.o1 = InvalidObjectException()
  3367. self.o1.read(iprot)
  3368. else:
  3369. iprot.skip(ftype)
  3370. elif fid == 2:
  3371. if ftype == TType.STRUCT:
  3372. self.o2 = AlreadyExistsException()
  3373. self.o2.read(iprot)
  3374. else:
  3375. iprot.skip(ftype)
  3376. elif fid == 3:
  3377. if ftype == TType.STRUCT:
  3378. self.o3 = MetaException()
  3379. self.o3.read(iprot)
  3380. else:
  3381. iprot.skip(ftype)
  3382. else:
  3383. iprot.skip(ftype)
  3384. iprot.readFieldEnd()
  3385. iprot.readStructEnd()
  3386. def write(self, oprot):
  3387. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3388. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3389. return
  3390. oprot.writeStructBegin('add_partition_result')
  3391. if self.success != None:
  3392. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3393. self.success.write(oprot)
  3394. oprot.writeFieldEnd()
  3395. if self.o1 != None:
  3396. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3397. self.o1.write(oprot)
  3398. oprot.writeFieldEnd()
  3399. if self.o2 != None:
  3400. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3401. self.o2.write(oprot)
  3402. oprot.writeFieldEnd()
  3403. if self.o3 != None:
  3404. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  3405. self.o3.write(oprot)
  3406. oprot.writeFieldEnd()
  3407. oprot.writeFieldStop()
  3408. oprot.writeStructEnd()
  3409. def validate(self):
  3410. return
  3411. def __repr__(self):
  3412. L = ['%s=%r' % (key, value)
  3413. for key, value in self.__dict__.iteritems()]
  3414. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3415. def __eq__(self, other):
  3416. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3417. def __ne__(self, other):
  3418. return not (self == other)
  3419. class append_partition_args(object):
  3420. """
  3421. Attributes:
  3422. - db_name
  3423. - tbl_name
  3424. - part_vals
  3425. """
  3426. thrift_spec = (
  3427. None, # 0
  3428. (1, TType.STRING, 'db_name', None, None, ), # 1
  3429. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3430. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  3431. )
  3432. def __init__(self, db_name=None, tbl_name=None, part_vals=None,):
  3433. self.db_name = db_name
  3434. self.tbl_name = tbl_name
  3435. self.part_vals = part_vals
  3436. def read(self, iprot):
  3437. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3438. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3439. return
  3440. iprot.readStructBegin()
  3441. while True:
  3442. (fname, ftype, fid) = iprot.readFieldBegin()
  3443. if ftype == TType.STOP:
  3444. break
  3445. if fid == 1:
  3446. if ftype == TType.STRING:
  3447. self.db_name = iprot.readString();
  3448. else:
  3449. iprot.skip(ftype)
  3450. elif fid == 2:
  3451. if ftype == TType.STRING:
  3452. self.tbl_name = iprot.readString();
  3453. else:
  3454. iprot.skip(ftype)
  3455. elif fid == 3:
  3456. if ftype == TType.LIST:
  3457. self.part_vals = []
  3458. (_etype141, _size138) = iprot.readListBegin()
  3459. for _i142 in xrange(_size138):
  3460. _elem143 = iprot.readString();
  3461. self.part_vals.append(_elem143)
  3462. iprot.readListEnd()
  3463. else:
  3464. iprot.skip(ftype)
  3465. else:
  3466. iprot.skip(ftype)
  3467. iprot.readFieldEnd()
  3468. iprot.readStructEnd()
  3469. def write(self, oprot):
  3470. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3471. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3472. return
  3473. oprot.writeStructBegin('append_partition_args')
  3474. if self.db_name != None:
  3475. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  3476. oprot.writeString(self.db_name)
  3477. oprot.writeFieldEnd()
  3478. if self.tbl_name != None:
  3479. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3480. oprot.writeString(self.tbl_name)
  3481. oprot.writeFieldEnd()
  3482. if self.part_vals != None:
  3483. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  3484. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  3485. for iter144 in self.part_vals:
  3486. oprot.writeString(iter144)
  3487. oprot.writeListEnd()
  3488. oprot.writeFieldEnd()
  3489. oprot.writeFieldStop()
  3490. oprot.writeStructEnd()
  3491. def validate(self):
  3492. return
  3493. def __repr__(self):
  3494. L = ['%s=%r' % (key, value)
  3495. for key, value in self.__dict__.iteritems()]
  3496. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3497. def __eq__(self, other):
  3498. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3499. def __ne__(self, other):
  3500. return not (self == other)
  3501. class append_partition_result(object):
  3502. """
  3503. Attributes:
  3504. - success
  3505. - o1
  3506. - o2
  3507. - o3
  3508. """
  3509. thrift_spec = (
  3510. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  3511. (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1
  3512. (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2
  3513. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  3514. )
  3515. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  3516. self.success = success
  3517. self.o1 = o1
  3518. self.o2 = o2
  3519. self.o3 = o3
  3520. def read(self, iprot):
  3521. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3522. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3523. return
  3524. iprot.readStructBegin()
  3525. while True:
  3526. (fname, ftype, fid) = iprot.readFieldBegin()
  3527. if ftype == TType.STOP:
  3528. break
  3529. if fid == 0:
  3530. if ftype == TType.STRUCT:
  3531. self.success = Partition()
  3532. self.success.read(iprot)
  3533. else:
  3534. iprot.skip(ftype)
  3535. elif fid == 1:
  3536. if ftype == TType.STRUCT:
  3537. self.o1 = InvalidObjectException()
  3538. self.o1.read(iprot)
  3539. else:
  3540. iprot.skip(ftype)
  3541. elif fid == 2:
  3542. if ftype == TType.STRUCT:
  3543. self.o2 = AlreadyExistsException()
  3544. self.o2.read(iprot)
  3545. else:
  3546. iprot.skip(ftype)
  3547. elif fid == 3:
  3548. if ftype == TType.STRUCT:
  3549. self.o3 = MetaException()
  3550. self.o3.read(iprot)
  3551. else:
  3552. iprot.skip(ftype)
  3553. else:
  3554. iprot.skip(ftype)
  3555. iprot.readFieldEnd()
  3556. iprot.readStructEnd()
  3557. def write(self, oprot):
  3558. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3559. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3560. return
  3561. oprot.writeStructBegin('append_partition_result')
  3562. if self.success != None:
  3563. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3564. self.success.write(oprot)
  3565. oprot.writeFieldEnd()
  3566. if self.o1 != None:
  3567. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3568. self.o1.write(oprot)
  3569. oprot.writeFieldEnd()
  3570. if self.o2 != None:
  3571. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3572. self.o2.write(oprot)
  3573. oprot.writeFieldEnd()
  3574. if self.o3 != None:
  3575. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  3576. self.o3.write(oprot)
  3577. oprot.writeFieldEnd()
  3578. oprot.writeFieldStop()
  3579. oprot.writeStructEnd()
  3580. def validate(self):
  3581. return
  3582. def __repr__(self):
  3583. L = ['%s=%r' % (key, value)
  3584. for key, value in self.__dict__.iteritems()]
  3585. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3586. def __eq__(self, other):
  3587. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3588. def __ne__(self, other):
  3589. return not (self == other)
  3590. class drop_partition_args(object):
  3591. """
  3592. Attributes:
  3593. - db_name
  3594. - tbl_name
  3595. - part_vals
  3596. - deleteData
  3597. """
  3598. thrift_spec = (
  3599. None, # 0
  3600. (1, TType.STRING, 'db_name', None, None, ), # 1
  3601. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3602. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  3603. (4, TType.BOOL, 'deleteData', None, None, ), # 4
  3604. )
  3605. def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,):
  3606. self.db_name = db_name
  3607. self.tbl_name = tbl_name
  3608. self.part_vals = part_vals
  3609. self.deleteData = deleteData
  3610. def read(self, iprot):
  3611. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3612. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3613. return
  3614. iprot.readStructBegin()
  3615. while True:
  3616. (fname, ftype, fid) = iprot.readFieldBegin()
  3617. if ftype == TType.STOP:
  3618. break
  3619. if fid == 1:
  3620. if ftype == TType.STRING:
  3621. self.db_name = iprot.readString();
  3622. else:
  3623. iprot.skip(ftype)
  3624. elif fid == 2:
  3625. if ftype == TType.STRING:
  3626. self.tbl_name = iprot.readString();
  3627. else:
  3628. iprot.skip(ftype)
  3629. elif fid == 3:
  3630. if ftype == TType.LIST:
  3631. self.part_vals = []
  3632. (_etype148, _size145) = iprot.readListBegin()
  3633. for _i149 in xrange(_size145):
  3634. _elem150 = iprot.readString();
  3635. self.part_vals.append(_elem150)
  3636. iprot.readListEnd()
  3637. else:
  3638. iprot.skip(ftype)
  3639. elif fid == 4:
  3640. if ftype == TType.BOOL:
  3641. self.deleteData = iprot.readBool();
  3642. else:
  3643. iprot.skip(ftype)
  3644. else:
  3645. iprot.skip(ftype)
  3646. iprot.readFieldEnd()
  3647. iprot.readStructEnd()
  3648. def write(self, oprot):
  3649. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3650. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3651. return
  3652. oprot.writeStructBegin('drop_partition_args')
  3653. if self.db_name != None:
  3654. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  3655. oprot.writeString(self.db_name)
  3656. oprot.writeFieldEnd()
  3657. if self.tbl_name != None:
  3658. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3659. oprot.writeString(self.tbl_name)
  3660. oprot.writeFieldEnd()
  3661. if self.part_vals != None:
  3662. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  3663. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  3664. for iter151 in self.part_vals:
  3665. oprot.writeString(iter151)
  3666. oprot.writeListEnd()
  3667. oprot.writeFieldEnd()
  3668. if self.deleteData != None:
  3669. oprot.writeFieldBegin('deleteData', TType.BOOL, 4)
  3670. oprot.writeBool(self.deleteData)
  3671. oprot.writeFieldEnd()
  3672. oprot.writeFieldStop()
  3673. oprot.writeStructEnd()
  3674. def validate(self):
  3675. return
  3676. def __repr__(self):
  3677. L = ['%s=%r' % (key, value)
  3678. for key, value in self.__dict__.iteritems()]
  3679. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3680. def __eq__(self, other):
  3681. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3682. def __ne__(self, other):
  3683. return not (self == other)
  3684. class drop_partition_result(object):
  3685. """
  3686. Attributes:
  3687. - success
  3688. - o1
  3689. - o2
  3690. """
  3691. thrift_spec = (
  3692. (0, TType.BOOL, 'success', None, None, ), # 0
  3693. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  3694. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  3695. )
  3696. def __init__(self, success=None, o1=None, o2=None,):
  3697. self.success = success
  3698. self.o1 = o1
  3699. self.o2 = o2
  3700. def read(self, iprot):
  3701. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3702. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3703. return
  3704. iprot.readStructBegin()
  3705. while True:
  3706. (fname, ftype, fid) = iprot.readFieldBegin()
  3707. if ftype == TType.STOP:
  3708. break
  3709. if fid == 0:
  3710. if ftype == TType.BOOL:
  3711. self.success = iprot.readBool();
  3712. else:
  3713. iprot.skip(ftype)
  3714. elif fid == 1:
  3715. if ftype == TType.STRUCT:
  3716. self.o1 = NoSuchObjectException()
  3717. self.o1.read(iprot)
  3718. else:
  3719. iprot.skip(ftype)
  3720. elif fid == 2:
  3721. if ftype == TType.STRUCT:
  3722. self.o2 = MetaException()
  3723. self.o2.read(iprot)
  3724. else:
  3725. iprot.skip(ftype)
  3726. else:
  3727. iprot.skip(ftype)
  3728. iprot.readFieldEnd()
  3729. iprot.readStructEnd()
  3730. def write(self, oprot):
  3731. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3732. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3733. return
  3734. oprot.writeStructBegin('drop_partition_result')
  3735. if self.success != None:
  3736. oprot.writeFieldBegin('success', TType.BOOL, 0)
  3737. oprot.writeBool(self.success)
  3738. oprot.writeFieldEnd()
  3739. if self.o1 != None:
  3740. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3741. self.o1.write(oprot)
  3742. oprot.writeFieldEnd()
  3743. if self.o2 != None:
  3744. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3745. self.o2.write(oprot)
  3746. oprot.writeFieldEnd()
  3747. oprot.writeFieldStop()
  3748. oprot.writeStructEnd()
  3749. def validate(self):
  3750. return
  3751. def __repr__(self):
  3752. L = ['%s=%r' % (key, value)
  3753. for key, value in self.__dict__.iteritems()]
  3754. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3755. def __eq__(self, other):
  3756. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3757. def __ne__(self, other):
  3758. return not (self == other)
  3759. class get_partition_args(object):
  3760. """
  3761. Attributes:
  3762. - db_name
  3763. - tbl_name
  3764. - part_vals
  3765. """
  3766. thrift_spec = (
  3767. None, # 0
  3768. (1, TType.STRING, 'db_name', None, None, ), # 1
  3769. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3770. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  3771. )
  3772. def __init__(self, db_name=None, tbl_name=None, part_vals=None,):
  3773. self.db_name = db_name
  3774. self.tbl_name = tbl_name
  3775. self.part_vals = part_vals
  3776. def read(self, iprot):
  3777. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3778. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3779. return
  3780. iprot.readStructBegin()
  3781. while True:
  3782. (fname, ftype, fid) = iprot.readFieldBegin()
  3783. if ftype == TType.STOP:
  3784. break
  3785. if fid == 1:
  3786. if ftype == TType.STRING:
  3787. self.db_name = iprot.readString();
  3788. else:
  3789. iprot.skip(ftype)
  3790. elif fid == 2:
  3791. if ftype == TType.STRING:
  3792. self.tbl_name = iprot.readString();
  3793. else:
  3794. iprot.skip(ftype)
  3795. elif fid == 3:
  3796. if ftype == TType.LIST:
  3797. self.part_vals = []
  3798. (_etype155, _size152) = iprot.readListBegin()
  3799. for _i156 in xrange(_size152):
  3800. _elem157 = iprot.readString();
  3801. self.part_vals.append(_elem157)
  3802. iprot.readListEnd()
  3803. else:
  3804. iprot.skip(ftype)
  3805. else:
  3806. iprot.skip(ftype)
  3807. iprot.readFieldEnd()
  3808. iprot.readStructEnd()
  3809. def write(self, oprot):
  3810. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3811. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3812. return
  3813. oprot.writeStructBegin('get_partition_args')
  3814. if self.db_name != None:
  3815. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  3816. oprot.writeString(self.db_name)
  3817. oprot.writeFieldEnd()
  3818. if self.tbl_name != None:
  3819. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3820. oprot.writeString(self.tbl_name)
  3821. oprot.writeFieldEnd()
  3822. if self.part_vals != None:
  3823. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  3824. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  3825. for iter158 in self.part_vals:
  3826. oprot.writeString(iter158)
  3827. oprot.writeListEnd()
  3828. oprot.writeFieldEnd()
  3829. oprot.writeFieldStop()
  3830. oprot.writeStructEnd()
  3831. def validate(self):
  3832. return
  3833. def __repr__(self):
  3834. L = ['%s=%r' % (key, value)
  3835. for key, value in self.__dict__.iteritems()]
  3836. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3837. def __eq__(self, other):
  3838. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3839. def __ne__(self, other):
  3840. return not (self == other)
  3841. class get_partition_result(object):
  3842. """
  3843. Attributes:
  3844. - success
  3845. - o1
  3846. """
  3847. thrift_spec = (
  3848. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  3849. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  3850. )
  3851. def __init__(self, success=None, o1=None,):
  3852. self.success = success
  3853. self.o1 = o1
  3854. def read(self, iprot):
  3855. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3856. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3857. return
  3858. iprot.readStructBegin()
  3859. while True:
  3860. (fname, ftype, fid) = iprot.readFieldBegin()
  3861. if ftype == TType.STOP:
  3862. break
  3863. if fid == 0:
  3864. if ftype == TType.STRUCT:
  3865. self.success = Partition()
  3866. self.success.read(iprot)
  3867. else:
  3868. iprot.skip(ftype)
  3869. elif fid == 1:
  3870. if ftype == TType.STRUCT:
  3871. self.o1 = MetaException()
  3872. self.o1.read(iprot)
  3873. else:
  3874. iprot.skip(ftype)
  3875. else:
  3876. iprot.skip(ftype)
  3877. iprot.readFieldEnd()
  3878. iprot.readStructEnd()
  3879. def write(self, oprot):
  3880. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3881. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3882. return
  3883. oprot.writeStructBegin('get_partition_result')
  3884. if self.success != None:
  3885. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3886. self.success.write(oprot)
  3887. oprot.writeFieldEnd()
  3888. if self.o1 != None:
  3889. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3890. self.o1.write(oprot)
  3891. oprot.writeFieldEnd()
  3892. oprot.writeFieldStop()
  3893. oprot.writeStructEnd()
  3894. def validate(self):
  3895. return
  3896. def __repr__(self):
  3897. L = ['%s=%r' % (key, value)
  3898. for key, value in self.__dict__.iteritems()]
  3899. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3900. def __eq__(self, other):
  3901. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3902. def __ne__(self, other):
  3903. return not (self == other)
  3904. class get_partitions_args(object):
  3905. """
  3906. Attributes:
  3907. - db_name
  3908. - tbl_name
  3909. - max_parts
  3910. """
  3911. thrift_spec = (
  3912. None, # 0
  3913. (1, TType.STRING, 'db_name', None, None, ), # 1
  3914. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  3915. (3, TType.I16, 'max_parts', None, -1, ), # 3
  3916. )
  3917. def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],):
  3918. self.db_name = db_name
  3919. self.tbl_name = tbl_name
  3920. self.max_parts = max_parts
  3921. def read(self, iprot):
  3922. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3923. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3924. return
  3925. iprot.readStructBegin()
  3926. while True:
  3927. (fname, ftype, fid) = iprot.readFieldBegin()
  3928. if ftype == TType.STOP:
  3929. break
  3930. if fid == 1:
  3931. if ftype == TType.STRING:
  3932. self.db_name = iprot.readString();
  3933. else:
  3934. iprot.skip(ftype)
  3935. elif fid == 2:
  3936. if ftype == TType.STRING:
  3937. self.tbl_name = iprot.readString();
  3938. else:
  3939. iprot.skip(ftype)
  3940. elif fid == 3:
  3941. if ftype == TType.I16:
  3942. self.max_parts = iprot.readI16();
  3943. else:
  3944. iprot.skip(ftype)
  3945. else:
  3946. iprot.skip(ftype)
  3947. iprot.readFieldEnd()
  3948. iprot.readStructEnd()
  3949. def write(self, oprot):
  3950. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3951. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3952. return
  3953. oprot.writeStructBegin('get_partitions_args')
  3954. if self.db_name != None:
  3955. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  3956. oprot.writeString(self.db_name)
  3957. oprot.writeFieldEnd()
  3958. if self.tbl_name != None:
  3959. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  3960. oprot.writeString(self.tbl_name)
  3961. oprot.writeFieldEnd()
  3962. if self.max_parts != None:
  3963. oprot.writeFieldBegin('max_parts', TType.I16, 3)
  3964. oprot.writeI16(self.max_parts)
  3965. oprot.writeFieldEnd()
  3966. oprot.writeFieldStop()
  3967. oprot.writeStructEnd()
  3968. def validate(self):
  3969. return
  3970. def __repr__(self):
  3971. L = ['%s=%r' % (key, value)
  3972. for key, value in self.__dict__.iteritems()]
  3973. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3974. def __eq__(self, other):
  3975. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3976. def __ne__(self, other):
  3977. return not (self == other)
  3978. class get_partitions_result(object):
  3979. """
  3980. Attributes:
  3981. - success
  3982. - o1
  3983. - o2
  3984. """
  3985. thrift_spec = (
  3986. (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0
  3987. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  3988. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  3989. )
  3990. def __init__(self, success=None, o1=None, o2=None,):
  3991. self.success = success
  3992. self.o1 = o1
  3993. self.o2 = o2
  3994. def read(self, iprot):
  3995. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3996. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3997. return
  3998. iprot.readStructBegin()
  3999. while True:
  4000. (fname, ftype, fid) = iprot.readFieldBegin()
  4001. if ftype == TType.STOP:
  4002. break
  4003. if fid == 0:
  4004. if ftype == TType.LIST:
  4005. self.success = []
  4006. (_etype162, _size159) = iprot.readListBegin()
  4007. for _i163 in xrange(_size159):
  4008. _elem164 = Partition()
  4009. _elem164.read(iprot)
  4010. self.success.append(_elem164)
  4011. iprot.readListEnd()
  4012. else:
  4013. iprot.skip(ftype)
  4014. elif fid == 1:
  4015. if ftype == TType.STRUCT:
  4016. self.o1 = NoSuchObjectException()
  4017. self.o1.read(iprot)
  4018. else:
  4019. iprot.skip(ftype)
  4020. elif fid == 2:
  4021. if ftype == TType.STRUCT:
  4022. self.o2 = MetaException()
  4023. self.o2.read(iprot)
  4024. else:
  4025. iprot.skip(ftype)
  4026. else:
  4027. iprot.skip(ftype)
  4028. iprot.readFieldEnd()
  4029. iprot.readStructEnd()
  4030. def write(self, oprot):
  4031. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4032. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4033. return
  4034. oprot.writeStructBegin('get_partitions_result')
  4035. if self.success != None:
  4036. oprot.writeFieldBegin('success', TType.LIST, 0)
  4037. oprot.writeListBegin(TType.STRUCT, len(self.success))
  4038. for iter165 in self.success:
  4039. iter165.write(oprot)
  4040. oprot.writeListEnd()
  4041. oprot.writeFieldEnd()
  4042. if self.o1 != None:
  4043. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4044. self.o1.write(oprot)
  4045. oprot.writeFieldEnd()
  4046. if self.o2 != None:
  4047. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  4048. self.o2.write(oprot)
  4049. oprot.writeFieldEnd()
  4050. oprot.writeFieldStop()
  4051. oprot.writeStructEnd()
  4052. def validate(self):
  4053. return
  4054. def __repr__(self):
  4055. L = ['%s=%r' % (key, value)
  4056. for key, value in self.__dict__.iteritems()]
  4057. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4058. def __eq__(self, other):
  4059. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4060. def __ne__(self, other):
  4061. return not (self == other)
  4062. class get_partition_names_args(object):
  4063. """
  4064. Attributes:
  4065. - db_name
  4066. - tbl_name
  4067. - max_parts
  4068. """
  4069. thrift_spec = (
  4070. None, # 0
  4071. (1, TType.STRING, 'db_name', None, None, ), # 1
  4072. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  4073. (3, TType.I16, 'max_parts', None, -1, ), # 3
  4074. )
  4075. def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],):
  4076. self.db_name = db_name
  4077. self.tbl_name = tbl_name
  4078. self.max_parts = max_parts
  4079. def read(self, iprot):
  4080. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4081. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4082. return
  4083. iprot.readStructBegin()
  4084. while True:
  4085. (fname, ftype, fid) = iprot.readFieldBegin()
  4086. if ftype == TType.STOP:
  4087. break
  4088. if fid == 1:
  4089. if ftype == TType.STRING:
  4090. self.db_name = iprot.readString();
  4091. else:
  4092. iprot.skip(ftype)
  4093. elif fid == 2:
  4094. if ftype == TType.STRING:
  4095. self.tbl_name = iprot.readString();
  4096. else:
  4097. iprot.skip(ftype)
  4098. elif fid == 3:
  4099. if ftype == TType.I16:
  4100. self.max_parts = iprot.readI16();
  4101. else:
  4102. iprot.skip(ftype)
  4103. else:
  4104. iprot.skip(ftype)
  4105. iprot.readFieldEnd()
  4106. iprot.readStructEnd()
  4107. def write(self, oprot):
  4108. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4109. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4110. return
  4111. oprot.writeStructBegin('get_partition_names_args')
  4112. if self.db_name != None:
  4113. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  4114. oprot.writeString(self.db_name)
  4115. oprot.writeFieldEnd()
  4116. if self.tbl_name != None:
  4117. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  4118. oprot.writeString(self.tbl_name)
  4119. oprot.writeFieldEnd()
  4120. if self.max_parts != None:
  4121. oprot.writeFieldBegin('max_parts', TType.I16, 3)
  4122. oprot.writeI16(self.max_parts)
  4123. oprot.writeFieldEnd()
  4124. oprot.writeFieldStop()
  4125. oprot.writeStructEnd()
  4126. def validate(self):
  4127. return
  4128. def __repr__(self):
  4129. L = ['%s=%r' % (key, value)
  4130. for key, value in self.__dict__.iteritems()]
  4131. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4132. def __eq__(self, other):
  4133. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4134. def __ne__(self, other):
  4135. return not (self == other)
  4136. class get_partition_names_result(object):
  4137. """
  4138. Attributes:
  4139. - success
  4140. - o2
  4141. """
  4142. thrift_spec = (
  4143. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  4144. (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
  4145. )
  4146. def __init__(self, success=None, o2=None,):
  4147. self.success = success
  4148. self.o2 = o2
  4149. def read(self, iprot):
  4150. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4151. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4152. return
  4153. iprot.readStructBegin()
  4154. while True:
  4155. (fname, ftype, fid) = iprot.readFieldBegin()
  4156. if ftype == TType.STOP:
  4157. break
  4158. if fid == 0:
  4159. if ftype == TType.LIST:
  4160. self.success = []
  4161. (_etype169, _size166) = iprot.readListBegin()
  4162. for _i170 in xrange(_size166):
  4163. _elem171 = iprot.readString();
  4164. self.success.append(_elem171)
  4165. iprot.readListEnd()
  4166. else:
  4167. iprot.skip(ftype)
  4168. elif fid == 1:
  4169. if ftype == TType.STRUCT:
  4170. self.o2 = MetaException()
  4171. self.o2.read(iprot)
  4172. else:
  4173. iprot.skip(ftype)
  4174. else:
  4175. iprot.skip(ftype)
  4176. iprot.readFieldEnd()
  4177. iprot.readStructEnd()
  4178. def write(self, oprot):
  4179. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4180. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4181. return
  4182. oprot.writeStructBegin('get_partition_names_result')
  4183. if self.success != None:
  4184. oprot.writeFieldBegin('success', TType.LIST, 0)
  4185. oprot.writeListBegin(TType.STRING, len(self.success))
  4186. for iter172 in self.success:
  4187. oprot.writeString(iter172)
  4188. oprot.writeListEnd()
  4189. oprot.writeFieldEnd()
  4190. if self.o2 != None:
  4191. oprot.writeFieldBegin('o2', TType.STRUCT, 1)
  4192. self.o2.write(oprot)
  4193. oprot.writeFieldEnd()
  4194. oprot.writeFieldStop()
  4195. oprot.writeStructEnd()
  4196. def validate(self):
  4197. return
  4198. def __repr__(self):
  4199. L = ['%s=%r' % (key, value)
  4200. for key, value in self.__dict__.iteritems()]
  4201. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4202. def __eq__(self, other):
  4203. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4204. def __ne__(self, other):
  4205. return not (self == other)
  4206. class alter_partition_args(object):
  4207. """
  4208. Attributes:
  4209. - db_name
  4210. - tbl_name
  4211. - new_part
  4212. """
  4213. thrift_spec = (
  4214. None, # 0
  4215. (1, TType.STRING, 'db_name', None, None, ), # 1
  4216. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  4217. (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3
  4218. )
  4219. def __init__(self, db_name=None, tbl_name=None, new_part=None,):
  4220. self.db_name = db_name
  4221. self.tbl_name = tbl_name
  4222. self.new_part = new_part
  4223. def read(self, iprot):
  4224. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4225. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4226. return
  4227. iprot.readStructBegin()
  4228. while True:
  4229. (fname, ftype, fid) = iprot.readFieldBegin()
  4230. if ftype == TType.STOP:
  4231. break
  4232. if fid == 1:
  4233. if ftype == TType.STRING:
  4234. self.db_name = iprot.readString();
  4235. else:
  4236. iprot.skip(ftype)
  4237. elif fid == 2:
  4238. if ftype == TType.STRING:
  4239. self.tbl_name = iprot.readString();
  4240. else:
  4241. iprot.skip(ftype)
  4242. elif fid == 3:
  4243. if ftype == TType.STRUCT:
  4244. self.new_part = Partition()
  4245. self.new_part.read(iprot)
  4246. else:
  4247. iprot.skip(ftype)
  4248. else:
  4249. iprot.skip(ftype)
  4250. iprot.readFieldEnd()
  4251. iprot.readStructEnd()
  4252. def write(self, oprot):
  4253. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4254. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4255. return
  4256. oprot.writeStructBegin('alter_partition_args')
  4257. if self.db_name != None:
  4258. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  4259. oprot.writeString(self.db_name)
  4260. oprot.writeFieldEnd()
  4261. if self.tbl_name != None:
  4262. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  4263. oprot.writeString(self.tbl_name)
  4264. oprot.writeFieldEnd()
  4265. if self.new_part != None:
  4266. oprot.writeFieldBegin('new_part', TType.STRUCT, 3)
  4267. self.new_part.write(oprot)
  4268. oprot.writeFieldEnd()
  4269. oprot.writeFieldStop()
  4270. oprot.writeStructEnd()
  4271. def validate(self):
  4272. return
  4273. def __repr__(self):
  4274. L = ['%s=%r' % (key, value)
  4275. for key, value in self.__dict__.iteritems()]
  4276. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4277. def __eq__(self, other):
  4278. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4279. def __ne__(self, other):
  4280. return not (self == other)
  4281. class alter_partition_result(object):
  4282. """
  4283. Attributes:
  4284. - o1
  4285. - o2
  4286. """
  4287. thrift_spec = (
  4288. None, # 0
  4289. (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1
  4290. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  4291. )
  4292. def __init__(self, o1=None, o2=None,):
  4293. self.o1 = o1
  4294. self.o2 = o2
  4295. def read(self, iprot):
  4296. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4297. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4298. return
  4299. iprot.readStructBegin()
  4300. while True:
  4301. (fname, ftype, fid) = iprot.readFieldBegin()
  4302. if ftype == TType.STOP:
  4303. break
  4304. if fid == 1:
  4305. if ftype == TType.STRUCT:
  4306. self.o1 = InvalidOperationException()
  4307. self.o1.read(iprot)
  4308. else:
  4309. iprot.skip(ftype)
  4310. elif fid == 2:
  4311. if ftype == TType.STRUCT:
  4312. self.o2 = MetaException()
  4313. self.o2.read(iprot)
  4314. else:
  4315. iprot.skip(ftype)
  4316. else:
  4317. iprot.skip(ftype)
  4318. iprot.readFieldEnd()
  4319. iprot.readStructEnd()
  4320. def write(self, oprot):
  4321. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4322. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4323. return
  4324. oprot.writeStructBegin('alter_partition_result')
  4325. if self.o1 != None:
  4326. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4327. self.o1.write(oprot)
  4328. oprot.writeFieldEnd()
  4329. if self.o2 != None:
  4330. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  4331. self.o2.write(oprot)
  4332. oprot.writeFieldEnd()
  4333. oprot.writeFieldStop()
  4334. oprot.writeStructEnd()
  4335. def validate(self):
  4336. return
  4337. def __repr__(self):
  4338. L = ['%s=%r' % (key, value)
  4339. for key, value in self.__dict__.iteritems()]
  4340. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4341. def __eq__(self, other):
  4342. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4343. def __ne__(self, other):
  4344. return not (self == other)
  4345. class get_config_value_args(object):
  4346. """
  4347. Attributes:
  4348. - name
  4349. - defaultValue
  4350. """
  4351. thrift_spec = (
  4352. None, # 0
  4353. (1, TType.STRING, 'name', None, None, ), # 1
  4354. (2, TType.STRING, 'defaultValue', None, None, ), # 2
  4355. )
  4356. def __init__(self, name=None, defaultValue=None,):
  4357. self.name = name
  4358. self.defaultValue = defaultValue
  4359. def read(self, iprot):
  4360. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4361. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4362. return
  4363. iprot.readStructBegin()
  4364. while True:
  4365. (fname, ftype, fid) = iprot.readFieldBegin()
  4366. if ftype == TType.STOP:
  4367. break
  4368. if fid == 1:
  4369. if ftype == TType.STRING:
  4370. self.name = iprot.readString();
  4371. else:
  4372. iprot.skip(ftype)
  4373. elif fid == 2:
  4374. if ftype == TType.STRING:
  4375. self.defaultValue = iprot.readString();
  4376. else:
  4377. iprot.skip(ftype)
  4378. else:
  4379. iprot.skip(ftype)
  4380. iprot.readFieldEnd()
  4381. iprot.readStructEnd()
  4382. def write(self, oprot):
  4383. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4384. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4385. return
  4386. oprot.writeStructBegin('get_config_value_args')
  4387. if self.name != None:
  4388. oprot.writeFieldBegin('name', TType.STRING, 1)
  4389. oprot.writeString(self.name)
  4390. oprot.writeFieldEnd()
  4391. if self.defaultValue != None:
  4392. oprot.writeFieldBegin('defaultValue', TType.STRING, 2)
  4393. oprot.writeString(self.defaultValue)
  4394. oprot.writeFieldEnd()
  4395. oprot.writeFieldStop()
  4396. oprot.writeStructEnd()
  4397. def validate(self):
  4398. return
  4399. def __repr__(self):
  4400. L = ['%s=%r' % (key, value)
  4401. for key, value in self.__dict__.iteritems()]
  4402. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4403. def __eq__(self, other):
  4404. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4405. def __ne__(self, other):
  4406. return not (self == other)
  4407. class get_config_value_result(object):
  4408. """
  4409. Attributes:
  4410. - success
  4411. - o1
  4412. """
  4413. thrift_spec = (
  4414. (0, TType.STRING, 'success', None, None, ), # 0
  4415. (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1
  4416. )
  4417. def __init__(self, success=None, o1=None,):
  4418. self.success = success
  4419. self.o1 = o1
  4420. def read(self, iprot):
  4421. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4422. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4423. return
  4424. iprot.readStructBegin()
  4425. while True:
  4426. (fname, ftype, fid) = iprot.readFieldBegin()
  4427. if ftype == TType.STOP:
  4428. break
  4429. if fid == 0:
  4430. if ftype == TType.STRING:
  4431. self.success = iprot.readString();
  4432. else:
  4433. iprot.skip(ftype)
  4434. elif fid == 1:
  4435. if ftype == TType.STRUCT:
  4436. self.o1 = ConfigValSecurityException()
  4437. self.o1.read(iprot)
  4438. else:
  4439. iprot.skip(ftype)
  4440. else:
  4441. iprot.skip(ftype)
  4442. iprot.readFieldEnd()
  4443. iprot.readStructEnd()
  4444. def write(self, oprot):
  4445. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4446. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4447. return
  4448. oprot.writeStructBegin('get_config_value_result')
  4449. if self.success != None:
  4450. oprot.writeFieldBegin('success', TType.STRING, 0)
  4451. oprot.writeString(self.success)
  4452. oprot.writeFieldEnd()
  4453. if self.o1 != None:
  4454. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4455. self.o1.write(oprot)
  4456. oprot.writeFieldEnd()
  4457. oprot.writeFieldStop()
  4458. oprot.writeStructEnd()
  4459. def validate(self):
  4460. return
  4461. def __repr__(self):
  4462. L = ['%s=%r' % (key, value)
  4463. for key, value in self.__dict__.iteritems()]
  4464. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4465. def __eq__(self, other):
  4466. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4467. def __ne__(self, other):
  4468. return not (self == other)