diff --git common/src/java/org/apache/hadoop/hive/conf/HiveConf.java common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index f86d6a7..50337a9 100644 --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -1,4 +1,4 @@ -/** +** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -545,6 +545,8 @@ public class HiveConf extends Configuration { HIVE_STATS_RELIABLE("hive.stats.reliable", false), // Collect table access keys information for operators that can benefit from bucketing HIVE_STATS_COLLECT_TABLEKEYS("hive.stats.collect.tablekeys", false), + // standard error allowed for ndv estimates. A lower value indicates higher accuracy and a higher compute cost. + HIVE_STATS_NDV_ERROR("hive.stats.ndv.error", 20), // Concurrency HIVE_SUPPORT_CONCURRENCY("hive.support.concurrency", false), diff --git conf/hive-default.xml.template conf/hive-default.xml.template index 4a59fb6..5654260 100644 --- conf/hive-default.xml.template +++ conf/hive-default.xml.template @@ -1035,6 +1035,13 @@ + hive.stats.ndv.error + 10 + Standard error expressed in percentage. Provides a tradeoff between accuracy and compute cost.A lower value for error indicates higher accuracy and a higher compute cost. + + + + hive.support.concurrency false Whether hive supports concurrency or not. A zookeeper instance must be up and running for the default hive lock manager to support read-write locks. diff --git data/files/UserVisits.dat data/files/UserVisits.dat new file mode 100644 index 0000000..f56c5a1 --- /dev/null +++ data/files/UserVisits.dat @@ -0,0 +1,55 @@ +170.131.22.2|13rdgckzlcblruc.html|1984-8-7|336.869186722|NuSearch Spider|HUN|HUN-NL|remnants|3 +162.114.4.2|6xpirzjeytxdjsmwtmyeugkesratmpvamliekrijlgmvyyrslqwgw.html|1978-1-9|331.791153595|Superdownloads Spiderma|AUT|AUT-ZR|MHD|8 +177.110.45.18|11zvmoamsyaameokoeylbkivgquksibqbalnpmailbiyfxitbhfdroyxesixbjndkyqzl.html|1986-9-25|411.968497603|Mozilla/4.0|FLK|FLK-GB|apj@as.arizona.edu.|7 +157.111.12.37|44mvdnls.html|2002-7-3|486.660926201|PHP/4.0.|FIN|FIN-CZ|diffuse|3 +161.100.45.22|14ceyigx.html|1978-10-26|399.80234522|NP/0.1|BEN|BEN-CA|region|8 +164.118.48.16|28axfinfqwdcwoorukpwqvqoxxeuivbniclnkytavwdslrj.html|1996-12-8|298.335411612|MSNBOT_Mobile MSMOBOT Mozilla/2.0|USA|USA-IO|medium|1 +153.104.13.11|19aysprojntmnwymfdkaznbqxprxxaissjqkzhzivsvipuvuxfuxsvnqlfnigvby.html|1976-10-6|146.309480768|WebSearch.COM.AU/3.0.1|MCO|MCO-YD|state|5 +150.112.45.27|12hcaewxiswjeezfnlulkenwubaqsitpuarufosogoxls.html|1995-6-19|173.469334335|WinkBot/0.06|PHL|PHL-NN|important|2 +152.108.39.16|36umg.html|1974-3-28|269.969215988|GSiteCrawler/v1.xx rev. xxx|MNG|MNG-HI|...)|6 +174.119.41.16|60yxoboskwpyfin.html|2002-7-17|436.113482675|Infoseek SideWinder/2.0B|NIC|NIC-JP|data|1 +165.116.21.12|70difiadhmrvragggmoaufnuwwbakbjntnwzvxcdjtybufiarwbmcphzmizwkikewh.html|1984-2-6|13.099044572|WWWeasel Robot v1.00|THA|THA-FO|bubbles|6 +155.128.42.14|21brkepinqiwvtmfmebjckkhwevhxaesogkykzgyqpuligrul.html|1986-7-29|347.800952938|Mozilla/4.0 compatible ZyBorg/1.0|IRN|IRN-YS|conduction|1 +156.131.31.12|14nbaaoablhxrlvbfgrwcxktvshtkoqzddbdepegbmesxztdglzjjkc.html|2002-7-30|85.7691140217|Java1.1.xx.|BRA|BRA-BL|circumstellar|9 +159.122.42.18|4xfydvopxveeduudfzodxkbczvdlzou.html|1989-9-20|332.572440865|Metaeuro Web Crawler/0.2|LUX|LUX-SD|kinematics|7 +151.104.39.45|65psclahgvasawczpyicyxkuqzwpbowghmzkxzsdvtwwpzvfydiwbsqrrmhtbezjqyuo.html|2002-1-13|190.528735328|JobSpider_BA/1.|UGA|UGA-PY|pulsars:|7 +159.132.24.22|18vhcbzhhblfbayejcybyibwqsgzlkmswizyjzgrbrw.html|1978-1-2|182.368755789|Piffany_Web_Scraper_v0.|ITA|ITA-NJ|nonthermal|1 +170.101.17.16|40prmxavsjoizdzkgsncesndxebatfwvrmmejnacxol.html|1989-9-1|41.4163486896|Mozilla/4.01 [en]|ZAF|ZAF-AK|Scuti|6 +171.124.38.2|29nripzogexadckoiaoafxvtkrxksdqgveydtxsabpbfsltbmibrfwlqojagmr.html|1979-6-12|192.085693167|IconSurf/2.0 favicon monitor|SVN|SVN-DY|systems|5 +178.128.29.41|24tmrndfialwvkwybuspjyexlkiamebwtvilimqqncnimkgofzepximj.html|2000-7-8|276.89796127|obidos-bot|SLB|SLB-RL|(...|4 +175.101.24.43|70dcfbcotdzhfhuhquyosbcviglrkrakddmifpxzswg.html|1978-3-16|131.775726872|Mozilla/4.0|BMU|BMU-BR|spiral|6 +155.102.37.30|99cyllzbnsowifxdxsdmiseiceeriaaoucmgnlhaewxmbvqynulwmpepujhckhqfjdmxpuyt.html|1975-5-4|311.052004479|WebSearch.COM.AU/3.0.1|NLD|NLD-GX|Herbig-Haro|6 +156.105.11.18|1nczmzpivhbgn.html|1992-9-19|36.9747263531|Search/1.0|GLP|GLP-DJ|observations|3 +164.115.38.23|79bvcojctkaugbcterbzfykwvesklokgilbkalntvoocqqvuixunvekqjcburlbzxckxnyrjm.html|1991-4-20|267.047961774|Journster.com RSS/Atom aggregator 0.5|HKG|HKG-PK|radio|2 +179.133.2.36|12azizhsdhdgdpidjgmdeyzmfhdwsbezbeyjegcioforvxvfehjigiulqyhizmhargkwmmeartsnrosvvbdbkynawvi.html|1999-12-9|481.463770712|LeechGet 200x|SCG|SCG-XF|instruments|8 +178.107.45.18|45mbziaowxegkhzcmbsyrextgqjbyezodmqduqrqnwxydwaqytopxmidcsfbwfparfemvwdjtaiwxjnvcclaotdrmjs.html|1983-4-13|51.6686671965|IlTrovatore/1.2|HND|HND-AN|dynamics|2 +162.117.17.14|17tkabzxynnqswezhqmkvrlfycpmxqowlhgligihuwxmscmasylopwuozjawaotlwaxfggmack.html|2001-12-24|161.048060104|Mozilla/4.5 [en]C-CCK-MCD {TLC;RETAIL}|RWA|RWA-QE|rays|9 +178.119.40.7|48amqtmqxsjgrmjkszztfpegqzapidysnze.html|1987-4-3|492.988714137|Mozilla/4.0|AUT|AUT-ZR|cosmology:|8 +160.119.18.18|15yufqaoxpuqwb.html|1979-7-22|394.694548614|scooter-venus-3.0.vn|MCO|MCO-YD|outflows|1 +162.112.21.25|21boum.html|1991-2-6|165.368136543|LinkProver 2.|TCA|TCA-IS|spots|8 +176.112.31.17|20gblxgjcvpu.html|1991-8-5|78.2740990152|Mozilla/4.0|BMU|BMU-BR|masses|2 +166.130.12.13|9izokfebomgsiifyzrsepbbemutvj.html|2003-12-5|188.600736756|WWW-Mechanize/1.1|TGO|TGO-WB|bursts|5 +171.100.18.39|97sxfsgahjujwzlszmxkahyslcobrrlx.html|1985-11-21|143.277058506|Overture-WebCrawler/3.8/Fresh|SAU|SAU-KL|interferometric|5 +152.122.43.35|85zdszgzonsxkqbrkthtceiuzjsedwvghvkzvqzj.html|1989-12-1|315.628996565|moget/x.x|UMI|UMI-VU|Galaxy:|2 +157.133.36.37|15xnilzhtqjsxhhbzazrflznupllyhvdbsqjeqqyharfiyhhyhzdszrnpcyoktslljvqam.html|1990-3-20|426.498017786|PrivacyFinder/1.|UZB|UZB-ZJ|nebulae|7 +161.134.11.11|96kvrofepctfbesrphjiznjktygntkkubupsjvxyxrdzvwrkeasdobohauvueg.html|1984-6-6|280.039128409|Waypath development crawler - info at waypath dot co|IDN|IDN-BH|supergiants|6 +163.123.23.13|19rkrtwumqwmnnzisxyeesqacwolpypyxhipaejnvfzitzrlwqqbigblcqxrpnqmuybudkiyqhhjgzvdpleysg.html|1977-10-11|86.3390049695|Opera/5.0|LSO|LSO-PW|testing|7 +166.126.40.21|52ejufqiidwioozorbnsjxezfwaucndbihldnblvehdtwchoeuhoslnyioslbwmkdynrzymegpy.html|1990-10-20|125.582281932|Mozilla/4.0|BTN|BTN-HP|catalogs|9 +158.133.10.19|87nzdhsnzhkylakazmkvctgaaxtrafpxscxvjqijxthitrj.html|1982-10-5|481.583542862|larbin|GAB|GAB-CS|angular|8 +173.104.45.8|49sdptdphxjlbiwrbbrsebwqquadx.html|1981-5-2|41.3182727245|LECodeChecker/3.0 libgetdoc/1.|AUS|AUS-AV|bands|6 +160.101.31.43|6lrepnctlanokfhla.html|1973-9-7|133.29867101|sogou develop spide|SWE|SWE-TM|time|5 +150.127.33.8|22oeawpxhqahkvtaecwp.html|1999-3-16|398.882494477|W3C-WebCon/5.x.x libwww/5.x.|ISR|ISR-DY|history|1 +154.114.47.36|2mzzsgievabpkaoqegadbbjxwkutdisnvrmox.html|1981-7-24|332.760102125|mammoth/1.0|AUT|AUT-ZR|FUNCTION|3 +155.108.15.24|22beewtbnpw.html|1996-6-7|393.470347637|Scrubby/3.0|ABW|ABW-NB|horizontal-branch|4 +177.120.40.39|48itvyjulckeddslsuayoguojzhvqvmfgvyctiwflhj.html|1977-8-12|239.601807636|webmeasurement-bot, http://rvs.informatik.uni-leipzig.d|WSM|WSM-UF|are|3 +179.123.41.31|46eppnympstjuhivvpritvotqmivgsfmdkbtxafns.html|2001-11-26|258.55616439|Mozilla/2.0|SYR|SYR-XP|photometric|1 +175.100.9.4|32fjrnrlabonc.html|1988-10-22|344.394849153|Snapbot/1.|GUF|GUF-KP|acceleration|2 +155.126.7.17|72wufwnsdsqncftnvdcunnknzqnaiyflmcgsytkbmbpogicblew.html|1981-12-5|398.334494319|UKWizz/Nutch-0.8.1|NIC|NIC-JP|Kuiper|4 +150.118.20.31|1mbyargbxtnjtivflxzzredcfbtehxbxjcwkucmrwaaqiwvutuulzxnezhi.html|1982-8-27|168.936669894|Mozilla/4.0|IRL|IRL-NN|cataclysmic|5 +177.116.39.36|84maivbmcqggefkjtsde.html|1982-6-11|88.121669797|Mozilla/4.0|ARE|ARE-MX|instruments|1 +168.119.19.26|73vhjursdvxateuvrxsspwwfdbsoqfegeannuegyadzuitparisgfomiqfxhkcnocacxfivfmuzuopvfynmdcyl.html|1991-11-17|397.829289621|webbandit/4.xx.|NIC|NIC-JP|dust|2 +154.100.36.32|57rylepuglpfqvjwkxgrtftvqkjzjwsznjyzontuzizqdimofsfzxzuojeot.html|1999-1-5|334.714055649|RRC|GTM|GTM-VH|blue|7 +153.112.2.11|6pkwxtlgkkxoqtxpgrullqxjauquvmlkcwhzpsgzdeotymieddqpu.html|1975-8-6|348.218411093|Wotbox/alpha0.6|MNP|MNP-UD|supernovae:|6 +150.107.15.22|53gohsgrvrjgfptttlpfipgsnijsrhxsyeggwnysfhykxrdqdsvlicdwkmpcumut.html|1978-8-2|355.771603423|Mozilla/3.0|DEU|DEU-PU|stars|4 +150.126.27.44|0rgxbnwiqebsmszpkvfpxvhkleebngzxxgvzt.html|1989-5-18|467.800755054|Mozilla/3.01|ZWE|ZWE-TS|system|3 +151.101.32.3|34btbqii.html|1998-8-1|131.055972797|Orca Browser|THA|THA-FO|late-type|5 diff --git data/files/binary.txt data/files/binary.txt new file mode 100644 index 0000000..c6fbdee --- /dev/null +++ data/files/binary.txt @@ -0,0 +1,10 @@ +the quick brown fox jumped over the lazy little dog +today is nice outside +the quick brown fox jumped over the lazy little dog + +wikipedia is a great source of information +the quick brown fox jumped over the lazy little dog + +estimating the number of distinct values is a hard problem + +the quick brown fox jumped over the lazy little dog diff --git data/files/bool.txt data/files/bool.txt new file mode 100644 index 0000000..065359b --- /dev/null +++ data/files/bool.txt @@ -0,0 +1,33 @@ +true +false +true +true +true +false +false +false +false +true +true +true +true +false + +false +true +true +false +false +false +false +false +false +false +false +true +false +false +false +true +true +false diff --git data/files/double.txt data/files/double.txt new file mode 100644 index 0000000..66c030b --- /dev/null +++ data/files/double.txt @@ -0,0 +1,16 @@ +55.33 +44.2 +435.33 +324.33 +324.33 +44.2 +55.3 +55.3 +0.0 + +66.4 +23.22 +-87.2 + +33.44 +55.3 diff --git data/files/employee.dat data/files/employee.dat new file mode 100644 index 0000000..1c1d342 --- /dev/null +++ data/files/employee.dat @@ -0,0 +1,12 @@ +16|john +17|robert +18|andrew +19|katty +21|tom +22|tim +23|james +24|paul +27|edward +29|alan +31|kerry +34|terri diff --git data/files/employee2.dat data/files/employee2.dat new file mode 100644 index 0000000..b70b2dd --- /dev/null +++ data/files/employee2.dat @@ -0,0 +1,8 @@ +16|john +17|robert +18|andrew +19|katty +27|edward +29|alan +31|kerry + diff --git data/files/int.txt data/files/int.txt new file mode 100644 index 0000000..9553ed2 --- /dev/null +++ data/files/int.txt @@ -0,0 +1,12 @@ +4 +252 +233 + +343 +43 +45 +344 +22 +54 +8 +13 diff --git ivy/libraries.properties ivy/libraries.properties index 7ac6778..2794049 100644 --- ivy/libraries.properties +++ ivy/libraries.properties @@ -64,3 +64,4 @@ slf4j-api.version=1.6.1 slf4j-log4j12.version=1.6.1 velocity.version=1.5 zookeeper.version=3.4.3 +javolution.version=5.5.1 diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift index d4fad72..7230107 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -194,6 +194,67 @@ struct Index { 10: bool deferredRebuild } +// column statistics +struct BooleanColumnStatsData { +1: required i64 numTrues, +2: required i64 numFalses, +3: required i64 numNulls +} + +struct DoubleColumnStatsData { +1: required double lowValue, +2: required double highValue, +3: required i64 numNulls, +4: required i64 numDVs +} + +struct LongColumnStatsData { +1: required i64 lowValue, +2: required i64 highValue, +3: required i64 numNulls, +4: required i64 numDVs +} + +struct StringColumnStatsData { +1: required i64 maxColLen, +2: required double avgColLen, +3: required i64 numNulls, +4: required i64 numDVs +} + +struct BinaryColumnStatsData { +1: required i64 maxColLen, +2: required double avgColLen, +3: required i64 numNulls +} + +union ColumnStatisticsData { +1: BooleanColumnStatsData booleanStats, +2: LongColumnStatsData longStats, +3: DoubleColumnStatsData doubleStats, +4: StringColumnStatsData stringStats, +5: BinaryColumnStatsData binaryStats +} + +struct ColumnStatisticsObj { +1: required string colName, +2: required string colType, +3: required ColumnStatisticsData statsData +} + +struct ColumnStatisticsDesc { +1: required bool isTblLevel, +2: required string dbName, +3: required string tableName, +4: optional string partName, +5: optional i64 lastAnalyzed +} + +struct ColumnStatistics { +1: required ColumnStatisticsDesc statsDesc, +2: required list statsObj; +} + // schema of the table/query results etc. struct Schema { // column names, types, comments @@ -253,6 +314,10 @@ exception ConfigValSecurityException { 1: string message } +exception InvalidInputException { + 1: string message +} + /** * This interface is live. */ @@ -472,6 +537,37 @@ service ThriftHiveMetastore extends fb303.FacebookService list get_index_names(1:string db_name, 2:string tbl_name, 3:i16 max_indexes=-1) throws(1:MetaException o2) + // column statistics interfaces + + // update APIs persist the column statistics object(s) that are passed in. If statistics already + // exists for one or more columns, the existing statistics will be overwritten. The update APIs + // validate that the dbName, tableName, partName, colName[] passed in as part of the ColumnStatistics + // struct are valid, throws InvalidInputException/NoSuchObjectException if found to be invalid + bool update_table_column_statistics(1:ColumnStatistics stats_obj) throws (1:NoSuchObjectException o1, + 2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4) + bool update_partition_column_statistics(1:ColumnStatistics stats_obj) throws (1:NoSuchObjectException o1, + 2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4) + + // get APIs return the column statistics corresponding to db_name, tbl_name, [part_name], col_name if + // such statistics exists. If the required statistics doesn't exist, get APIs throw NoSuchObjectException + // For instance, if get_table_column_statistics is called on a partitioned table for which only + // partition level column stats exist, get_table_column_statistics will throw NoSuchObjectException + ColumnStatistics get_table_column_statistics(1:string db_name, 2:string tbl_name, 3:string col_name) throws + (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidInputException o3, 4:InvalidObjectException o4) + ColumnStatistics get_partition_column_statistics(1:string db_name, 2:string tbl_name, 3:string part_name, + 4:string col_name) throws (1:NoSuchObjectException o1, 2:MetaException o2, + 3:InvalidInputException o3, 4:InvalidObjectException o4) + + // delete APIs attempt to delete column statistics, if found, associated with a given db_name, tbl_name, [part_name] + // and col_name. If the delete API doesn't find the statistics record in the metastore, throws NoSuchObjectException + // Delete API validates the input and if the input is invalid throws InvalidInputException/InvalidObjectException. + bool delete_partition_column_statistics(1:string db_name, 2:string tbl_name, 3:string part_name, 4:string col_name) throws + (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidObjectException o3, + 4:InvalidInputException o4) + bool delete_table_column_statistics(1:string db_name, 2:string tbl_name, 3:string col_name) throws + (1:NoSuchObjectException o1, 2:MetaException o2, 3:InvalidObjectException o3, + 4:InvalidInputException o4) + //authorization privileges bool create_role(1:Role role) throws(1:MetaException o1) diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp index 5efad1b..b8e3ce9 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp @@ -715,14 +715,14 @@ uint32_t ThriftHiveMetastore_get_databases_result::read(::apache::thrift::protoc if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size195; - ::apache::thrift::protocol::TType _etype198; - iprot->readListBegin(_etype198, _size195); - this->success.resize(_size195); - uint32_t _i199; - for (_i199 = 0; _i199 < _size195; ++_i199) + uint32_t _size201; + ::apache::thrift::protocol::TType _etype204; + iprot->readListBegin(_etype204, _size201); + this->success.resize(_size201); + uint32_t _i205; + for (_i205 = 0; _i205 < _size201; ++_i205) { - xfer += iprot->readString(this->success[_i199]); + xfer += iprot->readString(this->success[_i205]); } iprot->readListEnd(); } @@ -761,10 +761,10 @@ uint32_t ThriftHiveMetastore_get_databases_result::write(::apache::thrift::proto xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter200; - for (_iter200 = this->success.begin(); _iter200 != this->success.end(); ++_iter200) + std::vector ::const_iterator _iter206; + for (_iter206 = this->success.begin(); _iter206 != this->success.end(); ++_iter206) { - xfer += oprot->writeString((*_iter200)); + xfer += oprot->writeString((*_iter206)); } xfer += oprot->writeListEnd(); } @@ -803,14 +803,14 @@ uint32_t ThriftHiveMetastore_get_databases_presult::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size201; - ::apache::thrift::protocol::TType _etype204; - iprot->readListBegin(_etype204, _size201); - (*(this->success)).resize(_size201); - uint32_t _i205; - for (_i205 = 0; _i205 < _size201; ++_i205) + uint32_t _size207; + ::apache::thrift::protocol::TType _etype210; + iprot->readListBegin(_etype210, _size207); + (*(this->success)).resize(_size207); + uint32_t _i211; + for (_i211 = 0; _i211 < _size207; ++_i211) { - xfer += iprot->readString((*(this->success))[_i205]); + xfer += iprot->readString((*(this->success))[_i211]); } iprot->readListEnd(); } @@ -911,14 +911,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::read(::apache::thrift::pr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size206; - ::apache::thrift::protocol::TType _etype209; - iprot->readListBegin(_etype209, _size206); - this->success.resize(_size206); - uint32_t _i210; - for (_i210 = 0; _i210 < _size206; ++_i210) + uint32_t _size212; + ::apache::thrift::protocol::TType _etype215; + iprot->readListBegin(_etype215, _size212); + this->success.resize(_size212); + uint32_t _i216; + for (_i216 = 0; _i216 < _size212; ++_i216) { - xfer += iprot->readString(this->success[_i210]); + xfer += iprot->readString(this->success[_i216]); } iprot->readListEnd(); } @@ -957,10 +957,10 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::write(::apache::thrift::p xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter211; - for (_iter211 = this->success.begin(); _iter211 != this->success.end(); ++_iter211) + std::vector ::const_iterator _iter217; + for (_iter217 = this->success.begin(); _iter217 != this->success.end(); ++_iter217) { - xfer += oprot->writeString((*_iter211)); + xfer += oprot->writeString((*_iter217)); } xfer += oprot->writeListEnd(); } @@ -999,14 +999,14 @@ uint32_t ThriftHiveMetastore_get_all_databases_presult::read(::apache::thrift::p if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size212; - ::apache::thrift::protocol::TType _etype215; - iprot->readListBegin(_etype215, _size212); - (*(this->success)).resize(_size212); - uint32_t _i216; - for (_i216 = 0; _i216 < _size212; ++_i216) + uint32_t _size218; + ::apache::thrift::protocol::TType _etype221; + iprot->readListBegin(_etype221, _size218); + (*(this->success)).resize(_size218); + uint32_t _i222; + for (_i222 = 0; _i222 < _size218; ++_i222) { - xfer += iprot->readString((*(this->success))[_i216]); + xfer += iprot->readString((*(this->success))[_i222]); } iprot->readListEnd(); } @@ -1927,17 +1927,17 @@ uint32_t ThriftHiveMetastore_get_type_all_result::read(::apache::thrift::protoco if (ftype == ::apache::thrift::protocol::T_MAP) { { this->success.clear(); - uint32_t _size217; - ::apache::thrift::protocol::TType _ktype218; - ::apache::thrift::protocol::TType _vtype219; - iprot->readMapBegin(_ktype218, _vtype219, _size217); - uint32_t _i221; - for (_i221 = 0; _i221 < _size217; ++_i221) + uint32_t _size223; + ::apache::thrift::protocol::TType _ktype224; + ::apache::thrift::protocol::TType _vtype225; + iprot->readMapBegin(_ktype224, _vtype225, _size223); + uint32_t _i227; + for (_i227 = 0; _i227 < _size223; ++_i227) { - std::string _key222; - xfer += iprot->readString(_key222); - Type& _val223 = this->success[_key222]; - xfer += _val223.read(iprot); + std::string _key228; + xfer += iprot->readString(_key228); + Type& _val229 = this->success[_key228]; + xfer += _val229.read(iprot); } iprot->readMapEnd(); } @@ -1976,11 +1976,11 @@ uint32_t ThriftHiveMetastore_get_type_all_result::write(::apache::thrift::protoc xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::map ::const_iterator _iter224; - for (_iter224 = this->success.begin(); _iter224 != this->success.end(); ++_iter224) + std::map ::const_iterator _iter230; + for (_iter230 = this->success.begin(); _iter230 != this->success.end(); ++_iter230) { - xfer += oprot->writeString(_iter224->first); - xfer += _iter224->second.write(oprot); + xfer += oprot->writeString(_iter230->first); + xfer += _iter230->second.write(oprot); } xfer += oprot->writeMapEnd(); } @@ -2019,17 +2019,17 @@ uint32_t ThriftHiveMetastore_get_type_all_presult::read(::apache::thrift::protoc if (ftype == ::apache::thrift::protocol::T_MAP) { { (*(this->success)).clear(); - uint32_t _size225; - ::apache::thrift::protocol::TType _ktype226; - ::apache::thrift::protocol::TType _vtype227; - iprot->readMapBegin(_ktype226, _vtype227, _size225); - uint32_t _i229; - for (_i229 = 0; _i229 < _size225; ++_i229) + uint32_t _size231; + ::apache::thrift::protocol::TType _ktype232; + ::apache::thrift::protocol::TType _vtype233; + iprot->readMapBegin(_ktype232, _vtype233, _size231); + uint32_t _i235; + for (_i235 = 0; _i235 < _size231; ++_i235) { - std::string _key230; - xfer += iprot->readString(_key230); - Type& _val231 = (*(this->success))[_key230]; - xfer += _val231.read(iprot); + std::string _key236; + xfer += iprot->readString(_key236); + Type& _val237 = (*(this->success))[_key236]; + xfer += _val237.read(iprot); } iprot->readMapEnd(); } @@ -2158,14 +2158,14 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(::apache::thrift::protocol: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size232; - ::apache::thrift::protocol::TType _etype235; - iprot->readListBegin(_etype235, _size232); - this->success.resize(_size232); - uint32_t _i236; - for (_i236 = 0; _i236 < _size232; ++_i236) + uint32_t _size238; + ::apache::thrift::protocol::TType _etype241; + iprot->readListBegin(_etype241, _size238); + this->success.resize(_size238); + uint32_t _i242; + for (_i242 = 0; _i242 < _size238; ++_i242) { - xfer += this->success[_i236].read(iprot); + xfer += this->success[_i242].read(iprot); } iprot->readListEnd(); } @@ -2220,10 +2220,10 @@ uint32_t ThriftHiveMetastore_get_fields_result::write(::apache::thrift::protocol xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter237; - for (_iter237 = this->success.begin(); _iter237 != this->success.end(); ++_iter237) + std::vector ::const_iterator _iter243; + for (_iter243 = this->success.begin(); _iter243 != this->success.end(); ++_iter243) { - xfer += (*_iter237).write(oprot); + xfer += (*_iter243).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2270,14 +2270,14 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size238; - ::apache::thrift::protocol::TType _etype241; - iprot->readListBegin(_etype241, _size238); - (*(this->success)).resize(_size238); - uint32_t _i242; - for (_i242 = 0; _i242 < _size238; ++_i242) + uint32_t _size244; + ::apache::thrift::protocol::TType _etype247; + iprot->readListBegin(_etype247, _size244); + (*(this->success)).resize(_size244); + uint32_t _i248; + for (_i248 = 0; _i248 < _size244; ++_i248) { - xfer += (*(this->success))[_i242].read(iprot); + xfer += (*(this->success))[_i248].read(iprot); } iprot->readListEnd(); } @@ -2422,14 +2422,14 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(::apache::thrift::protocol: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size243; - ::apache::thrift::protocol::TType _etype246; - iprot->readListBegin(_etype246, _size243); - this->success.resize(_size243); - uint32_t _i247; - for (_i247 = 0; _i247 < _size243; ++_i247) + uint32_t _size249; + ::apache::thrift::protocol::TType _etype252; + iprot->readListBegin(_etype252, _size249); + this->success.resize(_size249); + uint32_t _i253; + for (_i253 = 0; _i253 < _size249; ++_i253) { - xfer += this->success[_i247].read(iprot); + xfer += this->success[_i253].read(iprot); } iprot->readListEnd(); } @@ -2484,10 +2484,10 @@ uint32_t ThriftHiveMetastore_get_schema_result::write(::apache::thrift::protocol xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter248; - for (_iter248 = this->success.begin(); _iter248 != this->success.end(); ++_iter248) + std::vector ::const_iterator _iter254; + for (_iter254 = this->success.begin(); _iter254 != this->success.end(); ++_iter254) { - xfer += (*_iter248).write(oprot); + xfer += (*_iter254).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2534,14 +2534,14 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size249; - ::apache::thrift::protocol::TType _etype252; - iprot->readListBegin(_etype252, _size249); - (*(this->success)).resize(_size249); - uint32_t _i253; - for (_i253 = 0; _i253 < _size249; ++_i253) + uint32_t _size255; + ::apache::thrift::protocol::TType _etype258; + iprot->readListBegin(_etype258, _size255); + (*(this->success)).resize(_size255); + uint32_t _i259; + for (_i259 = 0; _i259 < _size255; ++_i259) { - xfer += (*(this->success))[_i253].read(iprot); + xfer += (*(this->success))[_i259].read(iprot); } iprot->readListEnd(); } @@ -3342,14 +3342,14 @@ uint32_t ThriftHiveMetastore_get_tables_result::read(::apache::thrift::protocol: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size254; - ::apache::thrift::protocol::TType _etype257; - iprot->readListBegin(_etype257, _size254); - this->success.resize(_size254); - uint32_t _i258; - for (_i258 = 0; _i258 < _size254; ++_i258) + uint32_t _size260; + ::apache::thrift::protocol::TType _etype263; + iprot->readListBegin(_etype263, _size260); + this->success.resize(_size260); + uint32_t _i264; + for (_i264 = 0; _i264 < _size260; ++_i264) { - xfer += iprot->readString(this->success[_i258]); + xfer += iprot->readString(this->success[_i264]); } iprot->readListEnd(); } @@ -3388,10 +3388,10 @@ uint32_t ThriftHiveMetastore_get_tables_result::write(::apache::thrift::protocol xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter259; - for (_iter259 = this->success.begin(); _iter259 != this->success.end(); ++_iter259) + std::vector ::const_iterator _iter265; + for (_iter265 = this->success.begin(); _iter265 != this->success.end(); ++_iter265) { - xfer += oprot->writeString((*_iter259)); + xfer += oprot->writeString((*_iter265)); } xfer += oprot->writeListEnd(); } @@ -3430,14 +3430,14 @@ uint32_t ThriftHiveMetastore_get_tables_presult::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size260; - ::apache::thrift::protocol::TType _etype263; - iprot->readListBegin(_etype263, _size260); - (*(this->success)).resize(_size260); - uint32_t _i264; - for (_i264 = 0; _i264 < _size260; ++_i264) + uint32_t _size266; + ::apache::thrift::protocol::TType _etype269; + iprot->readListBegin(_etype269, _size266); + (*(this->success)).resize(_size266); + uint32_t _i270; + for (_i270 = 0; _i270 < _size266; ++_i270) { - xfer += iprot->readString((*(this->success))[_i264]); + xfer += iprot->readString((*(this->success))[_i270]); } iprot->readListEnd(); } @@ -3552,14 +3552,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size265; - ::apache::thrift::protocol::TType _etype268; - iprot->readListBegin(_etype268, _size265); - this->success.resize(_size265); - uint32_t _i269; - for (_i269 = 0; _i269 < _size265; ++_i269) + uint32_t _size271; + ::apache::thrift::protocol::TType _etype274; + iprot->readListBegin(_etype274, _size271); + this->success.resize(_size271); + uint32_t _i275; + for (_i275 = 0; _i275 < _size271; ++_i275) { - xfer += iprot->readString(this->success[_i269]); + xfer += iprot->readString(this->success[_i275]); } iprot->readListEnd(); } @@ -3598,10 +3598,10 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter270; - for (_iter270 = this->success.begin(); _iter270 != this->success.end(); ++_iter270) + std::vector ::const_iterator _iter276; + for (_iter276 = this->success.begin(); _iter276 != this->success.end(); ++_iter276) { - xfer += oprot->writeString((*_iter270)); + xfer += oprot->writeString((*_iter276)); } xfer += oprot->writeListEnd(); } @@ -3640,14 +3640,14 @@ uint32_t ThriftHiveMetastore_get_all_tables_presult::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size271; - ::apache::thrift::protocol::TType _etype274; - iprot->readListBegin(_etype274, _size271); - (*(this->success)).resize(_size271); - uint32_t _i275; - for (_i275 = 0; _i275 < _size271; ++_i275) + uint32_t _size277; + ::apache::thrift::protocol::TType _etype280; + iprot->readListBegin(_etype280, _size277); + (*(this->success)).resize(_size277); + uint32_t _i281; + for (_i281 = 0; _i281 < _size277; ++_i281) { - xfer += iprot->readString((*(this->success))[_i275]); + xfer += iprot->readString((*(this->success))[_i281]); } iprot->readListEnd(); } @@ -3920,14 +3920,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_LIST) { { this->tbl_names.clear(); - uint32_t _size276; - ::apache::thrift::protocol::TType _etype279; - iprot->readListBegin(_etype279, _size276); - this->tbl_names.resize(_size276); - uint32_t _i280; - for (_i280 = 0; _i280 < _size276; ++_i280) + uint32_t _size282; + ::apache::thrift::protocol::TType _etype285; + iprot->readListBegin(_etype285, _size282); + this->tbl_names.resize(_size282); + uint32_t _i286; + for (_i286 = 0; _i286 < _size282; ++_i286) { - xfer += iprot->readString(this->tbl_names[_i280]); + xfer += iprot->readString(this->tbl_names[_i286]); } iprot->readListEnd(); } @@ -3957,10 +3957,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_args::write(::apache::thr xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->tbl_names.size())); - std::vector ::const_iterator _iter281; - for (_iter281 = this->tbl_names.begin(); _iter281 != this->tbl_names.end(); ++_iter281) + std::vector ::const_iterator _iter287; + for (_iter287 = this->tbl_names.begin(); _iter287 != this->tbl_names.end(); ++_iter287) { - xfer += oprot->writeString((*_iter281)); + xfer += oprot->writeString((*_iter287)); } xfer += oprot->writeListEnd(); } @@ -3979,10 +3979,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_pargs::write(::apache::th xfer += oprot->writeFieldBegin("tbl_names", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->tbl_names)).size())); - std::vector ::const_iterator _iter282; - for (_iter282 = (*(this->tbl_names)).begin(); _iter282 != (*(this->tbl_names)).end(); ++_iter282) + std::vector ::const_iterator _iter288; + for (_iter288 = (*(this->tbl_names)).begin(); _iter288 != (*(this->tbl_names)).end(); ++_iter288) { - xfer += oprot->writeString((*_iter282)); + xfer += oprot->writeString((*_iter288)); } xfer += oprot->writeListEnd(); } @@ -4016,14 +4016,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size283; - ::apache::thrift::protocol::TType _etype286; - iprot->readListBegin(_etype286, _size283); - this->success.resize(_size283); - uint32_t _i287; - for (_i287 = 0; _i287 < _size283; ++_i287) + uint32_t _size289; + ::apache::thrift::protocol::TType _etype292; + iprot->readListBegin(_etype292, _size289); + this->success.resize(_size289); + uint32_t _i293; + for (_i293 = 0; _i293 < _size289; ++_i293) { - xfer += this->success[_i287].read(iprot); + xfer += this->success[_i293].read(iprot); } iprot->readListEnd(); } @@ -4078,10 +4078,10 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_result::write(::apache::t xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter288; - for (_iter288 = this->success.begin(); _iter288 != this->success.end(); ++_iter288) + std::vector
::const_iterator _iter294; + for (_iter294 = this->success.begin(); _iter294 != this->success.end(); ++_iter294) { - xfer += (*_iter288).write(oprot); + xfer += (*_iter294).write(oprot); } xfer += oprot->writeListEnd(); } @@ -4128,14 +4128,14 @@ uint32_t ThriftHiveMetastore_get_table_objects_by_name_presult::read(::apache::t if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size289; - ::apache::thrift::protocol::TType _etype292; - iprot->readListBegin(_etype292, _size289); - (*(this->success)).resize(_size289); - uint32_t _i293; - for (_i293 = 0; _i293 < _size289; ++_i293) + uint32_t _size295; + ::apache::thrift::protocol::TType _etype298; + iprot->readListBegin(_etype298, _size295); + (*(this->success)).resize(_size295); + uint32_t _i299; + for (_i299 = 0; _i299 < _size295; ++_i299) { - xfer += (*(this->success))[_i293].read(iprot); + xfer += (*(this->success))[_i299].read(iprot); } iprot->readListEnd(); } @@ -4294,14 +4294,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size294; - ::apache::thrift::protocol::TType _etype297; - iprot->readListBegin(_etype297, _size294); - this->success.resize(_size294); - uint32_t _i298; - for (_i298 = 0; _i298 < _size294; ++_i298) + uint32_t _size300; + ::apache::thrift::protocol::TType _etype303; + iprot->readListBegin(_etype303, _size300); + this->success.resize(_size300); + uint32_t _i304; + for (_i304 = 0; _i304 < _size300; ++_i304) { - xfer += iprot->readString(this->success[_i298]); + xfer += iprot->readString(this->success[_i304]); } iprot->readListEnd(); } @@ -4356,10 +4356,10 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_result::write(::apache::t xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter299; - for (_iter299 = this->success.begin(); _iter299 != this->success.end(); ++_iter299) + std::vector ::const_iterator _iter305; + for (_iter305 = this->success.begin(); _iter305 != this->success.end(); ++_iter305) { - xfer += oprot->writeString((*_iter299)); + xfer += oprot->writeString((*_iter305)); } xfer += oprot->writeListEnd(); } @@ -4406,14 +4406,14 @@ uint32_t ThriftHiveMetastore_get_table_names_by_filter_presult::read(::apache::t if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size300; - ::apache::thrift::protocol::TType _etype303; - iprot->readListBegin(_etype303, _size300); - (*(this->success)).resize(_size300); - uint32_t _i304; - for (_i304 = 0; _i304 < _size300; ++_i304) + uint32_t _size306; + ::apache::thrift::protocol::TType _etype309; + iprot->readListBegin(_etype309, _size306); + (*(this->success)).resize(_size306); + uint32_t _i310; + for (_i310 = 0; _i310 < _size306; ++_i310) { - xfer += iprot->readString((*(this->success))[_i304]); + xfer += iprot->readString((*(this->success))[_i310]); } iprot->readListEnd(); } @@ -5358,14 +5358,14 @@ uint32_t ThriftHiveMetastore_add_partitions_args::read(::apache::thrift::protoco if (ftype == ::apache::thrift::protocol::T_LIST) { { this->new_parts.clear(); - uint32_t _size305; - ::apache::thrift::protocol::TType _etype308; - iprot->readListBegin(_etype308, _size305); - this->new_parts.resize(_size305); - uint32_t _i309; - for (_i309 = 0; _i309 < _size305; ++_i309) + uint32_t _size311; + ::apache::thrift::protocol::TType _etype314; + iprot->readListBegin(_etype314, _size311); + this->new_parts.resize(_size311); + uint32_t _i315; + for (_i315 = 0; _i315 < _size311; ++_i315) { - xfer += this->new_parts[_i309].read(iprot); + xfer += this->new_parts[_i315].read(iprot); } iprot->readListEnd(); } @@ -5392,10 +5392,10 @@ uint32_t ThriftHiveMetastore_add_partitions_args::write(::apache::thrift::protoc xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); - std::vector ::const_iterator _iter310; - for (_iter310 = this->new_parts.begin(); _iter310 != this->new_parts.end(); ++_iter310) + std::vector ::const_iterator _iter316; + for (_iter316 = this->new_parts.begin(); _iter316 != this->new_parts.end(); ++_iter316) { - xfer += (*_iter310).write(oprot); + xfer += (*_iter316).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5411,10 +5411,10 @@ uint32_t ThriftHiveMetastore_add_partitions_pargs::write(::apache::thrift::proto xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); - std::vector ::const_iterator _iter311; - for (_iter311 = (*(this->new_parts)).begin(); _iter311 != (*(this->new_parts)).end(); ++_iter311) + std::vector ::const_iterator _iter317; + for (_iter317 = (*(this->new_parts)).begin(); _iter317 != (*(this->new_parts)).end(); ++_iter317) { - xfer += (*_iter311).write(oprot); + xfer += (*_iter317).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5620,14 +5620,14 @@ uint32_t ThriftHiveMetastore_append_partition_args::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size312; - ::apache::thrift::protocol::TType _etype315; - iprot->readListBegin(_etype315, _size312); - this->part_vals.resize(_size312); - uint32_t _i316; - for (_i316 = 0; _i316 < _size312; ++_i316) + uint32_t _size318; + ::apache::thrift::protocol::TType _etype321; + iprot->readListBegin(_etype321, _size318); + this->part_vals.resize(_size318); + uint32_t _i322; + for (_i322 = 0; _i322 < _size318; ++_i322) { - xfer += iprot->readString(this->part_vals[_i316]); + xfer += iprot->readString(this->part_vals[_i322]); } iprot->readListEnd(); } @@ -5660,10 +5660,10 @@ uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter317; - for (_iter317 = this->part_vals.begin(); _iter317 != this->part_vals.end(); ++_iter317) + std::vector ::const_iterator _iter323; + for (_iter323 = this->part_vals.begin(); _iter323 != this->part_vals.end(); ++_iter323) { - xfer += oprot->writeString((*_iter317)); + xfer += oprot->writeString((*_iter323)); } xfer += oprot->writeListEnd(); } @@ -5685,10 +5685,10 @@ uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter318; - for (_iter318 = (*(this->part_vals)).begin(); _iter318 != (*(this->part_vals)).end(); ++_iter318) + std::vector ::const_iterator _iter324; + for (_iter324 = (*(this->part_vals)).begin(); _iter324 != (*(this->part_vals)).end(); ++_iter324) { - xfer += oprot->writeString((*_iter318)); + xfer += oprot->writeString((*_iter324)); } xfer += oprot->writeListEnd(); } @@ -6140,14 +6140,14 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(::apache::thrift::protoco if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size319; - ::apache::thrift::protocol::TType _etype322; - iprot->readListBegin(_etype322, _size319); - this->part_vals.resize(_size319); - uint32_t _i323; - for (_i323 = 0; _i323 < _size319; ++_i323) + uint32_t _size325; + ::apache::thrift::protocol::TType _etype328; + iprot->readListBegin(_etype328, _size325); + this->part_vals.resize(_size325); + uint32_t _i329; + for (_i329 = 0; _i329 < _size325; ++_i329) { - xfer += iprot->readString(this->part_vals[_i323]); + xfer += iprot->readString(this->part_vals[_i329]); } iprot->readListEnd(); } @@ -6188,10 +6188,10 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protoc xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter324; - for (_iter324 = this->part_vals.begin(); _iter324 != this->part_vals.end(); ++_iter324) + std::vector ::const_iterator _iter330; + for (_iter330 = this->part_vals.begin(); _iter330 != this->part_vals.end(); ++_iter330) { - xfer += oprot->writeString((*_iter324)); + xfer += oprot->writeString((*_iter330)); } xfer += oprot->writeListEnd(); } @@ -6216,10 +6216,10 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::proto xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter325; - for (_iter325 = (*(this->part_vals)).begin(); _iter325 != (*(this->part_vals)).end(); ++_iter325) + std::vector ::const_iterator _iter331; + for (_iter331 = (*(this->part_vals)).begin(); _iter331 != (*(this->part_vals)).end(); ++_iter331) { - xfer += oprot->writeString((*_iter325)); + xfer += oprot->writeString((*_iter331)); } xfer += oprot->writeListEnd(); } @@ -6648,14 +6648,14 @@ uint32_t ThriftHiveMetastore_get_partition_args::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size326; - ::apache::thrift::protocol::TType _etype329; - iprot->readListBegin(_etype329, _size326); - this->part_vals.resize(_size326); - uint32_t _i330; - for (_i330 = 0; _i330 < _size326; ++_i330) + uint32_t _size332; + ::apache::thrift::protocol::TType _etype335; + iprot->readListBegin(_etype335, _size332); + this->part_vals.resize(_size332); + uint32_t _i336; + for (_i336 = 0; _i336 < _size332; ++_i336) { - xfer += iprot->readString(this->part_vals[_i330]); + xfer += iprot->readString(this->part_vals[_i336]); } iprot->readListEnd(); } @@ -6688,10 +6688,10 @@ uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protoco xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter331; - for (_iter331 = this->part_vals.begin(); _iter331 != this->part_vals.end(); ++_iter331) + std::vector ::const_iterator _iter337; + for (_iter337 = this->part_vals.begin(); _iter337 != this->part_vals.end(); ++_iter337) { - xfer += oprot->writeString((*_iter331)); + xfer += oprot->writeString((*_iter337)); } xfer += oprot->writeListEnd(); } @@ -6713,10 +6713,10 @@ uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protoc xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter332; - for (_iter332 = (*(this->part_vals)).begin(); _iter332 != (*(this->part_vals)).end(); ++_iter332) + std::vector ::const_iterator _iter338; + for (_iter338 = (*(this->part_vals)).begin(); _iter338 != (*(this->part_vals)).end(); ++_iter338) { - xfer += oprot->writeString((*_iter332)); + xfer += oprot->writeString((*_iter338)); } xfer += oprot->writeListEnd(); } @@ -6902,14 +6902,14 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size333; - ::apache::thrift::protocol::TType _etype336; - iprot->readListBegin(_etype336, _size333); - this->part_vals.resize(_size333); - uint32_t _i337; - for (_i337 = 0; _i337 < _size333; ++_i337) + uint32_t _size339; + ::apache::thrift::protocol::TType _etype342; + iprot->readListBegin(_etype342, _size339); + this->part_vals.resize(_size339); + uint32_t _i343; + for (_i343 = 0; _i343 < _size339; ++_i343) { - xfer += iprot->readString(this->part_vals[_i337]); + xfer += iprot->readString(this->part_vals[_i343]); } iprot->readListEnd(); } @@ -6930,14 +6930,14 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(::apache::thrift if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size338; - ::apache::thrift::protocol::TType _etype341; - iprot->readListBegin(_etype341, _size338); - this->group_names.resize(_size338); - uint32_t _i342; - for (_i342 = 0; _i342 < _size338; ++_i342) + uint32_t _size344; + ::apache::thrift::protocol::TType _etype347; + iprot->readListBegin(_etype347, _size344); + this->group_names.resize(_size344); + uint32_t _i348; + for (_i348 = 0; _i348 < _size344; ++_i348) { - xfer += iprot->readString(this->group_names[_i342]); + xfer += iprot->readString(this->group_names[_i348]); } iprot->readListEnd(); } @@ -6970,10 +6970,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrif xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter343; - for (_iter343 = this->part_vals.begin(); _iter343 != this->part_vals.end(); ++_iter343) + std::vector ::const_iterator _iter349; + for (_iter349 = this->part_vals.begin(); _iter349 != this->part_vals.end(); ++_iter349) { - xfer += oprot->writeString((*_iter343)); + xfer += oprot->writeString((*_iter349)); } xfer += oprot->writeListEnd(); } @@ -6984,10 +6984,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(::apache::thrif xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter344; - for (_iter344 = this->group_names.begin(); _iter344 != this->group_names.end(); ++_iter344) + std::vector ::const_iterator _iter350; + for (_iter350 = this->group_names.begin(); _iter350 != this->group_names.end(); ++_iter350) { - xfer += oprot->writeString((*_iter344)); + xfer += oprot->writeString((*_iter350)); } xfer += oprot->writeListEnd(); } @@ -7009,10 +7009,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thri xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter345; - for (_iter345 = (*(this->part_vals)).begin(); _iter345 != (*(this->part_vals)).end(); ++_iter345) + std::vector ::const_iterator _iter351; + for (_iter351 = (*(this->part_vals)).begin(); _iter351 != (*(this->part_vals)).end(); ++_iter351) { - xfer += oprot->writeString((*_iter345)); + xfer += oprot->writeString((*_iter351)); } xfer += oprot->writeListEnd(); } @@ -7023,10 +7023,10 @@ uint32_t ThriftHiveMetastore_get_partition_with_auth_pargs::write(::apache::thri xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter346; - for (_iter346 = (*(this->group_names)).begin(); _iter346 != (*(this->group_names)).end(); ++_iter346) + std::vector ::const_iterator _iter352; + for (_iter352 = (*(this->group_names)).begin(); _iter352 != (*(this->group_names)).end(); ++_iter352) { - xfer += oprot->writeString((*_iter346)); + xfer += oprot->writeString((*_iter352)); } xfer += oprot->writeListEnd(); } @@ -7512,14 +7512,14 @@ uint32_t ThriftHiveMetastore_get_partitions_result::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size347; - ::apache::thrift::protocol::TType _etype350; - iprot->readListBegin(_etype350, _size347); - this->success.resize(_size347); - uint32_t _i351; - for (_i351 = 0; _i351 < _size347; ++_i351) + uint32_t _size353; + ::apache::thrift::protocol::TType _etype356; + iprot->readListBegin(_etype356, _size353); + this->success.resize(_size353); + uint32_t _i357; + for (_i357 = 0; _i357 < _size353; ++_i357) { - xfer += this->success[_i351].read(iprot); + xfer += this->success[_i357].read(iprot); } iprot->readListEnd(); } @@ -7566,10 +7566,10 @@ uint32_t ThriftHiveMetastore_get_partitions_result::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter352; - for (_iter352 = this->success.begin(); _iter352 != this->success.end(); ++_iter352) + std::vector ::const_iterator _iter358; + for (_iter358 = this->success.begin(); _iter358 != this->success.end(); ++_iter358) { - xfer += (*_iter352).write(oprot); + xfer += (*_iter358).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7612,14 +7612,14 @@ uint32_t ThriftHiveMetastore_get_partitions_presult::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size353; - ::apache::thrift::protocol::TType _etype356; - iprot->readListBegin(_etype356, _size353); - (*(this->success)).resize(_size353); - uint32_t _i357; - for (_i357 = 0; _i357 < _size353; ++_i357) + uint32_t _size359; + ::apache::thrift::protocol::TType _etype362; + iprot->readListBegin(_etype362, _size359); + (*(this->success)).resize(_size359); + uint32_t _i363; + for (_i363 = 0; _i363 < _size359; ++_i363) { - xfer += (*(this->success))[_i357].read(iprot); + xfer += (*(this->success))[_i363].read(iprot); } iprot->readListEnd(); } @@ -7712,14 +7712,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::read(::apache::thrif if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size358; - ::apache::thrift::protocol::TType _etype361; - iprot->readListBegin(_etype361, _size358); - this->group_names.resize(_size358); - uint32_t _i362; - for (_i362 = 0; _i362 < _size358; ++_i362) + uint32_t _size364; + ::apache::thrift::protocol::TType _etype367; + iprot->readListBegin(_etype367, _size364); + this->group_names.resize(_size364); + uint32_t _i368; + for (_i368 = 0; _i368 < _size364; ++_i368) { - xfer += iprot->readString(this->group_names[_i362]); + xfer += iprot->readString(this->group_names[_i368]); } iprot->readListEnd(); } @@ -7758,10 +7758,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(::apache::thri xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter363; - for (_iter363 = this->group_names.begin(); _iter363 != this->group_names.end(); ++_iter363) + std::vector ::const_iterator _iter369; + for (_iter369 = this->group_names.begin(); _iter369 != this->group_names.end(); ++_iter369) { - xfer += oprot->writeString((*_iter363)); + xfer += oprot->writeString((*_iter369)); } xfer += oprot->writeListEnd(); } @@ -7789,10 +7789,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_pargs::write(::apache::thr xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter364; - for (_iter364 = (*(this->group_names)).begin(); _iter364 != (*(this->group_names)).end(); ++_iter364) + std::vector ::const_iterator _iter370; + for (_iter370 = (*(this->group_names)).begin(); _iter370 != (*(this->group_names)).end(); ++_iter370) { - xfer += oprot->writeString((*_iter364)); + xfer += oprot->writeString((*_iter370)); } xfer += oprot->writeListEnd(); } @@ -7826,14 +7826,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::read(::apache::thr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size365; - ::apache::thrift::protocol::TType _etype368; - iprot->readListBegin(_etype368, _size365); - this->success.resize(_size365); - uint32_t _i369; - for (_i369 = 0; _i369 < _size365; ++_i369) + uint32_t _size371; + ::apache::thrift::protocol::TType _etype374; + iprot->readListBegin(_etype374, _size371); + this->success.resize(_size371); + uint32_t _i375; + for (_i375 = 0; _i375 < _size371; ++_i375) { - xfer += this->success[_i369].read(iprot); + xfer += this->success[_i375].read(iprot); } iprot->readListEnd(); } @@ -7880,10 +7880,10 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::write(::apache::th xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter370; - for (_iter370 = this->success.begin(); _iter370 != this->success.end(); ++_iter370) + std::vector ::const_iterator _iter376; + for (_iter376 = this->success.begin(); _iter376 != this->success.end(); ++_iter376) { - xfer += (*_iter370).write(oprot); + xfer += (*_iter376).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7926,14 +7926,14 @@ uint32_t ThriftHiveMetastore_get_partitions_with_auth_presult::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size371; - ::apache::thrift::protocol::TType _etype374; - iprot->readListBegin(_etype374, _size371); - (*(this->success)).resize(_size371); - uint32_t _i375; - for (_i375 = 0; _i375 < _size371; ++_i375) + uint32_t _size377; + ::apache::thrift::protocol::TType _etype380; + iprot->readListBegin(_etype380, _size377); + (*(this->success)).resize(_size377); + uint32_t _i381; + for (_i381 = 0; _i381 < _size377; ++_i381) { - xfer += (*(this->success))[_i375].read(iprot); + xfer += (*(this->success))[_i381].read(iprot); } iprot->readListEnd(); } @@ -8084,14 +8084,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::read(::apache::thrift:: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size376; - ::apache::thrift::protocol::TType _etype379; - iprot->readListBegin(_etype379, _size376); - this->success.resize(_size376); - uint32_t _i380; - for (_i380 = 0; _i380 < _size376; ++_i380) + uint32_t _size382; + ::apache::thrift::protocol::TType _etype385; + iprot->readListBegin(_etype385, _size382); + this->success.resize(_size382); + uint32_t _i386; + for (_i386 = 0; _i386 < _size382; ++_i386) { - xfer += iprot->readString(this->success[_i380]); + xfer += iprot->readString(this->success[_i386]); } iprot->readListEnd(); } @@ -8130,10 +8130,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::write(::apache::thrift: xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter381; - for (_iter381 = this->success.begin(); _iter381 != this->success.end(); ++_iter381) + std::vector ::const_iterator _iter387; + for (_iter387 = this->success.begin(); _iter387 != this->success.end(); ++_iter387) { - xfer += oprot->writeString((*_iter381)); + xfer += oprot->writeString((*_iter387)); } xfer += oprot->writeListEnd(); } @@ -8172,14 +8172,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_presult::read(::apache::thrift: if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size382; - ::apache::thrift::protocol::TType _etype385; - iprot->readListBegin(_etype385, _size382); - (*(this->success)).resize(_size382); - uint32_t _i386; - for (_i386 = 0; _i386 < _size382; ++_i386) + uint32_t _size388; + ::apache::thrift::protocol::TType _etype391; + iprot->readListBegin(_etype391, _size388); + (*(this->success)).resize(_size388); + uint32_t _i392; + for (_i392 = 0; _i392 < _size388; ++_i392) { - xfer += iprot->readString((*(this->success))[_i386]); + xfer += iprot->readString((*(this->success))[_i392]); } iprot->readListEnd(); } @@ -8248,14 +8248,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size387; - ::apache::thrift::protocol::TType _etype390; - iprot->readListBegin(_etype390, _size387); - this->part_vals.resize(_size387); - uint32_t _i391; - for (_i391 = 0; _i391 < _size387; ++_i391) + uint32_t _size393; + ::apache::thrift::protocol::TType _etype396; + iprot->readListBegin(_etype396, _size393); + this->part_vals.resize(_size393); + uint32_t _i397; + for (_i397 = 0; _i397 < _size393; ++_i397) { - xfer += iprot->readString(this->part_vals[_i391]); + xfer += iprot->readString(this->part_vals[_i397]); } iprot->readListEnd(); } @@ -8296,10 +8296,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter392; - for (_iter392 = this->part_vals.begin(); _iter392 != this->part_vals.end(); ++_iter392) + std::vector ::const_iterator _iter398; + for (_iter398 = this->part_vals.begin(); _iter398 != this->part_vals.end(); ++_iter398) { - xfer += oprot->writeString((*_iter392)); + xfer += oprot->writeString((*_iter398)); } xfer += oprot->writeListEnd(); } @@ -8324,10 +8324,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::pr xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter393; - for (_iter393 = (*(this->part_vals)).begin(); _iter393 != (*(this->part_vals)).end(); ++_iter393) + std::vector ::const_iterator _iter399; + for (_iter399 = (*(this->part_vals)).begin(); _iter399 != (*(this->part_vals)).end(); ++_iter399) { - xfer += oprot->writeString((*_iter393)); + xfer += oprot->writeString((*_iter399)); } xfer += oprot->writeListEnd(); } @@ -8364,14 +8364,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(::apache::thrift::pr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size394; - ::apache::thrift::protocol::TType _etype397; - iprot->readListBegin(_etype397, _size394); - this->success.resize(_size394); - uint32_t _i398; - for (_i398 = 0; _i398 < _size394; ++_i398) + uint32_t _size400; + ::apache::thrift::protocol::TType _etype403; + iprot->readListBegin(_etype403, _size400); + this->success.resize(_size400); + uint32_t _i404; + for (_i404 = 0; _i404 < _size400; ++_i404) { - xfer += this->success[_i398].read(iprot); + xfer += this->success[_i404].read(iprot); } iprot->readListEnd(); } @@ -8418,10 +8418,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(::apache::thrift::p xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter399; - for (_iter399 = this->success.begin(); _iter399 != this->success.end(); ++_iter399) + std::vector ::const_iterator _iter405; + for (_iter405 = this->success.begin(); _iter405 != this->success.end(); ++_iter405) { - xfer += (*_iter399).write(oprot); + xfer += (*_iter405).write(oprot); } xfer += oprot->writeListEnd(); } @@ -8464,14 +8464,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(::apache::thrift::p if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size400; - ::apache::thrift::protocol::TType _etype403; - iprot->readListBegin(_etype403, _size400); - (*(this->success)).resize(_size400); - uint32_t _i404; - for (_i404 = 0; _i404 < _size400; ++_i404) + uint32_t _size406; + ::apache::thrift::protocol::TType _etype409; + iprot->readListBegin(_etype409, _size406); + (*(this->success)).resize(_size406); + uint32_t _i410; + for (_i410 = 0; _i410 < _size406; ++_i410) { - xfer += (*(this->success))[_i404].read(iprot); + xfer += (*(this->success))[_i410].read(iprot); } iprot->readListEnd(); } @@ -8548,14 +8548,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size405; - ::apache::thrift::protocol::TType _etype408; - iprot->readListBegin(_etype408, _size405); - this->part_vals.resize(_size405); - uint32_t _i409; - for (_i409 = 0; _i409 < _size405; ++_i409) + uint32_t _size411; + ::apache::thrift::protocol::TType _etype414; + iprot->readListBegin(_etype414, _size411); + this->part_vals.resize(_size411); + uint32_t _i415; + for (_i415 = 0; _i415 < _size411; ++_i415) { - xfer += iprot->readString(this->part_vals[_i409]); + xfer += iprot->readString(this->part_vals[_i415]); } iprot->readListEnd(); } @@ -8584,14 +8584,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { this->group_names.clear(); - uint32_t _size410; - ::apache::thrift::protocol::TType _etype413; - iprot->readListBegin(_etype413, _size410); - this->group_names.resize(_size410); - uint32_t _i414; - for (_i414 = 0; _i414 < _size410; ++_i414) + uint32_t _size416; + ::apache::thrift::protocol::TType _etype419; + iprot->readListBegin(_etype419, _size416); + this->group_names.resize(_size416); + uint32_t _i420; + for (_i420 = 0; _i420 < _size416; ++_i420) { - xfer += iprot->readString(this->group_names[_i414]); + xfer += iprot->readString(this->group_names[_i420]); } iprot->readListEnd(); } @@ -8624,10 +8624,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::t xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter415; - for (_iter415 = this->part_vals.begin(); _iter415 != this->part_vals.end(); ++_iter415) + std::vector ::const_iterator _iter421; + for (_iter421 = this->part_vals.begin(); _iter421 != this->part_vals.end(); ++_iter421) { - xfer += oprot->writeString((*_iter415)); + xfer += oprot->writeString((*_iter421)); } xfer += oprot->writeListEnd(); } @@ -8641,10 +8641,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(::apache::t xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter416; - for (_iter416 = this->group_names.begin(); _iter416 != this->group_names.end(); ++_iter416) + std::vector ::const_iterator _iter422; + for (_iter422 = this->group_names.begin(); _iter422 != this->group_names.end(); ++_iter422) { - xfer += oprot->writeString((*_iter416)); + xfer += oprot->writeString((*_iter422)); } xfer += oprot->writeListEnd(); } @@ -8666,10 +8666,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::write(::apache:: xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter417; - for (_iter417 = (*(this->part_vals)).begin(); _iter417 != (*(this->part_vals)).end(); ++_iter417) + std::vector ::const_iterator _iter423; + for (_iter423 = (*(this->part_vals)).begin(); _iter423 != (*(this->part_vals)).end(); ++_iter423) { - xfer += oprot->writeString((*_iter417)); + xfer += oprot->writeString((*_iter423)); } xfer += oprot->writeListEnd(); } @@ -8683,10 +8683,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_pargs::write(::apache:: xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 6); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter418; - for (_iter418 = (*(this->group_names)).begin(); _iter418 != (*(this->group_names)).end(); ++_iter418) + std::vector ::const_iterator _iter424; + for (_iter424 = (*(this->group_names)).begin(); _iter424 != (*(this->group_names)).end(); ++_iter424) { - xfer += oprot->writeString((*_iter418)); + xfer += oprot->writeString((*_iter424)); } xfer += oprot->writeListEnd(); } @@ -8720,14 +8720,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::read(::apache:: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size419; - ::apache::thrift::protocol::TType _etype422; - iprot->readListBegin(_etype422, _size419); - this->success.resize(_size419); - uint32_t _i423; - for (_i423 = 0; _i423 < _size419; ++_i423) + uint32_t _size425; + ::apache::thrift::protocol::TType _etype428; + iprot->readListBegin(_etype428, _size425); + this->success.resize(_size425); + uint32_t _i429; + for (_i429 = 0; _i429 < _size425; ++_i429) { - xfer += this->success[_i423].read(iprot); + xfer += this->success[_i429].read(iprot); } iprot->readListEnd(); } @@ -8774,10 +8774,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::write(::apache: xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter424; - for (_iter424 = this->success.begin(); _iter424 != this->success.end(); ++_iter424) + std::vector ::const_iterator _iter430; + for (_iter430 = this->success.begin(); _iter430 != this->success.end(); ++_iter430) { - xfer += (*_iter424).write(oprot); + xfer += (*_iter430).write(oprot); } xfer += oprot->writeListEnd(); } @@ -8820,14 +8820,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_presult::read(::apache: if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size425; - ::apache::thrift::protocol::TType _etype428; - iprot->readListBegin(_etype428, _size425); - (*(this->success)).resize(_size425); - uint32_t _i429; - for (_i429 = 0; _i429 < _size425; ++_i429) + uint32_t _size431; + ::apache::thrift::protocol::TType _etype434; + iprot->readListBegin(_etype434, _size431); + (*(this->success)).resize(_size431); + uint32_t _i435; + for (_i435 = 0; _i435 < _size431; ++_i435) { - xfer += (*(this->success))[_i429].read(iprot); + xfer += (*(this->success))[_i435].read(iprot); } iprot->readListEnd(); } @@ -8904,14 +8904,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(::apache::thrift: if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size430; - ::apache::thrift::protocol::TType _etype433; - iprot->readListBegin(_etype433, _size430); - this->part_vals.resize(_size430); - uint32_t _i434; - for (_i434 = 0; _i434 < _size430; ++_i434) + uint32_t _size436; + ::apache::thrift::protocol::TType _etype439; + iprot->readListBegin(_etype439, _size436); + this->part_vals.resize(_size436); + uint32_t _i440; + for (_i440 = 0; _i440 < _size436; ++_i440) { - xfer += iprot->readString(this->part_vals[_i434]); + xfer += iprot->readString(this->part_vals[_i440]); } iprot->readListEnd(); } @@ -8952,10 +8952,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(::apache::thrift xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter435; - for (_iter435 = this->part_vals.begin(); _iter435 != this->part_vals.end(); ++_iter435) + std::vector ::const_iterator _iter441; + for (_iter441 = this->part_vals.begin(); _iter441 != this->part_vals.end(); ++_iter441) { - xfer += oprot->writeString((*_iter435)); + xfer += oprot->writeString((*_iter441)); } xfer += oprot->writeListEnd(); } @@ -8980,10 +8980,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(::apache::thrif xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter436; - for (_iter436 = (*(this->part_vals)).begin(); _iter436 != (*(this->part_vals)).end(); ++_iter436) + std::vector ::const_iterator _iter442; + for (_iter442 = (*(this->part_vals)).begin(); _iter442 != (*(this->part_vals)).end(); ++_iter442) { - xfer += oprot->writeString((*_iter436)); + xfer += oprot->writeString((*_iter442)); } xfer += oprot->writeListEnd(); } @@ -9020,14 +9020,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(::apache::thrif if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size437; - ::apache::thrift::protocol::TType _etype440; - iprot->readListBegin(_etype440, _size437); - this->success.resize(_size437); - uint32_t _i441; - for (_i441 = 0; _i441 < _size437; ++_i441) + uint32_t _size443; + ::apache::thrift::protocol::TType _etype446; + iprot->readListBegin(_etype446, _size443); + this->success.resize(_size443); + uint32_t _i447; + for (_i447 = 0; _i447 < _size443; ++_i447) { - xfer += iprot->readString(this->success[_i441]); + xfer += iprot->readString(this->success[_i447]); } iprot->readListEnd(); } @@ -9074,10 +9074,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(::apache::thri xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter442; - for (_iter442 = this->success.begin(); _iter442 != this->success.end(); ++_iter442) + std::vector ::const_iterator _iter448; + for (_iter448 = this->success.begin(); _iter448 != this->success.end(); ++_iter448) { - xfer += oprot->writeString((*_iter442)); + xfer += oprot->writeString((*_iter448)); } xfer += oprot->writeListEnd(); } @@ -9120,14 +9120,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size443; - ::apache::thrift::protocol::TType _etype446; - iprot->readListBegin(_etype446, _size443); - (*(this->success)).resize(_size443); - uint32_t _i447; - for (_i447 = 0; _i447 < _size443; ++_i447) + uint32_t _size449; + ::apache::thrift::protocol::TType _etype452; + iprot->readListBegin(_etype452, _size449); + (*(this->success)).resize(_size449); + uint32_t _i453; + for (_i453 = 0; _i453 < _size449; ++_i453) { - xfer += iprot->readString((*(this->success))[_i447]); + xfer += iprot->readString((*(this->success))[_i453]); } iprot->readListEnd(); } @@ -9292,14 +9292,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(::apache::thr if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size448; - ::apache::thrift::protocol::TType _etype451; - iprot->readListBegin(_etype451, _size448); - this->success.resize(_size448); - uint32_t _i452; - for (_i452 = 0; _i452 < _size448; ++_i452) + uint32_t _size454; + ::apache::thrift::protocol::TType _etype457; + iprot->readListBegin(_etype457, _size454); + this->success.resize(_size454); + uint32_t _i458; + for (_i458 = 0; _i458 < _size454; ++_i458) { - xfer += this->success[_i452].read(iprot); + xfer += this->success[_i458].read(iprot); } iprot->readListEnd(); } @@ -9346,10 +9346,10 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(::apache::th xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter453; - for (_iter453 = this->success.begin(); _iter453 != this->success.end(); ++_iter453) + std::vector ::const_iterator _iter459; + for (_iter459 = this->success.begin(); _iter459 != this->success.end(); ++_iter459) { - xfer += (*_iter453).write(oprot); + xfer += (*_iter459).write(oprot); } xfer += oprot->writeListEnd(); } @@ -9392,14 +9392,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(::apache::th if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size454; - ::apache::thrift::protocol::TType _etype457; - iprot->readListBegin(_etype457, _size454); - (*(this->success)).resize(_size454); - uint32_t _i458; - for (_i458 = 0; _i458 < _size454; ++_i458) + uint32_t _size460; + ::apache::thrift::protocol::TType _etype463; + iprot->readListBegin(_etype463, _size460); + (*(this->success)).resize(_size460); + uint32_t _i464; + for (_i464 = 0; _i464 < _size460; ++_i464) { - xfer += (*(this->success))[_i458].read(iprot); + xfer += (*(this->success))[_i464].read(iprot); } iprot->readListEnd(); } @@ -9476,14 +9476,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_args::read(::apache::thrift if (ftype == ::apache::thrift::protocol::T_LIST) { { this->names.clear(); - uint32_t _size459; - ::apache::thrift::protocol::TType _etype462; - iprot->readListBegin(_etype462, _size459); - this->names.resize(_size459); - uint32_t _i463; - for (_i463 = 0; _i463 < _size459; ++_i463) + uint32_t _size465; + ::apache::thrift::protocol::TType _etype468; + iprot->readListBegin(_etype468, _size465); + this->names.resize(_size465); + uint32_t _i469; + for (_i469 = 0; _i469 < _size465; ++_i469) { - xfer += iprot->readString(this->names[_i463]); + xfer += iprot->readString(this->names[_i469]); } iprot->readListEnd(); } @@ -9516,10 +9516,10 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_args::write(::apache::thrif xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->names.size())); - std::vector ::const_iterator _iter464; - for (_iter464 = this->names.begin(); _iter464 != this->names.end(); ++_iter464) + std::vector ::const_iterator _iter470; + for (_iter470 = this->names.begin(); _iter470 != this->names.end(); ++_iter470) { - xfer += oprot->writeString((*_iter464)); + xfer += oprot->writeString((*_iter470)); } xfer += oprot->writeListEnd(); } @@ -9541,10 +9541,10 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_pargs::write(::apache::thri xfer += oprot->writeFieldBegin("names", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->names)).size())); - std::vector ::const_iterator _iter465; - for (_iter465 = (*(this->names)).begin(); _iter465 != (*(this->names)).end(); ++_iter465) + std::vector ::const_iterator _iter471; + for (_iter471 = (*(this->names)).begin(); _iter471 != (*(this->names)).end(); ++_iter471) { - xfer += oprot->writeString((*_iter465)); + xfer += oprot->writeString((*_iter471)); } xfer += oprot->writeListEnd(); } @@ -9578,14 +9578,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_result::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size466; - ::apache::thrift::protocol::TType _etype469; - iprot->readListBegin(_etype469, _size466); - this->success.resize(_size466); - uint32_t _i470; - for (_i470 = 0; _i470 < _size466; ++_i470) + uint32_t _size472; + ::apache::thrift::protocol::TType _etype475; + iprot->readListBegin(_etype475, _size472); + this->success.resize(_size472); + uint32_t _i476; + for (_i476 = 0; _i476 < _size472; ++_i476) { - xfer += this->success[_i470].read(iprot); + xfer += this->success[_i476].read(iprot); } iprot->readListEnd(); } @@ -9632,10 +9632,10 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_result::write(::apache::thr xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter471; - for (_iter471 = this->success.begin(); _iter471 != this->success.end(); ++_iter471) + std::vector ::const_iterator _iter477; + for (_iter477 = this->success.begin(); _iter477 != this->success.end(); ++_iter477) { - xfer += (*_iter471).write(oprot); + xfer += (*_iter477).write(oprot); } xfer += oprot->writeListEnd(); } @@ -9678,14 +9678,14 @@ uint32_t ThriftHiveMetastore_get_partitions_by_names_presult::read(::apache::thr if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size472; - ::apache::thrift::protocol::TType _etype475; - iprot->readListBegin(_etype475, _size472); - (*(this->success)).resize(_size472); - uint32_t _i476; - for (_i476 = 0; _i476 < _size472; ++_i476) + uint32_t _size478; + ::apache::thrift::protocol::TType _etype481; + iprot->readListBegin(_etype481, _size478); + (*(this->success)).resize(_size478); + uint32_t _i482; + for (_i482 = 0; _i482 < _size478; ++_i482) { - xfer += (*(this->success))[_i476].read(iprot); + xfer += (*(this->success))[_i482].read(iprot); } iprot->readListEnd(); } @@ -9968,14 +9968,14 @@ uint32_t ThriftHiveMetastore_alter_partitions_args::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->new_parts.clear(); - uint32_t _size477; - ::apache::thrift::protocol::TType _etype480; - iprot->readListBegin(_etype480, _size477); - this->new_parts.resize(_size477); - uint32_t _i481; - for (_i481 = 0; _i481 < _size477; ++_i481) + uint32_t _size483; + ::apache::thrift::protocol::TType _etype486; + iprot->readListBegin(_etype486, _size483); + this->new_parts.resize(_size483); + uint32_t _i487; + for (_i487 = 0; _i487 < _size483; ++_i487) { - xfer += this->new_parts[_i481].read(iprot); + xfer += this->new_parts[_i487].read(iprot); } iprot->readListEnd(); } @@ -10008,10 +10008,10 @@ uint32_t ThriftHiveMetastore_alter_partitions_args::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->new_parts.size())); - std::vector ::const_iterator _iter482; - for (_iter482 = this->new_parts.begin(); _iter482 != this->new_parts.end(); ++_iter482) + std::vector ::const_iterator _iter488; + for (_iter488 = this->new_parts.begin(); _iter488 != this->new_parts.end(); ++_iter488) { - xfer += (*_iter482).write(oprot); + xfer += (*_iter488).write(oprot); } xfer += oprot->writeListEnd(); } @@ -10033,10 +10033,10 @@ uint32_t ThriftHiveMetastore_alter_partitions_pargs::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("new_parts", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->new_parts)).size())); - std::vector ::const_iterator _iter483; - for (_iter483 = (*(this->new_parts)).begin(); _iter483 != (*(this->new_parts)).end(); ++_iter483) + std::vector ::const_iterator _iter489; + for (_iter489 = (*(this->new_parts)).begin(); _iter489 != (*(this->new_parts)).end(); ++_iter489) { - xfer += (*_iter483).write(oprot); + xfer += (*_iter489).write(oprot); } xfer += oprot->writeListEnd(); } @@ -10422,14 +10422,14 @@ uint32_t ThriftHiveMetastore_rename_partition_args::read(::apache::thrift::proto if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size484; - ::apache::thrift::protocol::TType _etype487; - iprot->readListBegin(_etype487, _size484); - this->part_vals.resize(_size484); - uint32_t _i488; - for (_i488 = 0; _i488 < _size484; ++_i488) + uint32_t _size490; + ::apache::thrift::protocol::TType _etype493; + iprot->readListBegin(_etype493, _size490); + this->part_vals.resize(_size490); + uint32_t _i494; + for (_i494 = 0; _i494 < _size490; ++_i494) { - xfer += iprot->readString(this->part_vals[_i488]); + xfer += iprot->readString(this->part_vals[_i494]); } iprot->readListEnd(); } @@ -10470,10 +10470,10 @@ uint32_t ThriftHiveMetastore_rename_partition_args::write(::apache::thrift::prot xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::vector ::const_iterator _iter489; - for (_iter489 = this->part_vals.begin(); _iter489 != this->part_vals.end(); ++_iter489) + std::vector ::const_iterator _iter495; + for (_iter495 = this->part_vals.begin(); _iter495 != this->part_vals.end(); ++_iter495) { - xfer += oprot->writeString((*_iter489)); + xfer += oprot->writeString((*_iter495)); } xfer += oprot->writeListEnd(); } @@ -10498,10 +10498,10 @@ uint32_t ThriftHiveMetastore_rename_partition_pargs::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::vector ::const_iterator _iter490; - for (_iter490 = (*(this->part_vals)).begin(); _iter490 != (*(this->part_vals)).end(); ++_iter490) + std::vector ::const_iterator _iter496; + for (_iter496 = (*(this->part_vals)).begin(); _iter496 != (*(this->part_vals)).end(); ++_iter496) { - xfer += oprot->writeString((*_iter490)); + xfer += oprot->writeString((*_iter496)); } xfer += oprot->writeListEnd(); } @@ -10908,14 +10908,14 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(::apache::thrif if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size491; - ::apache::thrift::protocol::TType _etype494; - iprot->readListBegin(_etype494, _size491); - this->success.resize(_size491); - uint32_t _i495; - for (_i495 = 0; _i495 < _size491; ++_i495) + uint32_t _size497; + ::apache::thrift::protocol::TType _etype500; + iprot->readListBegin(_etype500, _size497); + this->success.resize(_size497); + uint32_t _i501; + for (_i501 = 0; _i501 < _size497; ++_i501) { - xfer += iprot->readString(this->success[_i495]); + xfer += iprot->readString(this->success[_i501]); } iprot->readListEnd(); } @@ -10954,10 +10954,10 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(::apache::thri xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter496; - for (_iter496 = this->success.begin(); _iter496 != this->success.end(); ++_iter496) + std::vector ::const_iterator _iter502; + for (_iter502 = this->success.begin(); _iter502 != this->success.end(); ++_iter502) { - xfer += oprot->writeString((*_iter496)); + xfer += oprot->writeString((*_iter502)); } xfer += oprot->writeListEnd(); } @@ -10996,14 +10996,14 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size497; - ::apache::thrift::protocol::TType _etype500; - iprot->readListBegin(_etype500, _size497); - (*(this->success)).resize(_size497); - uint32_t _i501; - for (_i501 = 0; _i501 < _size497; ++_i501) + uint32_t _size503; + ::apache::thrift::protocol::TType _etype506; + iprot->readListBegin(_etype506, _size503); + (*(this->success)).resize(_size503); + uint32_t _i507; + for (_i507 = 0; _i507 < _size503; ++_i507) { - xfer += iprot->readString((*(this->success))[_i501]); + xfer += iprot->readString((*(this->success))[_i507]); } iprot->readListEnd(); } @@ -11118,17 +11118,17 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(::apache::thrif if (ftype == ::apache::thrift::protocol::T_MAP) { { this->success.clear(); - uint32_t _size502; - ::apache::thrift::protocol::TType _ktype503; - ::apache::thrift::protocol::TType _vtype504; - iprot->readMapBegin(_ktype503, _vtype504, _size502); - uint32_t _i506; - for (_i506 = 0; _i506 < _size502; ++_i506) + uint32_t _size508; + ::apache::thrift::protocol::TType _ktype509; + ::apache::thrift::protocol::TType _vtype510; + iprot->readMapBegin(_ktype509, _vtype510, _size508); + uint32_t _i512; + for (_i512 = 0; _i512 < _size508; ++_i512) { - std::string _key507; - xfer += iprot->readString(_key507); - std::string& _val508 = this->success[_key507]; - xfer += iprot->readString(_val508); + std::string _key513; + xfer += iprot->readString(_key513); + std::string& _val514 = this->success[_key513]; + xfer += iprot->readString(_val514); } iprot->readMapEnd(); } @@ -11167,11 +11167,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(::apache::thri xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::map ::const_iterator _iter509; - for (_iter509 = this->success.begin(); _iter509 != this->success.end(); ++_iter509) + std::map ::const_iterator _iter515; + for (_iter515 = this->success.begin(); _iter515 != this->success.end(); ++_iter515) { - xfer += oprot->writeString(_iter509->first); - xfer += oprot->writeString(_iter509->second); + xfer += oprot->writeString(_iter515->first); + xfer += oprot->writeString(_iter515->second); } xfer += oprot->writeMapEnd(); } @@ -11210,17 +11210,17 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_MAP) { { (*(this->success)).clear(); - uint32_t _size510; - ::apache::thrift::protocol::TType _ktype511; - ::apache::thrift::protocol::TType _vtype512; - iprot->readMapBegin(_ktype511, _vtype512, _size510); - uint32_t _i514; - for (_i514 = 0; _i514 < _size510; ++_i514) + uint32_t _size516; + ::apache::thrift::protocol::TType _ktype517; + ::apache::thrift::protocol::TType _vtype518; + iprot->readMapBegin(_ktype517, _vtype518, _size516); + uint32_t _i520; + for (_i520 = 0; _i520 < _size516; ++_i520) { - std::string _key515; - xfer += iprot->readString(_key515); - std::string& _val516 = (*(this->success))[_key515]; - xfer += iprot->readString(_val516); + std::string _key521; + xfer += iprot->readString(_key521); + std::string& _val522 = (*(this->success))[_key521]; + xfer += iprot->readString(_val522); } iprot->readMapEnd(); } @@ -11289,17 +11289,17 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_args::read(::apache::thrift:: if (ftype == ::apache::thrift::protocol::T_MAP) { { this->part_vals.clear(); - uint32_t _size517; - ::apache::thrift::protocol::TType _ktype518; - ::apache::thrift::protocol::TType _vtype519; - iprot->readMapBegin(_ktype518, _vtype519, _size517); - uint32_t _i521; - for (_i521 = 0; _i521 < _size517; ++_i521) + uint32_t _size523; + ::apache::thrift::protocol::TType _ktype524; + ::apache::thrift::protocol::TType _vtype525; + iprot->readMapBegin(_ktype524, _vtype525, _size523); + uint32_t _i527; + for (_i527 = 0; _i527 < _size523; ++_i527) { - std::string _key522; - xfer += iprot->readString(_key522); - std::string& _val523 = this->part_vals[_key522]; - xfer += iprot->readString(_val523); + std::string _key528; + xfer += iprot->readString(_key528); + std::string& _val529 = this->part_vals[_key528]; + xfer += iprot->readString(_val529); } iprot->readMapEnd(); } @@ -11310,9 +11310,9 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_args::read(::apache::thrift:: break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast524; - xfer += iprot->readI32(ecast524); - this->eventType = (PartitionEventType::type)ecast524; + int32_t ecast530; + xfer += iprot->readI32(ecast530); + this->eventType = (PartitionEventType::type)ecast530; this->__isset.eventType = true; } else { xfer += iprot->skip(ftype); @@ -11342,11 +11342,11 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_args::write(::apache::thrift: xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::map ::const_iterator _iter525; - for (_iter525 = this->part_vals.begin(); _iter525 != this->part_vals.end(); ++_iter525) + std::map ::const_iterator _iter531; + for (_iter531 = this->part_vals.begin(); _iter531 != this->part_vals.end(); ++_iter531) { - xfer += oprot->writeString(_iter525->first); - xfer += oprot->writeString(_iter525->second); + xfer += oprot->writeString(_iter531->first); + xfer += oprot->writeString(_iter531->second); } xfer += oprot->writeMapEnd(); } @@ -11371,11 +11371,11 @@ uint32_t ThriftHiveMetastore_markPartitionForEvent_pargs::write(::apache::thrift xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::map ::const_iterator _iter526; - for (_iter526 = (*(this->part_vals)).begin(); _iter526 != (*(this->part_vals)).end(); ++_iter526) + std::map ::const_iterator _iter532; + for (_iter532 = (*(this->part_vals)).begin(); _iter532 != (*(this->part_vals)).end(); ++_iter532) { - xfer += oprot->writeString(_iter526->first); - xfer += oprot->writeString(_iter526->second); + xfer += oprot->writeString(_iter532->first); + xfer += oprot->writeString(_iter532->second); } xfer += oprot->writeMapEnd(); } @@ -11624,17 +11624,17 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::read(::apache::thri if (ftype == ::apache::thrift::protocol::T_MAP) { { this->part_vals.clear(); - uint32_t _size527; - ::apache::thrift::protocol::TType _ktype528; - ::apache::thrift::protocol::TType _vtype529; - iprot->readMapBegin(_ktype528, _vtype529, _size527); - uint32_t _i531; - for (_i531 = 0; _i531 < _size527; ++_i531) + uint32_t _size533; + ::apache::thrift::protocol::TType _ktype534; + ::apache::thrift::protocol::TType _vtype535; + iprot->readMapBegin(_ktype534, _vtype535, _size533); + uint32_t _i537; + for (_i537 = 0; _i537 < _size533; ++_i537) { - std::string _key532; - xfer += iprot->readString(_key532); - std::string& _val533 = this->part_vals[_key532]; - xfer += iprot->readString(_val533); + std::string _key538; + xfer += iprot->readString(_key538); + std::string& _val539 = this->part_vals[_key538]; + xfer += iprot->readString(_val539); } iprot->readMapEnd(); } @@ -11645,9 +11645,9 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::read(::apache::thri break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast534; - xfer += iprot->readI32(ecast534); - this->eventType = (PartitionEventType::type)ecast534; + int32_t ecast540; + xfer += iprot->readI32(ecast540); + this->eventType = (PartitionEventType::type)ecast540; this->__isset.eventType = true; } else { xfer += iprot->skip(ftype); @@ -11677,11 +11677,11 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_args::write(::apache::thr xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->part_vals.size())); - std::map ::const_iterator _iter535; - for (_iter535 = this->part_vals.begin(); _iter535 != this->part_vals.end(); ++_iter535) + std::map ::const_iterator _iter541; + for (_iter541 = this->part_vals.begin(); _iter541 != this->part_vals.end(); ++_iter541) { - xfer += oprot->writeString(_iter535->first); - xfer += oprot->writeString(_iter535->second); + xfer += oprot->writeString(_iter541->first); + xfer += oprot->writeString(_iter541->second); } xfer += oprot->writeMapEnd(); } @@ -11706,11 +11706,11 @@ uint32_t ThriftHiveMetastore_isPartitionMarkedForEvent_pargs::write(::apache::th xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_MAP, 3); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->part_vals)).size())); - std::map ::const_iterator _iter536; - for (_iter536 = (*(this->part_vals)).begin(); _iter536 != (*(this->part_vals)).end(); ++_iter536) + std::map ::const_iterator _iter542; + for (_iter542 = (*(this->part_vals)).begin(); _iter542 != (*(this->part_vals)).end(); ++_iter542) { - xfer += oprot->writeString(_iter536->first); - xfer += oprot->writeString(_iter536->second); + xfer += oprot->writeString(_iter542->first); + xfer += oprot->writeString(_iter542->second); } xfer += oprot->writeMapEnd(); } @@ -12971,14 +12971,14 @@ uint32_t ThriftHiveMetastore_get_indexes_result::read(::apache::thrift::protocol if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size537; - ::apache::thrift::protocol::TType _etype540; - iprot->readListBegin(_etype540, _size537); - this->success.resize(_size537); - uint32_t _i541; - for (_i541 = 0; _i541 < _size537; ++_i541) + uint32_t _size543; + ::apache::thrift::protocol::TType _etype546; + iprot->readListBegin(_etype546, _size543); + this->success.resize(_size543); + uint32_t _i547; + for (_i547 = 0; _i547 < _size543; ++_i547) { - xfer += this->success[_i541].read(iprot); + xfer += this->success[_i547].read(iprot); } iprot->readListEnd(); } @@ -13025,10 +13025,10 @@ uint32_t ThriftHiveMetastore_get_indexes_result::write(::apache::thrift::protoco xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter542; - for (_iter542 = this->success.begin(); _iter542 != this->success.end(); ++_iter542) + std::vector ::const_iterator _iter548; + for (_iter548 = this->success.begin(); _iter548 != this->success.end(); ++_iter548) { - xfer += (*_iter542).write(oprot); + xfer += (*_iter548).write(oprot); } xfer += oprot->writeListEnd(); } @@ -13071,14 +13071,14 @@ uint32_t ThriftHiveMetastore_get_indexes_presult::read(::apache::thrift::protoco if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size543; - ::apache::thrift::protocol::TType _etype546; - iprot->readListBegin(_etype546, _size543); - (*(this->success)).resize(_size543); - uint32_t _i547; - for (_i547 = 0; _i547 < _size543; ++_i547) + uint32_t _size549; + ::apache::thrift::protocol::TType _etype552; + iprot->readListBegin(_etype552, _size549); + (*(this->success)).resize(_size549); + uint32_t _i553; + for (_i553 = 0; _i553 < _size549; ++_i553) { - xfer += (*(this->success))[_i547].read(iprot); + xfer += (*(this->success))[_i553].read(iprot); } iprot->readListEnd(); } @@ -13229,14 +13229,14 @@ uint32_t ThriftHiveMetastore_get_index_names_result::read(::apache::thrift::prot if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size548; - ::apache::thrift::protocol::TType _etype551; - iprot->readListBegin(_etype551, _size548); - this->success.resize(_size548); - uint32_t _i552; - for (_i552 = 0; _i552 < _size548; ++_i552) + uint32_t _size554; + ::apache::thrift::protocol::TType _etype557; + iprot->readListBegin(_etype557, _size554); + this->success.resize(_size554); + uint32_t _i558; + for (_i558 = 0; _i558 < _size554; ++_i558) { - xfer += iprot->readString(this->success[_i552]); + xfer += iprot->readString(this->success[_i558]); } iprot->readListEnd(); } @@ -13275,10 +13275,10 @@ uint32_t ThriftHiveMetastore_get_index_names_result::write(::apache::thrift::pro xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter553; - for (_iter553 = this->success.begin(); _iter553 != this->success.end(); ++_iter553) + std::vector ::const_iterator _iter559; + for (_iter559 = this->success.begin(); _iter559 != this->success.end(); ++_iter559) { - xfer += oprot->writeString((*_iter553)); + xfer += oprot->writeString((*_iter559)); } xfer += oprot->writeListEnd(); } @@ -13317,14 +13317,14 @@ uint32_t ThriftHiveMetastore_get_index_names_presult::read(::apache::thrift::pro if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size554; - ::apache::thrift::protocol::TType _etype557; - iprot->readListBegin(_etype557, _size554); - (*(this->success)).resize(_size554); - uint32_t _i558; - for (_i558 = 0; _i558 < _size554; ++_i558) + uint32_t _size560; + ::apache::thrift::protocol::TType _etype563; + iprot->readListBegin(_etype563, _size560); + (*(this->success)).resize(_size560); + uint32_t _i564; + for (_i564 = 0; _i564 < _size560; ++_i564) { - xfer += iprot->readString((*(this->success))[_i558]); + xfer += iprot->readString((*(this->success))[_i564]); } iprot->readListEnd(); } @@ -13353,7 +13353,7 @@ uint32_t ThriftHiveMetastore_get_index_names_presult::read(::apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_update_table_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13375,8 +13375,8 @@ uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol:: { case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->role.read(iprot); - this->__isset.role = true; + xfer += this->stats_obj.read(iprot); + this->__isset.stats_obj = true; } else { xfer += iprot->skip(ftype); } @@ -13393,29 +13393,29 @@ uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_create_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_update_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_args"); - xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->role.write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_args"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->stats_obj.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_create_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_update_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_pargs"); - xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->role)).write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->stats_obj)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_update_table_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13451,6 +13451,30 @@ uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -13463,11 +13487,11 @@ uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_create_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_update_table_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_table_column_statistics_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -13477,13 +13501,25 @@ uint32_t ThriftHiveMetastore_create_role_result::write(::apache::thrift::protoco xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_update_table_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13519,19 +13555,43 @@ uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protoco xfer += iprot->skip(ftype); } break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + xfer += iprot->readStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_update_partition_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13552,9 +13612,9 @@ uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TP switch (fid) { case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->role_name); - this->__isset.role_name = true; + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->stats_obj.read(iprot); + this->__isset.stats_obj = true; } else { xfer += iprot->skip(ftype); } @@ -13571,29 +13631,29 @@ uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_drop_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_update_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_args"); - xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->role_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_args"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->stats_obj.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_update_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_pargs"); - xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->stats_obj)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_update_partition_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13629,6 +13689,30 @@ uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol:: xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -13641,11 +13725,11 @@ uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_drop_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_update_partition_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_update_partition_column_statistics_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -13655,13 +13739,25 @@ uint32_t ThriftHiveMetastore_drop_role_result::write(::apache::thrift::protocol: xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_update_partition_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13697,6 +13793,30 @@ uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol: xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -13709,7 +13829,7 @@ uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_table_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13729,6 +13849,30 @@ uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protoco } switch (fid) { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->col_name); + this->__isset.col_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -13741,23 +13885,41 @@ uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->col_name); + xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->col_name))); + xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_table_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13778,20 +13940,8 @@ uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::proto switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size559; - ::apache::thrift::protocol::TType _etype562; - iprot->readListBegin(_etype562, _size559); - this->success.resize(_size559); - uint32_t _i563; - for (_i563 = 0; _i563 < _size559; ++_i563) - { - xfer += iprot->readString(this->success[_i563]); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -13805,6 +13955,30 @@ uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::proto xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -13817,35 +13991,39 @@ uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_table_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_column_statistics_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter564; - for (_iter564 = this->success.begin(); _iter564 != this->success.end(); ++_iter564) - { - xfer += oprot->writeString((*_iter564)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_table_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13866,20 +14044,8 @@ uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::prot switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size565; - ::apache::thrift::protocol::TType _etype568; - iprot->readListBegin(_etype568, _size565); - (*(this->success)).resize(_size565); - uint32_t _i569; - for (_i569 = 0; _i569 < _size565; ++_i569) - { - xfer += iprot->readString((*(this->success))[_i569]); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -13893,6 +14059,30 @@ uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::prot xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -13905,7 +14095,7 @@ uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13927,52 +14117,32 @@ uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::T { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->role_name); - this->__isset.role_name = true; + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; } else { xfer += iprot->skip(ftype); } break; case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast570; - xfer += iprot->readI32(ecast570); - this->principal_type = (PrincipalType::type)ecast570; - this->__isset.principal_type = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; } else { xfer += iprot->skip(ftype); } break; case 4: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->grantor); - this->__isset.grantor = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast571; - xfer += iprot->readI32(ecast571); - this->grantorType = (PrincipalType::type)ecast571; - this->__isset.grantorType = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->grant_option); - this->__isset.grant_option = true; + xfer += iprot->readString(this->col_name); + this->__isset.col_name = true; } else { xfer += iprot->skip(ftype); } @@ -13989,59 +14159,47 @@ uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_grant_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_args"); - xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->role_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->principal_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)this->grantorType); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool(this->grant_option); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->col_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_pargs"); - xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->role_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->principal_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); - xfer += oprot->writeString((*(this->grantor))); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32((int32_t)(*(this->grantorType))); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); - xfer += oprot->writeBool((*(this->grant_option))); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->col_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14062,8 +14220,8 @@ uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol: switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -14077,6 +14235,30 @@ uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol: xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -14089,27 +14271,39 @@ uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_grant_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_column_statistics_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14130,8 +14324,8 @@ uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -14145,6 +14339,30 @@ uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -14157,7 +14375,7 @@ uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14179,26 +14397,32 @@ uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol:: { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->role_name); - this->__isset.role_name = true; + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; } else { xfer += iprot->skip(ftype); } break; case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast572; - xfer += iprot->readI32(ecast572); - this->principal_type = (PrincipalType::type)ecast572; - this->__isset.principal_type = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->col_name); + this->__isset.col_name = true; } else { xfer += iprot->skip(ftype); } @@ -14215,41 +14439,47 @@ uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_args"); - xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->role_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->col_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_pargs"); - xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->col_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14285,6 +14515,30 @@ uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -14297,11 +14551,11 @@ uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_partition_column_statistics_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -14311,13 +14565,25 @@ uint32_t ThriftHiveMetastore_revoke_role_result::write(::apache::thrift::protoco xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_delete_partition_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14353,6 +14619,30 @@ uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protoco xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -14365,7 +14655,7 @@ uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_delete_table_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14387,18 +14677,24 @@ uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::T { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast573; - xfer += iprot->readI32(ecast573); - this->principal_type = (PrincipalType::type)ecast573; - this->__isset.principal_type = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->col_name); + this->__isset.col_name = true; } else { xfer += iprot->skip(ftype); } @@ -14415,35 +14711,41 @@ uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_delete_table_column_statistics_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_args"); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_args"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->col_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_delete_table_column_statistics_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_pargs"); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("col_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->col_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_delete_table_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14464,20 +14766,8 @@ uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol: switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size574; - ::apache::thrift::protocol::TType _etype577; - iprot->readListBegin(_etype577, _size574); - this->success.resize(_size574); - uint32_t _i578; - for (_i578 = 0; _i578 < _size574; ++_i578) - { - xfer += this->success[_i578].read(iprot); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -14491,6 +14781,30 @@ uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol: xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -14503,35 +14817,39 @@ uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_list_roles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_delete_table_column_statistics_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_table_column_statistics_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter579; - for (_iter579 = this->success.begin(); _iter579 != this->success.end(); ++_iter579) - { - xfer += (*_iter579).write(oprot); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o4) { + xfer += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->o4.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_delete_table_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14552,20 +14870,8 @@ uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size580; - ::apache::thrift::protocol::TType _etype583; - iprot->readListBegin(_etype583, _size580); - (*(this->success)).resize(_size580); - uint32_t _i584; - for (_i584 = 0; _i584 < _size580; ++_i584) - { - xfer += (*(this->success))[_i584].read(iprot); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -14579,6 +14885,30 @@ uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o4.read(iprot); + this->__isset.o4 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -14591,7 +14921,7 @@ uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14613,36 +14943,8 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::prot { case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->hiveObject.read(iprot); - this->__isset.hiveObject = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user_name); - this->__isset.user_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size585; - ::apache::thrift::protocol::TType _etype588; - iprot->readListBegin(_etype588, _size585); - this->group_names.resize(_size585); - uint32_t _i589; - for (_i589 = 0; _i589 < _size585; ++_i589) - { - xfer += iprot->readString(this->group_names[_i589]); - } - iprot->readListEnd(); - } - this->__isset.group_names = true; + xfer += this->role.read(iprot); + this->__isset.role = true; } else { xfer += iprot->skip(ftype); } @@ -14659,57 +14961,29 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_args"); - xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->hiveObject.write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->user_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter590; - for (_iter590 = this->group_names.begin(); _iter590 != this->group_names.end(); ++_iter590) - { - xfer += oprot->writeString((*_iter590)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_args"); + xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->role.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_pargs"); - xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->hiveObject)).write(oprot); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->user_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter591; - for (_iter591 = (*(this->group_names)).begin(); _iter591 != (*(this->group_names)).end(); ++_iter591) - { - xfer += oprot->writeString((*_iter591)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_pargs"); + xfer += oprot->writeFieldBegin("role", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->role)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14730,8 +15004,8 @@ uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::pr switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -14757,15 +15031,15 @@ uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -14777,7 +15051,7 @@ uint32_t ThriftHiveMetastore_get_privilege_set_result::write(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14798,8 +15072,8 @@ uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::p switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -14825,7 +15099,7 @@ uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14847,26 +15121,8 @@ uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protoc { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->principal_name); - this->__isset.principal_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast592; - xfer += iprot->readI32(ecast592); - this->principal_type = (PrincipalType::type)ecast592; - this->__isset.principal_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->hiveObject.read(iprot); - this->__isset.hiveObject = true; + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; } else { xfer += iprot->skip(ftype); } @@ -14883,41 +15139,29 @@ uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_args"); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->principal_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->principal_type); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += this->hiveObject.write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_pargs"); - xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->principal_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)(*(this->principal_type))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); - xfer += (*(this->hiveObject)).write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14938,20 +15182,8 @@ uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::prot switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size593; - ::apache::thrift::protocol::TType _etype596; - iprot->readListBegin(_etype596, _size593); - this->success.resize(_size593); - uint32_t _i597; - for (_i597 = 0; _i597 < _size593; ++_i597) - { - xfer += this->success[_i597].read(iprot); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -14977,23 +15209,15 @@ uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); - std::vector ::const_iterator _iter598; - for (_iter598 = this->success.begin(); _iter598 != this->success.end(); ++_iter598) - { - xfer += (*_iter598).write(oprot); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -15005,7 +15229,7 @@ uint32_t ThriftHiveMetastore_list_privileges_result::write(::apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15026,20 +15250,8 @@ uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::pro switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size599; - ::apache::thrift::protocol::TType _etype602; - iprot->readListBegin(_etype602, _size599); - (*(this->success)).resize(_size599); - uint32_t _i603; - for (_i603 = 0; _i603 < _size599; ++_i603) - { - xfer += (*(this->success))[_i603].read(iprot); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15065,7 +15277,7 @@ uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_role_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15085,14 +15297,6 @@ uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::proto } switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -15105,29 +15309,23 @@ uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_role_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_args"); - xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->privileges.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_args"); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_role_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_pargs"); - xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->privileges)).write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_pargs"); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_role_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15148,8 +15346,20 @@ uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::pro switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size565; + ::apache::thrift::protocol::TType _etype568; + iprot->readListBegin(_etype568, _size565); + this->success.resize(_size565); + uint32_t _i569; + for (_i569 = 0; _i569 < _size565; ++_i569) + { + xfer += iprot->readString(this->success[_i569]); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15175,15 +15385,23 @@ uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_role_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter570; + for (_iter570 = this->success.begin(); _iter570 != this->success.end(); ++_iter570) + { + xfer += oprot->writeString((*_iter570)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -15195,7 +15413,7 @@ uint32_t ThriftHiveMetastore_grant_privileges_result::write(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_role_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15216,8 +15434,20 @@ uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::pr switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size571; + ::apache::thrift::protocol::TType _etype574; + iprot->readListBegin(_etype574, _size571); + (*(this->success)).resize(_size571); + uint32_t _i575; + for (_i575 = 0; _i575 < _size571; ++_i575) + { + xfer += iprot->readString((*(this->success))[_i575]); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15243,7 +15473,7 @@ uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_grant_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15264,9 +15494,53 @@ uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::prot switch (fid) { case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->privileges.read(iprot); - this->__isset.privileges = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast576; + xfer += iprot->readI32(ecast576); + this->principal_type = (PrincipalType::type)ecast576; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast577; + xfer += iprot->readI32(ecast577); + this->grantorType = (PrincipalType::type)ecast577; + this->__isset.grantorType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->grant_option); + this->__isset.grant_option = true; } else { xfer += iprot->skip(ftype); } @@ -15283,29 +15557,59 @@ uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_grant_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_args"); - xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->privileges.write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)this->grantorType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->grant_option); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_grant_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_pargs"); - xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->privileges)).write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->grantor))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((int32_t)(*(this->grantorType))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grant_option", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool((*(this->grant_option))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_grant_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15353,11 +15657,11 @@ uint32_t ThriftHiveMetastore_revoke_privileges_result::read(::apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_grant_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -15373,7 +15677,7 @@ uint32_t ThriftHiveMetastore_revoke_privileges_result::write(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_grant_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15421,7 +15725,7 @@ uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_revoke_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15443,28 +15747,26 @@ uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TPro { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->user_name); - this->__isset.user_name = true; + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size604; - ::apache::thrift::protocol::TType _etype607; - iprot->readListBegin(_etype607, _size604); - this->group_names.resize(_size604); - uint32_t _i608; - for (_i608 = 0; _i608 < _size604; ++_i608) - { - xfer += iprot->readString(this->group_names[_i608]); - } - iprot->readListEnd(); - } - this->__isset.group_names = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast578; + xfer += iprot->readI32(ecast578); + this->principal_type = (PrincipalType::type)ecast578; + this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); } @@ -15481,51 +15783,41 @@ uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_revoke_role_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_args"); - xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->user_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_args"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); - std::vector ::const_iterator _iter609; - for (_iter609 = this->group_names.begin(); _iter609 != this->group_names.end(); ++_iter609) - { - xfer += oprot->writeString((*_iter609)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_pargs"); - xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); - std::vector ::const_iterator _iter610; - for (_iter610 = (*(this->group_names)).begin(); _iter610 != (*(this->group_names)).end(); ++_iter610) - { - xfer += oprot->writeString((*_iter610)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_revoke_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15546,20 +15838,8 @@ uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TP switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size611; - ::apache::thrift::protocol::TType _etype614; - iprot->readListBegin(_etype614, _size611); - this->success.resize(_size611); - uint32_t _i615; - for (_i615 = 0; _i615 < _size611; ++_i615) - { - xfer += iprot->readString(this->success[_i615]); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15585,23 +15865,15 @@ uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); - std::vector ::const_iterator _iter616; - for (_iter616 = this->success.begin(); _iter616 != this->success.end(); ++_iter616) - { - xfer += oprot->writeString((*_iter616)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -15613,7 +15885,7 @@ uint32_t ThriftHiveMetastore_set_ugi_result::write(::apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_revoke_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15634,20 +15906,8 @@ uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::T switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size617; - ::apache::thrift::protocol::TType _etype620; - iprot->readListBegin(_etype620, _size617); - (*(this->success)).resize(_size617); - uint32_t _i621; - for (_i621 = 0; _i621 < _size617; ++_i621) - { - xfer += iprot->readString((*(this->success))[_i621]); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15673,7 +15933,7 @@ uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15695,16 +15955,18 @@ uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::p { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_owner); - this->__isset.token_owner = true; + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->renewer_kerberos_principal_name); - this->__isset.renewer_kerberos_principal_name = true; + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast579; + xfer += iprot->readI32(ecast579); + this->principal_type = (PrincipalType::type)ecast579; + this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); } @@ -15721,35 +15983,35 @@ uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_roles_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_args"); - xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->token_owner); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->renewer_kerberos_principal_name); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->principal_type); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_roles_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_pargs"); - xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->token_owner))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->renewer_kerberos_principal_name))); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)(*(this->principal_type))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_roles_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15770,8 +16032,20 @@ uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift: switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size580; + ::apache::thrift::protocol::TType _etype583; + iprot->readListBegin(_etype583, _size580); + this->success.resize(_size580); + uint32_t _i584; + for (_i584 = 0; _i584 < _size580; ++_i584) + { + xfer += this->success[_i584].read(iprot); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15797,15 +16071,23 @@ uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_roles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter585; + for (_iter585 = this->success.begin(); _iter585 != this->success.end(); ++_iter585) + { + xfer += (*_iter585).write(oprot); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -15817,7 +16099,7 @@ uint32_t ThriftHiveMetastore_get_delegation_token_result::write(::apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_roles_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15838,8 +16120,20 @@ uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size586; + ::apache::thrift::protocol::TType _etype589; + iprot->readListBegin(_etype589, _size586); + (*(this->success)).resize(_size586); + uint32_t _i590; + for (_i590 = 0; _i590 < _size586; ++_i590) + { + xfer += (*(this->success))[_i590].read(iprot); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15865,7 +16159,7 @@ uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15886,9 +16180,37 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift: switch (fid) { case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_str_form); - this->__isset.token_str_form = true; + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size591; + ::apache::thrift::protocol::TType _etype594; + iprot->readListBegin(_etype594, _size591); + this->group_names.resize(_size591); + uint32_t _i595; + for (_i595 = 0; _i595 < _size591; ++_i595) + { + xfer += iprot->readString(this->group_names[_i595]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -15905,29 +16227,57 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_privilege_set_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_args"); - xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->token_str_form); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_args"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->hiveObject.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); + std::vector ::const_iterator _iter596; + for (_iter596 = this->group_names.begin(); _iter596 != this->group_names.end(); ++_iter596) + { + xfer += oprot->writeString((*_iter596)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_privilege_set_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_pargs"); - xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->token_str_form))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->hiveObject)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); + std::vector ::const_iterator _iter597; + for (_iter597 = (*(this->group_names)).begin(); _iter597 != (*(this->group_names)).end(); ++_iter597) + { + xfer += oprot->writeString((*_iter597)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_privilege_set_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15948,8 +16298,8 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrif switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->success); + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15975,15 +16325,15 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrif return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); - xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -15995,7 +16345,7 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_result::write(::apache::thri return xfer; } -uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_privilege_set_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -16016,8 +16366,8 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thri switch (fid) { case 0: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64((*(this->success))); + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -16043,7 +16393,7 @@ uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thri return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -16065,8 +16415,26 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift { case 1: if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_str_form); - this->__isset.token_str_form = true; + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast598; + xfer += iprot->readI32(ecast598); + this->principal_type = (PrincipalType::type)ecast598; + this->__isset.principal_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->hiveObject.read(iprot); + this->__isset.hiveObject = true; } else { xfer += iprot->skip(ftype); } @@ -16083,29 +16451,41 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_args"); - xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->token_str_form); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_args"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->principal_type); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->hiveObject.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_pargs"); - xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->token_str_form))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_pargs"); + xfer += oprot->writeFieldBegin("principal_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->hiveObject)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -16125,6 +16505,26 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thri } switch (fid) { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size599; + ::apache::thrift::protocol::TType _etype602; + iprot->readListBegin(_etype602, _size599); + this->success.resize(_size599); + uint32_t _i603; + for (_i603 = 0; _i603 < _size599; ++_i603) + { + xfer += this->success[_i603].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -16145,13 +16545,25 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thri return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_list_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_result"); - if (this->__isset.o1) { + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter604; + for (_iter604 = this->success.begin(); _iter604 != this->success.end(); ++_iter604) + { + xfer += (*_iter604).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); @@ -16161,7 +16573,7 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_result::write(::apache::thr return xfer; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -16181,6 +16593,26 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thr } switch (fid) { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size605; + ::apache::thrift::protocol::TType _etype608; + iprot->readListBegin(_etype608, _size605); + (*(this->success)).resize(_size605); + uint32_t _i609; + for (_i609 = 0; _i609 < _size605; ++_i609) + { + xfer += (*(this->success))[_i609].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; case 1: if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -16201,155 +16633,1665 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thr return xfer; } -void ThriftHiveMetastoreClient::create_database(const Database& database) -{ - send_create_database(database); - recv_create_database(); -} - -void ThriftHiveMetastoreClient::send_create_database(const Database& database) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); +uint32_t ThriftHiveMetastore_grant_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { - ThriftHiveMetastore_create_database_pargs args; - args.database = &database; - args.write(oprot_); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} + xfer += iprot->readStructBegin(fname); -void ThriftHiveMetastoreClient::recv_create_database() -{ + using ::apache::thrift::protocol::TProtocolException; - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("create_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); } - ThriftHiveMetastore_create_database_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - return; -} + xfer += iprot->readStructEnd(); -void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) -{ - send_get_database(name); - recv_get_database(_return); + return xfer; } -void ThriftHiveMetastoreClient::send_get_database(const std::string& name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); - - ThriftHiveMetastore_get_database_pargs args; - args.name = &name; - args.write(oprot_); +uint32_t ThriftHiveMetastore_grant_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_args"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); +uint32_t ThriftHiveMetastore_grant_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_pargs"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->privileges)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void ThriftHiveMetastoreClient::recv_get_database(Database& _return) -{ +uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { - int32_t rseqid = 0; + uint32_t xfer = 0; std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("get_database") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - ThriftHiveMetastore_get_database_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); -} + ::apache::thrift::protocol::TType ftype; + int16_t fid; -void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData, const bool cascade) -{ - send_drop_database(name, deleteData, cascade); - recv_drop_database(); -} + xfer += iprot->readStructBegin(fname); -void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData, const bool cascade) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + using ::apache::thrift::protocol::TProtocolException; - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; - args.cascade = &cascade; - args.write(oprot_); - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_args"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_pargs"); + xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->privileges)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size610; + ::apache::thrift::protocol::TType _etype613; + iprot->readListBegin(_etype613, _size610); + this->group_names.resize(_size610); + uint32_t _i614; + for (_i614 = 0; _i614 < _size610; ++_i614) + { + xfer += iprot->readString(this->group_names[_i614]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_args"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->group_names.size())); + std::vector ::const_iterator _iter615; + for (_iter615 = this->group_names.begin(); _iter615 != this->group_names.end(); ++_iter615) + { + xfer += oprot->writeString((*_iter615)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_pargs"); + xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->group_names)).size())); + std::vector ::const_iterator _iter616; + for (_iter616 = (*(this->group_names)).begin(); _iter616 != (*(this->group_names)).end(); ++_iter616) + { + xfer += oprot->writeString((*_iter616)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size617; + ::apache::thrift::protocol::TType _etype620; + iprot->readListBegin(_etype620, _size617); + this->success.resize(_size617); + uint32_t _i621; + for (_i621 = 0; _i621 < _size617; ++_i621) + { + xfer += iprot->readString(this->success[_i621]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter622; + for (_iter622 = this->success.begin(); _iter622 != this->success.end(); ++_iter622) + { + xfer += oprot->writeString((*_iter622)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size623; + ::apache::thrift::protocol::TType _etype626; + iprot->readListBegin(_etype626, _size623); + (*(this->success)).resize(_size623); + uint32_t _i627; + for (_i627 = 0; _i627 < _size623; ++_i627) + { + xfer += iprot->readString((*(this->success))[_i627]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_owner); + this->__isset.token_owner = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->renewer_kerberos_principal_name); + this->__isset.renewer_kerberos_principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_args"); + xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->token_owner); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->renewer_kerberos_principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_pargs"); + xfer += oprot->writeFieldBegin("token_owner", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->token_owner))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->renewer_kerberos_principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_str_form); + this->__isset.token_str_form = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_args"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->token_str_form); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_pargs"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->token_str_form))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); + xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_renew_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->token_str_form); + this->__isset.token_str_form = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_args"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->token_str_form); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_pargs"); + xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->token_str_form))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_result"); + + if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void ThriftHiveMetastoreClient::create_database(const Database& database) +{ + send_create_database(database); + recv_create_database(); +} + +void ThriftHiveMetastoreClient::send_create_database(const Database& database) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_database_pargs args; + args.database = &database; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_create_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_create_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) +{ + send_get_database(name); + recv_get_database(_return); +} + +void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_database_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_database_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); +} + +void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData, const bool cascade) +{ + send_drop_database(name, deleteData, cascade); + recv_drop_database(); +} + +void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData, const bool cascade) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_database_pargs args; + args.name = &name; + args.deleteData = &deleteData; + args.cascade = &cascade; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_drop_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("drop_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_drop_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +{ + send_get_databases(pattern); + recv_get_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_databases_pargs args; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +{ + send_get_all_databases(); + recv_get_all_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_databases() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_databases_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_all_databases") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_all_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db) +{ + send_alter_database(dbname, db); + recv_alter_database(); +} + +void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_database_pargs args; + args.dbname = &dbname; + args.db = &db; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_alter_database() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("alter_database") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_alter_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +{ + send_get_type(name); + recv_get_type(_return); +} + +void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_get_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::create_type(const Type& type) +{ + send_create_type(type); + return recv_create_type(); +} + +void ThriftHiveMetastoreClient::send_create_type(const Type& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_create_type() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("create_type") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + ThriftHiveMetastore_create_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); -void ThriftHiveMetastoreClient::recv_drop_database() + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +{ + send_drop_type(type); + return recv_drop_type(); +} + +void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool ThriftHiveMetastoreClient::recv_drop_type() { int32_t rseqid = 0; @@ -16369,41 +18311,43 @@ void ThriftHiveMetastoreClient::recv_drop_database() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_database") != 0) { + if (fname.compare("drop_type") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_drop_database_presult result; + bool _return; + ThriftHiveMetastore_drop_type_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + return _return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); } -void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) { - send_get_databases(pattern); - recv_get_databases(_return); + send_get_type_all(name); + recv_get_type_all(_return); } -void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; + ThriftHiveMetastore_get_type_all_pargs args; + args.name = &name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16411,7 +18355,7 @@ void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) { int32_t rseqid = 0; @@ -16431,12 +18375,12 @@ void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _r iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_databases") != 0) { + if (fname.compare("get_type_all") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_databases_presult result; + ThriftHiveMetastore_get_type_all_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16446,24 +18390,26 @@ void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _r // _return pointer has now been filled return; } - if (result.__isset.o1) { - throw result.o1; + if (result.__isset.o2) { + throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); } -void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { - send_get_all_databases(); - recv_get_all_databases(_return); + send_get_fields(db_name, table_name); + recv_get_fields(_return); } -void ThriftHiveMetastoreClient::send_get_all_databases() +void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_databases_pargs args; + ThriftHiveMetastore_get_fields_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16471,7 +18417,7 @@ void ThriftHiveMetastoreClient::send_get_all_databases() oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) { int32_t rseqid = 0; @@ -16491,12 +18437,12 @@ void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_all_databases") != 0) { + if (fname.compare("get_fields") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_all_databases_presult result; + ThriftHiveMetastore_get_fields_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16509,23 +18455,29 @@ void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db) +void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { - send_alter_database(dbname, db); - recv_alter_database(); + send_get_schema(db_name, table_name); + recv_get_schema(_return); } -void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db) +void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_database_pargs args; - args.dbname = &dbname; - args.db = &db; + ThriftHiveMetastore_get_schema_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16533,7 +18485,7 @@ void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, c oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_database() +void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) { int32_t rseqid = 0; @@ -16553,38 +18505,46 @@ void ThriftHiveMetastoreClient::recv_alter_database() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_database") != 0) { + if (fname.compare("get_schema") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_database_presult result; + ThriftHiveMetastore_get_schema_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); } -void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +void ThriftHiveMetastoreClient::create_table(const Table& tbl) { - send_get_type(name); - recv_get_type(_return); + send_create_table(tbl); + recv_create_table(); } -void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_pargs args; - args.name = &name; + ThriftHiveMetastore_create_table_pargs args; + args.tbl = &tbl; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16592,7 +18552,7 @@ void ThriftHiveMetastoreClient::send_get_type(const std::string& name) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +void ThriftHiveMetastoreClient::recv_create_table() { int32_t rseqid = 0; @@ -16612,43 +18572,45 @@ void ThriftHiveMetastoreClient::recv_get_type(Type& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_type") != 0) { + if (fname.compare("create_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_type_presult result; - result.success = &_return; + ThriftHiveMetastore_create_table_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; } -bool ThriftHiveMetastoreClient::create_type(const Type& type) +void ThriftHiveMetastoreClient::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { - send_create_type(type); - return recv_create_type(); + send_create_table_with_environment_context(tbl, environment_context); + recv_create_table_with_environment_context(); } -void ThriftHiveMetastoreClient::send_create_type(const Type& type) +void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_type_pargs args; - args.type = &type; + ThriftHiveMetastore_create_table_with_environment_context_pargs args; + args.tbl = &tbl; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16656,7 +18618,7 @@ void ThriftHiveMetastoreClient::send_create_type(const Type& type) oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_create_type() +void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() { int32_t rseqid = 0; @@ -16676,21 +18638,16 @@ bool ThriftHiveMetastoreClient::recv_create_type() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_type") != 0) { + if (fname.compare("create_table_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_create_type_presult result; - result.success = &_return; + ThriftHiveMetastore_create_table_with_environment_context_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } if (result.__isset.o1) { throw result.o1; } @@ -16700,22 +18657,27 @@ bool ThriftHiveMetastoreClient::recv_create_type() if (result.__isset.o3) { throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); + if (result.__isset.o4) { + throw result.o4; + } + return; } -bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { - send_drop_type(type); - return recv_drop_type(); + send_drop_table(dbname, name, deleteData); + recv_drop_table(); } -void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_type_pargs args; - args.type = &type; + ThriftHiveMetastore_drop_table_pargs args; + args.dbname = &dbname; + args.name = &name; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16723,7 +18685,7 @@ void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_type() +void ThriftHiveMetastoreClient::recv_drop_table() { int32_t rseqid = 0; @@ -16743,43 +18705,39 @@ bool ThriftHiveMetastoreClient::recv_drop_type() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_type") != 0) { + if (fname.compare("drop_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_type_presult result; - result.success = &_return; + ThriftHiveMetastore_drop_table_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; + if (result.__isset.o3) { + throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { - send_get_type_all(name); - recv_get_type_all(_return); + send_get_tables(db_name, pattern); + recv_get_tables(_return); } -void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_all_pargs args; - args.name = &name; + ThriftHiveMetastore_get_tables_pargs args; + args.db_name = &db_name; + args.pattern = &pattern; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16787,7 +18745,7 @@ void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) +void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) { int32_t rseqid = 0; @@ -16807,12 +18765,12 @@ void ThriftHiveMetastoreClient::recv_get_type_all(std::map & iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_type_all") != 0) { + if (fname.compare("get_tables") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_type_all_presult result; + ThriftHiveMetastore_get_tables_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16822,26 +18780,25 @@ void ThriftHiveMetastoreClient::recv_get_type_all(std::map & // _return pointer has now been filled return; } - if (result.__isset.o2) { - throw result.o2; + if (result.__isset.o1) { + throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); } -void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) { - send_get_fields(db_name, table_name); - recv_get_fields(_return); + send_get_all_tables(db_name); + recv_get_all_tables(_return); } -void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_fields_pargs args; + ThriftHiveMetastore_get_all_tables_pargs args; args.db_name = &db_name; - args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16849,7 +18806,7 @@ void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) { int32_t rseqid = 0; @@ -16869,12 +18826,12 @@ void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _retu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_fields") != 0) { + if (fname.compare("get_all_tables") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_fields_presult result; + ThriftHiveMetastore_get_all_tables_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16887,29 +18844,23 @@ void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _retu if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); } -void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { - send_get_schema(db_name, table_name); - recv_get_schema(_return); + send_get_table(dbname, tbl_name); + recv_get_table(_return); } -void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_schema_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; + ThriftHiveMetastore_get_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16917,7 +18868,7 @@ void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_table(Table& _return) { int32_t rseqid = 0; @@ -16937,12 +18888,12 @@ void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _retu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_schema") != 0) { + if (fname.compare("get_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_schema_presult result; + ThriftHiveMetastore_get_table_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16958,25 +18909,23 @@ void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _retu if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table(const Table& tbl) +void ThriftHiveMetastoreClient::get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) { - send_create_table(tbl); - recv_create_table(); + send_get_table_objects_by_name(dbname, tbl_names); + recv_get_table_objects_by_name(_return); } -void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +void ThriftHiveMetastoreClient::send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; + ThriftHiveMetastore_get_table_objects_by_name_pargs args; + args.dbname = &dbname; + args.tbl_names = &tbl_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16984,7 +18933,7 @@ void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_create_table() +void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
& _return) { int32_t rseqid = 0; @@ -17004,16 +18953,21 @@ void ThriftHiveMetastoreClient::recv_create_table() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_table") != 0) { + if (fname.compare("get_table_objects_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_create_table_presult result; + ThriftHiveMetastore_get_table_objects_by_name_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } @@ -17023,26 +18977,24 @@ void ThriftHiveMetastoreClient::recv_create_table() if (result.__isset.o3) { throw result.o3; } - if (result.__isset.o4) { - throw result.o4; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_objects_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) { - send_create_table_with_environment_context(tbl, environment_context); - recv_create_table_with_environment_context(); + send_get_table_names_by_filter(dbname, filter, max_tables); + recv_get_table_names_by_filter(_return); } -void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_table_with_environment_context_pargs args; - args.tbl = &tbl; - args.environment_context = &environment_context; + ThriftHiveMetastore_get_table_names_by_filter_pargs args; + args.dbname = &dbname; + args.filter = &filter; + args.max_tables = &max_tables; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17050,7 +19002,7 @@ void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() +void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vector & _return) { int32_t rseqid = 0; @@ -17070,16 +19022,21 @@ void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_table_with_environment_context") != 0) { + if (fname.compare("get_table_names_by_filter") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_create_table_with_environment_context_presult result; + ThriftHiveMetastore_get_table_names_by_filter_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } @@ -17089,27 +19046,24 @@ void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() if (result.__isset.o3) { throw result.o3; } - if (result.__isset.o4) { - throw result.o4; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); } -void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { - send_drop_table(dbname, name, deleteData); - recv_drop_table(); + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); } -void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_table_pargs args; + ThriftHiveMetastore_alter_table_pargs args; args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17117,7 +19071,7 @@ void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_drop_table() +void ThriftHiveMetastoreClient::recv_alter_table() { int32_t rseqid = 0; @@ -17137,12 +19091,12 @@ void ThriftHiveMetastoreClient::recv_drop_table() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_table") != 0) { + if (fname.compare("alter_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_drop_table_presult result; + ThriftHiveMetastore_alter_table_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); @@ -17150,26 +19104,28 @@ void ThriftHiveMetastoreClient::recv_drop_table() if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o3) { - throw result.o3; + if (result.__isset.o2) { + throw result.o2; } return; } -void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) { - send_get_tables(db_name, pattern); - recv_get_tables(_return); + send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); + recv_alter_table_with_environment_context(); } -void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_tables_pargs args; - args.db_name = &db_name; - args.pattern = &pattern; + ThriftHiveMetastore_alter_table_with_environment_context_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17177,7 +19133,7 @@ void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_alter_table_with_environment_context() { int32_t rseqid = 0; @@ -17197,40 +19153,38 @@ void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _retu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_tables") != 0) { + if (fname.compare("alter_table_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_tables_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_table_with_environment_context_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + return; } -void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) +void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) { - send_get_all_tables(db_name); - recv_get_all_tables(_return); + send_add_partition(new_part); + recv_add_partition(_return); } -void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) +void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_tables_pargs args; - args.db_name = &db_name; + ThriftHiveMetastore_add_partition_pargs args; + args.new_part = &new_part; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17238,7 +19192,7 @@ void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) { int32_t rseqid = 0; @@ -17258,12 +19212,12 @@ void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _ iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_all_tables") != 0) { + if (fname.compare("add_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_all_tables_presult result; + ThriftHiveMetastore_add_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17276,23 +19230,29 @@ void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _ if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); } -void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) { - send_get_table(dbname, tbl_name); - recv_get_table(_return); + send_add_partition_with_environment_context(new_part, environment_context); + recv_add_partition_with_environment_context(_return); } -void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; + ThriftHiveMetastore_add_partition_with_environment_context_pargs args; + args.new_part = &new_part; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17300,7 +19260,7 @@ void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_table(Table& _return) +void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Partition& _return) { int32_t rseqid = 0; @@ -17320,12 +19280,12 @@ void ThriftHiveMetastoreClient::recv_get_table(Table& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_table") != 0) { + if (fname.compare("add_partition_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_presult result; + ThriftHiveMetastore_add_partition_with_environment_context_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17341,23 +19301,25 @@ void ThriftHiveMetastoreClient::recv_get_table(Table& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); } -void ThriftHiveMetastoreClient::get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) +int32_t ThriftHiveMetastoreClient::add_partitions(const std::vector & new_parts) { - send_get_table_objects_by_name(dbname, tbl_names); - recv_get_table_objects_by_name(_return); + send_add_partitions(new_parts); + return recv_add_partitions(); } -void ThriftHiveMetastoreClient::send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names) +void ThriftHiveMetastoreClient::send_add_partitions(const std::vector & new_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_objects_by_name_pargs args; - args.dbname = &dbname; - args.tbl_names = &tbl_names; + ThriftHiveMetastore_add_partitions_pargs args; + args.new_parts = &new_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17365,7 +19327,7 @@ void ThriftHiveMetastoreClient::send_get_table_objects_by_name(const std::string oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
& _return) +int32_t ThriftHiveMetastoreClient::recv_add_partitions() { int32_t rseqid = 0; @@ -17385,20 +19347,20 @@ void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_table_objects_by_name") != 0) { + if (fname.compare("add_partitions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_objects_by_name_presult result; + int32_t _return; + ThriftHiveMetastore_add_partitions_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -17409,24 +19371,24 @@ void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) +void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - send_get_table_names_by_filter(dbname, filter, max_tables); - recv_get_table_names_by_filter(_return); + send_append_partition(db_name, tbl_name, part_vals); + recv_append_partition(_return); } -void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) +void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_names_by_filter_pargs args; - args.dbname = &dbname; - args.filter = &filter; - args.max_tables = &max_tables; + ThriftHiveMetastore_append_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17434,7 +19396,7 @@ void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vector & _return) +void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) { int32_t rseqid = 0; @@ -17454,12 +19416,12 @@ void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_table_names_by_filter") != 0) { + if (fname.compare("append_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_names_by_filter_presult result; + ThriftHiveMetastore_append_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17478,24 +19440,24 @@ void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vectorwriteMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_table_pargs args; - args.dbname = &dbname; + ThriftHiveMetastore_append_partition_by_name_pargs args; + args.db_name = &db_name; args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17503,7 +19465,7 @@ void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_table() +void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) { int32_t rseqid = 0; @@ -17523,41 +19485,49 @@ void ThriftHiveMetastoreClient::recv_alter_table() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_table") != 0) { + if (fname.compare("append_partition_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_table_presult result; + ThriftHiveMetastore_append_partition_by_name_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) +bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { - send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); - recv_alter_table_with_environment_context(); + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); } -void ThriftHiveMetastoreClient::send_alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_table_with_environment_context_pargs args; - args.dbname = &dbname; + ThriftHiveMetastore_drop_partition_pargs args; + args.db_name = &db_name; args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; - args.environment_context = &environment_context; + args.part_vals = &part_vals; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17565,7 +19535,7 @@ void ThriftHiveMetastoreClient::send_alter_table_with_environment_context(const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_table_with_environment_context() +bool ThriftHiveMetastoreClient::recv_drop_partition() { int32_t rseqid = 0; @@ -17585,38 +19555,46 @@ void ThriftHiveMetastoreClient::recv_alter_table_with_environment_context() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_table_with_environment_context") != 0) { + if (fname.compare("drop_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_table_with_environment_context_presult result; + bool _return; + ThriftHiveMetastore_drop_partition_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + return _return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); } -void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) +bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { - send_add_partition(new_part); - recv_add_partition(_return); + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); } -void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partition_pargs args; - args.new_part = &new_part; + ThriftHiveMetastore_drop_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17624,7 +19602,7 @@ void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() { int32_t rseqid = 0; @@ -17644,20 +19622,20 @@ void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_partition") != 0) { + if (fname.compare("drop_partition_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_partition_presult result; + bool _return; + ThriftHiveMetastore_drop_partition_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -17665,26 +19643,24 @@ void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - send_add_partition_with_environment_context(new_part, environment_context); - recv_add_partition_with_environment_context(_return); + send_get_partition(db_name, tbl_name, part_vals); + recv_get_partition(_return); } -void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partition_with_environment_context_pargs args; - args.new_part = &new_part; - args.environment_context = &environment_context; + ThriftHiveMetastore_get_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17692,7 +19668,7 @@ void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) { int32_t rseqid = 0; @@ -17712,12 +19688,12 @@ void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Part iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_partition_with_environment_context") != 0) { + if (fname.compare("get_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_partition_with_environment_context_presult result; + ThriftHiveMetastore_get_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17733,25 +19709,26 @@ void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Part if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition_with_environment_context failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); } -int32_t ThriftHiveMetastoreClient::add_partitions(const std::vector & new_parts) +void ThriftHiveMetastoreClient::get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) { - send_add_partitions(new_parts); - return recv_add_partitions(); + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); + recv_get_partition_with_auth(_return); } -void ThriftHiveMetastoreClient::send_add_partitions(const std::vector & new_parts) +void ThriftHiveMetastoreClient::send_get_partition_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partitions_pargs args; - args.new_parts = &new_parts; + ThriftHiveMetastore_get_partition_with_auth_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17759,7 +19736,7 @@ void ThriftHiveMetastoreClient::send_add_partitions(const std::vector oprot_->getTransport()->flush(); } -int32_t ThriftHiveMetastoreClient::recv_add_partitions() +void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) { int32_t rseqid = 0; @@ -17779,20 +19756,20 @@ int32_t ThriftHiveMetastoreClient::recv_add_partitions() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_partitions") != 0) { + if (fname.compare("get_partition_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - int32_t _return; - ThriftHiveMetastore_add_partitions_presult result; + ThriftHiveMetastore_get_partition_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -17800,27 +19777,24 @@ int32_t ThriftHiveMetastoreClient::recv_add_partitions() if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partitions failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - send_append_partition(db_name, tbl_name, part_vals); - recv_append_partition(_return); + send_get_partition_by_name(db_name, tbl_name, part_name); + recv_get_partition_by_name(_return); } -void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_pargs args; + ThriftHiveMetastore_get_partition_by_name_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17828,7 +19802,7 @@ void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) { int32_t rseqid = 0; @@ -17848,12 +19822,12 @@ void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("append_partition") != 0) { + if (fname.compare("get_partition_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_append_partition_presult result; + ThriftHiveMetastore_get_partition_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17869,27 +19843,24 @@ void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_append_partition_by_name(db_name, tbl_name, part_name); - recv_append_partition_by_name(_return); + send_get_partitions(db_name, tbl_name, max_parts); + recv_get_partitions(_return); } -void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_by_name_pargs args; + ThriftHiveMetastore_get_partitions_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_name = &part_name; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17897,7 +19868,7 @@ void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) { int32_t rseqid = 0; @@ -17917,12 +19888,12 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("append_partition_by_name") != 0) { + if (fname.compare("get_partitions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_append_partition_by_name_presult result; + ThriftHiveMetastore_get_partitions_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17938,28 +19909,26 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +void ThriftHiveMetastoreClient::get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); + recv_get_partitions_with_auth(_return); } -void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_partitions_with_auth(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_pargs args; + ThriftHiveMetastore_get_partitions_with_auth_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.deleteData = &deleteData; + args.max_parts = &max_parts; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17967,7 +19936,7 @@ void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_partition() +void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -17987,20 +19956,20 @@ bool ThriftHiveMetastoreClient::recv_drop_partition() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_partition") != 0) { + if (fname.compare("get_partitions_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_partition_presult result; + ThriftHiveMetastore_get_partitions_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -18008,25 +19977,24 @@ bool ThriftHiveMetastoreClient::recv_drop_partition() if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); + send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_return); } -void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_by_name_pargs args; + ThriftHiveMetastore_get_partition_names_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18034,7 +20002,7 @@ void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& d oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) { int32_t rseqid = 0; @@ -18054,45 +20022,43 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_partition_by_name") != 0) { + if (fname.compare("get_partition_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_partition_by_name_presult result; + ThriftHiveMetastore_get_partition_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; + // _return pointer has now been filled + return; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { - send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return); + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_return); } -void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_pargs args; + ThriftHiveMetastore_get_partitions_ps_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18100,7 +20066,7 @@ void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, c oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) { int32_t rseqid = 0; @@ -18120,12 +20086,12 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition") != 0) { + if (fname.compare("get_partitions_ps") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_presult result; + ThriftHiveMetastore_get_partitions_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18141,24 +20107,25 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) +void ThriftHiveMetastoreClient::get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { - send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); - recv_get_partition_with_auth(_return); + send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); + recv_get_partitions_ps_with_auth(_return); } -void ThriftHiveMetastoreClient::send_get_partition_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) +void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_with_auth_pargs args; + ThriftHiveMetastore_get_partitions_ps_with_auth_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; args.part_vals = &part_vals; + args.max_parts = &max_parts; args.user_name = &user_name; args.group_names = &group_names; args.write(oprot_); @@ -18168,7 +20135,7 @@ void ThriftHiveMetastoreClient::send_get_partition_with_auth(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -18188,12 +20155,12 @@ void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_with_auth") != 0) { + if (fname.compare("get_partitions_ps_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_with_auth_presult result; + ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18209,24 +20176,25 @@ void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { - send_get_partition_by_name(db_name, tbl_name, part_name); - recv_get_partition_by_name(_return); + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partition_names_ps(_return); } -void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_by_name_pargs args; + ThriftHiveMetastore_get_partition_names_ps_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_name = &part_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18234,7 +20202,7 @@ void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) { int32_t rseqid = 0; @@ -18254,12 +20222,12 @@ void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_by_name") != 0) { + if (fname.compare("get_partition_names_ps") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_by_name_presult result; + ThriftHiveMetastore_get_partition_names_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18275,23 +20243,24 @@ void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { - send_get_partitions(db_name, tbl_name, max_parts); - recv_get_partitions(_return); + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_partitions_by_filter(_return); } -void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_pargs args; + ThriftHiveMetastore_get_partitions_by_filter_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; + args.filter = &filter; args.max_parts = &max_parts; args.write(oprot_); @@ -18300,7 +20269,7 @@ void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) { int32_t rseqid = 0; @@ -18320,12 +20289,12 @@ void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _re iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions") != 0) { + if (fname.compare("get_partitions_by_filter") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_presult result; + ThriftHiveMetastore_get_partitions_by_filter_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18341,26 +20310,24 @@ void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _re if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) +void ThriftHiveMetastoreClient::get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) { - send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); - recv_get_partitions_with_auth(_return); + send_get_partitions_by_names(db_name, tbl_name, names); + recv_get_partitions_by_names(_return); } -void ThriftHiveMetastoreClient::send_get_partitions_with_auth(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) +void ThriftHiveMetastoreClient::send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_with_auth_pargs args; + ThriftHiveMetastore_get_partitions_by_names_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.max_parts = &max_parts; - args.user_name = &user_name; - args.group_names = &group_names; + args.names = &names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18368,7 +20335,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_with_auth(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vector & _return) { int32_t rseqid = 0; @@ -18388,12 +20355,12 @@ void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_with_auth") != 0) { + if (fname.compare("get_partitions_by_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_with_auth_presult result; + ThriftHiveMetastore_get_partitions_by_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18409,24 +20376,24 @@ void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { - send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return); + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); } -void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_pargs args; + ThriftHiveMetastore_alter_partition_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.max_parts = &max_parts; + args.new_part = &new_part; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18434,7 +20401,7 @@ void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_n oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) +void ThriftHiveMetastoreClient::recv_alter_partition() { int32_t rseqid = 0; @@ -18454,43 +20421,40 @@ void ThriftHiveMetastoreClient::recv_get_partition_names(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_names") != 0) { + if (fname.compare("alter_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_names_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_partition_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; + if (result.__isset.o1) { + throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) { - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_ps(_return); + send_alter_partitions(db_name, tbl_name, new_parts); + recv_alter_partitions(); } -void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_ps_pargs args; + ThriftHiveMetastore_alter_partitions_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; + args.new_parts = &new_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18498,7 +20462,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_nam oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_alter_partitions() { int32_t rseqid = 0; @@ -18518,48 +20482,41 @@ void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_ps") != 0) { + if (fname.compare("alter_partitions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_ps_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_partitions_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) +void ThriftHiveMetastoreClient::alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) { - send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); - recv_get_partitions_ps_with_auth(_return); + send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); + recv_alter_partition_with_environment_context(); } -void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) +void ThriftHiveMetastoreClient::send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_ps_with_auth_pargs args; + ThriftHiveMetastore_alter_partition_with_environment_context_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; - args.user_name = &user_name; - args.group_names = &group_names; + args.new_part = &new_part; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18567,7 +20524,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(const std::stri oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return) +void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() { int32_t rseqid = 0; @@ -18587,46 +20544,41 @@ void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_ps_with_auth") != 0) { + if (fname.compare("alter_partition_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_partition_with_environment_context_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) { - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partition_names_ps(_return); + send_rename_partition(db_name, tbl_name, part_vals, new_part); + recv_rename_partition(); } -void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_ps_pargs args; + ThriftHiveMetastore_rename_partition_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; args.part_vals = &part_vals; - args.max_parts = &max_parts; + args.new_part = &new_part; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18634,7 +20586,7 @@ void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& d oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_rename_partition() { int32_t rseqid = 0; @@ -18654,46 +20606,39 @@ void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_names_ps") != 0) { + if (fname.compare("rename_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_names_ps_presult result; - result.success = &_return; + ThriftHiveMetastore_rename_partition_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_partitions_by_filter(_return); + send_get_config_value(name, defaultValue); + recv_get_config_value(_return); } -void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_by_filter_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.max_parts = &max_parts; + ThriftHiveMetastore_get_config_value_pargs args; + args.name = &name; + args.defaultValue = &defaultValue; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18701,7 +20646,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) { int32_t rseqid = 0; @@ -18721,12 +20666,12 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_by_filter") != 0) { + if (fname.compare("get_config_value") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_by_filter_presult result; + ThriftHiveMetastore_get_config_value_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18739,27 +20684,22 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) +void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) { - send_get_partitions_by_names(db_name, tbl_name, names); - recv_get_partitions_by_names(_return); + send_partition_name_to_vals(part_name); + recv_partition_name_to_vals(_return); } -void ThriftHiveMetastoreClient::send_get_partitions_by_names(const std::string& db_name, const std::string& tbl_name, const std::vector & names) +void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_by_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.names = &names; + ThriftHiveMetastore_partition_name_to_vals_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18767,7 +20707,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_by_names(const std::string& oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vector & _return) +void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) { int32_t rseqid = 0; @@ -18787,12 +20727,12 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions_by_names") != 0) { + if (fname.compare("partition_name_to_vals") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_by_names_presult result; + ThriftHiveMetastore_partition_name_to_vals_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18805,27 +20745,22 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_names(std::vector & _return, const std::string& part_name) { - send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(); + send_partition_name_to_spec(part_name); + recv_partition_name_to_spec(_return); } -void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_part = &new_part; + ThriftHiveMetastore_partition_name_to_spec_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18833,7 +20768,7 @@ void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_partition() +void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) { int32_t rseqid = 0; @@ -18853,40 +20788,43 @@ void ThriftHiveMetastoreClient::recv_alter_partition() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_partition") != 0) { + if (fname.compare("partition_name_to_spec") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_partition_presult result; + ThriftHiveMetastore_partition_name_to_spec_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) +void ThriftHiveMetastoreClient::markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { - send_alter_partitions(db_name, tbl_name, new_parts); - recv_alter_partitions(); + send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); + recv_markPartitionForEvent(); } -void ThriftHiveMetastoreClient::send_alter_partitions(const std::string& db_name, const std::string& tbl_name, const std::vector & new_parts) +void ThriftHiveMetastoreClient::send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partitions_pargs args; + ThriftHiveMetastore_markPartitionForEvent_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.new_parts = &new_parts; + args.part_vals = &part_vals; + args.eventType = &eventType; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18894,7 +20832,7 @@ void ThriftHiveMetastoreClient::send_alter_partitions(const std::string& db_name oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_partitions() +void ThriftHiveMetastoreClient::recv_markPartitionForEvent() { int32_t rseqid = 0; @@ -18914,12 +20852,12 @@ void ThriftHiveMetastoreClient::recv_alter_partitions() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_partitions") != 0) { + if (fname.compare("markPartitionForEvent") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_partitions_presult result; + ThriftHiveMetastore_markPartitionForEvent_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); @@ -18930,25 +20868,37 @@ void ThriftHiveMetastoreClient::recv_alter_partitions() if (result.__isset.o2) { throw result.o2; } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + if (result.__isset.o5) { + throw result.o5; + } + if (result.__isset.o6) { + throw result.o6; + } return; } -void ThriftHiveMetastoreClient::alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) +bool ThriftHiveMetastoreClient::isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { - send_alter_partition_with_environment_context(db_name, tbl_name, new_part, environment_context); - recv_alter_partition_with_environment_context(); + send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); + return recv_isPartitionMarkedForEvent(); } -void ThriftHiveMetastoreClient::send_alter_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partition_with_environment_context_pargs args; + ThriftHiveMetastore_isPartitionMarkedForEvent_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.new_part = &new_part; - args.environment_context = &environment_context; + args.part_vals = &part_vals; + args.eventType = &eventType; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18956,7 +20906,7 @@ void ThriftHiveMetastoreClient::send_alter_partition_with_environment_context(co oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() +bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() { int32_t rseqid = 0; @@ -18976,41 +20926,56 @@ void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_partition_with_environment_context") != 0) { + if (fname.compare("isPartitionMarkedForEvent") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_partition_with_environment_context_presult result; + bool _return; + ThriftHiveMetastore_isPartitionMarkedForEvent_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + return _return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + if (result.__isset.o5) { + throw result.o5; + } + if (result.__isset.o6) { + throw result.o6; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); } -void ThriftHiveMetastoreClient::rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) +void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) { - send_rename_partition(db_name, tbl_name, part_vals, new_part); - recv_rename_partition(); + send_add_index(new_index, index_table); + recv_add_index(_return); } -void ThriftHiveMetastoreClient::send_rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) +void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) { int32_t cseqid = 0; - oprot_->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_rename_partition_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.new_part = &new_part; + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19018,7 +20983,7 @@ void ThriftHiveMetastoreClient::send_rename_partition(const std::string& db_name oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_rename_partition() +void ThriftHiveMetastoreClient::recv_add_index(Index& _return) { int32_t rseqid = 0; @@ -19038,39 +21003,49 @@ void ThriftHiveMetastoreClient::recv_rename_partition() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("rename_partition") != 0) { + if (fname.compare("add_index") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_rename_partition_presult result; + ThriftHiveMetastore_add_index_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); } -void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { - send_get_config_value(name, defaultValue); - recv_get_config_value(_return); + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); } -void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; + ThriftHiveMetastore_alter_index_pargs args; + args.dbname = &dbname; + args.base_tbl_name = &base_tbl_name; + args.idx_name = &idx_name; + args.new_idx = &new_idx; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19078,7 +21053,7 @@ void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, c oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) +void ThriftHiveMetastoreClient::recv_alter_index() { int32_t rseqid = 0; @@ -19098,40 +21073,41 @@ void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_config_value") != 0) { + if (fname.compare("alter_index") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_config_value_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_index_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled - return; - } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + return; } -void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) +bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { - send_partition_name_to_vals(part_name); - recv_partition_name_to_vals(_return); + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(); } -void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) +void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_vals_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_drop_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19139,7 +21115,7 @@ void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& p oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_drop_index_by_name() { int32_t rseqid = 0; @@ -19159,40 +21135,45 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("partition_name_to_vals") != 0) { + if (fname.compare("drop_index_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_partition_name_to_vals_presult result; + bool _return; + ThriftHiveMetastore_drop_index_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) +void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { - send_partition_name_to_spec(part_name); - recv_partition_name_to_spec(_return); + send_get_index_by_name(db_name, tbl_name, index_name); + recv_get_index_by_name(_return); } -void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) +void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_spec_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_get_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19200,7 +21181,7 @@ void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& p oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) +void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) { int32_t rseqid = 0; @@ -19220,12 +21201,12 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::mapreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("partition_name_to_spec") != 0) { + if (fname.compare("get_index_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_partition_name_to_spec_presult result; + ThriftHiveMetastore_get_index_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -19238,25 +21219,27 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & part_vals, const PartitionEventType::type eventType) +void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); - recv_markPartitionForEvent(); + send_get_indexes(db_name, tbl_name, max_indexes); + recv_get_indexes(_return); } -void ThriftHiveMetastoreClient::send_markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { int32_t cseqid = 0; - oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_markPartitionForEvent_pargs args; + ThriftHiveMetastore_get_indexes_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.eventType = &eventType; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19264,7 +21247,7 @@ void ThriftHiveMetastoreClient::send_markPartitionForEvent(const std::string& db oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_markPartitionForEvent() +void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) { int32_t rseqid = 0; @@ -19284,53 +21267,45 @@ void ThriftHiveMetastoreClient::recv_markPartitionForEvent() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("markPartitionForEvent") != 0) { + if (fname.compare("get_indexes") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_markPartitionForEvent_presult result; + ThriftHiveMetastore_get_indexes_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - if (result.__isset.o5) { - throw result.o5; - } - if (result.__isset.o6) { - throw result.o6; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); } -bool ThriftHiveMetastoreClient::isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); - return recv_isPartitionMarkedForEvent(); + send_get_index_names(db_name, tbl_name, max_indexes); + recv_get_index_names(_return); } -void ThriftHiveMetastoreClient::send_isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { int32_t cseqid = 0; - oprot_->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_isPartitionMarkedForEvent_pargs args; + ThriftHiveMetastore_get_index_names_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.eventType = &eventType; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19338,7 +21313,7 @@ void ThriftHiveMetastoreClient::send_isPartitionMarkedForEvent(const std::string oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() +void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) { int32_t rseqid = 0; @@ -19358,56 +21333,40 @@ bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("isPartitionMarkedForEvent") != 0) { + if (fname.compare("get_index_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_isPartitionMarkedForEvent_presult result; + ThriftHiveMetastore_get_index_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; + // _return pointer has now been filled + return; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } - if (result.__isset.o5) { - throw result.o5; - } - if (result.__isset.o6) { - throw result.o6; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isPartitionMarkedForEvent failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); } -void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) +bool ThriftHiveMetastoreClient::update_table_column_statistics(const ColumnStatistics& stats_obj) { - send_add_index(new_index, index_table); - recv_add_index(_return); + send_update_table_column_statistics(stats_obj); + return recv_update_table_column_statistics(); } -void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) +void ThriftHiveMetastoreClient::send_update_table_column_statistics(const ColumnStatistics& stats_obj) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; + ThriftHiveMetastore_update_table_column_statistics_pargs args; + args.stats_obj = &stats_obj; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19415,7 +21374,7 @@ void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Tab oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_add_index(Index& _return) +bool ThriftHiveMetastoreClient::recv_update_table_column_statistics() { int32_t rseqid = 0; @@ -19435,20 +21394,20 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_index") != 0) { + if (fname.compare("update_table_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_index_presult result; + bool _return; + ThriftHiveMetastore_update_table_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -19459,25 +21418,25 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return) if (result.__isset.o3) { throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_table_column_statistics failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +bool ThriftHiveMetastoreClient::update_partition_column_statistics(const ColumnStatistics& stats_obj) { - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); + send_update_partition_column_statistics(stats_obj); + return recv_update_partition_column_statistics(); } -void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +void ThriftHiveMetastoreClient::send_update_partition_column_statistics(const ColumnStatistics& stats_obj) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_index_pargs args; - args.dbname = &dbname; - args.base_tbl_name = &base_tbl_name; - args.idx_name = &idx_name; - args.new_idx = &new_idx; + ThriftHiveMetastore_update_partition_column_statistics_pargs args; + args.stats_obj = &stats_obj; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19485,7 +21444,7 @@ void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_index() +bool ThriftHiveMetastoreClient::recv_update_partition_column_statistics() { int32_t rseqid = 0; @@ -19505,41 +21464,51 @@ void ThriftHiveMetastoreClient::recv_alter_index() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_index") != 0) { + if (fname.compare("update_partition_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_index_presult result; + bool _return; + ThriftHiveMetastore_update_partition_column_statistics_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + return _return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - return; + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +void ThriftHiveMetastoreClient::get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(); + send_get_table_column_statistics(db_name, tbl_name, col_name); + recv_get_table_column_statistics(_return); } -void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_index_by_name_pargs args; + ThriftHiveMetastore_get_table_column_statistics_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.deleteData = &deleteData; + args.col_name = &col_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19547,7 +21516,7 @@ void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_na oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_index_by_name() +void ThriftHiveMetastoreClient::recv_get_table_column_statistics(ColumnStatistics& _return) { int32_t rseqid = 0; @@ -19567,20 +21536,20 @@ bool ThriftHiveMetastoreClient::recv_drop_index_by_name() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_index_by_name") != 0) { + if (fname.compare("get_table_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_index_by_name_presult result; + ThriftHiveMetastore_get_table_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -19588,24 +21557,31 @@ bool ThriftHiveMetastoreClient::recv_drop_index_by_name() if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_column_statistics failed: unknown result"); } -void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +void ThriftHiveMetastoreClient::get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { - send_get_index_by_name(db_name, tbl_name, index_name); - recv_get_index_by_name(_return); + send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); + recv_get_partition_column_statistics(_return); } -void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +void ThriftHiveMetastoreClient::send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_index_by_name_pargs args; + ThriftHiveMetastore_get_partition_column_statistics_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.index_name = &index_name; + args.part_name = &part_name; + args.col_name = &col_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19613,7 +21589,7 @@ void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_nam oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) +void ThriftHiveMetastoreClient::recv_get_partition_column_statistics(ColumnStatistics& _return) { int32_t rseqid = 0; @@ -19633,12 +21609,12 @@ void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_index_by_name") != 0) { + if (fname.compare("get_partition_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_index_by_name_presult result; + ThriftHiveMetastore_get_partition_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -19654,24 +21630,31 @@ void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); } -void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +bool ThriftHiveMetastoreClient::delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { - send_get_indexes(db_name, tbl_name, max_indexes); - recv_get_indexes(_return); + send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + return recv_delete_partition_column_statistics(); } -void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +void ThriftHiveMetastoreClient::send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_indexes_pargs args; + ThriftHiveMetastore_delete_partition_column_statistics_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; + args.part_name = &part_name; + args.col_name = &col_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19679,7 +21662,7 @@ void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, con oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_delete_partition_column_statistics() { int32_t rseqid = 0; @@ -19699,20 +21682,20 @@ void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_indexes") != 0) { + if (fname.compare("delete_partition_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_indexes_presult result; + bool _return; + ThriftHiveMetastore_delete_partition_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -19720,24 +21703,30 @@ void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); } -void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +bool ThriftHiveMetastoreClient::delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { - send_get_index_names(db_name, tbl_name, max_indexes); - recv_get_index_names(_return); + send_delete_table_column_statistics(db_name, tbl_name, col_name); + return recv_delete_table_column_statistics(); } -void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +void ThriftHiveMetastoreClient::send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_index_names_pargs args; + ThriftHiveMetastore_delete_table_column_statistics_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; + args.col_name = &col_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19745,7 +21734,7 @@ void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_delete_table_column_statistics() { int32_t rseqid = 0; @@ -19765,25 +21754,34 @@ void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_index_names") != 0) { + if (fname.compare("delete_table_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_index_names_presult result; + bool _return; + ThriftHiveMetastore_delete_table_column_statistics_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; } - if (result.__isset.o2) { - throw result.o2; + if (result.__isset.o4) { + throw result.o4; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); } bool ThriftHiveMetastoreClient::create_role(const Role& role) @@ -20521,209 +22519,504 @@ void ThriftHiveMetastoreClient::recv_get_delegation_token(std::string& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_delegation_token failed: unknown result"); +} + +int64_t ThriftHiveMetastoreClient::renew_delegation_token(const std::string& token_str_form) +{ + send_renew_delegation_token(token_str_form); + return recv_renew_delegation_token(); +} + +void ThriftHiveMetastoreClient::send_renew_delegation_token(const std::string& token_str_form) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_renew_delegation_token_pargs args; + args.token_str_form = &token_str_form; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int64_t ThriftHiveMetastoreClient::recv_renew_delegation_token() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("renew_delegation_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int64_t _return; + ThriftHiveMetastore_renew_delegation_token_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "renew_delegation_token failed: unknown result"); +} + +void ThriftHiveMetastoreClient::cancel_delegation_token(const std::string& token_str_form) +{ + send_cancel_delegation_token(token_str_form); + recv_cancel_delegation_token(); +} + +void ThriftHiveMetastoreClient::send_cancel_delegation_token(const std::string& token_str_form) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_cancel_delegation_token_pargs args; + args.token_str_form = &token_str_form; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void ThriftHiveMetastoreClient::recv_cancel_delegation_token() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("cancel_delegation_token") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ThriftHiveMetastore_cancel_delegation_token_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + return; +} + +bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) { + + ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); + ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + int32_t seqid; + + iprot->readMessageBegin(fname, mtype, seqid); + + if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return false; + } + + return process_fn(iprot, oprot, fname, seqid, callContext); +} + +bool ThriftHiveMetastoreProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) { + std::map::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid, callContext); + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (eventHandler_.get() != NULL) { + ctx = eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); + + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); + } + + ThriftHiveMetastore_create_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); + } + + ThriftHiveMetastore_create_database_result result; + try { + iface_->create_database(args.database); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (eventHandler_.get() != NULL) { + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (eventHandler_.get() != NULL) { + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); + } + + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_database", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (eventHandler_.get() != NULL) { + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); + + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); + } + + ThriftHiveMetastore_get_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); + } + + ThriftHiveMetastore_get_database_result result; + try { + iface_->get_database(result.success, args.name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (eventHandler_.get() != NULL) { + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); return; } - if (result.__isset.o1) { - throw result.o1; + + if (eventHandler_.get() != NULL) { + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_delegation_token failed: unknown result"); -} -int64_t ThriftHiveMetastoreClient::renew_delegation_token(const std::string& token_str_form) -{ - send_renew_delegation_token(token_str_form); - return recv_renew_delegation_token(); + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_database", bytes); + } } -void ThriftHiveMetastoreClient::send_renew_delegation_token(const std::string& token_str_form) +void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + void* ctx = NULL; + if (eventHandler_.get() != NULL) { + ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); - ThriftHiveMetastore_renew_delegation_token_pargs args; - args.token_str_form = &token_str_form; - args.write(oprot_); + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} + ThriftHiveMetastore_drop_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); -int64_t ThriftHiveMetastoreClient::recv_renew_delegation_token() -{ + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); + } - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; + ThriftHiveMetastore_drop_database_result result; + try { + iface_->drop_database(args.name, args.deleteData, args.cascade); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + if (eventHandler_.get() != NULL) { + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); + } - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - } - if (fname.compare("renew_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; } - int64_t _return; - ThriftHiveMetastore_renew_delegation_token_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; + if (eventHandler_.get() != NULL) { + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); } - if (result.__isset.o1) { - throw result.o1; + + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_database", bytes); } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "renew_delegation_token failed: unknown result"); } -void ThriftHiveMetastoreClient::cancel_delegation_token(const std::string& token_str_form) +void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - send_cancel_delegation_token(token_str_form); - recv_cancel_delegation_token(); -} + void* ctx = NULL; + if (eventHandler_.get() != NULL) { + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); -void ThriftHiveMetastoreClient::send_cancel_delegation_token(const std::string& token_str_form) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid); + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); + } - ThriftHiveMetastore_cancel_delegation_token_pargs args; - args.token_str_form = &token_str_form; - args.write(oprot_); + ThriftHiveMetastore_get_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); - oprot_->writeMessageEnd(); - oprot_->getTransport()->writeEnd(); - oprot_->getTransport()->flush(); -} + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); + } -void ThriftHiveMetastoreClient::recv_cancel_delegation_token() -{ + ThriftHiveMetastore_get_databases_result result; + try { + iface_->get_databases(result.success, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (eventHandler_.get() != NULL) { + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); + } - int32_t rseqid = 0; - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { - ::apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; + if (eventHandler_.get() != NULL) { + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); } - if (mtype != ::apache::thrift::protocol::T_REPLY) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_databases", bytes); } - if (fname.compare("cancel_delegation_token") != 0) { - iprot_->skip(::apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (eventHandler_.get() != NULL) { + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); } - ThriftHiveMetastore_cancel_delegation_token_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); - if (result.__isset.o1) { - throw result.o1; + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); } - return; -} -bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* callContext) { + ThriftHiveMetastore_get_all_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); - ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); - ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); - std::string fname; - ::apache::thrift::protocol::TMessageType mtype; - int32_t seqid; + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + } - iprot->readMessageBegin(fname, mtype, seqid); + ThriftHiveMetastore_get_all_databases_result result; + try { + iface_->get_all_databases(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + if (eventHandler_.get() != NULL) { + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); + } - if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { - iprot->skip(::apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - return false; + return; } - return process_fn(iprot, oprot, fname, seqid, callContext); -} + if (eventHandler_.get() != NULL) { + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); + } -bool ThriftHiveMetastoreProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) { - std::map::iterator pfn; - pfn = processMap_.find(fname); - if (pfn == processMap_.end()) { - return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid, callContext); + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_databases", bytes); } - (this->*(pfn->second))(seqid, iprot, oprot, callContext); - return true; } -void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_database", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_database"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_database"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); } - ThriftHiveMetastore_create_database_args args; + ThriftHiveMetastore_alter_database_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_database", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); } - ThriftHiveMetastore_create_database_result result; + ThriftHiveMetastore_alter_database_result result; try { - iface_->create_database(args.database); - } catch (AlreadyExistsException &o1) { + iface_->alter_database(args.dbname, args.db); + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_database"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -20732,58 +23025,58 @@ void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apac } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_database"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); } - oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_database", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_database", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_database", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_database"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_database"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); } - ThriftHiveMetastore_get_database_args args; + ThriftHiveMetastore_get_type_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_database", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); } - ThriftHiveMetastore_get_database_result result; + ThriftHiveMetastore_get_type_result result; try { - iface_->get_database(result.success, args.name); + iface_->get_type(result.success, args.name); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_database"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -20792,48 +23085,49 @@ void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache: } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_database"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); } - oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_database", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_database", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_database"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_database"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); } - ThriftHiveMetastore_drop_database_args args; + ThriftHiveMetastore_create_type_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_database", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); } - ThriftHiveMetastore_drop_database_result result; + ThriftHiveMetastore_create_type_result result; try { - iface_->drop_database(args.name, args.deleteData, args.cascade); - } catch (NoSuchObjectException &o1) { + result.success = iface_->create_type(args.type); + result.__isset.success = true; + } catch (AlreadyExistsException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { + } catch (InvalidObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (MetaException &o3) { @@ -20841,11 +23135,11 @@ void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_database"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -20854,55 +23148,58 @@ void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_database"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); } - oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_database", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_type", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_databases", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_databases"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_databases"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); } - ThriftHiveMetastore_get_databases_args args; + ThriftHiveMetastore_drop_type_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_databases", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); } - ThriftHiveMetastore_get_databases_result result; + ThriftHiveMetastore_drop_type_result result; try { - iface_->get_databases(result.success, args.pattern); + result.success = iface_->drop_type(args.type); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_databases"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -20911,55 +23208,118 @@ void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_databases"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); } - oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_databases", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_type", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_all_databases", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_databases"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_databases"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); } - ThriftHiveMetastore_get_all_databases_args args; + ThriftHiveMetastore_get_type_all_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); } - ThriftHiveMetastore_get_all_databases_result result; + ThriftHiveMetastore_get_type_all_result result; try { - iface_->get_all_databases(result.success); + iface_->get_type_all(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + if (eventHandler_.get() != NULL) { + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (eventHandler_.get() != NULL) { + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); + } + + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type_all", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (eventHandler_.get() != NULL) { + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); + + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); + } + + ThriftHiveMetastore_get_fields_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); + } + + ThriftHiveMetastore_get_fields_result result; + try { + iface_->get_fields(result.success, args.db_name, args.table_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_databases"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -20968,57 +23328,61 @@ void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::ap } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_databases"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); } - oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_databases", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_database", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_database"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_database"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); } - ThriftHiveMetastore_alter_database_args args; + ThriftHiveMetastore_get_schema_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_database", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); } - ThriftHiveMetastore_alter_database_result result; + ThriftHiveMetastore_get_schema_result result; try { - iface_->alter_database(args.dbname, args.db); + iface_->get_schema(result.success, args.db_name, args.table_name); + result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (UnknownTableException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_database"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21027,58 +23391,63 @@ void ThriftHiveMetastoreProcessor::process_alter_database(int32_t seqid, ::apach } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_database"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); } - oprot->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_database", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_type", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); } - ThriftHiveMetastore_get_type_args args; + ThriftHiveMetastore_create_table_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); } - ThriftHiveMetastore_get_type_result result; + ThriftHiveMetastore_create_table_result result; try { - iface_->get_type(result.success, args.name); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->create_table(args.tbl); + } catch (AlreadyExistsException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (InvalidObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21087,45 +23456,44 @@ void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thr } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); } - oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table", bytes); } } -void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_create_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_type", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_type"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_environment_context"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_type"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } - ThriftHiveMetastore_create_type_args args; + ThriftHiveMetastore_create_table_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_type", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); } - ThriftHiveMetastore_create_type_result result; + ThriftHiveMetastore_create_table_with_environment_context_result result; try { - result.success = iface_->create_type(args.type); - result.__isset.success = true; + iface_->create_table_with_environment_context(args.tbl, args.environment_context); } catch (AlreadyExistsException &o1) { result.o1 = o1; result.__isset.o1 = true; @@ -21135,13 +23503,16 @@ void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache:: } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_type"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21150,58 +23521,57 @@ void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache:: } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_type"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); } - oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_type", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_type", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_type"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_type"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); } - ThriftHiveMetastore_drop_type_args args; + ThriftHiveMetastore_drop_table_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_type", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); } - ThriftHiveMetastore_drop_type_result result; + ThriftHiveMetastore_drop_table_result result; try { - result.success = iface_->drop_type(args.type); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->drop_table(args.dbname, args.name, args.deleteData); + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_type"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21210,55 +23580,55 @@ void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::th } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_type"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); } - oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_type", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_type_all", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_type_all"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_type_all"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); } - ThriftHiveMetastore_get_type_all_args args; + ThriftHiveMetastore_get_tables_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_type_all", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); } - ThriftHiveMetastore_get_type_all_result result; + ThriftHiveMetastore_get_tables_result result; try { - iface_->get_type_all(result.success, args.name); + iface_->get_tables(result.success, args.db_name, args.pattern); result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_type_all"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21267,61 +23637,55 @@ void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache: } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_type_all"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); } - oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_type_all", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_fields", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_fields"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_fields"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); } - ThriftHiveMetastore_get_fields_args args; + ThriftHiveMetastore_get_all_tables_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_fields", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); } - ThriftHiveMetastore_get_fields_result result; + ThriftHiveMetastore_get_all_tables_result result; try { - iface_->get_fields(result.success, args.db_name, args.table_name); + iface_->get_all_tables(result.success, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_fields"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21330,61 +23694,58 @@ void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::t } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_fields"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); } - oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_fields", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_tables", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_schema", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_schema"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_schema"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); } - ThriftHiveMetastore_get_schema_args args; + ThriftHiveMetastore_get_table_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_schema", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); } - ThriftHiveMetastore_get_schema_result result; + ThriftHiveMetastore_get_table_result result; try { - iface_->get_schema(result.success, args.db_name, args.table_name); + iface_->get_table(result.success, args.dbname, args.tbl_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (UnknownTableException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_schema"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21393,63 +23754,61 @@ void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::t } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_schema"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); } - oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_schema", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table", bytes); } } -void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_table_objects_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_table", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } - ThriftHiveMetastore_create_table_args args; + ThriftHiveMetastore_get_table_objects_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); } - ThriftHiveMetastore_create_table_result result; + ThriftHiveMetastore_get_table_objects_by_name_result result; try { - iface_->create_table(args.tbl); - } catch (AlreadyExistsException &o1) { + iface_->get_table_objects_by_name(result.success, args.dbname, args.tbl_names); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (InvalidOperationException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { + } catch (UnknownDBException &o3) { result.o3 = o3; result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21458,63 +23817,61 @@ void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache: } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); } - oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_create_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_table_names_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.create_table_with_environment_context", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_names_by_filter"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } - ThriftHiveMetastore_create_table_with_environment_context_args args; + ThriftHiveMetastore_get_table_names_by_filter_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); } - ThriftHiveMetastore_create_table_with_environment_context_result result; + ThriftHiveMetastore_get_table_names_by_filter_result result; try { - iface_->create_table_with_environment_context(args.tbl, args.environment_context); - } catch (AlreadyExistsException &o1) { + iface_->get_table_names_by_filter(result.success, args.dbname, args.filter, args.max_tables); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (InvalidOperationException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { + } catch (UnknownDBException &o3) { result.o3 = o3; result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21523,57 +23880,57 @@ void ThriftHiveMetastoreProcessor::process_create_table_with_environment_context } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); } - oprot->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.create_table_with_environment_context", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_table", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_table"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_table"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); } - ThriftHiveMetastore_drop_table_args args; + ThriftHiveMetastore_alter_table_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_table", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); } - ThriftHiveMetastore_drop_table_result result; + ThriftHiveMetastore_alter_table_result result; try { - iface_->drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_table"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21582,55 +23939,57 @@ void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::t } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_table"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); } - oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_table", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_tables", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_tables"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_tables"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } - ThriftHiveMetastore_get_tables_args args; + ThriftHiveMetastore_alter_table_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_tables", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); } - ThriftHiveMetastore_get_tables_result result; + ThriftHiveMetastore_alter_table_with_environment_context_result result; try { - iface_->get_tables(result.success, args.db_name, args.pattern); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_tables"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21639,55 +23998,61 @@ void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::t } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_tables"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); } - oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_tables", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_all_tables", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_all_tables"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_all_tables"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); } - ThriftHiveMetastore_get_all_tables_args args; + ThriftHiveMetastore_add_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_all_tables", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); } - ThriftHiveMetastore_get_all_tables_result result; + ThriftHiveMetastore_add_partition_result result; try { - iface_->get_all_tables(result.success, args.db_name); + iface_->add_partition(result.success, args.new_part); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_all_tables"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21696,58 +24061,61 @@ void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apach } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_all_tables"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); } - oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_all_tables", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_add_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } - ThriftHiveMetastore_get_table_args args; + ThriftHiveMetastore_add_partition_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); } - ThriftHiveMetastore_get_table_result result; + ThriftHiveMetastore_add_partition_with_environment_context_result result; try { - iface_->get_table(result.success, args.dbname, args.tbl_name); + iface_->add_partition_with_environment_context(result.success, args.new_part, args.environment_context); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21756,61 +24124,61 @@ void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::th } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); } - oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_table_objects_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_add_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_objects_by_name", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); } - ThriftHiveMetastore_get_table_objects_by_name_args args; + ThriftHiveMetastore_add_partitions_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); } - ThriftHiveMetastore_get_table_objects_by_name_result result; + ThriftHiveMetastore_add_partitions_result result; try { - iface_->get_table_objects_by_name(result.success, args.dbname, args.tbl_names); + result.success = iface_->add_partitions(args.new_parts); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { + } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21819,61 +24187,61 @@ void ThriftHiveMetastoreProcessor::process_get_table_objects_by_name(int32_t seq } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); } - oprot->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_objects_by_name", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_table_names_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_names_by_filter", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); } - ThriftHiveMetastore_get_table_names_by_filter_args args; + ThriftHiveMetastore_append_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); } - ThriftHiveMetastore_get_table_names_by_filter_result result; + ThriftHiveMetastore_append_partition_result result; try { - iface_->get_table_names_by_filter(result.success, args.dbname, args.filter, args.max_tables); + iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { + } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21882,57 +24250,61 @@ void ThriftHiveMetastoreProcessor::process_get_table_names_by_filter(int32_t seq } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); } - oprot->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_names_by_filter", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_table", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name"); } - ThriftHiveMetastore_alter_table_args args; + ThriftHiveMetastore_append_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); } - ThriftHiveMetastore_alter_table_result result; + ThriftHiveMetastore_append_partition_by_name_result result; try { - iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); - } catch (InvalidOperationException &o1) { + iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -21941,45 +24313,46 @@ void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache:: } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name"); } - oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_table_with_environment_context", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); } - ThriftHiveMetastore_alter_table_with_environment_context_args args; + ThriftHiveMetastore_drop_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); } - ThriftHiveMetastore_alter_table_with_environment_context_result result; + ThriftHiveMetastore_drop_partition_result result; try { - iface_->alter_table_with_environment_context(args.dbname, args.tbl_name, args.new_tbl, args.environment_context); - } catch (InvalidOperationException &o1) { + result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (MetaException &o2) { @@ -21987,11 +24360,11 @@ void ThriftHiveMetastoreProcessor::process_alter_table_with_environment_context( result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22000,61 +24373,58 @@ void ThriftHiveMetastoreProcessor::process_alter_table_with_environment_context( } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); } - oprot->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_table_with_environment_context", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partition", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } - ThriftHiveMetastore_add_partition_args args; + ThriftHiveMetastore_drop_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); } - ThriftHiveMetastore_add_partition_result result; + ThriftHiveMetastore_drop_partition_by_name_result result; try { - iface_->add_partition(result.success, args.new_part); + result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22063,61 +24433,58 @@ void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name"); } - oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_add_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partition_with_environment_context", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); } - ThriftHiveMetastore_add_partition_with_environment_context_args args; + ThriftHiveMetastore_get_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); } - ThriftHiveMetastore_add_partition_with_environment_context_result result; + ThriftHiveMetastore_get_partition_result result; try { - iface_->add_partition_with_environment_context(result.success, args.new_part, args.environment_context); + iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22126,61 +24493,58 @@ void ThriftHiveMetastoreProcessor::process_add_partition_with_environment_contex } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); } - oprot->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partition_with_environment_context", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_add_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partition_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_partitions", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_partitions"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_with_auth"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_partitions"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } - ThriftHiveMetastore_add_partitions_args args; + ThriftHiveMetastore_get_partition_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_partitions", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); } - ThriftHiveMetastore_add_partitions_result result; + ThriftHiveMetastore_get_partition_with_auth_result result; try { - result.success = iface_->add_partitions(args.new_parts); + iface_->get_partition_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_partitions"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22189,61 +24553,58 @@ void ThriftHiveMetastoreProcessor::process_add_partitions(int32_t seqid, ::apach } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_partitions"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth"); } - oprot->writeMessageBegin("add_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_partitions", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); } } -void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.append_partition", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_by_name"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_by_name"); } - ThriftHiveMetastore_append_partition_args args; + ThriftHiveMetastore_get_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); } - ThriftHiveMetastore_append_partition_result result; + ThriftHiveMetastore_get_partition_by_name_result result; try { - iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22252,61 +24613,58 @@ void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apa } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_by_name"); } - oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.append_partition_by_name", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.append_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.append_partition_by_name"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); } - ThriftHiveMetastore_append_partition_by_name_args args; + ThriftHiveMetastore_get_partitions_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); } - ThriftHiveMetastore_append_partition_by_name_result result; + ThriftHiveMetastore_get_partitions_result result; try { - iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.append_partition_by_name"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22315,44 +24673,44 @@ void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqi } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.append_partition_by_name"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); } - oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.append_partition_by_name", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partitions_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_partition", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_with_auth"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } - ThriftHiveMetastore_drop_partition_args args; + ThriftHiveMetastore_get_partitions_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); } - ThriftHiveMetastore_drop_partition_result result; + ThriftHiveMetastore_get_partitions_with_auth_result result; try { - result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + iface_->get_partitions_with_auth(result.success, args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); result.__isset.success = true; } catch (NoSuchObjectException &o1) { result.o1 = o1; @@ -22362,11 +24720,11 @@ void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apach result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22375,58 +24733,55 @@ void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apach } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); } - oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_partition_by_name", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); } - ThriftHiveMetastore_drop_partition_by_name_args args; + ThriftHiveMetastore_get_partition_names_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); } - ThriftHiveMetastore_drop_partition_by_name_result result; + ThriftHiveMetastore_get_partition_names_result result; try { - result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22435,44 +24790,44 @@ void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); } - oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_partition_by_name", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); } - ThriftHiveMetastore_get_partition_args args; + ThriftHiveMetastore_get_partitions_ps_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); } - ThriftHiveMetastore_get_partition_result result; + ThriftHiveMetastore_get_partitions_ps_result result; try { - iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; @@ -22482,11 +24837,11 @@ void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22495,58 +24850,58 @@ void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); } - oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_with_auth", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } - ThriftHiveMetastore_get_partition_with_auth_args args; + ThriftHiveMetastore_get_partitions_ps_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); } - ThriftHiveMetastore_get_partition_with_auth_result result; + ThriftHiveMetastore_get_partitions_ps_with_auth_result result; try { - iface_->get_partition_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); + iface_->get_partitions_ps_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22555,44 +24910,44 @@ void ThriftHiveMetastoreProcessor::process_get_partition_with_auth(int32_t seqid } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); } - oprot->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_with_auth", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_by_name", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_by_name"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names_ps"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_by_name"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } - ThriftHiveMetastore_get_partition_by_name_args args; + ThriftHiveMetastore_get_partition_names_ps_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); } - ThriftHiveMetastore_get_partition_by_name_result result; + ThriftHiveMetastore_get_partition_names_ps_result result; try { - iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; @@ -22602,11 +24957,11 @@ void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_by_name"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22615,58 +24970,58 @@ void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_by_name"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps"); } - oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_by_name", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_filter"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } - ThriftHiveMetastore_get_partitions_args args; + ThriftHiveMetastore_get_partitions_by_filter_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); } - ThriftHiveMetastore_get_partitions_result result; + ThriftHiveMetastore_get_partitions_by_filter_result result; try { - iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); + iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22675,58 +25030,58 @@ void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apach } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); } - oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partitions_by_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_with_auth", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_names"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } - ThriftHiveMetastore_get_partitions_with_auth_args args; + ThriftHiveMetastore_get_partitions_by_names_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); } - ThriftHiveMetastore_get_partitions_with_auth_result result; + ThriftHiveMetastore_get_partitions_by_names_result result; try { - iface_->get_partitions_with_auth(result.success, args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); + iface_->get_partitions_by_names(result.success, args.db_name, args.tbl_name, args.names); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22735,55 +25090,57 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_with_auth(int32_t seqi } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names"); } - oprot->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_with_auth", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_names", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); } - ThriftHiveMetastore_get_partition_names_args args; + ThriftHiveMetastore_alter_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); } - ThriftHiveMetastore_get_partition_names_result result; + ThriftHiveMetastore_alter_partition_result result; try { - iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); - result.__isset.success = true; + iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22792,58 +25149,57 @@ void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, :: } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); } - oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); } - ThriftHiveMetastore_get_partitions_ps_args args; + ThriftHiveMetastore_alter_partitions_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); } - ThriftHiveMetastore_get_partitions_ps_result result; + ThriftHiveMetastore_alter_partitions_result result; try { - iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->alter_partitions(args.db_name, args.tbl_name, args.new_parts); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22852,46 +25208,45 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::ap } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); } - oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_ps_with_auth", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } - ThriftHiveMetastore_get_partitions_ps_with_auth_args args; + ThriftHiveMetastore_alter_partition_with_environment_context_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); } - ThriftHiveMetastore_get_partitions_ps_with_auth_result result; + ThriftHiveMetastore_alter_partition_with_environment_context_result result; try { - iface_->get_partitions_ps_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); - result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + iface_->alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (MetaException &o2) { @@ -22899,11 +25254,11 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t s result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22912,58 +25267,57 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t s } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); } - oprot->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_ps_with_auth", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_rename_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_names_ps", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_names_ps"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); } - ThriftHiveMetastore_get_partition_names_ps_args args; + ThriftHiveMetastore_rename_partition_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); } - ThriftHiveMetastore_get_partition_names_ps_result result; + ThriftHiveMetastore_rename_partition_result result; try { - iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); - result.__isset.success = true; - } catch (MetaException &o1) { + iface_->rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -22972,58 +25326,55 @@ void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); } - oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_names_ps", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_filter", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); } - ThriftHiveMetastore_get_partitions_by_filter_args args; + ThriftHiveMetastore_get_config_value_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); } - ThriftHiveMetastore_get_partitions_by_filter_result result; + ThriftHiveMetastore_get_config_value_result result; try { - iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); + iface_->get_config_value(result.success, args.name, args.defaultValue); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (ConfigValSecurityException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23032,58 +25383,55 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqi } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); } - oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_filter", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_config_value", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_partitions_by_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partitions_by_names", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partitions_by_names"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_vals"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } - ThriftHiveMetastore_get_partitions_by_names_args args; + ThriftHiveMetastore_partition_name_to_vals_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); } - ThriftHiveMetastore_get_partitions_by_names_result result; + ThriftHiveMetastore_partition_name_to_vals_result result; try { - iface_->get_partitions_by_names(result.success, args.db_name, args.tbl_name, args.names); + iface_->partition_name_to_vals(result.success, args.part_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23092,57 +25440,55 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_by_names(int32_t seqid } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals"); } - oprot->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partitions_by_names", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partition", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_spec"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } - ThriftHiveMetastore_alter_partition_args args; + ThriftHiveMetastore_partition_name_to_spec_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); } - ThriftHiveMetastore_alter_partition_result result; + ThriftHiveMetastore_partition_name_to_spec_result result; try { - iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException &o1) { + iface_->partition_name_to_spec(result.success, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23151,57 +25497,69 @@ void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apac } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec"); } - oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_markPartitionForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partitions", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partitions"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partitions"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } - ThriftHiveMetastore_alter_partitions_args args; + ThriftHiveMetastore_markPartitionForEvent_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); } - ThriftHiveMetastore_alter_partitions_result result; + ThriftHiveMetastore_markPartitionForEvent_result result; try { - iface_->alter_partitions(args.db_name, args.tbl_name, args.new_parts); - } catch (InvalidOperationException &o1) { + iface_->markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (UnknownTableException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (UnknownPartitionException &o5) { + result.o5 = o5; + result.__isset.o5 = true; + } catch (InvalidPartitionException &o6) { + result.o6 = o6; + result.__isset.o6 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partitions"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23210,57 +25568,70 @@ void ThriftHiveMetastoreProcessor::process_alter_partitions(int32_t seqid, ::apa } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partitions"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); } - oprot->writeMessageBegin("alter_partitions", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partitions", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_partition_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_partition_with_environment_context", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } - ThriftHiveMetastore_alter_partition_with_environment_context_args args; + ThriftHiveMetastore_isPartitionMarkedForEvent_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); } - ThriftHiveMetastore_alter_partition_with_environment_context_result result; + ThriftHiveMetastore_isPartitionMarkedForEvent_result result; try { - iface_->alter_partition_with_environment_context(args.db_name, args.tbl_name, args.new_part, args.environment_context); - } catch (InvalidOperationException &o1) { + result.success = iface_->isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (UnknownTableException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (UnknownPartitionException &o5) { + result.o5 = o5; + result.__isset.o5 = true; + } catch (InvalidPartitionException &o6) { + result.o6 = o6; + result.__isset.o6 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23269,57 +25640,61 @@ void ThriftHiveMetastoreProcessor::process_alter_partition_with_environment_cont } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); } - oprot->writeMessageBegin("alter_partition_with_environment_context", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_partition_with_environment_context", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); } } -void ThriftHiveMetastoreProcessor::process_rename_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.rename_partition", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.rename_partition"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.rename_partition"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); } - ThriftHiveMetastore_rename_partition_args args; + ThriftHiveMetastore_add_index_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.rename_partition", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); } - ThriftHiveMetastore_rename_partition_result result; + ThriftHiveMetastore_add_index_result result; try { - iface_->rename_partition(args.db_name, args.tbl_name, args.part_vals, args.new_part); - } catch (InvalidOperationException &o1) { + iface_->add_index(result.success, args.new_index, args.index_table); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.rename_partition"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23328,55 +25703,57 @@ void ThriftHiveMetastoreProcessor::process_rename_partition(int32_t seqid, ::apa } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.rename_partition"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); } - oprot->writeMessageBegin("rename_partition", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.rename_partition", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_index", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_config_value", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_config_value"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_config_value"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); } - ThriftHiveMetastore_get_config_value_args args; + ThriftHiveMetastore_alter_index_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_config_value", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); } - ThriftHiveMetastore_get_config_value_result result; + ThriftHiveMetastore_alter_index_result result; try { - iface_->get_config_value(result.success, args.name, args.defaultValue); - result.__isset.success = true; - } catch (ConfigValSecurityException &o1) { + iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_config_value"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23385,55 +25762,58 @@ void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apa } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_config_value"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); } - oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_config_value", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_index", bytes); } } -void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_vals", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_vals"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_index_by_name"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_index_by_name"); } - ThriftHiveMetastore_partition_name_to_vals_args args; + ThriftHiveMetastore_drop_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); } - ThriftHiveMetastore_partition_name_to_vals_result result; + ThriftHiveMetastore_drop_index_by_name_result result; try { - iface_->partition_name_to_vals(result.success, args.part_name); + result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23442,55 +25822,58 @@ void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_index_by_name"); } - oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_vals", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.partition_name_to_spec", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.partition_name_to_spec"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_by_name"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_by_name"); } - ThriftHiveMetastore_partition_name_to_spec_args args; + ThriftHiveMetastore_get_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); } - ThriftHiveMetastore_partition_name_to_spec_result result; + ThriftHiveMetastore_get_index_by_name_result result; try { - iface_->partition_name_to_spec(result.success, args.part_name); + iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23499,69 +25882,58 @@ void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_by_name"); } - oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.partition_name_to_spec", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); } } -void ThriftHiveMetastoreProcessor::process_markPartitionForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.markPartitionForEvent", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.markPartitionForEvent"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); } - ThriftHiveMetastore_markPartitionForEvent_args args; + ThriftHiveMetastore_get_indexes_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); } - ThriftHiveMetastore_markPartitionForEvent_result result; + ThriftHiveMetastore_get_indexes_result result; try { - iface_->markPartitionForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); - } catch (MetaException &o1) { + iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (UnknownTableException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (UnknownPartitionException &o5) { - result.o5 = o5; - result.__isset.o5 = true; - } catch (InvalidPartitionException &o6) { - result.o6 = o6; - result.__isset.o6 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23570,70 +25942,55 @@ void ThriftHiveMetastoreProcessor::process_markPartitionForEvent(int32_t seqid, } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); } - oprot->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.markPartitionForEvent", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_indexes", bytes); } } -void ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.isPartitionMarkedForEvent", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); } - ThriftHiveMetastore_isPartitionMarkedForEvent_args args; + ThriftHiveMetastore_get_index_names_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); } - ThriftHiveMetastore_isPartitionMarkedForEvent_result result; + ThriftHiveMetastore_get_index_names_result result; try { - result.success = iface_->isPartitionMarkedForEvent(args.db_name, args.tbl_name, args.part_vals, args.eventType); + iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); result.__isset.success = true; - } catch (MetaException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (UnknownTableException &o4) { - result.o4 = o4; - result.__isset.o4 = true; - } catch (UnknownPartitionException &o5) { - result.o5 = o5; - result.__isset.o5 = true; - } catch (InvalidPartitionException &o6) { - result.o6 = o6; - result.__isset.o6 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23642,61 +25999,64 @@ void ThriftHiveMetastoreProcessor::process_isPartitionMarkedForEvent(int32_t seq } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); } - oprot->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.isPartitionMarkedForEvent", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); } } -void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_update_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.add_index", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.update_table_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.add_index"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.update_table_column_statistics"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.add_index"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_table_column_statistics"); } - ThriftHiveMetastore_add_index_args args; + ThriftHiveMetastore_update_table_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.add_index", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); } - ThriftHiveMetastore_add_index_result result; + ThriftHiveMetastore_update_table_column_statistics_result result; try { - iface_->add_index(result.success, args.new_index, args.index_table); + result.success = iface_->update_table_column_statistics(args.stats_obj); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (InvalidObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (MetaException &o3) { result.o3 = o3; result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.add_index"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_table_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23705,57 +26065,64 @@ void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::th } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.add_index"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics"); } - oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("update_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.add_index", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_table_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_update_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.alter_index", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.update_partition_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.alter_index"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.update_partition_column_statistics"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.alter_index"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); } - ThriftHiveMetastore_alter_index_args args; + ThriftHiveMetastore_update_partition_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.alter_index", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); } - ThriftHiveMetastore_alter_index_result result; + ThriftHiveMetastore_update_partition_column_statistics_result result; try { - iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException &o1) { + result.success = iface_->update_partition_column_statistics(args.stats_obj); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (InvalidObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.alter_index"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23764,44 +26131,44 @@ void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, ::apache:: } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.alter_index"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics"); } - oprot->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("update_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.alter_index", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.update_partition_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.drop_index_by_name", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_table_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.drop_index_by_name"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_table_column_statistics"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.drop_index_by_name"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_table_column_statistics"); } - ThriftHiveMetastore_drop_index_by_name_args args; + ThriftHiveMetastore_get_table_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); } - ThriftHiveMetastore_drop_index_by_name_result result; + ThriftHiveMetastore_get_table_column_statistics_result result; try { - result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); + iface_->get_table_column_statistics(result.success, args.db_name, args.tbl_name, args.col_name); result.__isset.success = true; } catch (NoSuchObjectException &o1) { result.o1 = o1; @@ -23809,13 +26176,19 @@ void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::a } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (InvalidInputException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.drop_index_by_name"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_table_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23824,58 +26197,64 @@ void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::a } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.drop_index_by_name"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics"); } - oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.drop_index_by_name", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_table_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_get_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_index_by_name", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.get_partition_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_by_name"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_partition_column_statistics"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_by_name"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); } - ThriftHiveMetastore_get_index_by_name_args args; + ThriftHiveMetastore_get_partition_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); } - ThriftHiveMetastore_get_index_by_name_result result; + ThriftHiveMetastore_get_partition_column_statistics_result result; try { - iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); + iface_->get_partition_column_statistics(result.success, args.db_name, args.tbl_name, args.part_name, args.col_name); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (InvalidInputException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_by_name"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23884,44 +26263,44 @@ void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::ap } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_by_name"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics"); } - oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_by_name", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_partition_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_indexes", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.delete_partition_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_indexes"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_indexes"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); } - ThriftHiveMetastore_get_indexes_args args; + ThriftHiveMetastore_delete_partition_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_indexes", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); } - ThriftHiveMetastore_get_indexes_result result; + ThriftHiveMetastore_delete_partition_column_statistics_result result; try { - iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); result.__isset.success = true; } catch (NoSuchObjectException &o1) { result.o1 = o1; @@ -23929,13 +26308,19 @@ void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache:: } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (InvalidObjectException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_indexes"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -23944,55 +26329,64 @@ void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache:: } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_indexes"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics"); } - oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("delete_partition_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_indexes", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_partition_column_statistics", bytes); } } -void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +void ThriftHiveMetastoreProcessor::process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; if (eventHandler_.get() != NULL) { - ctx = eventHandler_->getContext("ThriftHiveMetastore.get_index_names", callContext); + ctx = eventHandler_->getContext("ThriftHiveMetastore.delete_table_column_statistics", callContext); } - ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_index_names"); + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_table_column_statistics"); if (eventHandler_.get() != NULL) { - eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_index_names"); + eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); } - ThriftHiveMetastore_get_index_names_args args; + ThriftHiveMetastore_delete_table_column_statistics_args args; args.read(iprot); iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); if (eventHandler_.get() != NULL) { - eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_index_names", bytes); + eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); } - ThriftHiveMetastore_get_index_names_result result; + ThriftHiveMetastore_delete_table_column_statistics_result result; try { - iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (InvalidObjectException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; } catch (const std::exception& e) { if (eventHandler_.get() != NULL) { - eventHandler_->handlerError(ctx, "ThriftHiveMetastore.get_index_names"); + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); } ::apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->writeEnd(); @@ -24001,17 +26395,17 @@ void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apac } if (eventHandler_.get() != NULL) { - eventHandler_->preWrite(ctx, "ThriftHiveMetastore.get_index_names"); + eventHandler_->preWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics"); } - oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("delete_table_column_statistics", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); if (eventHandler_.get() != NULL) { - eventHandler_->postWrite(ctx, "ThriftHiveMetastore.get_index_names", bytes); + eventHandler_->postWrite(ctx, "ThriftHiveMetastore.delete_table_column_statistics", bytes); } } diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h index 34c05fc..d726190 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -70,6 +70,12 @@ class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf virtual void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) = 0; virtual void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; virtual void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; + virtual bool update_table_column_statistics(const ColumnStatistics& stats_obj) = 0; + virtual bool update_partition_column_statistics(const ColumnStatistics& stats_obj) = 0; + virtual void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) = 0; + virtual void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) = 0; + virtual bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) = 0; + virtual bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) = 0; virtual bool create_role(const Role& role) = 0; virtual bool drop_role(const std::string& role_name) = 0; virtual void get_role_names(std::vector & _return) = 0; @@ -261,6 +267,28 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p void get_index_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_indexes */) { return; } + bool update_table_column_statistics(const ColumnStatistics& /* stats_obj */) { + bool _return = false; + return _return; + } + bool update_partition_column_statistics(const ColumnStatistics& /* stats_obj */) { + bool _return = false; + return _return; + } + void get_table_column_statistics(ColumnStatistics& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* col_name */) { + return; + } + void get_partition_column_statistics(ColumnStatistics& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const std::string& /* col_name */) { + return; + } + bool delete_partition_column_statistics(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */, const std::string& /* col_name */) { + bool _return = false; + return _return; + } + bool delete_table_column_statistics(const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* col_name */) { + bool _return = false; + return _return; + } bool create_role(const Role& /* role */) { bool _return = false; return _return; @@ -8167,38 +8195,38 @@ class ThriftHiveMetastore_get_index_names_presult { }; -typedef struct _ThriftHiveMetastore_create_role_args__isset { - _ThriftHiveMetastore_create_role_args__isset() : role(false) {} - bool role; -} _ThriftHiveMetastore_create_role_args__isset; +typedef struct _ThriftHiveMetastore_update_table_column_statistics_args__isset { + _ThriftHiveMetastore_update_table_column_statistics_args__isset() : stats_obj(false) {} + bool stats_obj; +} _ThriftHiveMetastore_update_table_column_statistics_args__isset; -class ThriftHiveMetastore_create_role_args { +class ThriftHiveMetastore_update_table_column_statistics_args { public: - ThriftHiveMetastore_create_role_args() { + ThriftHiveMetastore_update_table_column_statistics_args() { } - virtual ~ThriftHiveMetastore_create_role_args() throw() {} + virtual ~ThriftHiveMetastore_update_table_column_statistics_args() throw() {} - Role role; + ColumnStatistics stats_obj; - _ThriftHiveMetastore_create_role_args__isset __isset; + _ThriftHiveMetastore_update_table_column_statistics_args__isset __isset; - void __set_role(const Role& val) { - role = val; + void __set_stats_obj(const ColumnStatistics& val) { + stats_obj = val; } - bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const + bool operator == (const ThriftHiveMetastore_update_table_column_statistics_args & rhs) const { - if (!(role == rhs.role)) + if (!(stats_obj == rhs.stats_obj)) return false; return true; } - bool operator != (const ThriftHiveMetastore_create_role_args &rhs) const { + bool operator != (const ThriftHiveMetastore_update_table_column_statistics_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_create_role_args & ) const; + bool operator < (const ThriftHiveMetastore_update_table_column_statistics_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -8206,117 +8234,147 @@ class ThriftHiveMetastore_create_role_args { }; -class ThriftHiveMetastore_create_role_pargs { +class ThriftHiveMetastore_update_table_column_statistics_pargs { public: - virtual ~ThriftHiveMetastore_create_role_pargs() throw() {} + virtual ~ThriftHiveMetastore_update_table_column_statistics_pargs() throw() {} - const Role* role; + const ColumnStatistics* stats_obj; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_create_role_result__isset { - _ThriftHiveMetastore_create_role_result__isset() : success(false), o1(false) {} +typedef struct _ThriftHiveMetastore_update_table_column_statistics_result__isset { + _ThriftHiveMetastore_update_table_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} bool success; bool o1; -} _ThriftHiveMetastore_create_role_result__isset; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_update_table_column_statistics_result__isset; -class ThriftHiveMetastore_create_role_result { +class ThriftHiveMetastore_update_table_column_statistics_result { public: - ThriftHiveMetastore_create_role_result() : success(0) { + ThriftHiveMetastore_update_table_column_statistics_result() : success(0) { } - virtual ~ThriftHiveMetastore_create_role_result() throw() {} + virtual ~ThriftHiveMetastore_update_table_column_statistics_result() throw() {} bool success; - MetaException o1; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; - _ThriftHiveMetastore_create_role_result__isset __isset; + _ThriftHiveMetastore_update_table_column_statistics_result__isset __isset; void __set_success(const bool val) { success = val; } - void __set_o1(const MetaException& val) { + void __set_o1(const NoSuchObjectException& val) { o1 = val; } - bool operator == (const ThriftHiveMetastore_create_role_result & rhs) const + void __set_o2(const InvalidObjectException& val) { + o2 = val; + } + + void __set_o3(const MetaException& val) { + o3 = val; + } + + void __set_o4(const InvalidInputException& val) { + o4 = val; + } + + bool operator == (const ThriftHiveMetastore_update_table_column_statistics_result & rhs) const { if (!(success == rhs.success)) return false; if (!(o1 == rhs.o1)) return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; return true; } - bool operator != (const ThriftHiveMetastore_create_role_result &rhs) const { + bool operator != (const ThriftHiveMetastore_update_table_column_statistics_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_create_role_result & ) const; + bool operator < (const ThriftHiveMetastore_update_table_column_statistics_result & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_create_role_presult__isset { - _ThriftHiveMetastore_create_role_presult__isset() : success(false), o1(false) {} +typedef struct _ThriftHiveMetastore_update_table_column_statistics_presult__isset { + _ThriftHiveMetastore_update_table_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} bool success; bool o1; -} _ThriftHiveMetastore_create_role_presult__isset; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_update_table_column_statistics_presult__isset; -class ThriftHiveMetastore_create_role_presult { +class ThriftHiveMetastore_update_table_column_statistics_presult { public: - virtual ~ThriftHiveMetastore_create_role_presult() throw() {} + virtual ~ThriftHiveMetastore_update_table_column_statistics_presult() throw() {} bool* success; - MetaException o1; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; - _ThriftHiveMetastore_create_role_presult__isset __isset; + _ThriftHiveMetastore_update_table_column_statistics_presult__isset __isset; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; -typedef struct _ThriftHiveMetastore_drop_role_args__isset { - _ThriftHiveMetastore_drop_role_args__isset() : role_name(false) {} - bool role_name; -} _ThriftHiveMetastore_drop_role_args__isset; +typedef struct _ThriftHiveMetastore_update_partition_column_statistics_args__isset { + _ThriftHiveMetastore_update_partition_column_statistics_args__isset() : stats_obj(false) {} + bool stats_obj; +} _ThriftHiveMetastore_update_partition_column_statistics_args__isset; -class ThriftHiveMetastore_drop_role_args { +class ThriftHiveMetastore_update_partition_column_statistics_args { public: - ThriftHiveMetastore_drop_role_args() : role_name("") { + ThriftHiveMetastore_update_partition_column_statistics_args() { } - virtual ~ThriftHiveMetastore_drop_role_args() throw() {} + virtual ~ThriftHiveMetastore_update_partition_column_statistics_args() throw() {} - std::string role_name; + ColumnStatistics stats_obj; - _ThriftHiveMetastore_drop_role_args__isset __isset; + _ThriftHiveMetastore_update_partition_column_statistics_args__isset __isset; - void __set_role_name(const std::string& val) { - role_name = val; + void __set_stats_obj(const ColumnStatistics& val) { + stats_obj = val; } - bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + bool operator == (const ThriftHiveMetastore_update_partition_column_statistics_args & rhs) const { - if (!(role_name == rhs.role_name)) + if (!(stats_obj == rhs.stats_obj)) return false; return true; } - bool operator != (const ThriftHiveMetastore_drop_role_args &rhs) const { + bool operator != (const ThriftHiveMetastore_update_partition_column_statistics_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; + bool operator < (const ThriftHiveMetastore_update_partition_column_statistics_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -8324,104 +8382,163 @@ class ThriftHiveMetastore_drop_role_args { }; -class ThriftHiveMetastore_drop_role_pargs { +class ThriftHiveMetastore_update_partition_column_statistics_pargs { public: - virtual ~ThriftHiveMetastore_drop_role_pargs() throw() {} + virtual ~ThriftHiveMetastore_update_partition_column_statistics_pargs() throw() {} - const std::string* role_name; + const ColumnStatistics* stats_obj; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_drop_role_result__isset { - _ThriftHiveMetastore_drop_role_result__isset() : success(false), o1(false) {} +typedef struct _ThriftHiveMetastore_update_partition_column_statistics_result__isset { + _ThriftHiveMetastore_update_partition_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} bool success; bool o1; -} _ThriftHiveMetastore_drop_role_result__isset; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_update_partition_column_statistics_result__isset; -class ThriftHiveMetastore_drop_role_result { +class ThriftHiveMetastore_update_partition_column_statistics_result { public: - ThriftHiveMetastore_drop_role_result() : success(0) { + ThriftHiveMetastore_update_partition_column_statistics_result() : success(0) { } - virtual ~ThriftHiveMetastore_drop_role_result() throw() {} + virtual ~ThriftHiveMetastore_update_partition_column_statistics_result() throw() {} bool success; - MetaException o1; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; - _ThriftHiveMetastore_drop_role_result__isset __isset; + _ThriftHiveMetastore_update_partition_column_statistics_result__isset __isset; void __set_success(const bool val) { success = val; } - void __set_o1(const MetaException& val) { + void __set_o1(const NoSuchObjectException& val) { o1 = val; } - bool operator == (const ThriftHiveMetastore_drop_role_result & rhs) const + void __set_o2(const InvalidObjectException& val) { + o2 = val; + } + + void __set_o3(const MetaException& val) { + o3 = val; + } + + void __set_o4(const InvalidInputException& val) { + o4 = val; + } + + bool operator == (const ThriftHiveMetastore_update_partition_column_statistics_result & rhs) const { if (!(success == rhs.success)) return false; if (!(o1 == rhs.o1)) return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; return true; } - bool operator != (const ThriftHiveMetastore_drop_role_result &rhs) const { + bool operator != (const ThriftHiveMetastore_update_partition_column_statistics_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_drop_role_result & ) const; + bool operator < (const ThriftHiveMetastore_update_partition_column_statistics_result & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_drop_role_presult__isset { - _ThriftHiveMetastore_drop_role_presult__isset() : success(false), o1(false) {} +typedef struct _ThriftHiveMetastore_update_partition_column_statistics_presult__isset { + _ThriftHiveMetastore_update_partition_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} bool success; bool o1; -} _ThriftHiveMetastore_drop_role_presult__isset; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_update_partition_column_statistics_presult__isset; -class ThriftHiveMetastore_drop_role_presult { +class ThriftHiveMetastore_update_partition_column_statistics_presult { public: - virtual ~ThriftHiveMetastore_drop_role_presult() throw() {} + virtual ~ThriftHiveMetastore_update_partition_column_statistics_presult() throw() {} bool* success; - MetaException o1; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; - _ThriftHiveMetastore_drop_role_presult__isset __isset; + _ThriftHiveMetastore_update_partition_column_statistics_presult__isset __isset; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_table_column_statistics_args__isset { + _ThriftHiveMetastore_get_table_column_statistics_args__isset() : db_name(false), tbl_name(false), col_name(false) {} + bool db_name; + bool tbl_name; + bool col_name; +} _ThriftHiveMetastore_get_table_column_statistics_args__isset; -class ThriftHiveMetastore_get_role_names_args { +class ThriftHiveMetastore_get_table_column_statistics_args { public: - ThriftHiveMetastore_get_role_names_args() { + ThriftHiveMetastore_get_table_column_statistics_args() : db_name(""), tbl_name(""), col_name("") { } - virtual ~ThriftHiveMetastore_get_role_names_args() throw() {} + virtual ~ThriftHiveMetastore_get_table_column_statistics_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string col_name; + _ThriftHiveMetastore_get_table_column_statistics_args__isset __isset; - bool operator == (const ThriftHiveMetastore_get_role_names_args & /* rhs */) const + void __set_db_name(const std::string& val) { + db_name = val; + } + + void __set_tbl_name(const std::string& val) { + tbl_name = val; + } + + void __set_col_name(const std::string& val) { + col_name = val; + } + + bool operator == (const ThriftHiveMetastore_get_table_column_statistics_args & rhs) const { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(col_name == rhs.col_name)) + return false; return true; } - bool operator != (const ThriftHiveMetastore_get_role_names_args &rhs) const { + bool operator != (const ThriftHiveMetastore_get_table_column_statistics_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_get_role_names_args & ) const; + bool operator < (const ThriftHiveMetastore_get_table_column_statistics_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -8429,113 +8546,1002 @@ class ThriftHiveMetastore_get_role_names_args { }; -class ThriftHiveMetastore_get_role_names_pargs { +class ThriftHiveMetastore_get_table_column_statistics_pargs { public: - virtual ~ThriftHiveMetastore_get_role_names_pargs() throw() {} + virtual ~ThriftHiveMetastore_get_table_column_statistics_pargs() throw() {} + const std::string* db_name; + const std::string* tbl_name; + const std::string* col_name; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_get_role_names_result__isset { - _ThriftHiveMetastore_get_role_names_result__isset() : success(false), o1(false) {} +typedef struct _ThriftHiveMetastore_get_table_column_statistics_result__isset { + _ThriftHiveMetastore_get_table_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} bool success; bool o1; -} _ThriftHiveMetastore_get_role_names_result__isset; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_get_table_column_statistics_result__isset; -class ThriftHiveMetastore_get_role_names_result { +class ThriftHiveMetastore_get_table_column_statistics_result { public: - ThriftHiveMetastore_get_role_names_result() { + ThriftHiveMetastore_get_table_column_statistics_result() { } - virtual ~ThriftHiveMetastore_get_role_names_result() throw() {} + virtual ~ThriftHiveMetastore_get_table_column_statistics_result() throw() {} - std::vector success; - MetaException o1; + ColumnStatistics success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; - _ThriftHiveMetastore_get_role_names_result__isset __isset; + _ThriftHiveMetastore_get_table_column_statistics_result__isset __isset; - void __set_success(const std::vector & val) { + void __set_success(const ColumnStatistics& val) { success = val; } - void __set_o1(const MetaException& val) { + void __set_o1(const NoSuchObjectException& val) { o1 = val; } - bool operator == (const ThriftHiveMetastore_get_role_names_result & rhs) const + void __set_o2(const MetaException& val) { + o2 = val; + } + + void __set_o3(const InvalidInputException& val) { + o3 = val; + } + + void __set_o4(const InvalidObjectException& val) { + o4 = val; + } + + bool operator == (const ThriftHiveMetastore_get_table_column_statistics_result & rhs) const { if (!(success == rhs.success)) return false; if (!(o1 == rhs.o1)) return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; return true; } - bool operator != (const ThriftHiveMetastore_get_role_names_result &rhs) const { + bool operator != (const ThriftHiveMetastore_get_table_column_statistics_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_get_role_names_result & ) const; + bool operator < (const ThriftHiveMetastore_get_table_column_statistics_result & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -typedef struct _ThriftHiveMetastore_get_role_names_presult__isset { - _ThriftHiveMetastore_get_role_names_presult__isset() : success(false), o1(false) {} +typedef struct _ThriftHiveMetastore_get_table_column_statistics_presult__isset { + _ThriftHiveMetastore_get_table_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} bool success; bool o1; -} _ThriftHiveMetastore_get_role_names_presult__isset; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_get_table_column_statistics_presult__isset; -class ThriftHiveMetastore_get_role_names_presult { +class ThriftHiveMetastore_get_table_column_statistics_presult { public: - virtual ~ThriftHiveMetastore_get_role_names_presult() throw() {} + virtual ~ThriftHiveMetastore_get_table_column_statistics_presult() throw() {} - std::vector * success; - MetaException o1; + ColumnStatistics* success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; - _ThriftHiveMetastore_get_role_names_presult__isset __isset; + _ThriftHiveMetastore_get_table_column_statistics_presult__isset __isset; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; -typedef struct _ThriftHiveMetastore_grant_role_args__isset { - _ThriftHiveMetastore_grant_role_args__isset() : role_name(false), principal_name(false), principal_type(false), grantor(false), grantorType(false), grant_option(false) {} - bool role_name; - bool principal_name; - bool principal_type; - bool grantor; - bool grantorType; - bool grant_option; -} _ThriftHiveMetastore_grant_role_args__isset; +typedef struct _ThriftHiveMetastore_get_partition_column_statistics_args__isset { + _ThriftHiveMetastore_get_partition_column_statistics_args__isset() : db_name(false), tbl_name(false), part_name(false), col_name(false) {} + bool db_name; + bool tbl_name; + bool part_name; + bool col_name; +} _ThriftHiveMetastore_get_partition_column_statistics_args__isset; -class ThriftHiveMetastore_grant_role_args { +class ThriftHiveMetastore_get_partition_column_statistics_args { public: - ThriftHiveMetastore_grant_role_args() : role_name(""), principal_name(""), grantor(""), grant_option(0) { + ThriftHiveMetastore_get_partition_column_statistics_args() : db_name(""), tbl_name(""), part_name(""), col_name("") { } - virtual ~ThriftHiveMetastore_grant_role_args() throw() {} + virtual ~ThriftHiveMetastore_get_partition_column_statistics_args() throw() {} - std::string role_name; - std::string principal_name; - PrincipalType::type principal_type; - std::string grantor; - PrincipalType::type grantorType; - bool grant_option; + std::string db_name; + std::string tbl_name; + std::string part_name; + std::string col_name; - _ThriftHiveMetastore_grant_role_args__isset __isset; + _ThriftHiveMetastore_get_partition_column_statistics_args__isset __isset; - void __set_role_name(const std::string& val) { - role_name = val; + void __set_db_name(const std::string& val) { + db_name = val; + } + + void __set_tbl_name(const std::string& val) { + tbl_name = val; + } + + void __set_part_name(const std::string& val) { + part_name = val; + } + + void __set_col_name(const std::string& val) { + col_name = val; + } + + bool operator == (const ThriftHiveMetastore_get_partition_column_statistics_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(col_name == rhs.col_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_column_statistics_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_column_statistics_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_partition_column_statistics_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_column_statistics_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + const std::string* col_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_column_statistics_result__isset { + _ThriftHiveMetastore_get_partition_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_get_partition_column_statistics_result__isset; + +class ThriftHiveMetastore_get_partition_column_statistics_result { + public: + + ThriftHiveMetastore_get_partition_column_statistics_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_column_statistics_result() throw() {} + + ColumnStatistics success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; + + _ThriftHiveMetastore_get_partition_column_statistics_result__isset __isset; + + void __set_success(const ColumnStatistics& val) { + success = val; + } + + void __set_o1(const NoSuchObjectException& val) { + o1 = val; + } + + void __set_o2(const MetaException& val) { + o2 = val; + } + + void __set_o3(const InvalidInputException& val) { + o3 = val; + } + + void __set_o4(const InvalidObjectException& val) { + o4 = val; + } + + bool operator == (const ThriftHiveMetastore_get_partition_column_statistics_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_column_statistics_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_column_statistics_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_partition_column_statistics_presult__isset { + _ThriftHiveMetastore_get_partition_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_get_partition_column_statistics_presult__isset; + +class ThriftHiveMetastore_get_partition_column_statistics_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_column_statistics_presult() throw() {} + + ColumnStatistics* success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; + + _ThriftHiveMetastore_get_partition_column_statistics_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_delete_partition_column_statistics_args__isset { + _ThriftHiveMetastore_delete_partition_column_statistics_args__isset() : db_name(false), tbl_name(false), part_name(false), col_name(false) {} + bool db_name; + bool tbl_name; + bool part_name; + bool col_name; +} _ThriftHiveMetastore_delete_partition_column_statistics_args__isset; + +class ThriftHiveMetastore_delete_partition_column_statistics_args { + public: + + ThriftHiveMetastore_delete_partition_column_statistics_args() : db_name(""), tbl_name(""), part_name(""), col_name("") { + } + + virtual ~ThriftHiveMetastore_delete_partition_column_statistics_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string part_name; + std::string col_name; + + _ThriftHiveMetastore_delete_partition_column_statistics_args__isset __isset; + + void __set_db_name(const std::string& val) { + db_name = val; + } + + void __set_tbl_name(const std::string& val) { + tbl_name = val; + } + + void __set_part_name(const std::string& val) { + part_name = val; + } + + void __set_col_name(const std::string& val) { + col_name = val; + } + + bool operator == (const ThriftHiveMetastore_delete_partition_column_statistics_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(col_name == rhs.col_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_delete_partition_column_statistics_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_partition_column_statistics_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_delete_partition_column_statistics_pargs { + public: + + + virtual ~ThriftHiveMetastore_delete_partition_column_statistics_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::string* part_name; + const std::string* col_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_partition_column_statistics_result__isset { + _ThriftHiveMetastore_delete_partition_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_delete_partition_column_statistics_result__isset; + +class ThriftHiveMetastore_delete_partition_column_statistics_result { + public: + + ThriftHiveMetastore_delete_partition_column_statistics_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_delete_partition_column_statistics_result() throw() {} + + bool success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_partition_column_statistics_result__isset __isset; + + void __set_success(const bool val) { + success = val; + } + + void __set_o1(const NoSuchObjectException& val) { + o1 = val; + } + + void __set_o2(const MetaException& val) { + o2 = val; + } + + void __set_o3(const InvalidObjectException& val) { + o3 = val; + } + + void __set_o4(const InvalidInputException& val) { + o4 = val; + } + + bool operator == (const ThriftHiveMetastore_delete_partition_column_statistics_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_delete_partition_column_statistics_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_partition_column_statistics_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset { + _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset; + +class ThriftHiveMetastore_delete_partition_column_statistics_presult { + public: + + + virtual ~ThriftHiveMetastore_delete_partition_column_statistics_presult() throw() {} + + bool* success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_partition_column_statistics_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_delete_table_column_statistics_args__isset { + _ThriftHiveMetastore_delete_table_column_statistics_args__isset() : db_name(false), tbl_name(false), col_name(false) {} + bool db_name; + bool tbl_name; + bool col_name; +} _ThriftHiveMetastore_delete_table_column_statistics_args__isset; + +class ThriftHiveMetastore_delete_table_column_statistics_args { + public: + + ThriftHiveMetastore_delete_table_column_statistics_args() : db_name(""), tbl_name(""), col_name("") { + } + + virtual ~ThriftHiveMetastore_delete_table_column_statistics_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string col_name; + + _ThriftHiveMetastore_delete_table_column_statistics_args__isset __isset; + + void __set_db_name(const std::string& val) { + db_name = val; + } + + void __set_tbl_name(const std::string& val) { + tbl_name = val; + } + + void __set_col_name(const std::string& val) { + col_name = val; + } + + bool operator == (const ThriftHiveMetastore_delete_table_column_statistics_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(tbl_name == rhs.tbl_name)) + return false; + if (!(col_name == rhs.col_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_delete_table_column_statistics_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_table_column_statistics_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_delete_table_column_statistics_pargs { + public: + + + virtual ~ThriftHiveMetastore_delete_table_column_statistics_pargs() throw() {} + + const std::string* db_name; + const std::string* tbl_name; + const std::string* col_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_table_column_statistics_result__isset { + _ThriftHiveMetastore_delete_table_column_statistics_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_delete_table_column_statistics_result__isset; + +class ThriftHiveMetastore_delete_table_column_statistics_result { + public: + + ThriftHiveMetastore_delete_table_column_statistics_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_delete_table_column_statistics_result() throw() {} + + bool success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_table_column_statistics_result__isset __isset; + + void __set_success(const bool val) { + success = val; + } + + void __set_o1(const NoSuchObjectException& val) { + o1 = val; + } + + void __set_o2(const MetaException& val) { + o2 = val; + } + + void __set_o3(const InvalidObjectException& val) { + o3 = val; + } + + void __set_o4(const InvalidInputException& val) { + o4 = val; + } + + bool operator == (const ThriftHiveMetastore_delete_table_column_statistics_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + if (!(o3 == rhs.o3)) + return false; + if (!(o4 == rhs.o4)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_delete_table_column_statistics_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_table_column_statistics_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_table_column_statistics_presult__isset { + _ThriftHiveMetastore_delete_table_column_statistics_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_delete_table_column_statistics_presult__isset; + +class ThriftHiveMetastore_delete_table_column_statistics_presult { + public: + + + virtual ~ThriftHiveMetastore_delete_table_column_statistics_presult() throw() {} + + bool* success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_table_column_statistics_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_create_role_args__isset { + _ThriftHiveMetastore_create_role_args__isset() : role(false) {} + bool role; +} _ThriftHiveMetastore_create_role_args__isset; + +class ThriftHiveMetastore_create_role_args { + public: + + ThriftHiveMetastore_create_role_args() { + } + + virtual ~ThriftHiveMetastore_create_role_args() throw() {} + + Role role; + + _ThriftHiveMetastore_create_role_args__isset __isset; + + void __set_role(const Role& val) { + role = val; + } + + bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const + { + if (!(role == rhs.role)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_create_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_role_pargs() throw() {} + + const Role* role; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_role_result__isset { + _ThriftHiveMetastore_create_role_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_create_role_result__isset; + +class ThriftHiveMetastore_create_role_result { + public: + + ThriftHiveMetastore_create_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_create_role_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_create_role_result__isset __isset; + + void __set_success(const bool val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_create_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_create_role_presult__isset { + _ThriftHiveMetastore_create_role_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_create_role_presult__isset; + +class ThriftHiveMetastore_create_role_presult { + public: + + + virtual ~ThriftHiveMetastore_create_role_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_create_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_drop_role_args__isset { + _ThriftHiveMetastore_drop_role_args__isset() : role_name(false) {} + bool role_name; +} _ThriftHiveMetastore_drop_role_args__isset; + +class ThriftHiveMetastore_drop_role_args { + public: + + ThriftHiveMetastore_drop_role_args() : role_name("") { + } + + virtual ~ThriftHiveMetastore_drop_role_args() throw() {} + + std::string role_name; + + _ThriftHiveMetastore_drop_role_args__isset __isset; + + void __set_role_name(const std::string& val) { + role_name = val; + } + + bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_drop_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_role_pargs() throw() {} + + const std::string* role_name; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_role_result__isset { + _ThriftHiveMetastore_drop_role_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_drop_role_result__isset; + +class ThriftHiveMetastore_drop_role_result { + public: + + ThriftHiveMetastore_drop_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_role_result() throw() {} + + bool success; + MetaException o1; + + _ThriftHiveMetastore_drop_role_result__isset __isset; + + void __set_success(const bool val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_drop_role_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_drop_role_presult__isset { + _ThriftHiveMetastore_drop_role_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_drop_role_presult__isset; + +class ThriftHiveMetastore_drop_role_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_role_presult() throw() {} + + bool* success; + MetaException o1; + + _ThriftHiveMetastore_drop_role_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHiveMetastore_get_role_names_args { + public: + + ThriftHiveMetastore_get_role_names_args() { + } + + virtual ~ThriftHiveMetastore_get_role_names_args() throw() {} + + + bool operator == (const ThriftHiveMetastore_get_role_names_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHiveMetastore_get_role_names_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_role_names_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_get_role_names_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_role_names_pargs() throw() {} + + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_role_names_result__isset { + _ThriftHiveMetastore_get_role_names_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_role_names_result__isset; + +class ThriftHiveMetastore_get_role_names_result { + public: + + ThriftHiveMetastore_get_role_names_result() { + } + + virtual ~ThriftHiveMetastore_get_role_names_result() throw() {} + + std::vector success; + MetaException o1; + + _ThriftHiveMetastore_get_role_names_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_o1(const MetaException& val) { + o1 = val; + } + + bool operator == (const ThriftHiveMetastore_get_role_names_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_role_names_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_role_names_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_get_role_names_presult__isset { + _ThriftHiveMetastore_get_role_names_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_role_names_presult__isset; + +class ThriftHiveMetastore_get_role_names_presult { + public: + + + virtual ~ThriftHiveMetastore_get_role_names_presult() throw() {} + + std::vector * success; + MetaException o1; + + _ThriftHiveMetastore_get_role_names_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_grant_role_args__isset { + _ThriftHiveMetastore_grant_role_args__isset() : role_name(false), principal_name(false), principal_type(false), grantor(false), grantorType(false), grant_option(false) {} + bool role_name; + bool principal_name; + bool principal_type; + bool grantor; + bool grantorType; + bool grant_option; +} _ThriftHiveMetastore_grant_role_args__isset; + +class ThriftHiveMetastore_grant_role_args { + public: + + ThriftHiveMetastore_grant_role_args() : role_name(""), principal_name(""), grantor(""), grant_option(0) { + } + + virtual ~ThriftHiveMetastore_grant_role_args() throw() {} + + std::string role_name; + std::string principal_name; + PrincipalType::type principal_type; + std::string grantor; + PrincipalType::type grantorType; + bool grant_option; + + _ThriftHiveMetastore_grant_role_args__isset __isset; + + void __set_role_name(const std::string& val) { + role_name = val; } void __set_principal_name(const std::string& val) { @@ -10098,6 +11104,24 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public f void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); void send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); void recv_get_index_names(std::vector & _return); + bool update_table_column_statistics(const ColumnStatistics& stats_obj); + void send_update_table_column_statistics(const ColumnStatistics& stats_obj); + bool recv_update_table_column_statistics(); + bool update_partition_column_statistics(const ColumnStatistics& stats_obj); + void send_update_partition_column_statistics(const ColumnStatistics& stats_obj); + bool recv_update_partition_column_statistics(); + void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void send_get_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void recv_get_table_column_statistics(ColumnStatistics& _return); + void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + void send_get_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + void recv_get_partition_column_statistics(ColumnStatistics& _return); + bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + void send_delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + bool recv_delete_partition_column_statistics(); + bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void send_delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + bool recv_delete_table_column_statistics(); bool create_role(const Role& role); void send_create_role(const Role& role); bool recv_create_role(); @@ -10203,6 +11227,12 @@ class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor void process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_update_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_update_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_delete_partition_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_delete_table_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_drop_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_role_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); @@ -10276,6 +11306,12 @@ class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor processMap_["get_index_by_name"] = &ThriftHiveMetastoreProcessor::process_get_index_by_name; processMap_["get_indexes"] = &ThriftHiveMetastoreProcessor::process_get_indexes; processMap_["get_index_names"] = &ThriftHiveMetastoreProcessor::process_get_index_names; + processMap_["update_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_update_table_column_statistics; + processMap_["update_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_update_partition_column_statistics; + processMap_["get_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_get_table_column_statistics; + processMap_["get_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_get_partition_column_statistics; + processMap_["delete_partition_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_partition_column_statistics; + processMap_["delete_table_column_statistics"] = &ThriftHiveMetastoreProcessor::process_delete_table_column_statistics; processMap_["create_role"] = &ThriftHiveMetastoreProcessor::process_create_role; processMap_["drop_role"] = &ThriftHiveMetastoreProcessor::process_drop_role; processMap_["get_role_names"] = &ThriftHiveMetastoreProcessor::process_get_role_names; @@ -10896,6 +11932,74 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi } } + bool update_table_column_statistics(const ColumnStatistics& stats_obj) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->update_table_column_statistics(stats_obj); + } else { + ifaces_[i]->update_table_column_statistics(stats_obj); + } + } + } + + bool update_partition_column_statistics(const ColumnStatistics& stats_obj) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->update_partition_column_statistics(stats_obj); + } else { + ifaces_[i]->update_partition_column_statistics(stats_obj); + } + } + } + + void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); + return; + } else { + ifaces_[i]->get_table_column_statistics(_return, db_name, tbl_name, col_name); + } + } + } + + void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); + return; + } else { + ifaces_[i]->get_partition_column_statistics(_return, db_name, tbl_name, part_name, col_name); + } + } + } + + bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + } else { + ifaces_[i]->delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + } + } + } + + bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); + } else { + ifaces_[i]->delete_table_column_statistics(db_name, tbl_name, col_name); + } + } + } + bool create_role(const Role& role) { size_t sz = ifaces_.size(); for (size_t i = 0; i < sz; ++i) { diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp index 1ee417b..6433375 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -297,6 +297,36 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { printf("get_index_names\n"); } + bool update_table_column_statistics(const ColumnStatistics& stats_obj) { + // Your implementation goes here + printf("update_table_column_statistics\n"); + } + + bool update_partition_column_statistics(const ColumnStatistics& stats_obj) { + // Your implementation goes here + printf("update_partition_column_statistics\n"); + } + + void get_table_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + // Your implementation goes here + printf("get_table_column_statistics\n"); + } + + void get_partition_column_statistics(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { + // Your implementation goes here + printf("get_partition_column_statistics\n"); + } + + bool delete_partition_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) { + // Your implementation goes here + printf("delete_partition_column_statistics\n"); + } + + bool delete_table_column_statistics(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + // Your implementation goes here + printf("delete_table_column_statistics\n"); + } + bool create_role(const Role& role) { // Your implementation goes here printf("create_role\n"); diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp index 7ff55ac..4442c86 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -2269,10 +2269,771 @@ uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const { return xfer; } -const char* Schema::ascii_fingerprint = "5CFEE46C975F4E2368D905109B8E3B5B"; -const uint8_t Schema::binary_fingerprint[16] = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B}; +const char* BooleanColumnStatsData::ascii_fingerprint = "EA2D65F1E0BB78760205682082304B41"; +const uint8_t BooleanColumnStatsData::binary_fingerprint[16] = {0xEA,0x2D,0x65,0xF1,0xE0,0xBB,0x78,0x76,0x02,0x05,0x68,0x20,0x82,0x30,0x4B,0x41}; + +uint32_t BooleanColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_numTrues = false; + bool isset_numFalses = false; + bool isset_numNulls = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numTrues); + isset_numTrues = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numFalses); + isset_numFalses = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_numTrues) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numFalses) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t BooleanColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("BooleanColumnStatsData"); + xfer += oprot->writeFieldBegin("numTrues", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->numTrues); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numFalses", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->numFalses); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* DoubleColumnStatsData::ascii_fingerprint = "97F958CB0709C3B109A57EEE01946C13"; +const uint8_t DoubleColumnStatsData::binary_fingerprint[16] = {0x97,0xF9,0x58,0xCB,0x07,0x09,0xC3,0xB1,0x09,0xA5,0x7E,0xEE,0x01,0x94,0x6C,0x13}; + +uint32_t DoubleColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_lowValue = false; + bool isset_highValue = false; + bool isset_numNulls = false; + bool isset_numDVs = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->lowValue); + isset_lowValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->highValue); + isset_highValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numDVs); + isset_numDVs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_lowValue) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_highValue) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numDVs) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t DoubleColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("DoubleColumnStatsData"); + xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_DOUBLE, 1); + xfer += oprot->writeDouble(this->lowValue); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->highValue); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->numDVs); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* LongColumnStatsData::ascii_fingerprint = "66C8E6F97F0275919D86FEB536251B17"; +const uint8_t LongColumnStatsData::binary_fingerprint[16] = {0x66,0xC8,0xE6,0xF9,0x7F,0x02,0x75,0x91,0x9D,0x86,0xFE,0xB5,0x36,0x25,0x1B,0x17}; + +uint32_t LongColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_lowValue = false; + bool isset_highValue = false; + bool isset_numNulls = false; + bool isset_numDVs = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lowValue); + isset_lowValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->highValue); + isset_highValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numDVs); + isset_numDVs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_lowValue) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_highValue) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numDVs) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t LongColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("LongColumnStatsData"); + xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->lowValue); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->highValue); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->numDVs); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* StringColumnStatsData::ascii_fingerprint = "D017B08C3DF12C3AB98788B2E67DAAB3"; +const uint8_t StringColumnStatsData::binary_fingerprint[16] = {0xD0,0x17,0xB0,0x8C,0x3D,0xF1,0x2C,0x3A,0xB9,0x87,0x88,0xB2,0xE6,0x7D,0xAA,0xB3}; + +uint32_t StringColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_maxColLen = false; + bool isset_avgColLen = false; + bool isset_numNulls = false; + bool isset_numDVs = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->maxColLen); + isset_maxColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->avgColLen); + isset_avgColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numDVs); + isset_numDVs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_maxColLen) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_avgColLen) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numDVs) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t StringColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("StringColumnStatsData"); + xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->maxColLen); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->avgColLen); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->numDVs); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* BinaryColumnStatsData::ascii_fingerprint = "22B0CB67183FCDB945892B9974518D06"; +const uint8_t BinaryColumnStatsData::binary_fingerprint[16] = {0x22,0xB0,0xCB,0x67,0x18,0x3F,0xCD,0xB9,0x45,0x89,0x2B,0x99,0x74,0x51,0x8D,0x06}; + +uint32_t BinaryColumnStatsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_maxColLen = false; + bool isset_avgColLen = false; + bool isset_numNulls = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->maxColLen); + isset_maxColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->avgColLen); + isset_avgColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + isset_numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_maxColLen) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_avgColLen) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_numNulls) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t BinaryColumnStatsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("BinaryColumnStatsData"); + xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 1); + xfer += oprot->writeI64(this->maxColLen); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 2); + xfer += oprot->writeDouble(this->avgColLen); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* ColumnStatisticsData::ascii_fingerprint = "3D106F26C0761EF37E58CAFAA3F1651C"; +const uint8_t ColumnStatisticsData::binary_fingerprint[16] = {0x3D,0x10,0x6F,0x26,0xC0,0x76,0x1E,0xF3,0x7E,0x58,0xCA,0xFA,0xA3,0xF1,0x65,0x1C}; + +uint32_t ColumnStatisticsData::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->booleanStats.read(iprot); + this->__isset.booleanStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->longStats.read(iprot); + this->__isset.longStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->doubleStats.read(iprot); + this->__isset.doubleStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->stringStats.read(iprot); + this->__isset.stringStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->binaryStats.read(iprot); + this->__isset.binaryStats = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ColumnStatisticsData::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ColumnStatisticsData"); + xfer += oprot->writeFieldBegin("booleanStats", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->booleanStats.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("longStats", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->longStats.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("doubleStats", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->doubleStats.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stringStats", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->stringStats.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("binaryStats", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->binaryStats.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* ColumnStatisticsObj::ascii_fingerprint = "DEE09584C51BCAF60824FE4509B59567"; +const uint8_t ColumnStatisticsObj::binary_fingerprint[16] = {0xDE,0xE0,0x95,0x84,0xC5,0x1B,0xCA,0xF6,0x08,0x24,0xFE,0x45,0x09,0xB5,0x95,0x67}; -uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ColumnStatisticsObj::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_colName = false; + bool isset_colType = false; + bool isset_statsData = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->colName); + isset_colName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->colType); + isset_colType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->statsData.read(iprot); + isset_statsData = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_colName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_colType) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_statsData) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ColumnStatisticsObj::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ColumnStatisticsObj"); + xfer += oprot->writeFieldBegin("colName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->colName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("colType", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->colType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("statsData", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->statsData.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* ColumnStatisticsDesc::ascii_fingerprint = "261759FF6F8FAB53F941453007FE18CB"; +const uint8_t ColumnStatisticsDesc::binary_fingerprint[16] = {0x26,0x17,0x59,0xFF,0x6F,0x8F,0xAB,0x53,0xF9,0x41,0x45,0x30,0x07,0xFE,0x18,0xCB}; + +uint32_t ColumnStatisticsDesc::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_isTblLevel = false; + bool isset_dbName = false; + bool isset_tableName = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isTblLevel); + isset_isTblLevel = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + isset_tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partName); + this->__isset.partName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lastAnalyzed); + this->__isset.lastAnalyzed = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_isTblLevel) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tableName) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ColumnStatisticsDesc::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ColumnStatisticsDesc"); + xfer += oprot->writeFieldBegin("isTblLevel", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->isTblLevel); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + if (this->__isset.partName) { + xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->partName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.lastAnalyzed) { + xfer += oprot->writeFieldBegin("lastAnalyzed", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->lastAnalyzed); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* ColumnStatistics::ascii_fingerprint = "681BDBD0CBB53373AC1C9C0C2E26BEAB"; +const uint8_t ColumnStatistics::binary_fingerprint[16] = {0x68,0x1B,0xDB,0xD0,0xCB,0xB5,0x33,0x73,0xAC,0x1C,0x9C,0x0C,0x2E,0x26,0xBE,0xAB}; + +uint32_t ColumnStatistics::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -2283,6 +3044,8 @@ uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { using ::apache::thrift::protocol::TProtocolException; + bool isset_statsDesc = false; + bool isset_statsObj = false; while (true) { @@ -2293,17 +3056,106 @@ uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { switch (fid) { case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->statsDesc.read(iprot); + isset_statsDesc = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: if (ftype == ::apache::thrift::protocol::T_LIST) { { - this->fieldSchemas.clear(); + this->statsObj.clear(); uint32_t _size173; ::apache::thrift::protocol::TType _etype176; iprot->readListBegin(_etype176, _size173); - this->fieldSchemas.resize(_size173); + this->statsObj.resize(_size173); uint32_t _i177; for (_i177 = 0; _i177 < _size173; ++_i177) { - xfer += this->fieldSchemas[_i177].read(iprot); + xfer += this->statsObj[_i177].read(iprot); + } + iprot->readListEnd(); + } + isset_statsObj = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_statsDesc) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_statsObj) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t ColumnStatistics::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ColumnStatistics"); + xfer += oprot->writeFieldBegin("statsDesc", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->statsDesc.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("statsObj", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->statsObj.size())); + std::vector ::const_iterator _iter178; + for (_iter178 = this->statsObj.begin(); _iter178 != this->statsObj.end(); ++_iter178) + { + xfer += (*_iter178).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Schema::ascii_fingerprint = "5CFEE46C975F4E2368D905109B8E3B5B"; +const uint8_t Schema::binary_fingerprint[16] = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B}; + +uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->fieldSchemas.clear(); + uint32_t _size179; + ::apache::thrift::protocol::TType _etype182; + iprot->readListBegin(_etype182, _size179); + this->fieldSchemas.resize(_size179); + uint32_t _i183; + for (_i183 = 0; _i183 < _size179; ++_i183) + { + xfer += this->fieldSchemas[_i183].read(iprot); } iprot->readListEnd(); } @@ -2316,17 +3168,17 @@ uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_MAP) { { this->properties.clear(); - uint32_t _size178; - ::apache::thrift::protocol::TType _ktype179; - ::apache::thrift::protocol::TType _vtype180; - iprot->readMapBegin(_ktype179, _vtype180, _size178); - uint32_t _i182; - for (_i182 = 0; _i182 < _size178; ++_i182) + uint32_t _size184; + ::apache::thrift::protocol::TType _ktype185; + ::apache::thrift::protocol::TType _vtype186; + iprot->readMapBegin(_ktype185, _vtype186, _size184); + uint32_t _i188; + for (_i188 = 0; _i188 < _size184; ++_i188) { - std::string _key183; - xfer += iprot->readString(_key183); - std::string& _val184 = this->properties[_key183]; - xfer += iprot->readString(_val184); + std::string _key189; + xfer += iprot->readString(_key189); + std::string& _val190 = this->properties[_key189]; + xfer += iprot->readString(_val190); } iprot->readMapEnd(); } @@ -2353,10 +3205,10 @@ uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("fieldSchemas", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->fieldSchemas.size())); - std::vector ::const_iterator _iter185; - for (_iter185 = this->fieldSchemas.begin(); _iter185 != this->fieldSchemas.end(); ++_iter185) + std::vector ::const_iterator _iter191; + for (_iter191 = this->fieldSchemas.begin(); _iter191 != this->fieldSchemas.end(); ++_iter191) { - xfer += (*_iter185).write(oprot); + xfer += (*_iter191).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2364,11 +3216,11 @@ uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 2); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); - std::map ::const_iterator _iter186; - for (_iter186 = this->properties.begin(); _iter186 != this->properties.end(); ++_iter186) + std::map ::const_iterator _iter192; + for (_iter192 = this->properties.begin(); _iter192 != this->properties.end(); ++_iter192) { - xfer += oprot->writeString(_iter186->first); - xfer += oprot->writeString(_iter186->second); + xfer += oprot->writeString(_iter192->first); + xfer += oprot->writeString(_iter192->second); } xfer += oprot->writeMapEnd(); } @@ -2405,17 +3257,17 @@ uint32_t EnvironmentContext::read(::apache::thrift::protocol::TProtocol* iprot) if (ftype == ::apache::thrift::protocol::T_MAP) { { this->properties.clear(); - uint32_t _size187; - ::apache::thrift::protocol::TType _ktype188; - ::apache::thrift::protocol::TType _vtype189; - iprot->readMapBegin(_ktype188, _vtype189, _size187); - uint32_t _i191; - for (_i191 = 0; _i191 < _size187; ++_i191) + uint32_t _size193; + ::apache::thrift::protocol::TType _ktype194; + ::apache::thrift::protocol::TType _vtype195; + iprot->readMapBegin(_ktype194, _vtype195, _size193); + uint32_t _i197; + for (_i197 = 0; _i197 < _size193; ++_i197) { - std::string _key192; - xfer += iprot->readString(_key192); - std::string& _val193 = this->properties[_key192]; - xfer += iprot->readString(_val193); + std::string _key198; + xfer += iprot->readString(_key198); + std::string& _val199 = this->properties[_key198]; + xfer += iprot->readString(_val199); } iprot->readMapEnd(); } @@ -2442,11 +3294,11 @@ uint32_t EnvironmentContext::write(::apache::thrift::protocol::TProtocol* oprot) xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 1); { xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->properties.size())); - std::map ::const_iterator _iter194; - for (_iter194 = this->properties.begin(); _iter194 != this->properties.end(); ++_iter194) + std::map ::const_iterator _iter200; + for (_iter200 = this->properties.begin(); _iter200 != this->properties.end(); ++_iter200) { - xfer += oprot->writeString(_iter194->first); - xfer += oprot->writeString(_iter194->second); + xfer += oprot->writeString(_iter200->first); + xfer += oprot->writeString(_iter200->second); } xfer += oprot->writeMapEnd(); } @@ -3050,4 +3902,58 @@ uint32_t ConfigValSecurityException::write(::apache::thrift::protocol::TProtocol return xfer; } +const char* InvalidInputException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; +const uint8_t InvalidInputException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + +uint32_t InvalidInputException::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t InvalidInputException::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("InvalidInputException"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + }}} // namespace diff --git metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h index 02f4aa2..b567d4b 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -1308,6 +1308,512 @@ class Index { }; + +class BooleanColumnStatsData { + public: + + static const char* ascii_fingerprint; // = "EA2D65F1E0BB78760205682082304B41"; + static const uint8_t binary_fingerprint[16]; // = {0xEA,0x2D,0x65,0xF1,0xE0,0xBB,0x78,0x76,0x02,0x05,0x68,0x20,0x82,0x30,0x4B,0x41}; + + BooleanColumnStatsData() : numTrues(0), numFalses(0), numNulls(0) { + } + + virtual ~BooleanColumnStatsData() throw() {} + + int64_t numTrues; + int64_t numFalses; + int64_t numNulls; + + void __set_numTrues(const int64_t val) { + numTrues = val; + } + + void __set_numFalses(const int64_t val) { + numFalses = val; + } + + void __set_numNulls(const int64_t val) { + numNulls = val; + } + + bool operator == (const BooleanColumnStatsData & rhs) const + { + if (!(numTrues == rhs.numTrues)) + return false; + if (!(numFalses == rhs.numFalses)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + return true; + } + bool operator != (const BooleanColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const BooleanColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class DoubleColumnStatsData { + public: + + static const char* ascii_fingerprint; // = "97F958CB0709C3B109A57EEE01946C13"; + static const uint8_t binary_fingerprint[16]; // = {0x97,0xF9,0x58,0xCB,0x07,0x09,0xC3,0xB1,0x09,0xA5,0x7E,0xEE,0x01,0x94,0x6C,0x13}; + + DoubleColumnStatsData() : lowValue(0), highValue(0), numNulls(0), numDVs(0) { + } + + virtual ~DoubleColumnStatsData() throw() {} + + double lowValue; + double highValue; + int64_t numNulls; + int64_t numDVs; + + void __set_lowValue(const double val) { + lowValue = val; + } + + void __set_highValue(const double val) { + highValue = val; + } + + void __set_numNulls(const int64_t val) { + numNulls = val; + } + + void __set_numDVs(const int64_t val) { + numDVs = val; + } + + bool operator == (const DoubleColumnStatsData & rhs) const + { + if (!(lowValue == rhs.lowValue)) + return false; + if (!(highValue == rhs.highValue)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (!(numDVs == rhs.numDVs)) + return false; + return true; + } + bool operator != (const DoubleColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const DoubleColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class LongColumnStatsData { + public: + + static const char* ascii_fingerprint; // = "66C8E6F97F0275919D86FEB536251B17"; + static const uint8_t binary_fingerprint[16]; // = {0x66,0xC8,0xE6,0xF9,0x7F,0x02,0x75,0x91,0x9D,0x86,0xFE,0xB5,0x36,0x25,0x1B,0x17}; + + LongColumnStatsData() : lowValue(0), highValue(0), numNulls(0), numDVs(0) { + } + + virtual ~LongColumnStatsData() throw() {} + + int64_t lowValue; + int64_t highValue; + int64_t numNulls; + int64_t numDVs; + + void __set_lowValue(const int64_t val) { + lowValue = val; + } + + void __set_highValue(const int64_t val) { + highValue = val; + } + + void __set_numNulls(const int64_t val) { + numNulls = val; + } + + void __set_numDVs(const int64_t val) { + numDVs = val; + } + + bool operator == (const LongColumnStatsData & rhs) const + { + if (!(lowValue == rhs.lowValue)) + return false; + if (!(highValue == rhs.highValue)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (!(numDVs == rhs.numDVs)) + return false; + return true; + } + bool operator != (const LongColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const LongColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class StringColumnStatsData { + public: + + static const char* ascii_fingerprint; // = "D017B08C3DF12C3AB98788B2E67DAAB3"; + static const uint8_t binary_fingerprint[16]; // = {0xD0,0x17,0xB0,0x8C,0x3D,0xF1,0x2C,0x3A,0xB9,0x87,0x88,0xB2,0xE6,0x7D,0xAA,0xB3}; + + StringColumnStatsData() : maxColLen(0), avgColLen(0), numNulls(0), numDVs(0) { + } + + virtual ~StringColumnStatsData() throw() {} + + int64_t maxColLen; + double avgColLen; + int64_t numNulls; + int64_t numDVs; + + void __set_maxColLen(const int64_t val) { + maxColLen = val; + } + + void __set_avgColLen(const double val) { + avgColLen = val; + } + + void __set_numNulls(const int64_t val) { + numNulls = val; + } + + void __set_numDVs(const int64_t val) { + numDVs = val; + } + + bool operator == (const StringColumnStatsData & rhs) const + { + if (!(maxColLen == rhs.maxColLen)) + return false; + if (!(avgColLen == rhs.avgColLen)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (!(numDVs == rhs.numDVs)) + return false; + return true; + } + bool operator != (const StringColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const StringColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class BinaryColumnStatsData { + public: + + static const char* ascii_fingerprint; // = "22B0CB67183FCDB945892B9974518D06"; + static const uint8_t binary_fingerprint[16]; // = {0x22,0xB0,0xCB,0x67,0x18,0x3F,0xCD,0xB9,0x45,0x89,0x2B,0x99,0x74,0x51,0x8D,0x06}; + + BinaryColumnStatsData() : maxColLen(0), avgColLen(0), numNulls(0) { + } + + virtual ~BinaryColumnStatsData() throw() {} + + int64_t maxColLen; + double avgColLen; + int64_t numNulls; + + void __set_maxColLen(const int64_t val) { + maxColLen = val; + } + + void __set_avgColLen(const double val) { + avgColLen = val; + } + + void __set_numNulls(const int64_t val) { + numNulls = val; + } + + bool operator == (const BinaryColumnStatsData & rhs) const + { + if (!(maxColLen == rhs.maxColLen)) + return false; + if (!(avgColLen == rhs.avgColLen)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + return true; + } + bool operator != (const BinaryColumnStatsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const BinaryColumnStatsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ColumnStatisticsData__isset { + _ColumnStatisticsData__isset() : booleanStats(false), longStats(false), doubleStats(false), stringStats(false), binaryStats(false) {} + bool booleanStats; + bool longStats; + bool doubleStats; + bool stringStats; + bool binaryStats; +} _ColumnStatisticsData__isset; + +class ColumnStatisticsData { + public: + + static const char* ascii_fingerprint; // = "3D106F26C0761EF37E58CAFAA3F1651C"; + static const uint8_t binary_fingerprint[16]; // = {0x3D,0x10,0x6F,0x26,0xC0,0x76,0x1E,0xF3,0x7E,0x58,0xCA,0xFA,0xA3,0xF1,0x65,0x1C}; + + ColumnStatisticsData() { + } + + virtual ~ColumnStatisticsData() throw() {} + + BooleanColumnStatsData booleanStats; + LongColumnStatsData longStats; + DoubleColumnStatsData doubleStats; + StringColumnStatsData stringStats; + BinaryColumnStatsData binaryStats; + + _ColumnStatisticsData__isset __isset; + + void __set_booleanStats(const BooleanColumnStatsData& val) { + booleanStats = val; + } + + void __set_longStats(const LongColumnStatsData& val) { + longStats = val; + } + + void __set_doubleStats(const DoubleColumnStatsData& val) { + doubleStats = val; + } + + void __set_stringStats(const StringColumnStatsData& val) { + stringStats = val; + } + + void __set_binaryStats(const BinaryColumnStatsData& val) { + binaryStats = val; + } + + bool operator == (const ColumnStatisticsData & rhs) const + { + if (!(booleanStats == rhs.booleanStats)) + return false; + if (!(longStats == rhs.longStats)) + return false; + if (!(doubleStats == rhs.doubleStats)) + return false; + if (!(stringStats == rhs.stringStats)) + return false; + if (!(binaryStats == rhs.binaryStats)) + return false; + return true; + } + bool operator != (const ColumnStatisticsData &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnStatisticsData & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ColumnStatisticsObj { + public: + + static const char* ascii_fingerprint; // = "DEE09584C51BCAF60824FE4509B59567"; + static const uint8_t binary_fingerprint[16]; // = {0xDE,0xE0,0x95,0x84,0xC5,0x1B,0xCA,0xF6,0x08,0x24,0xFE,0x45,0x09,0xB5,0x95,0x67}; + + ColumnStatisticsObj() : colName(""), colType("") { + } + + virtual ~ColumnStatisticsObj() throw() {} + + std::string colName; + std::string colType; + ColumnStatisticsData statsData; + + void __set_colName(const std::string& val) { + colName = val; + } + + void __set_colType(const std::string& val) { + colType = val; + } + + void __set_statsData(const ColumnStatisticsData& val) { + statsData = val; + } + + bool operator == (const ColumnStatisticsObj & rhs) const + { + if (!(colName == rhs.colName)) + return false; + if (!(colType == rhs.colType)) + return false; + if (!(statsData == rhs.statsData)) + return false; + return true; + } + bool operator != (const ColumnStatisticsObj &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnStatisticsObj & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ColumnStatisticsDesc__isset { + _ColumnStatisticsDesc__isset() : partName(false), lastAnalyzed(false) {} + bool partName; + bool lastAnalyzed; +} _ColumnStatisticsDesc__isset; + +class ColumnStatisticsDesc { + public: + + static const char* ascii_fingerprint; // = "261759FF6F8FAB53F941453007FE18CB"; + static const uint8_t binary_fingerprint[16]; // = {0x26,0x17,0x59,0xFF,0x6F,0x8F,0xAB,0x53,0xF9,0x41,0x45,0x30,0x07,0xFE,0x18,0xCB}; + + ColumnStatisticsDesc() : isTblLevel(0), dbName(""), tableName(""), partName(""), lastAnalyzed(0) { + } + + virtual ~ColumnStatisticsDesc() throw() {} + + bool isTblLevel; + std::string dbName; + std::string tableName; + std::string partName; + int64_t lastAnalyzed; + + _ColumnStatisticsDesc__isset __isset; + + void __set_isTblLevel(const bool val) { + isTblLevel = val; + } + + void __set_dbName(const std::string& val) { + dbName = val; + } + + void __set_tableName(const std::string& val) { + tableName = val; + } + + void __set_partName(const std::string& val) { + partName = val; + __isset.partName = true; + } + + void __set_lastAnalyzed(const int64_t val) { + lastAnalyzed = val; + __isset.lastAnalyzed = true; + } + + bool operator == (const ColumnStatisticsDesc & rhs) const + { + if (!(isTblLevel == rhs.isTblLevel)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (__isset.partName != rhs.__isset.partName) + return false; + else if (__isset.partName && !(partName == rhs.partName)) + return false; + if (__isset.lastAnalyzed != rhs.__isset.lastAnalyzed) + return false; + else if (__isset.lastAnalyzed && !(lastAnalyzed == rhs.lastAnalyzed)) + return false; + return true; + } + bool operator != (const ColumnStatisticsDesc &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnStatisticsDesc & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ColumnStatistics { + public: + + static const char* ascii_fingerprint; // = "681BDBD0CBB53373AC1C9C0C2E26BEAB"; + static const uint8_t binary_fingerprint[16]; // = {0x68,0x1B,0xDB,0xD0,0xCB,0xB5,0x33,0x73,0xAC,0x1C,0x9C,0x0C,0x2E,0x26,0xBE,0xAB}; + + ColumnStatistics() { + } + + virtual ~ColumnStatistics() throw() {} + + ColumnStatisticsDesc statsDesc; + std::vector statsObj; + + void __set_statsDesc(const ColumnStatisticsDesc& val) { + statsDesc = val; + } + + void __set_statsObj(const std::vector & val) { + statsObj = val; + } + + bool operator == (const ColumnStatistics & rhs) const + { + if (!(statsDesc == rhs.statsDesc)) + return false; + if (!(statsObj == rhs.statsObj)) + return false; + return true; + } + bool operator != (const ColumnStatistics &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnStatistics & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + typedef struct _Schema__isset { _Schema__isset() : fieldSchemas(false), properties(false) {} bool fieldSchemas; @@ -1849,6 +2355,47 @@ class ConfigValSecurityException : public ::apache::thrift::TException { }; +typedef struct _InvalidInputException__isset { + _InvalidInputException__isset() : message(false) {} + bool message; +} _InvalidInputException__isset; + +class InvalidInputException : public ::apache::thrift::TException { + public: + + static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + InvalidInputException() : message("") { + } + + virtual ~InvalidInputException() throw() {} + + std::string message; + + _InvalidInputException__isset __isset; + + void __set_message(const std::string& val) { + message = val; + } + + bool operator == (const InvalidInputException & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const InvalidInputException &rhs) const { + return !(*this == rhs); + } + + bool operator < (const InvalidInputException & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + }}} // namespace #endif diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java new file mode 100644 index 0000000..c5860f5 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BinaryColumnStatsData.java @@ -0,0 +1,512 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class BinaryColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BinaryColumnStatsData"); + + private static final org.apache.thrift.protocol.TField MAX_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("maxColLen", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField AVG_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("avgColLen", org.apache.thrift.protocol.TType.DOUBLE, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + + private long maxColLen; // required + private double avgColLen; // required + private long numNulls; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MAX_COL_LEN((short)1, "maxColLen"), + AVG_COL_LEN((short)2, "avgColLen"), + NUM_NULLS((short)3, "numNulls"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MAX_COL_LEN + return MAX_COL_LEN; + case 2: // AVG_COL_LEN + return AVG_COL_LEN; + case 3: // NUM_NULLS + return NUM_NULLS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAXCOLLEN_ISSET_ID = 0; + private static final int __AVGCOLLEN_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MAX_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("maxColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.AVG_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("avgColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BinaryColumnStatsData.class, metaDataMap); + } + + public BinaryColumnStatsData() { + } + + public BinaryColumnStatsData( + long maxColLen, + double avgColLen, + long numNulls) + { + this(); + this.maxColLen = maxColLen; + setMaxColLenIsSet(true); + this.avgColLen = avgColLen; + setAvgColLenIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public BinaryColumnStatsData(BinaryColumnStatsData other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.maxColLen = other.maxColLen; + this.avgColLen = other.avgColLen; + this.numNulls = other.numNulls; + } + + public BinaryColumnStatsData deepCopy() { + return new BinaryColumnStatsData(this); + } + + @Override + public void clear() { + setMaxColLenIsSet(false); + this.maxColLen = 0; + setAvgColLenIsSet(false); + this.avgColLen = 0.0; + setNumNullsIsSet(false); + this.numNulls = 0; + } + + public long getMaxColLen() { + return this.maxColLen; + } + + public void setMaxColLen(long maxColLen) { + this.maxColLen = maxColLen; + setMaxColLenIsSet(true); + } + + public void unsetMaxColLen() { + __isset_bit_vector.clear(__MAXCOLLEN_ISSET_ID); + } + + /** Returns true if field maxColLen is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxColLen() { + return __isset_bit_vector.get(__MAXCOLLEN_ISSET_ID); + } + + public void setMaxColLenIsSet(boolean value) { + __isset_bit_vector.set(__MAXCOLLEN_ISSET_ID, value); + } + + public double getAvgColLen() { + return this.avgColLen; + } + + public void setAvgColLen(double avgColLen) { + this.avgColLen = avgColLen; + setAvgColLenIsSet(true); + } + + public void unsetAvgColLen() { + __isset_bit_vector.clear(__AVGCOLLEN_ISSET_ID); + } + + /** Returns true if field avgColLen is set (has been assigned a value) and false otherwise */ + public boolean isSetAvgColLen() { + return __isset_bit_vector.get(__AVGCOLLEN_ISSET_ID); + } + + public void setAvgColLenIsSet(boolean value) { + __isset_bit_vector.set(__AVGCOLLEN_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MAX_COL_LEN: + if (value == null) { + unsetMaxColLen(); + } else { + setMaxColLen((Long)value); + } + break; + + case AVG_COL_LEN: + if (value == null) { + unsetAvgColLen(); + } else { + setAvgColLen((Double)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MAX_COL_LEN: + return Long.valueOf(getMaxColLen()); + + case AVG_COL_LEN: + return Double.valueOf(getAvgColLen()); + + case NUM_NULLS: + return Long.valueOf(getNumNulls()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MAX_COL_LEN: + return isSetMaxColLen(); + case AVG_COL_LEN: + return isSetAvgColLen(); + case NUM_NULLS: + return isSetNumNulls(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof BinaryColumnStatsData) + return this.equals((BinaryColumnStatsData)that); + return false; + } + + public boolean equals(BinaryColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_maxColLen = true; + boolean that_present_maxColLen = true; + if (this_present_maxColLen || that_present_maxColLen) { + if (!(this_present_maxColLen && that_present_maxColLen)) + return false; + if (this.maxColLen != that.maxColLen) + return false; + } + + boolean this_present_avgColLen = true; + boolean that_present_avgColLen = true; + if (this_present_avgColLen || that_present_avgColLen) { + if (!(this_present_avgColLen && that_present_avgColLen)) + return false; + if (this.avgColLen != that.avgColLen) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_maxColLen = true; + builder.append(present_maxColLen); + if (present_maxColLen) + builder.append(maxColLen); + + boolean present_avgColLen = true; + builder.append(present_avgColLen); + if (present_avgColLen) + builder.append(avgColLen); + + boolean present_numNulls = true; + builder.append(present_numNulls); + if (present_numNulls) + builder.append(numNulls); + + return builder.toHashCode(); + } + + public int compareTo(BinaryColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + BinaryColumnStatsData typedOther = (BinaryColumnStatsData)other; + + lastComparison = Boolean.valueOf(isSetMaxColLen()).compareTo(typedOther.isSetMaxColLen()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxColLen()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxColLen, typedOther.maxColLen); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAvgColLen()).compareTo(typedOther.isSetAvgColLen()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAvgColLen()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avgColLen, typedOther.avgColLen); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(typedOther.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, typedOther.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // MAX_COL_LEN + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.maxColLen = iprot.readI64(); + setMaxColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // AVG_COL_LEN + if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { + this.avgColLen = iprot.readDouble(); + setAvgColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // NUM_NULLS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numNulls = iprot.readI64(); + setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); + oprot.writeI64(this.maxColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); + oprot.writeDouble(this.avgColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(this.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("BinaryColumnStatsData("); + boolean first = true; + + sb.append("maxColLen:"); + sb.append(this.maxColLen); + first = false; + if (!first) sb.append(", "); + sb.append("avgColLen:"); + sb.append(this.avgColLen); + first = false; + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetMaxColLen()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxColLen' is unset! Struct:" + toString()); + } + + if (!isSetAvgColLen()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'avgColLen' is unset! Struct:" + toString()); + } + + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java new file mode 100644 index 0000000..7791c20 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/BooleanColumnStatsData.java @@ -0,0 +1,512 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class BooleanColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BooleanColumnStatsData"); + + private static final org.apache.thrift.protocol.TField NUM_TRUES_FIELD_DESC = new org.apache.thrift.protocol.TField("numTrues", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField NUM_FALSES_FIELD_DESC = new org.apache.thrift.protocol.TField("numFalses", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + + private long numTrues; // required + private long numFalses; // required + private long numNulls; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NUM_TRUES((short)1, "numTrues"), + NUM_FALSES((short)2, "numFalses"), + NUM_NULLS((short)3, "numNulls"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NUM_TRUES + return NUM_TRUES; + case 2: // NUM_FALSES + return NUM_FALSES; + case 3: // NUM_NULLS + return NUM_NULLS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __NUMTRUES_ISSET_ID = 0; + private static final int __NUMFALSES_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NUM_TRUES, new org.apache.thrift.meta_data.FieldMetaData("numTrues", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_FALSES, new org.apache.thrift.meta_data.FieldMetaData("numFalses", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BooleanColumnStatsData.class, metaDataMap); + } + + public BooleanColumnStatsData() { + } + + public BooleanColumnStatsData( + long numTrues, + long numFalses, + long numNulls) + { + this(); + this.numTrues = numTrues; + setNumTruesIsSet(true); + this.numFalses = numFalses; + setNumFalsesIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public BooleanColumnStatsData(BooleanColumnStatsData other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.numTrues = other.numTrues; + this.numFalses = other.numFalses; + this.numNulls = other.numNulls; + } + + public BooleanColumnStatsData deepCopy() { + return new BooleanColumnStatsData(this); + } + + @Override + public void clear() { + setNumTruesIsSet(false); + this.numTrues = 0; + setNumFalsesIsSet(false); + this.numFalses = 0; + setNumNullsIsSet(false); + this.numNulls = 0; + } + + public long getNumTrues() { + return this.numTrues; + } + + public void setNumTrues(long numTrues) { + this.numTrues = numTrues; + setNumTruesIsSet(true); + } + + public void unsetNumTrues() { + __isset_bit_vector.clear(__NUMTRUES_ISSET_ID); + } + + /** Returns true if field numTrues is set (has been assigned a value) and false otherwise */ + public boolean isSetNumTrues() { + return __isset_bit_vector.get(__NUMTRUES_ISSET_ID); + } + + public void setNumTruesIsSet(boolean value) { + __isset_bit_vector.set(__NUMTRUES_ISSET_ID, value); + } + + public long getNumFalses() { + return this.numFalses; + } + + public void setNumFalses(long numFalses) { + this.numFalses = numFalses; + setNumFalsesIsSet(true); + } + + public void unsetNumFalses() { + __isset_bit_vector.clear(__NUMFALSES_ISSET_ID); + } + + /** Returns true if field numFalses is set (has been assigned a value) and false otherwise */ + public boolean isSetNumFalses() { + return __isset_bit_vector.get(__NUMFALSES_ISSET_ID); + } + + public void setNumFalsesIsSet(boolean value) { + __isset_bit_vector.set(__NUMFALSES_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NUM_TRUES: + if (value == null) { + unsetNumTrues(); + } else { + setNumTrues((Long)value); + } + break; + + case NUM_FALSES: + if (value == null) { + unsetNumFalses(); + } else { + setNumFalses((Long)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NUM_TRUES: + return Long.valueOf(getNumTrues()); + + case NUM_FALSES: + return Long.valueOf(getNumFalses()); + + case NUM_NULLS: + return Long.valueOf(getNumNulls()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NUM_TRUES: + return isSetNumTrues(); + case NUM_FALSES: + return isSetNumFalses(); + case NUM_NULLS: + return isSetNumNulls(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof BooleanColumnStatsData) + return this.equals((BooleanColumnStatsData)that); + return false; + } + + public boolean equals(BooleanColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_numTrues = true; + boolean that_present_numTrues = true; + if (this_present_numTrues || that_present_numTrues) { + if (!(this_present_numTrues && that_present_numTrues)) + return false; + if (this.numTrues != that.numTrues) + return false; + } + + boolean this_present_numFalses = true; + boolean that_present_numFalses = true; + if (this_present_numFalses || that_present_numFalses) { + if (!(this_present_numFalses && that_present_numFalses)) + return false; + if (this.numFalses != that.numFalses) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_numTrues = true; + builder.append(present_numTrues); + if (present_numTrues) + builder.append(numTrues); + + boolean present_numFalses = true; + builder.append(present_numFalses); + if (present_numFalses) + builder.append(numFalses); + + boolean present_numNulls = true; + builder.append(present_numNulls); + if (present_numNulls) + builder.append(numNulls); + + return builder.toHashCode(); + } + + public int compareTo(BooleanColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + BooleanColumnStatsData typedOther = (BooleanColumnStatsData)other; + + lastComparison = Boolean.valueOf(isSetNumTrues()).compareTo(typedOther.isSetNumTrues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumTrues()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numTrues, typedOther.numTrues); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumFalses()).compareTo(typedOther.isSetNumFalses()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumFalses()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numFalses, typedOther.numFalses); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(typedOther.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, typedOther.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // NUM_TRUES + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numTrues = iprot.readI64(); + setNumTruesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // NUM_FALSES + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numFalses = iprot.readI64(); + setNumFalsesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // NUM_NULLS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numNulls = iprot.readI64(); + setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(NUM_TRUES_FIELD_DESC); + oprot.writeI64(this.numTrues); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_FALSES_FIELD_DESC); + oprot.writeI64(this.numFalses); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(this.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("BooleanColumnStatsData("); + boolean first = true; + + sb.append("numTrues:"); + sb.append(this.numTrues); + first = false; + if (!first) sb.append(", "); + sb.append("numFalses:"); + sb.append(this.numFalses); + first = false; + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetNumTrues()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numTrues' is unset! Struct:" + toString()); + } + + if (!isSetNumFalses()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numFalses' is unset! Struct:" + toString()); + } + + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java new file mode 100644 index 0000000..87b9526 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java @@ -0,0 +1,464 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ColumnStatistics implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatistics"); + + private static final org.apache.thrift.protocol.TField STATS_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("statsDesc", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("statsObj", org.apache.thrift.protocol.TType.LIST, (short)2); + + private ColumnStatisticsDesc statsDesc; // required + private List statsObj; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATS_DESC((short)1, "statsDesc"), + STATS_OBJ((short)2, "statsObj"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATS_DESC + return STATS_DESC; + case 2: // STATS_OBJ + return STATS_OBJ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.STATS_DESC, new org.apache.thrift.meta_data.FieldMetaData("statsDesc", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsDesc.class))); + tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("statsObj", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatistics.class, metaDataMap); + } + + public ColumnStatistics() { + } + + public ColumnStatistics( + ColumnStatisticsDesc statsDesc, + List statsObj) + { + this(); + this.statsDesc = statsDesc; + this.statsObj = statsObj; + } + + /** + * Performs a deep copy on other. + */ + public ColumnStatistics(ColumnStatistics other) { + if (other.isSetStatsDesc()) { + this.statsDesc = new ColumnStatisticsDesc(other.statsDesc); + } + if (other.isSetStatsObj()) { + List __this__statsObj = new ArrayList(); + for (ColumnStatisticsObj other_element : other.statsObj) { + __this__statsObj.add(new ColumnStatisticsObj(other_element)); + } + this.statsObj = __this__statsObj; + } + } + + public ColumnStatistics deepCopy() { + return new ColumnStatistics(this); + } + + @Override + public void clear() { + this.statsDesc = null; + this.statsObj = null; + } + + public ColumnStatisticsDesc getStatsDesc() { + return this.statsDesc; + } + + public void setStatsDesc(ColumnStatisticsDesc statsDesc) { + this.statsDesc = statsDesc; + } + + public void unsetStatsDesc() { + this.statsDesc = null; + } + + /** Returns true if field statsDesc is set (has been assigned a value) and false otherwise */ + public boolean isSetStatsDesc() { + return this.statsDesc != null; + } + + public void setStatsDescIsSet(boolean value) { + if (!value) { + this.statsDesc = null; + } + } + + public int getStatsObjSize() { + return (this.statsObj == null) ? 0 : this.statsObj.size(); + } + + public java.util.Iterator getStatsObjIterator() { + return (this.statsObj == null) ? null : this.statsObj.iterator(); + } + + public void addToStatsObj(ColumnStatisticsObj elem) { + if (this.statsObj == null) { + this.statsObj = new ArrayList(); + } + this.statsObj.add(elem); + } + + public List getStatsObj() { + return this.statsObj; + } + + public void setStatsObj(List statsObj) { + this.statsObj = statsObj; + } + + public void unsetStatsObj() { + this.statsObj = null; + } + + /** Returns true if field statsObj is set (has been assigned a value) and false otherwise */ + public boolean isSetStatsObj() { + return this.statsObj != null; + } + + public void setStatsObjIsSet(boolean value) { + if (!value) { + this.statsObj = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATS_DESC: + if (value == null) { + unsetStatsDesc(); + } else { + setStatsDesc((ColumnStatisticsDesc)value); + } + break; + + case STATS_OBJ: + if (value == null) { + unsetStatsObj(); + } else { + setStatsObj((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATS_DESC: + return getStatsDesc(); + + case STATS_OBJ: + return getStatsObj(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STATS_DESC: + return isSetStatsDesc(); + case STATS_OBJ: + return isSetStatsObj(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnStatistics) + return this.equals((ColumnStatistics)that); + return false; + } + + public boolean equals(ColumnStatistics that) { + if (that == null) + return false; + + boolean this_present_statsDesc = true && this.isSetStatsDesc(); + boolean that_present_statsDesc = true && that.isSetStatsDesc(); + if (this_present_statsDesc || that_present_statsDesc) { + if (!(this_present_statsDesc && that_present_statsDesc)) + return false; + if (!this.statsDesc.equals(that.statsDesc)) + return false; + } + + boolean this_present_statsObj = true && this.isSetStatsObj(); + boolean that_present_statsObj = true && that.isSetStatsObj(); + if (this_present_statsObj || that_present_statsObj) { + if (!(this_present_statsObj && that_present_statsObj)) + return false; + if (!this.statsObj.equals(that.statsObj)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_statsDesc = true && (isSetStatsDesc()); + builder.append(present_statsDesc); + if (present_statsDesc) + builder.append(statsDesc); + + boolean present_statsObj = true && (isSetStatsObj()); + builder.append(present_statsObj); + if (present_statsObj) + builder.append(statsObj); + + return builder.toHashCode(); + } + + public int compareTo(ColumnStatistics other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ColumnStatistics typedOther = (ColumnStatistics)other; + + lastComparison = Boolean.valueOf(isSetStatsDesc()).compareTo(typedOther.isSetStatsDesc()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatsDesc()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsDesc, typedOther.statsDesc); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStatsObj()).compareTo(typedOther.isSetStatsObj()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatsObj()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsObj, typedOther.statsObj); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // STATS_DESC + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.statsDesc = new ColumnStatisticsDesc(); + this.statsDesc.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // STATS_OBJ + if (field.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list110 = iprot.readListBegin(); + this.statsObj = new ArrayList(_list110.size); + for (int _i111 = 0; _i111 < _list110.size; ++_i111) + { + ColumnStatisticsObj _elem112; // required + _elem112 = new ColumnStatisticsObj(); + _elem112.read(iprot); + this.statsObj.add(_elem112); + } + iprot.readListEnd(); + } + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.statsDesc != null) { + oprot.writeFieldBegin(STATS_DESC_FIELD_DESC); + this.statsDesc.write(oprot); + oprot.writeFieldEnd(); + } + if (this.statsObj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.statsObj.size())); + for (ColumnStatisticsObj _iter113 : this.statsObj) + { + _iter113.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ColumnStatistics("); + boolean first = true; + + sb.append("statsDesc:"); + if (this.statsDesc == null) { + sb.append("null"); + } else { + sb.append(this.statsDesc); + } + first = false; + if (!first) sb.append(", "); + sb.append("statsObj:"); + if (this.statsObj == null) { + sb.append("null"); + } else { + sb.append(this.statsObj); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetStatsDesc()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsDesc' is unset! Struct:" + toString()); + } + + if (!isSetStatsObj()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsObj' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java new file mode 100644 index 0000000..6c63ef3 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsData.java @@ -0,0 +1,474 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ColumnStatisticsData extends org.apache.thrift.TUnion { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsData"); + private static final org.apache.thrift.protocol.TField BOOLEAN_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("booleanStats", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField LONG_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("longStats", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField DOUBLE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleStats", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField STRING_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stringStats", org.apache.thrift.protocol.TType.STRUCT, (short)4); + private static final org.apache.thrift.protocol.TField BINARY_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryStats", org.apache.thrift.protocol.TType.STRUCT, (short)5); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + BOOLEAN_STATS((short)1, "booleanStats"), + LONG_STATS((short)2, "longStats"), + DOUBLE_STATS((short)3, "doubleStats"), + STRING_STATS((short)4, "stringStats"), + BINARY_STATS((short)5, "binaryStats"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // BOOLEAN_STATS + return BOOLEAN_STATS; + case 2: // LONG_STATS + return LONG_STATS; + case 3: // DOUBLE_STATS + return DOUBLE_STATS; + case 4: // STRING_STATS + return STRING_STATS; + case 5: // BINARY_STATS + return BINARY_STATS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.BOOLEAN_STATS, new org.apache.thrift.meta_data.FieldMetaData("booleanStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BooleanColumnStatsData.class))); + tmpMap.put(_Fields.LONG_STATS, new org.apache.thrift.meta_data.FieldMetaData("longStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LongColumnStatsData.class))); + tmpMap.put(_Fields.DOUBLE_STATS, new org.apache.thrift.meta_data.FieldMetaData("doubleStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DoubleColumnStatsData.class))); + tmpMap.put(_Fields.STRING_STATS, new org.apache.thrift.meta_data.FieldMetaData("stringStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StringColumnStatsData.class))); + tmpMap.put(_Fields.BINARY_STATS, new org.apache.thrift.meta_data.FieldMetaData("binaryStats", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BinaryColumnStatsData.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsData.class, metaDataMap); + } + + public ColumnStatisticsData() { + super(); + } + + public ColumnStatisticsData(_Fields setField, Object value) { + super(setField, value); + } + + public ColumnStatisticsData(ColumnStatisticsData other) { + super(other); + } + public ColumnStatisticsData deepCopy() { + return new ColumnStatisticsData(this); + } + + public static ColumnStatisticsData booleanStats(BooleanColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setBooleanStats(value); + return x; + } + + public static ColumnStatisticsData longStats(LongColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setLongStats(value); + return x; + } + + public static ColumnStatisticsData doubleStats(DoubleColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setDoubleStats(value); + return x; + } + + public static ColumnStatisticsData stringStats(StringColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setStringStats(value); + return x; + } + + public static ColumnStatisticsData binaryStats(BinaryColumnStatsData value) { + ColumnStatisticsData x = new ColumnStatisticsData(); + x.setBinaryStats(value); + return x; + } + + + @Override + protected void checkType(_Fields setField, Object value) throws ClassCastException { + switch (setField) { + case BOOLEAN_STATS: + if (value instanceof BooleanColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type BooleanColumnStatsData for field 'booleanStats', but got " + value.getClass().getSimpleName()); + case LONG_STATS: + if (value instanceof LongColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type LongColumnStatsData for field 'longStats', but got " + value.getClass().getSimpleName()); + case DOUBLE_STATS: + if (value instanceof DoubleColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type DoubleColumnStatsData for field 'doubleStats', but got " + value.getClass().getSimpleName()); + case STRING_STATS: + if (value instanceof StringColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type StringColumnStatsData for field 'stringStats', but got " + value.getClass().getSimpleName()); + case BINARY_STATS: + if (value instanceof BinaryColumnStatsData) { + break; + } + throw new ClassCastException("Was expecting value of type BinaryColumnStatsData for field 'binaryStats', but got " + value.getClass().getSimpleName()); + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected Object readValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException { + _Fields setField = _Fields.findByThriftId(field.id); + if (setField != null) { + switch (setField) { + case BOOLEAN_STATS: + if (field.type == BOOLEAN_STATS_FIELD_DESC.type) { + BooleanColumnStatsData booleanStats; + booleanStats = new BooleanColumnStatsData(); + booleanStats.read(iprot); + return booleanStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case LONG_STATS: + if (field.type == LONG_STATS_FIELD_DESC.type) { + LongColumnStatsData longStats; + longStats = new LongColumnStatsData(); + longStats.read(iprot); + return longStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case DOUBLE_STATS: + if (field.type == DOUBLE_STATS_FIELD_DESC.type) { + DoubleColumnStatsData doubleStats; + doubleStats = new DoubleColumnStatsData(); + doubleStats.read(iprot); + return doubleStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case STRING_STATS: + if (field.type == STRING_STATS_FIELD_DESC.type) { + StringColumnStatsData stringStats; + stringStats = new StringColumnStatsData(); + stringStats.read(iprot); + return stringStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + case BINARY_STATS: + if (field.type == BINARY_STATS_FIELD_DESC.type) { + BinaryColumnStatsData binaryStats; + binaryStats = new BinaryColumnStatsData(); + binaryStats.read(iprot); + return binaryStats; + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + default: + throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); + } + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + return null; + } + } + + @Override + protected void writeValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + switch (setField_) { + case BOOLEAN_STATS: + BooleanColumnStatsData booleanStats = (BooleanColumnStatsData)value_; + booleanStats.write(oprot); + return; + case LONG_STATS: + LongColumnStatsData longStats = (LongColumnStatsData)value_; + longStats.write(oprot); + return; + case DOUBLE_STATS: + DoubleColumnStatsData doubleStats = (DoubleColumnStatsData)value_; + doubleStats.write(oprot); + return; + case STRING_STATS: + StringColumnStatsData stringStats = (StringColumnStatsData)value_; + stringStats.write(oprot); + return; + case BINARY_STATS: + BinaryColumnStatsData binaryStats = (BinaryColumnStatsData)value_; + binaryStats.write(oprot); + return; + default: + throw new IllegalStateException("Cannot write union with unknown field " + setField_); + } + } + + @Override + protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) { + switch (setField) { + case BOOLEAN_STATS: + return BOOLEAN_STATS_FIELD_DESC; + case LONG_STATS: + return LONG_STATS_FIELD_DESC; + case DOUBLE_STATS: + return DOUBLE_STATS_FIELD_DESC; + case STRING_STATS: + return STRING_STATS_FIELD_DESC; + case BINARY_STATS: + return BINARY_STATS_FIELD_DESC; + default: + throw new IllegalArgumentException("Unknown field id " + setField); + } + } + + @Override + protected org.apache.thrift.protocol.TStruct getStructDesc() { + return STRUCT_DESC; + } + + @Override + protected _Fields enumForId(short id) { + return _Fields.findByThriftIdOrThrow(id); + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + + public BooleanColumnStatsData getBooleanStats() { + if (getSetField() == _Fields.BOOLEAN_STATS) { + return (BooleanColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'booleanStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setBooleanStats(BooleanColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.BOOLEAN_STATS; + value_ = value; + } + + public LongColumnStatsData getLongStats() { + if (getSetField() == _Fields.LONG_STATS) { + return (LongColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'longStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setLongStats(LongColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.LONG_STATS; + value_ = value; + } + + public DoubleColumnStatsData getDoubleStats() { + if (getSetField() == _Fields.DOUBLE_STATS) { + return (DoubleColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'doubleStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setDoubleStats(DoubleColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.DOUBLE_STATS; + value_ = value; + } + + public StringColumnStatsData getStringStats() { + if (getSetField() == _Fields.STRING_STATS) { + return (StringColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'stringStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setStringStats(StringColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.STRING_STATS; + value_ = value; + } + + public BinaryColumnStatsData getBinaryStats() { + if (getSetField() == _Fields.BINARY_STATS) { + return (BinaryColumnStatsData)getFieldValue(); + } else { + throw new RuntimeException("Cannot get field 'binaryStats' because union is currently set to " + getFieldDesc(getSetField()).name); + } + } + + public void setBinaryStats(BinaryColumnStatsData value) { + if (value == null) throw new NullPointerException(); + setField_ = _Fields.BINARY_STATS; + value_ = value; + } + + public boolean isSetBooleanStats() { + return setField_ == _Fields.BOOLEAN_STATS; + } + + + public boolean isSetLongStats() { + return setField_ == _Fields.LONG_STATS; + } + + + public boolean isSetDoubleStats() { + return setField_ == _Fields.DOUBLE_STATS; + } + + + public boolean isSetStringStats() { + return setField_ == _Fields.STRING_STATS; + } + + + public boolean isSetBinaryStats() { + return setField_ == _Fields.BINARY_STATS; + } + + + public boolean equals(Object other) { + if (other instanceof ColumnStatisticsData) { + return equals((ColumnStatisticsData)other); + } else { + return false; + } + } + + public boolean equals(ColumnStatisticsData other) { + return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); + } + + @Override + public int compareTo(ColumnStatisticsData other) { + int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); + if (lastComparison == 0) { + return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); + } + return lastComparison; + } + + + @Override + public int hashCode() { + HashCodeBuilder hcb = new HashCodeBuilder(); + hcb.append(this.getClass().getName()); + org.apache.thrift.TFieldIdEnum setField = getSetField(); + if (setField != null) { + hcb.append(setField.getThriftFieldId()); + Object value = getFieldValue(); + if (value instanceof org.apache.thrift.TEnum) { + hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); + } else { + hcb.append(value); + } + } + return hcb.toHashCode(); + } + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + +} diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java new file mode 100644 index 0000000..0c31589 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsDesc.java @@ -0,0 +1,706 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ColumnStatisticsDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsDesc"); + + private static final org.apache.thrift.protocol.TField IS_TBL_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("isTblLevel", org.apache.thrift.protocol.TType.BOOL, (short)1); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partName", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField LAST_ANALYZED_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAnalyzed", org.apache.thrift.protocol.TType.I64, (short)5); + + private boolean isTblLevel; // required + private String dbName; // required + private String tableName; // required + private String partName; // required + private long lastAnalyzed; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IS_TBL_LEVEL((short)1, "isTblLevel"), + DB_NAME((short)2, "dbName"), + TABLE_NAME((short)3, "tableName"), + PART_NAME((short)4, "partName"), + LAST_ANALYZED((short)5, "lastAnalyzed"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IS_TBL_LEVEL + return IS_TBL_LEVEL; + case 2: // DB_NAME + return DB_NAME; + case 3: // TABLE_NAME + return TABLE_NAME; + case 4: // PART_NAME + return PART_NAME; + case 5: // LAST_ANALYZED + return LAST_ANALYZED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISTBLLEVEL_ISSET_ID = 0; + private static final int __LASTANALYZED_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IS_TBL_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("isTblLevel", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("partName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LAST_ANALYZED, new org.apache.thrift.meta_data.FieldMetaData("lastAnalyzed", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsDesc.class, metaDataMap); + } + + public ColumnStatisticsDesc() { + } + + public ColumnStatisticsDesc( + boolean isTblLevel, + String dbName, + String tableName) + { + this(); + this.isTblLevel = isTblLevel; + setIsTblLevelIsSet(true); + this.dbName = dbName; + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public ColumnStatisticsDesc(ColumnStatisticsDesc other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.isTblLevel = other.isTblLevel; + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetPartName()) { + this.partName = other.partName; + } + this.lastAnalyzed = other.lastAnalyzed; + } + + public ColumnStatisticsDesc deepCopy() { + return new ColumnStatisticsDesc(this); + } + + @Override + public void clear() { + setIsTblLevelIsSet(false); + this.isTblLevel = false; + this.dbName = null; + this.tableName = null; + this.partName = null; + setLastAnalyzedIsSet(false); + this.lastAnalyzed = 0; + } + + public boolean isIsTblLevel() { + return this.isTblLevel; + } + + public void setIsTblLevel(boolean isTblLevel) { + this.isTblLevel = isTblLevel; + setIsTblLevelIsSet(true); + } + + public void unsetIsTblLevel() { + __isset_bit_vector.clear(__ISTBLLEVEL_ISSET_ID); + } + + /** Returns true if field isTblLevel is set (has been assigned a value) and false otherwise */ + public boolean isSetIsTblLevel() { + return __isset_bit_vector.get(__ISTBLLEVEL_ISSET_ID); + } + + public void setIsTblLevelIsSet(boolean value) { + __isset_bit_vector.set(__ISTBLLEVEL_ISSET_ID, value); + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public String getPartName() { + return this.partName; + } + + public void setPartName(String partName) { + this.partName = partName; + } + + public void unsetPartName() { + this.partName = null; + } + + /** Returns true if field partName is set (has been assigned a value) and false otherwise */ + public boolean isSetPartName() { + return this.partName != null; + } + + public void setPartNameIsSet(boolean value) { + if (!value) { + this.partName = null; + } + } + + public long getLastAnalyzed() { + return this.lastAnalyzed; + } + + public void setLastAnalyzed(long lastAnalyzed) { + this.lastAnalyzed = lastAnalyzed; + setLastAnalyzedIsSet(true); + } + + public void unsetLastAnalyzed() { + __isset_bit_vector.clear(__LASTANALYZED_ISSET_ID); + } + + /** Returns true if field lastAnalyzed is set (has been assigned a value) and false otherwise */ + public boolean isSetLastAnalyzed() { + return __isset_bit_vector.get(__LASTANALYZED_ISSET_ID); + } + + public void setLastAnalyzedIsSet(boolean value) { + __isset_bit_vector.set(__LASTANALYZED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IS_TBL_LEVEL: + if (value == null) { + unsetIsTblLevel(); + } else { + setIsTblLevel((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPartName(); + } else { + setPartName((String)value); + } + break; + + case LAST_ANALYZED: + if (value == null) { + unsetLastAnalyzed(); + } else { + setLastAnalyzed((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IS_TBL_LEVEL: + return Boolean.valueOf(isIsTblLevel()); + + case DB_NAME: + return getDbName(); + + case TABLE_NAME: + return getTableName(); + + case PART_NAME: + return getPartName(); + + case LAST_ANALYZED: + return Long.valueOf(getLastAnalyzed()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IS_TBL_LEVEL: + return isSetIsTblLevel(); + case DB_NAME: + return isSetDbName(); + case TABLE_NAME: + return isSetTableName(); + case PART_NAME: + return isSetPartName(); + case LAST_ANALYZED: + return isSetLastAnalyzed(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnStatisticsDesc) + return this.equals((ColumnStatisticsDesc)that); + return false; + } + + public boolean equals(ColumnStatisticsDesc that) { + if (that == null) + return false; + + boolean this_present_isTblLevel = true; + boolean that_present_isTblLevel = true; + if (this_present_isTblLevel || that_present_isTblLevel) { + if (!(this_present_isTblLevel && that_present_isTblLevel)) + return false; + if (this.isTblLevel != that.isTblLevel) + return false; + } + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_partName = true && this.isSetPartName(); + boolean that_present_partName = true && that.isSetPartName(); + if (this_present_partName || that_present_partName) { + if (!(this_present_partName && that_present_partName)) + return false; + if (!this.partName.equals(that.partName)) + return false; + } + + boolean this_present_lastAnalyzed = true && this.isSetLastAnalyzed(); + boolean that_present_lastAnalyzed = true && that.isSetLastAnalyzed(); + if (this_present_lastAnalyzed || that_present_lastAnalyzed) { + if (!(this_present_lastAnalyzed && that_present_lastAnalyzed)) + return false; + if (this.lastAnalyzed != that.lastAnalyzed) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_isTblLevel = true; + builder.append(present_isTblLevel); + if (present_isTblLevel) + builder.append(isTblLevel); + + boolean present_dbName = true && (isSetDbName()); + builder.append(present_dbName); + if (present_dbName) + builder.append(dbName); + + boolean present_tableName = true && (isSetTableName()); + builder.append(present_tableName); + if (present_tableName) + builder.append(tableName); + + boolean present_partName = true && (isSetPartName()); + builder.append(present_partName); + if (present_partName) + builder.append(partName); + + boolean present_lastAnalyzed = true && (isSetLastAnalyzed()); + builder.append(present_lastAnalyzed); + if (present_lastAnalyzed) + builder.append(lastAnalyzed); + + return builder.toHashCode(); + } + + public int compareTo(ColumnStatisticsDesc other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ColumnStatisticsDesc typedOther = (ColumnStatisticsDesc)other; + + lastComparison = Boolean.valueOf(isSetIsTblLevel()).compareTo(typedOther.isSetIsTblLevel()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsTblLevel()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTblLevel, typedOther.isTblLevel); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartName()).compareTo(typedOther.isSetPartName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partName, typedOther.partName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAnalyzed()).compareTo(typedOther.isSetLastAnalyzed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAnalyzed()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastAnalyzed, typedOther.lastAnalyzed); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // IS_TBL_LEVEL + if (field.type == org.apache.thrift.protocol.TType.BOOL) { + this.isTblLevel = iprot.readBool(); + setIsTblLevelIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // DB_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.dbName = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // TABLE_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.tableName = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // PART_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.partName = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // LAST_ANALYZED + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.lastAnalyzed = iprot.readI64(); + setLastAnalyzedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(IS_TBL_LEVEL_FIELD_DESC); + oprot.writeBool(this.isTblLevel); + oprot.writeFieldEnd(); + if (this.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.dbName); + oprot.writeFieldEnd(); + } + if (this.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.tableName); + oprot.writeFieldEnd(); + } + if (this.partName != null) { + if (isSetPartName()) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.partName); + oprot.writeFieldEnd(); + } + } + if (isSetLastAnalyzed()) { + oprot.writeFieldBegin(LAST_ANALYZED_FIELD_DESC); + oprot.writeI64(this.lastAnalyzed); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ColumnStatisticsDesc("); + boolean first = true; + + sb.append("isTblLevel:"); + sb.append(this.isTblLevel); + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (isSetPartName()) { + if (!first) sb.append(", "); + sb.append("partName:"); + if (this.partName == null) { + sb.append("null"); + } else { + sb.append(this.partName); + } + first = false; + } + if (isSetLastAnalyzed()) { + if (!first) sb.append(", "); + sb.append("lastAnalyzed:"); + sb.append(this.lastAnalyzed); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetIsTblLevel()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'isTblLevel' is unset! Struct:" + toString()); + } + + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTableName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java new file mode 100644 index 0000000..a12313f --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatisticsObj.java @@ -0,0 +1,523 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ColumnStatisticsObj implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnStatisticsObj"); + + private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("colName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField COL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("colType", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField STATS_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("statsData", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private String colName; // required + private String colType; // required + private ColumnStatisticsData statsData; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + COL_NAME((short)1, "colName"), + COL_TYPE((short)2, "colType"), + STATS_DATA((short)3, "statsData"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // COL_NAME + return COL_NAME; + case 2: // COL_TYPE + return COL_TYPE; + case 3: // STATS_DATA + return STATS_DATA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("colName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("colType", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.STATS_DATA, new org.apache.thrift.meta_data.FieldMetaData("statsData", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsData.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatisticsObj.class, metaDataMap); + } + + public ColumnStatisticsObj() { + } + + public ColumnStatisticsObj( + String colName, + String colType, + ColumnStatisticsData statsData) + { + this(); + this.colName = colName; + this.colType = colType; + this.statsData = statsData; + } + + /** + * Performs a deep copy on other. + */ + public ColumnStatisticsObj(ColumnStatisticsObj other) { + if (other.isSetColName()) { + this.colName = other.colName; + } + if (other.isSetColType()) { + this.colType = other.colType; + } + if (other.isSetStatsData()) { + this.statsData = new ColumnStatisticsData(other.statsData); + } + } + + public ColumnStatisticsObj deepCopy() { + return new ColumnStatisticsObj(this); + } + + @Override + public void clear() { + this.colName = null; + this.colType = null; + this.statsData = null; + } + + public String getColName() { + return this.colName; + } + + public void setColName(String colName) { + this.colName = colName; + } + + public void unsetColName() { + this.colName = null; + } + + /** Returns true if field colName is set (has been assigned a value) and false otherwise */ + public boolean isSetColName() { + return this.colName != null; + } + + public void setColNameIsSet(boolean value) { + if (!value) { + this.colName = null; + } + } + + public String getColType() { + return this.colType; + } + + public void setColType(String colType) { + this.colType = colType; + } + + public void unsetColType() { + this.colType = null; + } + + /** Returns true if field colType is set (has been assigned a value) and false otherwise */ + public boolean isSetColType() { + return this.colType != null; + } + + public void setColTypeIsSet(boolean value) { + if (!value) { + this.colType = null; + } + } + + public ColumnStatisticsData getStatsData() { + return this.statsData; + } + + public void setStatsData(ColumnStatisticsData statsData) { + this.statsData = statsData; + } + + public void unsetStatsData() { + this.statsData = null; + } + + /** Returns true if field statsData is set (has been assigned a value) and false otherwise */ + public boolean isSetStatsData() { + return this.statsData != null; + } + + public void setStatsDataIsSet(boolean value) { + if (!value) { + this.statsData = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case COL_NAME: + if (value == null) { + unsetColName(); + } else { + setColName((String)value); + } + break; + + case COL_TYPE: + if (value == null) { + unsetColType(); + } else { + setColType((String)value); + } + break; + + case STATS_DATA: + if (value == null) { + unsetStatsData(); + } else { + setStatsData((ColumnStatisticsData)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case COL_NAME: + return getColName(); + + case COL_TYPE: + return getColType(); + + case STATS_DATA: + return getStatsData(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case COL_NAME: + return isSetColName(); + case COL_TYPE: + return isSetColType(); + case STATS_DATA: + return isSetStatsData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnStatisticsObj) + return this.equals((ColumnStatisticsObj)that); + return false; + } + + public boolean equals(ColumnStatisticsObj that) { + if (that == null) + return false; + + boolean this_present_colName = true && this.isSetColName(); + boolean that_present_colName = true && that.isSetColName(); + if (this_present_colName || that_present_colName) { + if (!(this_present_colName && that_present_colName)) + return false; + if (!this.colName.equals(that.colName)) + return false; + } + + boolean this_present_colType = true && this.isSetColType(); + boolean that_present_colType = true && that.isSetColType(); + if (this_present_colType || that_present_colType) { + if (!(this_present_colType && that_present_colType)) + return false; + if (!this.colType.equals(that.colType)) + return false; + } + + boolean this_present_statsData = true && this.isSetStatsData(); + boolean that_present_statsData = true && that.isSetStatsData(); + if (this_present_statsData || that_present_statsData) { + if (!(this_present_statsData && that_present_statsData)) + return false; + if (!this.statsData.equals(that.statsData)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_colName = true && (isSetColName()); + builder.append(present_colName); + if (present_colName) + builder.append(colName); + + boolean present_colType = true && (isSetColType()); + builder.append(present_colType); + if (present_colType) + builder.append(colType); + + boolean present_statsData = true && (isSetStatsData()); + builder.append(present_statsData); + if (present_statsData) + builder.append(statsData); + + return builder.toHashCode(); + } + + public int compareTo(ColumnStatisticsObj other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ColumnStatisticsObj typedOther = (ColumnStatisticsObj)other; + + lastComparison = Boolean.valueOf(isSetColName()).compareTo(typedOther.isSetColName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colName, typedOther.colName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColType()).compareTo(typedOther.isSetColType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colType, typedOther.colType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStatsData()).compareTo(typedOther.isSetStatsData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStatsData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statsData, typedOther.statsData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // COL_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.colName = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // COL_TYPE + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.colType = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // STATS_DATA + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.statsData = new ColumnStatisticsData(); + this.statsData.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.colName != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(this.colName); + oprot.writeFieldEnd(); + } + if (this.colType != null) { + oprot.writeFieldBegin(COL_TYPE_FIELD_DESC); + oprot.writeString(this.colType); + oprot.writeFieldEnd(); + } + if (this.statsData != null) { + oprot.writeFieldBegin(STATS_DATA_FIELD_DESC); + this.statsData.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ColumnStatisticsObj("); + boolean first = true; + + sb.append("colName:"); + if (this.colName == null) { + sb.append("null"); + } else { + sb.append(this.colName); + } + first = false; + if (!first) sb.append(", "); + sb.append("colType:"); + if (this.colType == null) { + sb.append("null"); + } else { + sb.append(this.colType); + } + first = false; + if (!first) sb.append(", "); + sb.append("statsData:"); + if (this.statsData == null) { + sb.append("null"); + } else { + sb.append(this.statsData); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetColName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'colName' is unset! Struct:" + toString()); + } + + if (!isSetColType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'colType' is unset! Struct:" + toString()); + } + + if (!isSetStatsData()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsData' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java new file mode 100644 index 0000000..d7a6b3a --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DoubleColumnStatsData.java @@ -0,0 +1,604 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DoubleColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DoubleColumnStatsData"); + + private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.DOUBLE, (short)1); + private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.DOUBLE, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + + private double lowValue; // required + private double highValue; // required + private long numNulls; // required + private long numDVs; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + LOW_VALUE((short)1, "lowValue"), + HIGH_VALUE((short)2, "highValue"), + NUM_NULLS((short)3, "numNulls"), + NUM_DVS((short)4, "numDVs"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOW_VALUE + return LOW_VALUE; + case 2: // HIGH_VALUE + return HIGH_VALUE; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // NUM_DVS + return NUM_DVS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOWVALUE_ISSET_ID = 0; + private static final int __HIGHVALUE_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private static final int __NUMDVS_ISSET_ID = 3; + private BitSet __isset_bit_vector = new BitSet(4); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DoubleColumnStatsData.class, metaDataMap); + } + + public DoubleColumnStatsData() { + } + + public DoubleColumnStatsData( + double lowValue, + double highValue, + long numNulls, + long numDVs) + { + this(); + this.lowValue = lowValue; + setLowValueIsSet(true); + this.highValue = highValue; + setHighValueIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public DoubleColumnStatsData(DoubleColumnStatsData other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.lowValue = other.lowValue; + this.highValue = other.highValue; + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + } + + public DoubleColumnStatsData deepCopy() { + return new DoubleColumnStatsData(this); + } + + @Override + public void clear() { + setLowValueIsSet(false); + this.lowValue = 0.0; + setHighValueIsSet(false); + this.highValue = 0.0; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + } + + public double getLowValue() { + return this.lowValue; + } + + public void setLowValue(double lowValue) { + this.lowValue = lowValue; + setLowValueIsSet(true); + } + + public void unsetLowValue() { + __isset_bit_vector.clear(__LOWVALUE_ISSET_ID); + } + + /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ + public boolean isSetLowValue() { + return __isset_bit_vector.get(__LOWVALUE_ISSET_ID); + } + + public void setLowValueIsSet(boolean value) { + __isset_bit_vector.set(__LOWVALUE_ISSET_ID, value); + } + + public double getHighValue() { + return this.highValue; + } + + public void setHighValue(double highValue) { + this.highValue = highValue; + setHighValueIsSet(true); + } + + public void unsetHighValue() { + __isset_bit_vector.clear(__HIGHVALUE_ISSET_ID); + } + + /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ + public boolean isSetHighValue() { + return __isset_bit_vector.get(__HIGHVALUE_ISSET_ID); + } + + public void setHighValueIsSet(boolean value) { + __isset_bit_vector.set(__HIGHVALUE_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + } + + public long getNumDVs() { + return this.numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + public void unsetNumDVs() { + __isset_bit_vector.clear(__NUMDVS_ISSET_ID); + } + + /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ + public boolean isSetNumDVs() { + return __isset_bit_vector.get(__NUMDVS_ISSET_ID); + } + + public void setNumDVsIsSet(boolean value) { + __isset_bit_vector.set(__NUMDVS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOW_VALUE: + if (value == null) { + unsetLowValue(); + } else { + setLowValue((Double)value); + } + break; + + case HIGH_VALUE: + if (value == null) { + unsetHighValue(); + } else { + setHighValue((Double)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case NUM_DVS: + if (value == null) { + unsetNumDVs(); + } else { + setNumDVs((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOW_VALUE: + return Double.valueOf(getLowValue()); + + case HIGH_VALUE: + return Double.valueOf(getHighValue()); + + case NUM_NULLS: + return Long.valueOf(getNumNulls()); + + case NUM_DVS: + return Long.valueOf(getNumDVs()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOW_VALUE: + return isSetLowValue(); + case HIGH_VALUE: + return isSetHighValue(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof DoubleColumnStatsData) + return this.equals((DoubleColumnStatsData)that); + return false; + } + + public boolean equals(DoubleColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_lowValue = true; + boolean that_present_lowValue = true; + if (this_present_lowValue || that_present_lowValue) { + if (!(this_present_lowValue && that_present_lowValue)) + return false; + if (this.lowValue != that.lowValue) + return false; + } + + boolean this_present_highValue = true; + boolean that_present_highValue = true; + if (this_present_highValue || that_present_highValue) { + if (!(this_present_highValue && that_present_highValue)) + return false; + if (this.highValue != that.highValue) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_numDVs = true; + boolean that_present_numDVs = true; + if (this_present_numDVs || that_present_numDVs) { + if (!(this_present_numDVs && that_present_numDVs)) + return false; + if (this.numDVs != that.numDVs) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_lowValue = true; + builder.append(present_lowValue); + if (present_lowValue) + builder.append(lowValue); + + boolean present_highValue = true; + builder.append(present_highValue); + if (present_highValue) + builder.append(highValue); + + boolean present_numNulls = true; + builder.append(present_numNulls); + if (present_numNulls) + builder.append(numNulls); + + boolean present_numDVs = true; + builder.append(present_numDVs); + if (present_numDVs) + builder.append(numDVs); + + return builder.toHashCode(); + } + + public int compareTo(DoubleColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + DoubleColumnStatsData typedOther = (DoubleColumnStatsData)other; + + lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(typedOther.isSetLowValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLowValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, typedOther.lowValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(typedOther.isSetHighValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHighValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, typedOther.highValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(typedOther.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, typedOther.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(typedOther.isSetNumDVs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumDVs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, typedOther.numDVs); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // LOW_VALUE + if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { + this.lowValue = iprot.readDouble(); + setLowValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // HIGH_VALUE + if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { + this.highValue = iprot.readDouble(); + setHighValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // NUM_NULLS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numNulls = iprot.readI64(); + setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // NUM_DVS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numDVs = iprot.readI64(); + setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); + oprot.writeDouble(this.lowValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); + oprot.writeDouble(this.highValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(this.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(this.numDVs); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("DoubleColumnStatsData("); + boolean first = true; + + sb.append("lowValue:"); + sb.append(this.lowValue); + first = false; + if (!first) sb.append(", "); + sb.append("highValue:"); + sb.append(this.highValue); + first = false; + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (!first) sb.append(", "); + sb.append("numDVs:"); + sb.append(this.numDVs); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetLowValue()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'lowValue' is unset! Struct:" + toString()); + } + + if (!isSetHighValue()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'highValue' is unset! Struct:" + toString()); + } + + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + if (!isSetNumDVs()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java index 094c6a7..7e75a4e 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java @@ -283,15 +283,15 @@ public class EnvironmentContext implements org.apache.thrift.TBase(2*_map119.size); - for (int _i120 = 0; _i120 < _map119.size; ++_i120) + org.apache.thrift.protocol.TMap _map123 = iprot.readMapBegin(); + this.properties = new HashMap(2*_map123.size); + for (int _i124 = 0; _i124 < _map123.size; ++_i124) { - String _key121; // required - String _val122; // required - _key121 = iprot.readString(); - _val122 = iprot.readString(); - this.properties.put(_key121, _val122); + String _key125; // required + String _val126; // required + _key125 = iprot.readString(); + _val126 = iprot.readString(); + this.properties.put(_key125, _val126); } iprot.readMapEnd(); } @@ -316,10 +316,10 @@ public class EnvironmentContext implements org.apache.thrift.TBase _iter123 : this.properties.entrySet()) + for (Map.Entry _iter127 : this.properties.entrySet()) { - oprot.writeString(_iter123.getKey()); - oprot.writeString(_iter123.getValue()); + oprot.writeString(_iter127.getKey()); + oprot.writeString(_iter127.getValue()); } oprot.writeMapEnd(); } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java new file mode 100644 index 0000000..f438a5f --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidInputException.java @@ -0,0 +1,324 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class InvalidInputException extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidInputException"); + + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + + private String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InvalidInputException.class, metaDataMap); + } + + public InvalidInputException() { + } + + public InvalidInputException( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public InvalidInputException(InvalidInputException other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public InvalidInputException deepCopy() { + return new InvalidInputException(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InvalidInputException) + return this.equals((InvalidInputException)that); + return false; + } + + public boolean equals(InvalidInputException that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_message = true && (isSetMessage()); + builder.append(present_message); + if (present_message) + builder.append(message); + + return builder.toHashCode(); + } + + public int compareTo(InvalidInputException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + InvalidInputException typedOther = (InvalidInputException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // MESSAGE + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.message = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(this.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("InvalidInputException("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java new file mode 100644 index 0000000..755cec6 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java @@ -0,0 +1,604 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class LongColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LongColumnStatsData"); + + private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.I64, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + + private long lowValue; // required + private long highValue; // required + private long numNulls; // required + private long numDVs; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + LOW_VALUE((short)1, "lowValue"), + HIGH_VALUE((short)2, "highValue"), + NUM_NULLS((short)3, "numNulls"), + NUM_DVS((short)4, "numDVs"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOW_VALUE + return LOW_VALUE; + case 2: // HIGH_VALUE + return HIGH_VALUE; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // NUM_DVS + return NUM_DVS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOWVALUE_ISSET_ID = 0; + private static final int __HIGHVALUE_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private static final int __NUMDVS_ISSET_ID = 3; + private BitSet __isset_bit_vector = new BitSet(4); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LongColumnStatsData.class, metaDataMap); + } + + public LongColumnStatsData() { + } + + public LongColumnStatsData( + long lowValue, + long highValue, + long numNulls, + long numDVs) + { + this(); + this.lowValue = lowValue; + setLowValueIsSet(true); + this.highValue = highValue; + setHighValueIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public LongColumnStatsData(LongColumnStatsData other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.lowValue = other.lowValue; + this.highValue = other.highValue; + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + } + + public LongColumnStatsData deepCopy() { + return new LongColumnStatsData(this); + } + + @Override + public void clear() { + setLowValueIsSet(false); + this.lowValue = 0; + setHighValueIsSet(false); + this.highValue = 0; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + } + + public long getLowValue() { + return this.lowValue; + } + + public void setLowValue(long lowValue) { + this.lowValue = lowValue; + setLowValueIsSet(true); + } + + public void unsetLowValue() { + __isset_bit_vector.clear(__LOWVALUE_ISSET_ID); + } + + /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ + public boolean isSetLowValue() { + return __isset_bit_vector.get(__LOWVALUE_ISSET_ID); + } + + public void setLowValueIsSet(boolean value) { + __isset_bit_vector.set(__LOWVALUE_ISSET_ID, value); + } + + public long getHighValue() { + return this.highValue; + } + + public void setHighValue(long highValue) { + this.highValue = highValue; + setHighValueIsSet(true); + } + + public void unsetHighValue() { + __isset_bit_vector.clear(__HIGHVALUE_ISSET_ID); + } + + /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ + public boolean isSetHighValue() { + return __isset_bit_vector.get(__HIGHVALUE_ISSET_ID); + } + + public void setHighValueIsSet(boolean value) { + __isset_bit_vector.set(__HIGHVALUE_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + } + + public long getNumDVs() { + return this.numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + public void unsetNumDVs() { + __isset_bit_vector.clear(__NUMDVS_ISSET_ID); + } + + /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ + public boolean isSetNumDVs() { + return __isset_bit_vector.get(__NUMDVS_ISSET_ID); + } + + public void setNumDVsIsSet(boolean value) { + __isset_bit_vector.set(__NUMDVS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOW_VALUE: + if (value == null) { + unsetLowValue(); + } else { + setLowValue((Long)value); + } + break; + + case HIGH_VALUE: + if (value == null) { + unsetHighValue(); + } else { + setHighValue((Long)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case NUM_DVS: + if (value == null) { + unsetNumDVs(); + } else { + setNumDVs((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOW_VALUE: + return Long.valueOf(getLowValue()); + + case HIGH_VALUE: + return Long.valueOf(getHighValue()); + + case NUM_NULLS: + return Long.valueOf(getNumNulls()); + + case NUM_DVS: + return Long.valueOf(getNumDVs()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOW_VALUE: + return isSetLowValue(); + case HIGH_VALUE: + return isSetHighValue(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof LongColumnStatsData) + return this.equals((LongColumnStatsData)that); + return false; + } + + public boolean equals(LongColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_lowValue = true; + boolean that_present_lowValue = true; + if (this_present_lowValue || that_present_lowValue) { + if (!(this_present_lowValue && that_present_lowValue)) + return false; + if (this.lowValue != that.lowValue) + return false; + } + + boolean this_present_highValue = true; + boolean that_present_highValue = true; + if (this_present_highValue || that_present_highValue) { + if (!(this_present_highValue && that_present_highValue)) + return false; + if (this.highValue != that.highValue) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_numDVs = true; + boolean that_present_numDVs = true; + if (this_present_numDVs || that_present_numDVs) { + if (!(this_present_numDVs && that_present_numDVs)) + return false; + if (this.numDVs != that.numDVs) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_lowValue = true; + builder.append(present_lowValue); + if (present_lowValue) + builder.append(lowValue); + + boolean present_highValue = true; + builder.append(present_highValue); + if (present_highValue) + builder.append(highValue); + + boolean present_numNulls = true; + builder.append(present_numNulls); + if (present_numNulls) + builder.append(numNulls); + + boolean present_numDVs = true; + builder.append(present_numDVs); + if (present_numDVs) + builder.append(numDVs); + + return builder.toHashCode(); + } + + public int compareTo(LongColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + LongColumnStatsData typedOther = (LongColumnStatsData)other; + + lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(typedOther.isSetLowValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLowValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, typedOther.lowValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(typedOther.isSetHighValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHighValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, typedOther.highValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(typedOther.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, typedOther.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(typedOther.isSetNumDVs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumDVs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, typedOther.numDVs); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // LOW_VALUE + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.lowValue = iprot.readI64(); + setLowValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // HIGH_VALUE + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.highValue = iprot.readI64(); + setHighValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // NUM_NULLS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numNulls = iprot.readI64(); + setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // NUM_DVS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numDVs = iprot.readI64(); + setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); + oprot.writeI64(this.lowValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); + oprot.writeI64(this.highValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(this.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(this.numDVs); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("LongColumnStatsData("); + boolean first = true; + + sb.append("lowValue:"); + sb.append(this.lowValue); + first = false; + if (!first) sb.append(", "); + sb.append("highValue:"); + sb.append(this.highValue); + first = false; + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (!first) sb.append(", "); + sb.append("numDVs:"); + sb.append(this.numDVs); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetLowValue()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'lowValue' is unset! Struct:" + toString()); + } + + if (!isSetHighValue()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'highValue' is unset! Struct:" + toString()); + } + + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + if (!isSetNumDVs()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NumericColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NumericColumnStatsData.java new file mode 100644 index 0000000..d50eb56 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NumericColumnStatsData.java @@ -0,0 +1,604 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class NumericColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NumericColumnStatsData"); + + private static final org.apache.thrift.protocol.TField LOW_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lowValue", org.apache.thrift.protocol.TType.DOUBLE, (short)1); + private static final org.apache.thrift.protocol.TField HIGH_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("highValue", org.apache.thrift.protocol.TType.DOUBLE, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + + private double lowValue; // required + private double highValue; // required + private long numNulls; // required + private long numDVs; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + LOW_VALUE((short)1, "lowValue"), + HIGH_VALUE((short)2, "highValue"), + NUM_NULLS((short)3, "numNulls"), + NUM_DVS((short)4, "numDVs"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // LOW_VALUE + return LOW_VALUE; + case 2: // HIGH_VALUE + return HIGH_VALUE; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // NUM_DVS + return NUM_DVS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __LOWVALUE_ISSET_ID = 0; + private static final int __HIGHVALUE_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private static final int __NUMDVS_ISSET_ID = 3; + private BitSet __isset_bit_vector = new BitSet(4); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.HIGH_VALUE, new org.apache.thrift.meta_data.FieldMetaData("highValue", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NumericColumnStatsData.class, metaDataMap); + } + + public NumericColumnStatsData() { + } + + public NumericColumnStatsData( + double lowValue, + double highValue, + long numNulls, + long numDVs) + { + this(); + this.lowValue = lowValue; + setLowValueIsSet(true); + this.highValue = highValue; + setHighValueIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public NumericColumnStatsData(NumericColumnStatsData other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.lowValue = other.lowValue; + this.highValue = other.highValue; + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + } + + public NumericColumnStatsData deepCopy() { + return new NumericColumnStatsData(this); + } + + @Override + public void clear() { + setLowValueIsSet(false); + this.lowValue = 0.0; + setHighValueIsSet(false); + this.highValue = 0.0; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + } + + public double getLowValue() { + return this.lowValue; + } + + public void setLowValue(double lowValue) { + this.lowValue = lowValue; + setLowValueIsSet(true); + } + + public void unsetLowValue() { + __isset_bit_vector.clear(__LOWVALUE_ISSET_ID); + } + + /** Returns true if field lowValue is set (has been assigned a value) and false otherwise */ + public boolean isSetLowValue() { + return __isset_bit_vector.get(__LOWVALUE_ISSET_ID); + } + + public void setLowValueIsSet(boolean value) { + __isset_bit_vector.set(__LOWVALUE_ISSET_ID, value); + } + + public double getHighValue() { + return this.highValue; + } + + public void setHighValue(double highValue) { + this.highValue = highValue; + setHighValueIsSet(true); + } + + public void unsetHighValue() { + __isset_bit_vector.clear(__HIGHVALUE_ISSET_ID); + } + + /** Returns true if field highValue is set (has been assigned a value) and false otherwise */ + public boolean isSetHighValue() { + return __isset_bit_vector.get(__HIGHVALUE_ISSET_ID); + } + + public void setHighValueIsSet(boolean value) { + __isset_bit_vector.set(__HIGHVALUE_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + } + + public long getNumDVs() { + return this.numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + public void unsetNumDVs() { + __isset_bit_vector.clear(__NUMDVS_ISSET_ID); + } + + /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ + public boolean isSetNumDVs() { + return __isset_bit_vector.get(__NUMDVS_ISSET_ID); + } + + public void setNumDVsIsSet(boolean value) { + __isset_bit_vector.set(__NUMDVS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case LOW_VALUE: + if (value == null) { + unsetLowValue(); + } else { + setLowValue((Double)value); + } + break; + + case HIGH_VALUE: + if (value == null) { + unsetHighValue(); + } else { + setHighValue((Double)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case NUM_DVS: + if (value == null) { + unsetNumDVs(); + } else { + setNumDVs((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case LOW_VALUE: + return Double.valueOf(getLowValue()); + + case HIGH_VALUE: + return Double.valueOf(getHighValue()); + + case NUM_NULLS: + return Long.valueOf(getNumNulls()); + + case NUM_DVS: + return Long.valueOf(getNumDVs()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case LOW_VALUE: + return isSetLowValue(); + case HIGH_VALUE: + return isSetHighValue(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NumericColumnStatsData) + return this.equals((NumericColumnStatsData)that); + return false; + } + + public boolean equals(NumericColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_lowValue = true; + boolean that_present_lowValue = true; + if (this_present_lowValue || that_present_lowValue) { + if (!(this_present_lowValue && that_present_lowValue)) + return false; + if (this.lowValue != that.lowValue) + return false; + } + + boolean this_present_highValue = true; + boolean that_present_highValue = true; + if (this_present_highValue || that_present_highValue) { + if (!(this_present_highValue && that_present_highValue)) + return false; + if (this.highValue != that.highValue) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_numDVs = true; + boolean that_present_numDVs = true; + if (this_present_numDVs || that_present_numDVs) { + if (!(this_present_numDVs && that_present_numDVs)) + return false; + if (this.numDVs != that.numDVs) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_lowValue = true; + builder.append(present_lowValue); + if (present_lowValue) + builder.append(lowValue); + + boolean present_highValue = true; + builder.append(present_highValue); + if (present_highValue) + builder.append(highValue); + + boolean present_numNulls = true; + builder.append(present_numNulls); + if (present_numNulls) + builder.append(numNulls); + + boolean present_numDVs = true; + builder.append(present_numDVs); + if (present_numDVs) + builder.append(numDVs); + + return builder.toHashCode(); + } + + public int compareTo(NumericColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + NumericColumnStatsData typedOther = (NumericColumnStatsData)other; + + lastComparison = Boolean.valueOf(isSetLowValue()).compareTo(typedOther.isSetLowValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLowValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lowValue, typedOther.lowValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetHighValue()).compareTo(typedOther.isSetHighValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHighValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.highValue, typedOther.highValue); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(typedOther.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, typedOther.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(typedOther.isSetNumDVs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumDVs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, typedOther.numDVs); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // LOW_VALUE + if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { + this.lowValue = iprot.readDouble(); + setLowValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // HIGH_VALUE + if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { + this.highValue = iprot.readDouble(); + setHighValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // NUM_NULLS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numNulls = iprot.readI64(); + setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // NUM_DVS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numDVs = iprot.readI64(); + setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC); + oprot.writeDouble(this.lowValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC); + oprot.writeDouble(this.highValue); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(this.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(this.numDVs); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("NumericColumnStatsData("); + boolean first = true; + + sb.append("lowValue:"); + sb.append(this.lowValue); + first = false; + if (!first) sb.append(", "); + sb.append("highValue:"); + sb.append(this.highValue); + first = false; + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (!first) sb.append(", "); + sb.append("numDVs:"); + sb.append(this.numDVs); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetLowValue()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'lowValue' is unset! Struct:" + toString()); + } + + if (!isSetHighValue()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'highValue' is unset! Struct:" + toString()); + } + + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + if (!isSetNumDVs()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java index 58f16df..1206da5 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java @@ -376,14 +376,14 @@ public class Schema implements org.apache.thrift.TBase, case 1: // FIELD_SCHEMAS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list110 = iprot.readListBegin(); - this.fieldSchemas = new ArrayList(_list110.size); - for (int _i111 = 0; _i111 < _list110.size; ++_i111) + org.apache.thrift.protocol.TList _list114 = iprot.readListBegin(); + this.fieldSchemas = new ArrayList(_list114.size); + for (int _i115 = 0; _i115 < _list114.size; ++_i115) { - FieldSchema _elem112; // required - _elem112 = new FieldSchema(); - _elem112.read(iprot); - this.fieldSchemas.add(_elem112); + FieldSchema _elem116; // required + _elem116 = new FieldSchema(); + _elem116.read(iprot); + this.fieldSchemas.add(_elem116); } iprot.readListEnd(); } @@ -394,15 +394,15 @@ public class Schema implements org.apache.thrift.TBase, case 2: // PROPERTIES if (field.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map113 = iprot.readMapBegin(); - this.properties = new HashMap(2*_map113.size); - for (int _i114 = 0; _i114 < _map113.size; ++_i114) + org.apache.thrift.protocol.TMap _map117 = iprot.readMapBegin(); + this.properties = new HashMap(2*_map117.size); + for (int _i118 = 0; _i118 < _map117.size; ++_i118) { - String _key115; // required - String _val116; // required - _key115 = iprot.readString(); - _val116 = iprot.readString(); - this.properties.put(_key115, _val116); + String _key119; // required + String _val120; // required + _key119 = iprot.readString(); + _val120 = iprot.readString(); + this.properties.put(_key119, _val120); } iprot.readMapEnd(); } @@ -427,9 +427,9 @@ public class Schema implements org.apache.thrift.TBase, oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.fieldSchemas.size())); - for (FieldSchema _iter117 : this.fieldSchemas) + for (FieldSchema _iter121 : this.fieldSchemas) { - _iter117.write(oprot); + _iter121.write(oprot); } oprot.writeListEnd(); } @@ -439,10 +439,10 @@ public class Schema implements org.apache.thrift.TBase, oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.properties.size())); - for (Map.Entry _iter118 : this.properties.entrySet()) + for (Map.Entry _iter122 : this.properties.entrySet()) { - oprot.writeString(_iter118.getKey()); - oprot.writeString(_iter118.getValue()); + oprot.writeString(_iter122.getKey()); + oprot.writeString(_iter122.getValue()); } oprot.writeMapEnd(); } diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java new file mode 100644 index 0000000..7d5fc25 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/StringColumnStatsData.java @@ -0,0 +1,604 @@ +/** + * Autogenerated by Thrift Compiler (0.7.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import org.apache.commons.lang.builder.HashCodeBuilder; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class StringColumnStatsData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("StringColumnStatsData"); + + private static final org.apache.thrift.protocol.TField MAX_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("maxColLen", org.apache.thrift.protocol.TType.I64, (short)1); + private static final org.apache.thrift.protocol.TField AVG_COL_LEN_FIELD_DESC = new org.apache.thrift.protocol.TField("avgColLen", org.apache.thrift.protocol.TType.DOUBLE, (short)2); + private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4); + + private long maxColLen; // required + private double avgColLen; // required + private long numNulls; // required + private long numDVs; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MAX_COL_LEN((short)1, "maxColLen"), + AVG_COL_LEN((short)2, "avgColLen"), + NUM_NULLS((short)3, "numNulls"), + NUM_DVS((short)4, "numDVs"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MAX_COL_LEN + return MAX_COL_LEN; + case 2: // AVG_COL_LEN + return AVG_COL_LEN; + case 3: // NUM_NULLS + return NUM_NULLS; + case 4: // NUM_DVS + return NUM_DVS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAXCOLLEN_ISSET_ID = 0; + private static final int __AVGCOLLEN_ISSET_ID = 1; + private static final int __NUMNULLS_ISSET_ID = 2; + private static final int __NUMDVS_ISSET_ID = 3; + private BitSet __isset_bit_vector = new BitSet(4); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MAX_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("maxColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.AVG_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("avgColLen", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.NUM_NULLS, new org.apache.thrift.meta_data.FieldMetaData("numNulls", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_DVS, new org.apache.thrift.meta_data.FieldMetaData("numDVs", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(StringColumnStatsData.class, metaDataMap); + } + + public StringColumnStatsData() { + } + + public StringColumnStatsData( + long maxColLen, + double avgColLen, + long numNulls, + long numDVs) + { + this(); + this.maxColLen = maxColLen; + setMaxColLenIsSet(true); + this.avgColLen = avgColLen; + setAvgColLenIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public StringColumnStatsData(StringColumnStatsData other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.maxColLen = other.maxColLen; + this.avgColLen = other.avgColLen; + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + } + + public StringColumnStatsData deepCopy() { + return new StringColumnStatsData(this); + } + + @Override + public void clear() { + setMaxColLenIsSet(false); + this.maxColLen = 0; + setAvgColLenIsSet(false); + this.avgColLen = 0.0; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + } + + public long getMaxColLen() { + return this.maxColLen; + } + + public void setMaxColLen(long maxColLen) { + this.maxColLen = maxColLen; + setMaxColLenIsSet(true); + } + + public void unsetMaxColLen() { + __isset_bit_vector.clear(__MAXCOLLEN_ISSET_ID); + } + + /** Returns true if field maxColLen is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxColLen() { + return __isset_bit_vector.get(__MAXCOLLEN_ISSET_ID); + } + + public void setMaxColLenIsSet(boolean value) { + __isset_bit_vector.set(__MAXCOLLEN_ISSET_ID, value); + } + + public double getAvgColLen() { + return this.avgColLen; + } + + public void setAvgColLen(double avgColLen) { + this.avgColLen = avgColLen; + setAvgColLenIsSet(true); + } + + public void unsetAvgColLen() { + __isset_bit_vector.clear(__AVGCOLLEN_ISSET_ID); + } + + /** Returns true if field avgColLen is set (has been assigned a value) and false otherwise */ + public boolean isSetAvgColLen() { + return __isset_bit_vector.get(__AVGCOLLEN_ISSET_ID); + } + + public void setAvgColLenIsSet(boolean value) { + __isset_bit_vector.set(__AVGCOLLEN_ISSET_ID, value); + } + + public long getNumNulls() { + return this.numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + setNumNullsIsSet(true); + } + + public void unsetNumNulls() { + __isset_bit_vector.clear(__NUMNULLS_ISSET_ID); + } + + /** Returns true if field numNulls is set (has been assigned a value) and false otherwise */ + public boolean isSetNumNulls() { + return __isset_bit_vector.get(__NUMNULLS_ISSET_ID); + } + + public void setNumNullsIsSet(boolean value) { + __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value); + } + + public long getNumDVs() { + return this.numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + setNumDVsIsSet(true); + } + + public void unsetNumDVs() { + __isset_bit_vector.clear(__NUMDVS_ISSET_ID); + } + + /** Returns true if field numDVs is set (has been assigned a value) and false otherwise */ + public boolean isSetNumDVs() { + return __isset_bit_vector.get(__NUMDVS_ISSET_ID); + } + + public void setNumDVsIsSet(boolean value) { + __isset_bit_vector.set(__NUMDVS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MAX_COL_LEN: + if (value == null) { + unsetMaxColLen(); + } else { + setMaxColLen((Long)value); + } + break; + + case AVG_COL_LEN: + if (value == null) { + unsetAvgColLen(); + } else { + setAvgColLen((Double)value); + } + break; + + case NUM_NULLS: + if (value == null) { + unsetNumNulls(); + } else { + setNumNulls((Long)value); + } + break; + + case NUM_DVS: + if (value == null) { + unsetNumDVs(); + } else { + setNumDVs((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MAX_COL_LEN: + return Long.valueOf(getMaxColLen()); + + case AVG_COL_LEN: + return Double.valueOf(getAvgColLen()); + + case NUM_NULLS: + return Long.valueOf(getNumNulls()); + + case NUM_DVS: + return Long.valueOf(getNumDVs()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MAX_COL_LEN: + return isSetMaxColLen(); + case AVG_COL_LEN: + return isSetAvgColLen(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof StringColumnStatsData) + return this.equals((StringColumnStatsData)that); + return false; + } + + public boolean equals(StringColumnStatsData that) { + if (that == null) + return false; + + boolean this_present_maxColLen = true; + boolean that_present_maxColLen = true; + if (this_present_maxColLen || that_present_maxColLen) { + if (!(this_present_maxColLen && that_present_maxColLen)) + return false; + if (this.maxColLen != that.maxColLen) + return false; + } + + boolean this_present_avgColLen = true; + boolean that_present_avgColLen = true; + if (this_present_avgColLen || that_present_avgColLen) { + if (!(this_present_avgColLen && that_present_avgColLen)) + return false; + if (this.avgColLen != that.avgColLen) + return false; + } + + boolean this_present_numNulls = true; + boolean that_present_numNulls = true; + if (this_present_numNulls || that_present_numNulls) { + if (!(this_present_numNulls && that_present_numNulls)) + return false; + if (this.numNulls != that.numNulls) + return false; + } + + boolean this_present_numDVs = true; + boolean that_present_numDVs = true; + if (this_present_numDVs || that_present_numDVs) { + if (!(this_present_numDVs && that_present_numDVs)) + return false; + if (this.numDVs != that.numDVs) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_maxColLen = true; + builder.append(present_maxColLen); + if (present_maxColLen) + builder.append(maxColLen); + + boolean present_avgColLen = true; + builder.append(present_avgColLen); + if (present_avgColLen) + builder.append(avgColLen); + + boolean present_numNulls = true; + builder.append(present_numNulls); + if (present_numNulls) + builder.append(numNulls); + + boolean present_numDVs = true; + builder.append(present_numDVs); + if (present_numDVs) + builder.append(numDVs); + + return builder.toHashCode(); + } + + public int compareTo(StringColumnStatsData other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + StringColumnStatsData typedOther = (StringColumnStatsData)other; + + lastComparison = Boolean.valueOf(isSetMaxColLen()).compareTo(typedOther.isSetMaxColLen()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxColLen()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxColLen, typedOther.maxColLen); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAvgColLen()).compareTo(typedOther.isSetAvgColLen()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAvgColLen()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avgColLen, typedOther.avgColLen); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumNulls()).compareTo(typedOther.isSetNumNulls()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumNulls()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numNulls, typedOther.numNulls); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumDVs()).compareTo(typedOther.isSetNumDVs()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumDVs()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numDVs, typedOther.numDVs); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // MAX_COL_LEN + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.maxColLen = iprot.readI64(); + setMaxColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // AVG_COL_LEN + if (field.type == org.apache.thrift.protocol.TType.DOUBLE) { + this.avgColLen = iprot.readDouble(); + setAvgColLenIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // NUM_NULLS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numNulls = iprot.readI64(); + setNumNullsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // NUM_DVS + if (field.type == org.apache.thrift.protocol.TType.I64) { + this.numDVs = iprot.readI64(); + setNumDVsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); + oprot.writeI64(this.maxColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); + oprot.writeDouble(this.avgColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC); + oprot.writeI64(this.numNulls); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_DVS_FIELD_DESC); + oprot.writeI64(this.numDVs); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("StringColumnStatsData("); + boolean first = true; + + sb.append("maxColLen:"); + sb.append(this.maxColLen); + first = false; + if (!first) sb.append(", "); + sb.append("avgColLen:"); + sb.append(this.avgColLen); + first = false; + if (!first) sb.append(", "); + sb.append("numNulls:"); + sb.append(this.numNulls); + first = false; + if (!first) sb.append(", "); + sb.append("numDVs:"); + sb.append(this.numDVs); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetMaxColLen()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxColLen' is unset! Struct:" + toString()); + } + + if (!isSetAvgColLen()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'avgColLen' is unset! Struct:" + toString()); + } + + if (!isSetNumNulls()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numNulls' is unset! Struct:" + toString()); + } + + if (!isSetNumDVs()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString()); + } + + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + +} + diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java index 8e1fae2..a53aa83 100644 --- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -138,6 +138,18 @@ public class ThriftHiveMetastore { public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, org.apache.thrift.TException; + public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; + + public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; + + public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException; + + public ColumnStatistics get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException; + + public boolean delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; + + public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; + public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException; public boolean drop_role(String role_name) throws MetaException, org.apache.thrift.TException; @@ -280,6 +292,18 @@ public class ThriftHiveMetastore { public void get_index_names(String db_name, String tbl_name, short max_indexes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void delete_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void drop_role(String role_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -2018,6 +2042,226 @@ public class ThriftHiveMetastore { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); } + public boolean update_table_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + send_update_table_column_statistics(stats_obj); + return recv_update_table_column_statistics(); + } + + public void send_update_table_column_statistics(ColumnStatistics stats_obj) throws org.apache.thrift.TException + { + update_table_column_statistics_args args = new update_table_column_statistics_args(); + args.setStats_obj(stats_obj); + sendBase("update_table_column_statistics", args); + } + + public boolean recv_update_table_column_statistics() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + update_table_column_statistics_result result = new update_table_column_statistics_result(); + receiveBase(result, "update_table_column_statistics"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + if (result.o4 != null) { + throw result.o4; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_table_column_statistics failed: unknown result"); + } + + public boolean update_partition_column_statistics(ColumnStatistics stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + send_update_partition_column_statistics(stats_obj); + return recv_update_partition_column_statistics(); + } + + public void send_update_partition_column_statistics(ColumnStatistics stats_obj) throws org.apache.thrift.TException + { + update_partition_column_statistics_args args = new update_partition_column_statistics_args(); + args.setStats_obj(stats_obj); + sendBase("update_partition_column_statistics", args); + } + + public boolean recv_update_partition_column_statistics() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + update_partition_column_statistics_result result = new update_partition_column_statistics_result(); + receiveBase(result, "update_partition_column_statistics"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + if (result.o4 != null) { + throw result.o4; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); + } + + public ColumnStatistics get_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + send_get_table_column_statistics(db_name, tbl_name, col_name); + return recv_get_table_column_statistics(); + } + + public void send_get_table_column_statistics(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException + { + get_table_column_statistics_args args = new get_table_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + sendBase("get_table_column_statistics", args); + } + + public ColumnStatistics recv_get_table_column_statistics() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + get_table_column_statistics_result result = new get_table_column_statistics_result(); + receiveBase(result, "get_table_column_statistics"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + if (result.o4 != null) { + throw result.o4; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_table_column_statistics failed: unknown result"); + } + + public ColumnStatistics get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name); + return recv_get_partition_column_statistics(); + } + + public void send_get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException + { + get_partition_column_statistics_args args = new get_partition_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + sendBase("get_partition_column_statistics", args); + } + + public ColumnStatistics recv_get_partition_column_statistics() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + get_partition_column_statistics_result result = new get_partition_column_statistics_result(); + receiveBase(result, "get_partition_column_statistics"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + if (result.o4 != null) { + throw result.o4; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); + } + + public boolean delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name); + return recv_delete_partition_column_statistics(); + } + + public void send_delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException + { + delete_partition_column_statistics_args args = new delete_partition_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + sendBase("delete_partition_column_statistics", args); + } + + public boolean recv_delete_partition_column_statistics() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); + receiveBase(result, "delete_partition_column_statistics"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + if (result.o4 != null) { + throw result.o4; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); + } + + public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + send_delete_table_column_statistics(db_name, tbl_name, col_name); + return recv_delete_table_column_statistics(); + } + + public void send_delete_table_column_statistics(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException + { + delete_table_column_statistics_args args = new delete_table_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + sendBase("delete_table_column_statistics", args); + } + + public boolean recv_delete_table_column_statistics() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + delete_table_column_statistics_result result = new delete_table_column_statistics_result(); + receiveBase(result, "delete_table_column_statistics"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + if (result.o2 != null) { + throw result.o2; + } + if (result.o3 != null) { + throw result.o3; + } + if (result.o4 != null) { + throw result.o4; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); + } + public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException { send_create_role(role); @@ -4440,6 +4684,228 @@ public class ThriftHiveMetastore { } } + public void update_table_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + update_table_column_statistics_call method_call = new update_table_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class update_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private ColumnStatistics stats_obj; + public update_table_column_statistics_call(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.stats_obj = stats_obj; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + update_table_column_statistics_args args = new update_table_column_statistics_args(); + args.setStats_obj(stats_obj); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_update_table_column_statistics(); + } + } + + public void update_partition_column_statistics(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + update_partition_column_statistics_call method_call = new update_partition_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class update_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private ColumnStatistics stats_obj; + public update_partition_column_statistics_call(ColumnStatistics stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.stats_obj = stats_obj; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("update_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + update_partition_column_statistics_args args = new update_partition_column_statistics_args(); + args.setStats_obj(stats_obj); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_update_partition_column_statistics(); + } + } + + public void get_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_table_column_statistics_call method_call = new get_table_column_statistics_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String col_name; + public get_table_column_statistics_call(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.col_name = col_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_table_column_statistics_args args = new get_table_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public ColumnStatistics getResult() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table_column_statistics(); + } + } + + public void get_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_partition_column_statistics_call method_call = new get_partition_column_statistics_call(db_name, tbl_name, part_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + private String col_name; + public get_partition_column_statistics_call(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.col_name = col_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_partition_column_statistics_args args = new get_partition_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public ColumnStatistics getResult() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_column_statistics(); + } + } + + public void delete_partition_column_statistics(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + delete_partition_column_statistics_call method_call = new delete_partition_column_statistics_call(db_name, tbl_name, part_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class delete_partition_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + private String col_name; + public delete_partition_column_statistics_call(String db_name, String tbl_name, String part_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.col_name = col_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_partition_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + delete_partition_column_statistics_args args = new delete_partition_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_delete_partition_column_statistics(); + } + } + + public void delete_table_column_statistics(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + delete_table_column_statistics_call method_call = new delete_table_column_statistics_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class delete_table_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String col_name; + public delete_table_column_statistics_call(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.col_name = col_name; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("delete_table_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + delete_table_column_statistics_args args = new delete_table_column_statistics_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_delete_table_column_statistics(); + } + } + public void create_role(Role role, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); create_role_call method_call = new create_role_call(role, resultHandler, this, ___protocolFactory, ___transport); @@ -4995,6 +5461,12 @@ public class ThriftHiveMetastore { processMap.put("get_index_by_name", new get_index_by_name()); processMap.put("get_indexes", new get_indexes()); processMap.put("get_index_names", new get_index_names()); + processMap.put("update_table_column_statistics", new update_table_column_statistics()); + processMap.put("update_partition_column_statistics", new update_partition_column_statistics()); + processMap.put("get_table_column_statistics", new get_table_column_statistics()); + processMap.put("get_partition_column_statistics", new get_partition_column_statistics()); + processMap.put("delete_partition_column_statistics", new delete_partition_column_statistics()); + processMap.put("delete_table_column_statistics", new delete_table_column_statistics()); processMap.put("create_role", new create_role()); processMap.put("drop_role", new drop_role()); processMap.put("get_role_names", new get_role_names()); @@ -6259,6 +6731,166 @@ public class ThriftHiveMetastore { } } + private static class update_table_column_statistics extends org.apache.thrift.ProcessFunction { + public update_table_column_statistics() { + super("update_table_column_statistics"); + } + + protected update_table_column_statistics_args getEmptyArgsInstance() { + return new update_table_column_statistics_args(); + } + + protected update_table_column_statistics_result getResult(I iface, update_table_column_statistics_args args) throws org.apache.thrift.TException { + update_table_column_statistics_result result = new update_table_column_statistics_result(); + try { + result.success = iface.update_table_column_statistics(args.stats_obj); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + private static class update_partition_column_statistics extends org.apache.thrift.ProcessFunction { + public update_partition_column_statistics() { + super("update_partition_column_statistics"); + } + + protected update_partition_column_statistics_args getEmptyArgsInstance() { + return new update_partition_column_statistics_args(); + } + + protected update_partition_column_statistics_result getResult(I iface, update_partition_column_statistics_args args) throws org.apache.thrift.TException { + update_partition_column_statistics_result result = new update_partition_column_statistics_result(); + try { + result.success = iface.update_partition_column_statistics(args.stats_obj); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + private static class get_table_column_statistics extends org.apache.thrift.ProcessFunction { + public get_table_column_statistics() { + super("get_table_column_statistics"); + } + + protected get_table_column_statistics_args getEmptyArgsInstance() { + return new get_table_column_statistics_args(); + } + + protected get_table_column_statistics_result getResult(I iface, get_table_column_statistics_args args) throws org.apache.thrift.TException { + get_table_column_statistics_result result = new get_table_column_statistics_result(); + try { + result.success = iface.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (InvalidInputException o3) { + result.o3 = o3; + } catch (InvalidObjectException o4) { + result.o4 = o4; + } + return result; + } + } + + private static class get_partition_column_statistics extends org.apache.thrift.ProcessFunction { + public get_partition_column_statistics() { + super("get_partition_column_statistics"); + } + + protected get_partition_column_statistics_args getEmptyArgsInstance() { + return new get_partition_column_statistics_args(); + } + + protected get_partition_column_statistics_result getResult(I iface, get_partition_column_statistics_args args) throws org.apache.thrift.TException { + get_partition_column_statistics_result result = new get_partition_column_statistics_result(); + try { + result.success = iface.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (InvalidInputException o3) { + result.o3 = o3; + } catch (InvalidObjectException o4) { + result.o4 = o4; + } + return result; + } + } + + private static class delete_partition_column_statistics extends org.apache.thrift.ProcessFunction { + public delete_partition_column_statistics() { + super("delete_partition_column_statistics"); + } + + protected delete_partition_column_statistics_args getEmptyArgsInstance() { + return new delete_partition_column_statistics_args(); + } + + protected delete_partition_column_statistics_result getResult(I iface, delete_partition_column_statistics_args args) throws org.apache.thrift.TException { + delete_partition_column_statistics_result result = new delete_partition_column_statistics_result(); + try { + result.success = iface.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (InvalidObjectException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + + private static class delete_table_column_statistics extends org.apache.thrift.ProcessFunction { + public delete_table_column_statistics() { + super("delete_table_column_statistics"); + } + + protected delete_table_column_statistics_args getEmptyArgsInstance() { + return new delete_table_column_statistics_args(); + } + + protected delete_table_column_statistics_result getResult(I iface, delete_table_column_statistics_args args) throws org.apache.thrift.TException { + delete_table_column_statistics_result result = new delete_table_column_statistics_result(); + try { + result.success = iface.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name); + result.setSuccessIsSet(true); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (InvalidObjectException o3) { + result.o3 = o3; + } catch (InvalidInputException o4) { + result.o4 = o4; + } + return result; + } + } + private static class create_role extends org.apache.thrift.ProcessFunction { public create_role() { super("create_role"); @@ -9725,13 +10357,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list124 = iprot.readListBegin(); - this.success = new ArrayList(_list124.size); - for (int _i125 = 0; _i125 < _list124.size; ++_i125) + org.apache.thrift.protocol.TList _list128 = iprot.readListBegin(); + this.success = new ArrayList(_list128.size); + for (int _i129 = 0; _i129 < _list128.size; ++_i129) { - String _elem126; // required - _elem126 = iprot.readString(); - this.success.add(_elem126); + String _elem130; // required + _elem130 = iprot.readString(); + this.success.add(_elem130); } iprot.readListEnd(); } @@ -9763,9 +10395,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter127 : this.success) + for (String _iter131 : this.success) { - oprot.writeString(_iter127); + oprot.writeString(_iter131); } oprot.writeListEnd(); } @@ -10357,13 +10989,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list128 = iprot.readListBegin(); - this.success = new ArrayList(_list128.size); - for (int _i129 = 0; _i129 < _list128.size; ++_i129) + org.apache.thrift.protocol.TList _list132 = iprot.readListBegin(); + this.success = new ArrayList(_list132.size); + for (int _i133 = 0; _i133 < _list132.size; ++_i133) { - String _elem130; // required - _elem130 = iprot.readString(); - this.success.add(_elem130); + String _elem134; // required + _elem134 = iprot.readString(); + this.success.add(_elem134); } iprot.readListEnd(); } @@ -10395,9 +11027,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter131 : this.success) + for (String _iter135 : this.success) { - oprot.writeString(_iter131); + oprot.writeString(_iter135); } oprot.writeListEnd(); } @@ -12907,6 +13539,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -13694,6 +14328,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -14338,16 +14974,16 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map132 = iprot.readMapBegin(); - this.success = new HashMap(2*_map132.size); - for (int _i133 = 0; _i133 < _map132.size; ++_i133) + org.apache.thrift.protocol.TMap _map136 = iprot.readMapBegin(); + this.success = new HashMap(2*_map136.size); + for (int _i137 = 0; _i137 < _map136.size; ++_i137) { - String _key134; // required - Type _val135; // required - _key134 = iprot.readString(); - _val135 = new Type(); - _val135.read(iprot); - this.success.put(_key134, _val135); + String _key138; // required + Type _val139; // required + _key138 = iprot.readString(); + _val139 = new Type(); + _val139.read(iprot); + this.success.put(_key138, _val139); } iprot.readMapEnd(); } @@ -14379,10 +15015,10 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Map.Entry _iter136 : this.success.entrySet()) + for (Map.Entry _iter140 : this.success.entrySet()) { - oprot.writeString(_iter136.getKey()); - _iter136.getValue().write(oprot); + oprot.writeString(_iter140.getKey()); + _iter140.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -15312,14 +15948,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list137 = iprot.readListBegin(); - this.success = new ArrayList(_list137.size); - for (int _i138 = 0; _i138 < _list137.size; ++_i138) + org.apache.thrift.protocol.TList _list141 = iprot.readListBegin(); + this.success = new ArrayList(_list141.size); + for (int _i142 = 0; _i142 < _list141.size; ++_i142) { - FieldSchema _elem139; // required - _elem139 = new FieldSchema(); - _elem139.read(iprot); - this.success.add(_elem139); + FieldSchema _elem143; // required + _elem143 = new FieldSchema(); + _elem143.read(iprot); + this.success.add(_elem143); } iprot.readListEnd(); } @@ -15367,9 +16003,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (FieldSchema _iter140 : this.success) + for (FieldSchema _iter144 : this.success) { - _iter140.write(oprot); + _iter144.write(oprot); } oprot.writeListEnd(); } @@ -16323,14 +16959,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list141 = iprot.readListBegin(); - this.success = new ArrayList(_list141.size); - for (int _i142 = 0; _i142 < _list141.size; ++_i142) + org.apache.thrift.protocol.TList _list145 = iprot.readListBegin(); + this.success = new ArrayList(_list145.size); + for (int _i146 = 0; _i146 < _list145.size; ++_i146) { - FieldSchema _elem143; // required - _elem143 = new FieldSchema(); - _elem143.read(iprot); - this.success.add(_elem143); + FieldSchema _elem147; // required + _elem147 = new FieldSchema(); + _elem147.read(iprot); + this.success.add(_elem147); } iprot.readListEnd(); } @@ -16378,9 +17014,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (FieldSchema _iter144 : this.success) + for (FieldSchema _iter148 : this.success) { - _iter144.write(oprot); + _iter148.write(oprot); } oprot.writeListEnd(); } @@ -19927,13 +20563,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list145 = iprot.readListBegin(); - this.success = new ArrayList(_list145.size); - for (int _i146 = 0; _i146 < _list145.size; ++_i146) + org.apache.thrift.protocol.TList _list149 = iprot.readListBegin(); + this.success = new ArrayList(_list149.size); + for (int _i150 = 0; _i150 < _list149.size; ++_i150) { - String _elem147; // required - _elem147 = iprot.readString(); - this.success.add(_elem147); + String _elem151; // required + _elem151 = iprot.readString(); + this.success.add(_elem151); } iprot.readListEnd(); } @@ -19965,9 +20601,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter148 : this.success) + for (String _iter152 : this.success) { - oprot.writeString(_iter148); + oprot.writeString(_iter152); } oprot.writeListEnd(); } @@ -20658,13 +21294,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list149 = iprot.readListBegin(); - this.success = new ArrayList(_list149.size); - for (int _i150 = 0; _i150 < _list149.size; ++_i150) + org.apache.thrift.protocol.TList _list153 = iprot.readListBegin(); + this.success = new ArrayList(_list153.size); + for (int _i154 = 0; _i154 < _list153.size; ++_i154) { - String _elem151; // required - _elem151 = iprot.readString(); - this.success.add(_elem151); + String _elem155; // required + _elem155 = iprot.readString(); + this.success.add(_elem155); } iprot.readListEnd(); } @@ -20696,9 +21332,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter152 : this.success) + for (String _iter156 : this.success) { - oprot.writeString(_iter152); + oprot.writeString(_iter156); } oprot.writeListEnd(); } @@ -21976,13 +22612,13 @@ public class ThriftHiveMetastore { case 2: // TBL_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list153 = iprot.readListBegin(); - this.tbl_names = new ArrayList(_list153.size); - for (int _i154 = 0; _i154 < _list153.size; ++_i154) + org.apache.thrift.protocol.TList _list157 = iprot.readListBegin(); + this.tbl_names = new ArrayList(_list157.size); + for (int _i158 = 0; _i158 < _list157.size; ++_i158) { - String _elem155; // required - _elem155 = iprot.readString(); - this.tbl_names.add(_elem155); + String _elem159; // required + _elem159 = iprot.readString(); + this.tbl_names.add(_elem159); } iprot.readListEnd(); } @@ -22012,9 +22648,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(TBL_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.tbl_names.size())); - for (String _iter156 : this.tbl_names) + for (String _iter160 : this.tbl_names) { - oprot.writeString(_iter156); + oprot.writeString(_iter160); } oprot.writeListEnd(); } @@ -22546,14 +23182,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list157 = iprot.readListBegin(); - this.success = new ArrayList
(_list157.size); - for (int _i158 = 0; _i158 < _list157.size; ++_i158) + org.apache.thrift.protocol.TList _list161 = iprot.readListBegin(); + this.success = new ArrayList
(_list161.size); + for (int _i162 = 0; _i162 < _list161.size; ++_i162) { - Table _elem159; // required - _elem159 = new Table(); - _elem159.read(iprot); - this.success.add(_elem159); + Table _elem163; // required + _elem163 = new Table(); + _elem163.read(iprot); + this.success.add(_elem163); } iprot.readListEnd(); } @@ -22601,9 +23237,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Table _iter160 : this.success) + for (Table _iter164 : this.success) { - _iter160.write(oprot); + _iter164.write(oprot); } oprot.writeListEnd(); } @@ -23652,13 +24288,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list161 = iprot.readListBegin(); - this.success = new ArrayList(_list161.size); - for (int _i162 = 0; _i162 < _list161.size; ++_i162) + org.apache.thrift.protocol.TList _list165 = iprot.readListBegin(); + this.success = new ArrayList(_list165.size); + for (int _i166 = 0; _i166 < _list165.size; ++_i166) { - String _elem163; // required - _elem163 = iprot.readString(); - this.success.add(_elem163); + String _elem167; // required + _elem167 = iprot.readString(); + this.success.add(_elem167); } iprot.readListEnd(); } @@ -23706,9 +24342,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter164 : this.success) + for (String _iter168 : this.success) { - oprot.writeString(_iter164); + oprot.writeString(_iter168); } oprot.writeListEnd(); } @@ -27765,14 +28401,14 @@ public class ThriftHiveMetastore { case 1: // NEW_PARTS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list165 = iprot.readListBegin(); - this.new_parts = new ArrayList(_list165.size); - for (int _i166 = 0; _i166 < _list165.size; ++_i166) + org.apache.thrift.protocol.TList _list169 = iprot.readListBegin(); + this.new_parts = new ArrayList(_list169.size); + for (int _i170 = 0; _i170 < _list169.size; ++_i170) { - Partition _elem167; // required - _elem167 = new Partition(); - _elem167.read(iprot); - this.new_parts.add(_elem167); + Partition _elem171; // required + _elem171 = new Partition(); + _elem171.read(iprot); + this.new_parts.add(_elem171); } iprot.readListEnd(); } @@ -27797,9 +28433,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.new_parts.size())); - for (Partition _iter168 : this.new_parts) + for (Partition _iter172 : this.new_parts) { - _iter168.write(oprot); + _iter172.write(oprot); } oprot.writeListEnd(); } @@ -28418,6 +29054,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -28843,13 +29481,13 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list169 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list169.size); - for (int _i170 = 0; _i170 < _list169.size; ++_i170) + org.apache.thrift.protocol.TList _list173 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list173.size); + for (int _i174 = 0; _i174 < _list173.size; ++_i174) { - String _elem171; // required - _elem171 = iprot.readString(); - this.part_vals.add(_elem171); + String _elem175; // required + _elem175 = iprot.readString(); + this.part_vals.add(_elem175); } iprot.readListEnd(); } @@ -28884,9 +29522,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter172 : this.part_vals) + for (String _iter176 : this.part_vals) { - oprot.writeString(_iter172); + oprot.writeString(_iter176); } oprot.writeListEnd(); } @@ -31090,13 +31728,13 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list173 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list173.size); - for (int _i174 = 0; _i174 < _list173.size; ++_i174) + org.apache.thrift.protocol.TList _list177 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list177.size); + for (int _i178 = 0; _i178 < _list177.size; ++_i178) { - String _elem175; // required - _elem175 = iprot.readString(); - this.part_vals.add(_elem175); + String _elem179; // required + _elem179 = iprot.readString(); + this.part_vals.add(_elem179); } iprot.readListEnd(); } @@ -31139,9 +31777,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter176 : this.part_vals) + for (String _iter180 : this.part_vals) { - oprot.writeString(_iter176); + oprot.writeString(_iter180); } oprot.writeListEnd(); } @@ -31692,6 +32330,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -32758,6 +33398,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -33183,13 +33825,13 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list177 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list177.size); - for (int _i178 = 0; _i178 < _list177.size; ++_i178) + org.apache.thrift.protocol.TList _list181 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list181.size); + for (int _i182 = 0; _i182 < _list181.size; ++_i182) { - String _elem179; // required - _elem179 = iprot.readString(); - this.part_vals.add(_elem179); + String _elem183; // required + _elem183 = iprot.readString(); + this.part_vals.add(_elem183); } iprot.readListEnd(); } @@ -33224,9 +33866,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter180 : this.part_vals) + for (String _iter184 : this.part_vals) { - oprot.writeString(_iter180); + oprot.writeString(_iter184); } oprot.writeListEnd(); } @@ -34360,13 +35002,13 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list181 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list181.size); - for (int _i182 = 0; _i182 < _list181.size; ++_i182) + org.apache.thrift.protocol.TList _list185 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list185.size); + for (int _i186 = 0; _i186 < _list185.size; ++_i186) { - String _elem183; // required - _elem183 = iprot.readString(); - this.part_vals.add(_elem183); + String _elem187; // required + _elem187 = iprot.readString(); + this.part_vals.add(_elem187); } iprot.readListEnd(); } @@ -34384,13 +35026,13 @@ public class ThriftHiveMetastore { case 5: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list184 = iprot.readListBegin(); - this.group_names = new ArrayList(_list184.size); - for (int _i185 = 0; _i185 < _list184.size; ++_i185) + org.apache.thrift.protocol.TList _list188 = iprot.readListBegin(); + this.group_names = new ArrayList(_list188.size); + for (int _i189 = 0; _i189 < _list188.size; ++_i189) { - String _elem186; // required - _elem186 = iprot.readString(); - this.group_names.add(_elem186); + String _elem190; // required + _elem190 = iprot.readString(); + this.group_names.add(_elem190); } iprot.readListEnd(); } @@ -34425,9 +35067,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter187 : this.part_vals) + for (String _iter191 : this.part_vals) { - oprot.writeString(_iter187); + oprot.writeString(_iter191); } oprot.writeListEnd(); } @@ -34442,9 +35084,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter188 : this.group_names) + for (String _iter192 : this.group_names) { - oprot.writeString(_iter188); + oprot.writeString(_iter192); } oprot.writeListEnd(); } @@ -36877,14 +37519,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list189 = iprot.readListBegin(); - this.success = new ArrayList(_list189.size); - for (int _i190 = 0; _i190 < _list189.size; ++_i190) + org.apache.thrift.protocol.TList _list193 = iprot.readListBegin(); + this.success = new ArrayList(_list193.size); + for (int _i194 = 0; _i194 < _list193.size; ++_i194) { - Partition _elem191; // required - _elem191 = new Partition(); - _elem191.read(iprot); - this.success.add(_elem191); + Partition _elem195; // required + _elem195 = new Partition(); + _elem195.read(iprot); + this.success.add(_elem195); } iprot.readListEnd(); } @@ -36924,9 +37566,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter192 : this.success) + for (Partition _iter196 : this.success) { - _iter192.write(oprot); + _iter196.write(oprot); } oprot.writeListEnd(); } @@ -37581,13 +38223,13 @@ public class ThriftHiveMetastore { case 5: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list193 = iprot.readListBegin(); - this.group_names = new ArrayList(_list193.size); - for (int _i194 = 0; _i194 < _list193.size; ++_i194) + org.apache.thrift.protocol.TList _list197 = iprot.readListBegin(); + this.group_names = new ArrayList(_list197.size); + for (int _i198 = 0; _i198 < _list197.size; ++_i198) { - String _elem195; // required - _elem195 = iprot.readString(); - this.group_names.add(_elem195); + String _elem199; // required + _elem199 = iprot.readString(); + this.group_names.add(_elem199); } iprot.readListEnd(); } @@ -37630,9 +38272,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter196 : this.group_names) + for (String _iter200 : this.group_names) { - oprot.writeString(_iter196); + oprot.writeString(_iter200); } oprot.writeListEnd(); } @@ -38113,14 +38755,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list197 = iprot.readListBegin(); - this.success = new ArrayList(_list197.size); - for (int _i198 = 0; _i198 < _list197.size; ++_i198) + org.apache.thrift.protocol.TList _list201 = iprot.readListBegin(); + this.success = new ArrayList(_list201.size); + for (int _i202 = 0; _i202 < _list201.size; ++_i202) { - Partition _elem199; // required - _elem199 = new Partition(); - _elem199.read(iprot); - this.success.add(_elem199); + Partition _elem203; // required + _elem203 = new Partition(); + _elem203.read(iprot); + this.success.add(_elem203); } iprot.readListEnd(); } @@ -38160,9 +38802,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter200 : this.success) + for (Partition _iter204 : this.success) { - _iter200.write(oprot); + _iter204.write(oprot); } oprot.writeListEnd(); } @@ -39053,13 +39695,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list201 = iprot.readListBegin(); - this.success = new ArrayList(_list201.size); - for (int _i202 = 0; _i202 < _list201.size; ++_i202) + org.apache.thrift.protocol.TList _list205 = iprot.readListBegin(); + this.success = new ArrayList(_list205.size); + for (int _i206 = 0; _i206 < _list205.size; ++_i206) { - String _elem203; // required - _elem203 = iprot.readString(); - this.success.add(_elem203); + String _elem207; // required + _elem207 = iprot.readString(); + this.success.add(_elem207); } iprot.readListEnd(); } @@ -39091,9 +39733,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter204 : this.success) + for (String _iter208 : this.success) { - oprot.writeString(_iter204); + oprot.writeString(_iter208); } oprot.writeListEnd(); } @@ -39648,13 +40290,13 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list205 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list205.size); - for (int _i206 = 0; _i206 < _list205.size; ++_i206) + org.apache.thrift.protocol.TList _list209 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list209.size); + for (int _i210 = 0; _i210 < _list209.size; ++_i210) { - String _elem207; // required - _elem207 = iprot.readString(); - this.part_vals.add(_elem207); + String _elem211; // required + _elem211 = iprot.readString(); + this.part_vals.add(_elem211); } iprot.readListEnd(); } @@ -39697,9 +40339,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter208 : this.part_vals) + for (String _iter212 : this.part_vals) { - oprot.writeString(_iter208); + oprot.writeString(_iter212); } oprot.writeListEnd(); } @@ -40175,14 +40817,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list209 = iprot.readListBegin(); - this.success = new ArrayList(_list209.size); - for (int _i210 = 0; _i210 < _list209.size; ++_i210) + org.apache.thrift.protocol.TList _list213 = iprot.readListBegin(); + this.success = new ArrayList(_list213.size); + for (int _i214 = 0; _i214 < _list213.size; ++_i214) { - Partition _elem211; // required - _elem211 = new Partition(); - _elem211.read(iprot); - this.success.add(_elem211); + Partition _elem215; // required + _elem215 = new Partition(); + _elem215.read(iprot); + this.success.add(_elem215); } iprot.readListEnd(); } @@ -40222,9 +40864,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter212 : this.success) + for (Partition _iter216 : this.success) { - _iter212.write(oprot); + _iter216.write(oprot); } oprot.writeListEnd(); } @@ -40957,13 +41599,13 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list213 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list213.size); - for (int _i214 = 0; _i214 < _list213.size; ++_i214) + org.apache.thrift.protocol.TList _list217 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list217.size); + for (int _i218 = 0; _i218 < _list217.size; ++_i218) { - String _elem215; // required - _elem215 = iprot.readString(); - this.part_vals.add(_elem215); + String _elem219; // required + _elem219 = iprot.readString(); + this.part_vals.add(_elem219); } iprot.readListEnd(); } @@ -40989,13 +41631,13 @@ public class ThriftHiveMetastore { case 6: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list216 = iprot.readListBegin(); - this.group_names = new ArrayList(_list216.size); - for (int _i217 = 0; _i217 < _list216.size; ++_i217) + org.apache.thrift.protocol.TList _list220 = iprot.readListBegin(); + this.group_names = new ArrayList(_list220.size); + for (int _i221 = 0; _i221 < _list220.size; ++_i221) { - String _elem218; // required - _elem218 = iprot.readString(); - this.group_names.add(_elem218); + String _elem222; // required + _elem222 = iprot.readString(); + this.group_names.add(_elem222); } iprot.readListEnd(); } @@ -41030,9 +41672,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter219 : this.part_vals) + for (String _iter223 : this.part_vals) { - oprot.writeString(_iter219); + oprot.writeString(_iter223); } oprot.writeListEnd(); } @@ -41050,9 +41692,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter220 : this.group_names) + for (String _iter224 : this.group_names) { - oprot.writeString(_iter220); + oprot.writeString(_iter224); } oprot.writeListEnd(); } @@ -41541,14 +42183,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list221 = iprot.readListBegin(); - this.success = new ArrayList(_list221.size); - for (int _i222 = 0; _i222 < _list221.size; ++_i222) + org.apache.thrift.protocol.TList _list225 = iprot.readListBegin(); + this.success = new ArrayList(_list225.size); + for (int _i226 = 0; _i226 < _list225.size; ++_i226) { - Partition _elem223; // required - _elem223 = new Partition(); - _elem223.read(iprot); - this.success.add(_elem223); + Partition _elem227; // required + _elem227 = new Partition(); + _elem227.read(iprot); + this.success.add(_elem227); } iprot.readListEnd(); } @@ -41588,9 +42230,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter224 : this.success) + for (Partition _iter228 : this.success) { - _iter224.write(oprot); + _iter228.write(oprot); } oprot.writeListEnd(); } @@ -42157,13 +42799,13 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list225 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list225.size); - for (int _i226 = 0; _i226 < _list225.size; ++_i226) + org.apache.thrift.protocol.TList _list229 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list229.size); + for (int _i230 = 0; _i230 < _list229.size; ++_i230) { - String _elem227; // required - _elem227 = iprot.readString(); - this.part_vals.add(_elem227); + String _elem231; // required + _elem231 = iprot.readString(); + this.part_vals.add(_elem231); } iprot.readListEnd(); } @@ -42206,9 +42848,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter228 : this.part_vals) + for (String _iter232 : this.part_vals) { - oprot.writeString(_iter228); + oprot.writeString(_iter232); } oprot.writeListEnd(); } @@ -42684,13 +43326,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list229 = iprot.readListBegin(); - this.success = new ArrayList(_list229.size); - for (int _i230 = 0; _i230 < _list229.size; ++_i230) + org.apache.thrift.protocol.TList _list233 = iprot.readListBegin(); + this.success = new ArrayList(_list233.size); + for (int _i234 = 0; _i234 < _list233.size; ++_i234) { - String _elem231; // required - _elem231 = iprot.readString(); - this.success.add(_elem231); + String _elem235; // required + _elem235 = iprot.readString(); + this.success.add(_elem235); } iprot.readListEnd(); } @@ -42730,9 +43372,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter232 : this.success) + for (String _iter236 : this.success) { - oprot.writeString(_iter232); + oprot.writeString(_iter236); } oprot.writeListEnd(); } @@ -43789,14 +44431,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list233 = iprot.readListBegin(); - this.success = new ArrayList(_list233.size); - for (int _i234 = 0; _i234 < _list233.size; ++_i234) + org.apache.thrift.protocol.TList _list237 = iprot.readListBegin(); + this.success = new ArrayList(_list237.size); + for (int _i238 = 0; _i238 < _list237.size; ++_i238) { - Partition _elem235; // required - _elem235 = new Partition(); - _elem235.read(iprot); - this.success.add(_elem235); + Partition _elem239; // required + _elem239 = new Partition(); + _elem239.read(iprot); + this.success.add(_elem239); } iprot.readListEnd(); } @@ -43836,9 +44478,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter236 : this.success) + for (Partition _iter240 : this.success) { - _iter236.write(oprot); + _iter240.write(oprot); } oprot.writeListEnd(); } @@ -44327,13 +44969,13 @@ public class ThriftHiveMetastore { case 3: // NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list237 = iprot.readListBegin(); - this.names = new ArrayList(_list237.size); - for (int _i238 = 0; _i238 < _list237.size; ++_i238) + org.apache.thrift.protocol.TList _list241 = iprot.readListBegin(); + this.names = new ArrayList(_list241.size); + for (int _i242 = 0; _i242 < _list241.size; ++_i242) { - String _elem239; // required - _elem239 = iprot.readString(); - this.names.add(_elem239); + String _elem243; // required + _elem243 = iprot.readString(); + this.names.add(_elem243); } iprot.readListEnd(); } @@ -44368,9 +45010,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.names.size())); - for (String _iter240 : this.names) + for (String _iter244 : this.names) { - oprot.writeString(_iter240); + oprot.writeString(_iter244); } oprot.writeListEnd(); } @@ -44837,14 +45479,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list241 = iprot.readListBegin(); - this.success = new ArrayList(_list241.size); - for (int _i242 = 0; _i242 < _list241.size; ++_i242) + org.apache.thrift.protocol.TList _list245 = iprot.readListBegin(); + this.success = new ArrayList(_list245.size); + for (int _i246 = 0; _i246 < _list245.size; ++_i246) { - Partition _elem243; // required - _elem243 = new Partition(); - _elem243.read(iprot); - this.success.add(_elem243); + Partition _elem247; // required + _elem247 = new Partition(); + _elem247.read(iprot); + this.success.add(_elem247); } iprot.readListEnd(); } @@ -44884,9 +45526,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Partition _iter244 : this.success) + for (Partition _iter248 : this.success) { - _iter244.write(oprot); + _iter248.write(oprot); } oprot.writeListEnd(); } @@ -46257,14 +46899,14 @@ public class ThriftHiveMetastore { case 3: // NEW_PARTS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list245 = iprot.readListBegin(); - this.new_parts = new ArrayList(_list245.size); - for (int _i246 = 0; _i246 < _list245.size; ++_i246) + org.apache.thrift.protocol.TList _list249 = iprot.readListBegin(); + this.new_parts = new ArrayList(_list249.size); + for (int _i250 = 0; _i250 < _list249.size; ++_i250) { - Partition _elem247; // required - _elem247 = new Partition(); - _elem247.read(iprot); - this.new_parts.add(_elem247); + Partition _elem251; // required + _elem251 = new Partition(); + _elem251.read(iprot); + this.new_parts.add(_elem251); } iprot.readListEnd(); } @@ -46299,9 +46941,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(NEW_PARTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.new_parts.size())); - for (Partition _iter248 : this.new_parts) + for (Partition _iter252 : this.new_parts) { - _iter248.write(oprot); + _iter252.write(oprot); } oprot.writeListEnd(); } @@ -48225,13 +48867,13 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list249 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list249.size); - for (int _i250 = 0; _i250 < _list249.size; ++_i250) + org.apache.thrift.protocol.TList _list253 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list253.size); + for (int _i254 = 0; _i254 < _list253.size; ++_i254) { - String _elem251; // required - _elem251 = iprot.readString(); - this.part_vals.add(_elem251); + String _elem255; // required + _elem255 = iprot.readString(); + this.part_vals.add(_elem255); } iprot.readListEnd(); } @@ -48274,9 +48916,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (String _iter252 : this.part_vals) + for (String _iter256 : this.part_vals) { - oprot.writeString(_iter252); + oprot.writeString(_iter256); } oprot.writeListEnd(); } @@ -50165,13 +50807,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list253 = iprot.readListBegin(); - this.success = new ArrayList(_list253.size); - for (int _i254 = 0; _i254 < _list253.size; ++_i254) + org.apache.thrift.protocol.TList _list257 = iprot.readListBegin(); + this.success = new ArrayList(_list257.size); + for (int _i258 = 0; _i258 < _list257.size; ++_i258) { - String _elem255; // required - _elem255 = iprot.readString(); - this.success.add(_elem255); + String _elem259; // required + _elem259 = iprot.readString(); + this.success.add(_elem259); } iprot.readListEnd(); } @@ -50203,9 +50845,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter256 : this.success) + for (String _iter260 : this.success) { - oprot.writeString(_iter256); + oprot.writeString(_iter260); } oprot.writeListEnd(); } @@ -50901,15 +51543,15 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map257 = iprot.readMapBegin(); - this.success = new HashMap(2*_map257.size); - for (int _i258 = 0; _i258 < _map257.size; ++_i258) + org.apache.thrift.protocol.TMap _map261 = iprot.readMapBegin(); + this.success = new HashMap(2*_map261.size); + for (int _i262 = 0; _i262 < _map261.size; ++_i262) { - String _key259; // required - String _val260; // required - _key259 = iprot.readString(); - _val260 = iprot.readString(); - this.success.put(_key259, _val260); + String _key263; // required + String _val264; // required + _key263 = iprot.readString(); + _val264 = iprot.readString(); + this.success.put(_key263, _val264); } iprot.readMapEnd(); } @@ -50941,10 +51583,10 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (Map.Entry _iter261 : this.success.entrySet()) + for (Map.Entry _iter265 : this.success.entrySet()) { - oprot.writeString(_iter261.getKey()); - oprot.writeString(_iter261.getValue()); + oprot.writeString(_iter265.getKey()); + oprot.writeString(_iter265.getValue()); } oprot.writeMapEnd(); } @@ -51511,15 +52153,15 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map262 = iprot.readMapBegin(); - this.part_vals = new HashMap(2*_map262.size); - for (int _i263 = 0; _i263 < _map262.size; ++_i263) + org.apache.thrift.protocol.TMap _map266 = iprot.readMapBegin(); + this.part_vals = new HashMap(2*_map266.size); + for (int _i267 = 0; _i267 < _map266.size; ++_i267) { - String _key264; // required - String _val265; // required - _key264 = iprot.readString(); - _val265 = iprot.readString(); - this.part_vals.put(_key264, _val265); + String _key268; // required + String _val269; // required + _key268 = iprot.readString(); + _val269 = iprot.readString(); + this.part_vals.put(_key268, _val269); } iprot.readMapEnd(); } @@ -51561,10 +52203,10 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (Map.Entry _iter266 : this.part_vals.entrySet()) + for (Map.Entry _iter270 : this.part_vals.entrySet()) { - oprot.writeString(_iter266.getKey()); - oprot.writeString(_iter266.getValue()); + oprot.writeString(_iter270.getKey()); + oprot.writeString(_iter270.getValue()); } oprot.writeMapEnd(); } @@ -52914,15 +53556,15 @@ public class ThriftHiveMetastore { case 3: // PART_VALS if (field.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map267 = iprot.readMapBegin(); - this.part_vals = new HashMap(2*_map267.size); - for (int _i268 = 0; _i268 < _map267.size; ++_i268) + org.apache.thrift.protocol.TMap _map271 = iprot.readMapBegin(); + this.part_vals = new HashMap(2*_map271.size); + for (int _i272 = 0; _i272 < _map271.size; ++_i272) { - String _key269; // required - String _val270; // required - _key269 = iprot.readString(); - _val270 = iprot.readString(); - this.part_vals.put(_key269, _val270); + String _key273; // required + String _val274; // required + _key273 = iprot.readString(); + _val274 = iprot.readString(); + this.part_vals.put(_key273, _val274); } iprot.readMapEnd(); } @@ -52964,10 +53606,10 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.part_vals.size())); - for (Map.Entry _iter271 : this.part_vals.entrySet()) + for (Map.Entry _iter275 : this.part_vals.entrySet()) { - oprot.writeString(_iter271.getKey()); - oprot.writeString(_iter271.getValue()); + oprot.writeString(_iter275.getKey()); + oprot.writeString(_iter275.getValue()); } oprot.writeMapEnd(); } @@ -53894,6 +54536,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -55768,7 +56412,5883 @@ public class ThriftHiveMetastore { switch (field.id) { case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new InvalidOperationException(); + this.o1 = new InvalidOperationException(); + this.o1.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_index_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class drop_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); + + private String db_name; // required + private String tbl_name; // required + private String index_name; // required + private boolean deleteData; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + INDEX_NAME((short)3, "index_name"), + DELETE_DATA((short)4, "deleteData"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // INDEX_NAME + return INDEX_NAME; + case 4: // DELETE_DATA + return DELETE_DATA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); + } + + public drop_index_by_name_args() { + } + + public drop_index_by_name_args( + String db_name, + String tbl_name, + String index_name, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public drop_index_by_name_args(drop_index_by_name_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetIndex_name()) { + this.index_name = other.index_name; + } + this.deleteData = other.deleteData; + } + + public drop_index_by_name_args deepCopy() { + return new drop_index_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.index_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getIndex_name() { + return this.index_name; + } + + public void setIndex_name(String index_name) { + this.index_name = index_name; + } + + public void unsetIndex_name() { + this.index_name = null; + } + + /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ + public boolean isSetIndex_name() { + return this.index_name != null; + } + + public void setIndex_nameIsSet(boolean value) { + if (!value) { + this.index_name = null; + } + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + setDeleteDataIsSet(true); + } + + public void unsetDeleteData() { + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); + } + + /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ + public boolean isSetDeleteData() { + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case INDEX_NAME: + if (value == null) { + unsetIndex_name(); + } else { + setIndex_name((String)value); + } + break; + + case DELETE_DATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case INDEX_NAME: + return getIndex_name(); + + case DELETE_DATA: + return Boolean.valueOf(isDeleteData()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case INDEX_NAME: + return isSetIndex_name(); + case DELETE_DATA: + return isSetDeleteData(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_index_by_name_args) + return this.equals((drop_index_by_name_args)that); + return false; + } + + public boolean equals(drop_index_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_index_name = true && this.isSetIndex_name(); + boolean that_present_index_name = true && that.isSetIndex_name(); + if (this_present_index_name || that_present_index_name) { + if (!(this_present_index_name && that_present_index_name)) + return false; + if (!this.index_name.equals(that.index_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_db_name = true && (isSetDb_name()); + builder.append(present_db_name); + if (present_db_name) + builder.append(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + builder.append(present_tbl_name); + if (present_tbl_name) + builder.append(tbl_name); + + boolean present_index_name = true && (isSetIndex_name()); + builder.append(present_index_name); + if (present_index_name) + builder.append(index_name); + + boolean present_deleteData = true; + builder.append(present_deleteData); + if (present_deleteData) + builder.append(deleteData); + + return builder.toHashCode(); + } + + public int compareTo(drop_index_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_index_by_name_args typedOther = (drop_index_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.db_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // INDEX_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.index_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // DELETE_DATA + if (field.type == org.apache.thrift.protocol.TType.BOOL) { + this.deleteData = iprot.readBool(); + setDeleteDataIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_index_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("index_name:"); + if (this.index_name == null) { + sb.append("null"); + } else { + sb.append(this.index_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class drop_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private boolean success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); + } + + public drop_index_by_name_result() { + } + + public drop_index_by_name_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_index_by_name_result(drop_index_by_name_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public drop_index_by_name_result deepCopy() { + return new drop_index_by_name_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_index_by_name_result) + return this.equals((drop_index_by_name_result)that); + return false; + } + + public boolean equals(drop_index_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true; + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + boolean present_o2 = true && (isSetO2()); + builder.append(present_o2); + if (present_o2) + builder.append(o2); + + return builder.toHashCode(); + } + + public int compareTo(drop_index_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_index_by_name_result typedOther = (drop_index_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == org.apache.thrift.protocol.TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_index_by_name_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class get_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); + + private String db_name; // required + private String tbl_name; // required + private String index_name; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + INDEX_NAME((short)3, "index_name"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // INDEX_NAME + return INDEX_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); + } + + public get_index_by_name_args() { + } + + public get_index_by_name_args( + String db_name, + String tbl_name, + String index_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + } + + /** + * Performs a deep copy on other. + */ + public get_index_by_name_args(get_index_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetIndex_name()) { + this.index_name = other.index_name; + } + } + + public get_index_by_name_args deepCopy() { + return new get_index_by_name_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.index_name = null; + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public String getIndex_name() { + return this.index_name; + } + + public void setIndex_name(String index_name) { + this.index_name = index_name; + } + + public void unsetIndex_name() { + this.index_name = null; + } + + /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ + public boolean isSetIndex_name() { + return this.index_name != null; + } + + public void setIndex_nameIsSet(boolean value) { + if (!value) { + this.index_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case INDEX_NAME: + if (value == null) { + unsetIndex_name(); + } else { + setIndex_name((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case INDEX_NAME: + return getIndex_name(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case INDEX_NAME: + return isSetIndex_name(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_by_name_args) + return this.equals((get_index_by_name_args)that); + return false; + } + + public boolean equals(get_index_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_index_name = true && this.isSetIndex_name(); + boolean that_present_index_name = true && that.isSetIndex_name(); + if (this_present_index_name || that_present_index_name) { + if (!(this_present_index_name && that_present_index_name)) + return false; + if (!this.index_name.equals(that.index_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_db_name = true && (isSetDb_name()); + builder.append(present_db_name); + if (present_db_name) + builder.append(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + builder.append(present_tbl_name); + if (present_tbl_name) + builder.append(tbl_name); + + boolean present_index_name = true && (isSetIndex_name()); + builder.append(present_index_name); + if (present_index_name) + builder.append(index_name); + + return builder.toHashCode(); + } + + public int compareTo(get_index_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_index_by_name_args typedOther = (get_index_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.db_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // INDEX_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.index_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_index_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("index_name:"); + if (this.index_name == null) { + sb.append("null"); + } else { + sb.append(this.index_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class get_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private Index success; // required + private MetaException o1; // required + private NoSuchObjectException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); + } + + public get_index_by_name_result() { + } + + public get_index_by_name_result( + Index success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_index_by_name_result(get_index_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Index(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + public get_index_by_name_result deepCopy() { + return new get_index_by_name_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public Index getSuccess() { + return this.success; + } + + public void setSuccess(Index success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO1() { + return this.o1; + } + + public void setO1(MetaException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public NoSuchObjectException getO2() { + return this.o2; + } + + public void setO2(NoSuchObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Index)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_by_name_result) + return this.equals((get_index_by_name_result)that); + return false; + } + + public boolean equals(get_index_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + boolean present_o2 = true && (isSetO2()); + builder.append(present_o2); + if (present_o2) + builder.append(o2); + + return builder.toHashCode(); + } + + public int compareTo(get_index_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_index_by_name_result typedOther = (get_index_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.success = new Index(); + this.success.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_index_by_name_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class get_indexes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); + + private String db_name; // required + private String tbl_name; // required + private short max_indexes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_INDEXES((short)3, "max_indexes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_INDEXES + return MAX_INDEXES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_INDEXES_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); + } + + public get_indexes_args() { + this.max_indexes = (short)-1; + + } + + public get_indexes_args( + String db_name, + String tbl_name, + short max_indexes) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_indexes_args(get_indexes_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_indexes = other.max_indexes; + } + + public get_indexes_args deepCopy() { + return new get_indexes_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_indexes = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public short getMax_indexes() { + return this.max_indexes; + } + + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + public void unsetMax_indexes() { + __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + } + + /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ + public boolean isSetMax_indexes() { + return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + } + + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_INDEXES: + if (value == null) { + unsetMax_indexes(); + } else { + setMax_indexes((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_INDEXES: + return Short.valueOf(getMax_indexes()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_INDEXES: + return isSetMax_indexes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_indexes_args) + return this.equals((get_indexes_args)that); + return false; + } + + public boolean equals(get_indexes_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_indexes = true; + boolean that_present_max_indexes = true; + if (this_present_max_indexes || that_present_max_indexes) { + if (!(this_present_max_indexes && that_present_max_indexes)) + return false; + if (this.max_indexes != that.max_indexes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_db_name = true && (isSetDb_name()); + builder.append(present_db_name); + if (present_db_name) + builder.append(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + builder.append(present_tbl_name); + if (present_tbl_name) + builder.append(tbl_name); + + boolean present_max_indexes = true; + builder.append(present_max_indexes); + if (present_max_indexes) + builder.append(max_indexes); + + return builder.toHashCode(); + } + + public int compareTo(get_indexes_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_indexes_args typedOther = (get_indexes_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_indexes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.db_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MAX_INDEXES + if (field.type == org.apache.thrift.protocol.TType.I16) { + this.max_indexes = iprot.readI16(); + setMax_indexesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(this.max_indexes); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_indexes_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_indexes:"); + sb.append(this.max_indexes); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class get_indexes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private List success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class)))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); + } + + public get_indexes_result() { + } + + public get_indexes_result( + List success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_indexes_result(get_indexes_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Index other_element : other.success) { + __this__success.add(new Index(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_indexes_result deepCopy() { + return new get_indexes_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(Index elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_indexes_result) + return this.equals((get_indexes_result)that); + return false; + } + + public boolean equals(get_indexes_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + boolean present_o2 = true && (isSetO2()); + builder.append(present_o2); + if (present_o2) + builder.append(o2); + + return builder.toHashCode(); + } + + public int compareTo(get_indexes_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_indexes_result typedOther = (get_indexes_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list276 = iprot.readListBegin(); + this.success = new ArrayList(_list276.size); + for (int _i277 = 0; _i277 < _list276.size; ++_i277) + { + Index _elem278; // required + _elem278 = new Index(); + _elem278.read(iprot); + this.success.add(_elem278); + } + iprot.readListEnd(); + } + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); + for (Index _iter279 : this.success) + { + _iter279.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_indexes_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class get_index_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_args"); + + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); + + private String db_name; // required + private String tbl_name; // required + private short max_indexes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_INDEXES((short)3, "max_indexes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // MAX_INDEXES + return MAX_INDEXES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAX_INDEXES_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); + } + + public get_index_names_args() { + this.max_indexes = (short)-1; + + } + + public get_index_names_args( + String db_name, + String tbl_name, + short max_indexes) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public get_index_names_args(get_index_names_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + this.max_indexes = other.max_indexes; + } + + public get_index_names_args deepCopy() { + return new get_index_names_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_indexes = (short)-1; + + } + + public String getDb_name() { + return this.db_name; + } + + public void setDb_name(String db_name) { + this.db_name = db_name; + } + + public void unsetDb_name() { + this.db_name = null; + } + + /** Returns true if field db_name is set (has been assigned a value) and false otherwise */ + public boolean isSetDb_name() { + return this.db_name != null; + } + + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public String getTbl_name() { + return this.tbl_name; + } + + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; + } + + public void unsetTbl_name() { + this.tbl_name = null; + } + + /** Returns true if field tbl_name is set (has been assigned a value) and false otherwise */ + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public short getMax_indexes() { + return this.max_indexes; + } + + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + setMax_indexesIsSet(true); + } + + public void unsetMax_indexes() { + __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + } + + /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ + public boolean isSetMax_indexes() { + return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + } + + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case MAX_INDEXES: + if (value == null) { + unsetMax_indexes(); + } else { + setMax_indexes((Short)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_INDEXES: + return Short.valueOf(getMax_indexes()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_INDEXES: + return isSetMax_indexes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_names_args) + return this.equals((get_index_names_args)that); + return false; + } + + public boolean equals(get_index_names_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_max_indexes = true; + boolean that_present_max_indexes = true; + if (this_present_max_indexes || that_present_max_indexes) { + if (!(this_present_max_indexes && that_present_max_indexes)) + return false; + if (this.max_indexes != that.max_indexes) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_db_name = true && (isSetDb_name()); + builder.append(present_db_name); + if (present_db_name) + builder.append(db_name); + + boolean present_tbl_name = true && (isSetTbl_name()); + builder.append(present_tbl_name); + if (present_tbl_name) + builder.append(tbl_name); + + boolean present_max_indexes = true; + builder.append(present_max_indexes); + if (present_max_indexes) + builder.append(max_indexes); + + return builder.toHashCode(); + } + + public int compareTo(get_index_names_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_index_names_args typedOther = (get_index_names_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_indexes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // DB_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.db_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // TBL_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // MAX_INDEXES + if (field.type == org.apache.thrift.protocol.TType.I16) { + this.max_indexes = iprot.readI16(); + setMax_indexesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(this.max_indexes); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_index_names_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_indexes:"); + sb.append(this.max_indexes); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class get_index_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private List success; // required + private MetaException o2; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O2((short)1, "o2"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O2 + return O2; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); + } + + public get_index_names_result() { + } + + public get_index_names_result( + List success, + MetaException o2) + { + this(); + this.success = success; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_index_names_result(get_index_names_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + public get_index_names_result deepCopy() { + return new get_index_names_result(this); + } + + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public MetaException getO2() { + return this.o2; + } + + public void setO2(MetaException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_index_names_result) + return this.equals((get_index_names_result)that); + return false; + } + + public boolean equals(get_index_names_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o2 = true && (isSetO2()); + builder.append(present_o2); + if (present_o2) + builder.append(o2); + + return builder.toHashCode(); + } + + public int compareTo(get_index_names_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_index_names_result typedOther = (get_index_names_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list280 = iprot.readListBegin(); + this.success = new ArrayList(_list280.size); + for (int _i281 = 0; _i281 < _list280.size; ++_i281) + { + String _elem282; // required + _elem282 = iprot.readString(); + this.success.add(_elem282); + } + iprot.readListEnd(); + } + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O2 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); + for (String _iter283 : this.success) + { + oprot.writeString(_iter283); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_index_names_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class update_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_table_column_statistics_args"); + + private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private ColumnStatistics stats_obj; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATS_OBJ((short)1, "stats_obj"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATS_OBJ + return STATS_OBJ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("stats_obj", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_table_column_statistics_args.class, metaDataMap); + } + + public update_table_column_statistics_args() { + } + + public update_table_column_statistics_args( + ColumnStatistics stats_obj) + { + this(); + this.stats_obj = stats_obj; + } + + /** + * Performs a deep copy on other. + */ + public update_table_column_statistics_args(update_table_column_statistics_args other) { + if (other.isSetStats_obj()) { + this.stats_obj = new ColumnStatistics(other.stats_obj); + } + } + + public update_table_column_statistics_args deepCopy() { + return new update_table_column_statistics_args(this); + } + + @Override + public void clear() { + this.stats_obj = null; + } + + public ColumnStatistics getStats_obj() { + return this.stats_obj; + } + + public void setStats_obj(ColumnStatistics stats_obj) { + this.stats_obj = stats_obj; + } + + public void unsetStats_obj() { + this.stats_obj = null; + } + + /** Returns true if field stats_obj is set (has been assigned a value) and false otherwise */ + public boolean isSetStats_obj() { + return this.stats_obj != null; + } + + public void setStats_objIsSet(boolean value) { + if (!value) { + this.stats_obj = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATS_OBJ: + if (value == null) { + unsetStats_obj(); + } else { + setStats_obj((ColumnStatistics)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATS_OBJ: + return getStats_obj(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STATS_OBJ: + return isSetStats_obj(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_table_column_statistics_args) + return this.equals((update_table_column_statistics_args)that); + return false; + } + + public boolean equals(update_table_column_statistics_args that) { + if (that == null) + return false; + + boolean this_present_stats_obj = true && this.isSetStats_obj(); + boolean that_present_stats_obj = true && that.isSetStats_obj(); + if (this_present_stats_obj || that_present_stats_obj) { + if (!(this_present_stats_obj && that_present_stats_obj)) + return false; + if (!this.stats_obj.equals(that.stats_obj)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_stats_obj = true && (isSetStats_obj()); + builder.append(present_stats_obj); + if (present_stats_obj) + builder.append(stats_obj); + + return builder.toHashCode(); + } + + public int compareTo(update_table_column_statistics_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + update_table_column_statistics_args typedOther = (update_table_column_statistics_args)other; + + lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(typedOther.isSetStats_obj()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStats_obj()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, typedOther.stats_obj); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // STATS_OBJ + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.stats_obj = new ColumnStatistics(); + this.stats_obj.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.stats_obj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + this.stats_obj.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("update_table_column_statistics_args("); + boolean first = true; + + sb.append("stats_obj:"); + if (this.stats_obj == null) { + sb.append("null"); + } else { + sb.append(this.stats_obj); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class update_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_table_column_statistics_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + + private boolean success; // required + private NoSuchObjectException o1; // required + private InvalidObjectException o2; // required + private MetaException o3; // required + private InvalidInputException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_table_column_statistics_result.class, metaDataMap); + } + + public update_table_column_statistics_result() { + } + + public update_table_column_statistics_result( + boolean success, + NoSuchObjectException o1, + InvalidObjectException o2, + MetaException o3, + InvalidInputException o4) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public update_table_column_statistics_result(update_table_column_statistics_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } + } + + public update_table_column_statistics_result deepCopy() { + return new update_table_column_statistics_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_table_column_statistics_result) + return this.equals((update_table_column_statistics_result)that); + return false; + } + + public boolean equals(update_table_column_statistics_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true; + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + boolean present_o2 = true && (isSetO2()); + builder.append(present_o2); + if (present_o2) + builder.append(o2); + + boolean present_o3 = true && (isSetO3()); + builder.append(present_o3); + if (present_o3) + builder.append(o3); + + boolean present_o4 = true && (isSetO4()); + builder.append(present_o4); + if (present_o4) + builder.append(o4); + + return builder.toHashCode(); + } + + public int compareTo(update_table_column_statistics_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + update_table_column_statistics_result typedOther = (update_table_column_statistics_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == org.apache.thrift.protocol.TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // O3 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // O4 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o4 = new InvalidInputException(); + this.o4.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO4()) { + oprot.writeFieldBegin(O4_FIELD_DESC); + this.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("update_table_column_statistics_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class update_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_partition_column_statistics_args"); + + private static final org.apache.thrift.protocol.TField STATS_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("stats_obj", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private ColumnStatistics stats_obj; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + STATS_OBJ((short)1, "stats_obj"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // STATS_OBJ + return STATS_OBJ; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.STATS_OBJ, new org.apache.thrift.meta_data.FieldMetaData("stats_obj", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_partition_column_statistics_args.class, metaDataMap); + } + + public update_partition_column_statistics_args() { + } + + public update_partition_column_statistics_args( + ColumnStatistics stats_obj) + { + this(); + this.stats_obj = stats_obj; + } + + /** + * Performs a deep copy on other. + */ + public update_partition_column_statistics_args(update_partition_column_statistics_args other) { + if (other.isSetStats_obj()) { + this.stats_obj = new ColumnStatistics(other.stats_obj); + } + } + + public update_partition_column_statistics_args deepCopy() { + return new update_partition_column_statistics_args(this); + } + + @Override + public void clear() { + this.stats_obj = null; + } + + public ColumnStatistics getStats_obj() { + return this.stats_obj; + } + + public void setStats_obj(ColumnStatistics stats_obj) { + this.stats_obj = stats_obj; + } + + public void unsetStats_obj() { + this.stats_obj = null; + } + + /** Returns true if field stats_obj is set (has been assigned a value) and false otherwise */ + public boolean isSetStats_obj() { + return this.stats_obj != null; + } + + public void setStats_objIsSet(boolean value) { + if (!value) { + this.stats_obj = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STATS_OBJ: + if (value == null) { + unsetStats_obj(); + } else { + setStats_obj((ColumnStatistics)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case STATS_OBJ: + return getStats_obj(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STATS_OBJ: + return isSetStats_obj(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_partition_column_statistics_args) + return this.equals((update_partition_column_statistics_args)that); + return false; + } + + public boolean equals(update_partition_column_statistics_args that) { + if (that == null) + return false; + + boolean this_present_stats_obj = true && this.isSetStats_obj(); + boolean that_present_stats_obj = true && that.isSetStats_obj(); + if (this_present_stats_obj || that_present_stats_obj) { + if (!(this_present_stats_obj && that_present_stats_obj)) + return false; + if (!this.stats_obj.equals(that.stats_obj)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_stats_obj = true && (isSetStats_obj()); + builder.append(present_stats_obj); + if (present_stats_obj) + builder.append(stats_obj); + + return builder.toHashCode(); + } + + public int compareTo(update_partition_column_statistics_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + update_partition_column_statistics_args typedOther = (update_partition_column_statistics_args)other; + + lastComparison = Boolean.valueOf(isSetStats_obj()).compareTo(typedOther.isSetStats_obj()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStats_obj()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats_obj, typedOther.stats_obj); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 1: // STATS_OBJ + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.stats_obj = new ColumnStatistics(); + this.stats_obj.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.stats_obj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + this.stats_obj.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("update_partition_column_statistics_args("); + boolean first = true; + + sb.append("stats_obj:"); + if (this.stats_obj == null) { + sb.append("null"); + } else { + sb.append(this.stats_obj); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + } + + public static class update_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("update_partition_column_statistics_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); + + private boolean success; // required + private NoSuchObjectException o1; // required + private InvalidObjectException o2; // required + private MetaException o3; // required + private InvalidInputException o4; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(update_partition_column_statistics_result.class, metaDataMap); + } + + public update_partition_column_statistics_result() { + } + + public update_partition_column_statistics_result( + boolean success, + NoSuchObjectException o1, + InvalidObjectException o2, + MetaException o3, + InvalidInputException o4) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public update_partition_column_statistics_result(update_partition_column_statistics_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } + } + + public update_partition_column_statistics_result deepCopy() { + return new update_partition_column_statistics_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public InvalidObjectException getO2() { + return this.o2; + } + + public void setO2(InvalidObjectException o2) { + this.o2 = o2; + } + + public void unsetO2() { + this.o2 = null; + } + + /** Returns true if field o2 is set (has been assigned a value) and false otherwise */ + public boolean isSetO2() { + return this.o2 != null; + } + + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public MetaException getO3() { + return this.o3; + } + + public void setO3(MetaException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof update_partition_column_statistics_result) + return this.equals((update_partition_column_statistics_result)that); + return false; + } + + public boolean equals(update_partition_column_statistics_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true; + builder.append(present_success); + if (present_success) + builder.append(success); + + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + + boolean present_o2 = true && (isSetO2()); + builder.append(present_o2); + if (present_o2) + builder.append(o2); + + boolean present_o3 = true && (isSetO3()); + builder.append(present_o3); + if (present_o3) + builder.append(o3); + + boolean present_o4 = true && (isSetO4()); + builder.append(present_o4); + if (present_o4) + builder.append(o4); + + return builder.toHashCode(); + } + + public int compareTo(update_partition_column_statistics_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + update_partition_column_statistics_result typedOther = (update_partition_column_statistics_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO2()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (field.id) { + case 0: // SUCCESS + if (field.type == org.apache.thrift.protocol.TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 1: // O1 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); @@ -55776,12 +62296,28 @@ public class ThriftHiveMetastore { break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new MetaException(); + this.o2 = new InvalidObjectException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; + case 3: // O3 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // O4 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o4 = new InvalidInputException(); + this.o4.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -55794,7 +62330,11 @@ public class ThriftHiveMetastore { public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); @@ -55802,6 +62342,14 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO4()) { + oprot.writeFieldBegin(O4_FIELD_DESC); + this.o4.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -55809,9 +62357,13 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_index_result("); + StringBuilder sb = new StringBuilder("update_partition_column_statistics_result("); boolean first = true; + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); @@ -55827,6 +62379,22 @@ public class ThriftHiveMetastore { sb.append(this.o2); } first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; sb.append(")"); return sb.toString(); } @@ -55845,6 +62413,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -55853,25 +62423,22 @@ public class ThriftHiveMetastore { } - public static class drop_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_args"); + public static class get_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_column_statistics_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField DELETE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteData", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)3); private String db_name; // required private String tbl_name; // required - private String index_name; // required - private boolean deleteData; // required + private String col_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - INDEX_NAME((short)3, "index_name"), - DELETE_DATA((short)4, "deleteData"); + COL_NAME((short)3, "col_name"); private static final Map byName = new HashMap(); @@ -55890,10 +62457,8 @@ public class ThriftHiveMetastore { return DB_NAME; case 2: // TBL_NAME return TBL_NAME; - case 3: // INDEX_NAME - return INDEX_NAME; - case 4: // DELETE_DATA - return DELETE_DATA; + case 3: // COL_NAME + return COL_NAME; default: return null; } @@ -55934,8 +62499,6 @@ public class ThriftHiveMetastore { } // isset id assignments - private static final int __DELETEDATA_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { @@ -55944,60 +62507,50 @@ public class ThriftHiveMetastore { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DELETE_DATA, new org.apache.thrift.meta_data.FieldMetaData("deleteData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_column_statistics_args.class, metaDataMap); } - public drop_index_by_name_args() { + public get_table_column_statistics_args() { } - public drop_index_by_name_args( + public get_table_column_statistics_args( String db_name, String tbl_name, - String index_name, - boolean deleteData) + String col_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.index_name = index_name; - this.deleteData = deleteData; - setDeleteDataIsSet(true); + this.col_name = col_name; } /** * Performs a deep copy on other. */ - public drop_index_by_name_args(drop_index_by_name_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + public get_table_column_statistics_args(get_table_column_statistics_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; + if (other.isSetCol_name()) { + this.col_name = other.col_name; } - this.deleteData = other.deleteData; } - public drop_index_by_name_args deepCopy() { - return new drop_index_by_name_args(this); + public get_table_column_statistics_args deepCopy() { + return new get_table_column_statistics_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; - this.index_name = null; - setDeleteDataIsSet(false); - this.deleteData = false; + this.col_name = null; } public String getDb_name() { @@ -56046,51 +62599,29 @@ public class ThriftHiveMetastore { } } - public String getIndex_name() { - return this.index_name; + public String getCol_name() { + return this.col_name; } - public void setIndex_name(String index_name) { - this.index_name = index_name; + public void setCol_name(String col_name) { + this.col_name = col_name; } - public void unsetIndex_name() { - this.index_name = null; + public void unsetCol_name() { + this.col_name = null; } - /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ - public boolean isSetIndex_name() { - return this.index_name != null; + /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCol_name() { + return this.col_name != null; } - public void setIndex_nameIsSet(boolean value) { + public void setCol_nameIsSet(boolean value) { if (!value) { - this.index_name = null; + this.col_name = null; } } - public boolean isDeleteData() { - return this.deleteData; - } - - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - setDeleteDataIsSet(true); - } - - public void unsetDeleteData() { - __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); - } - - /** Returns true if field deleteData is set (has been assigned a value) and false otherwise */ - public boolean isSetDeleteData() { - return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); - } - - public void setDeleteDataIsSet(boolean value) { - __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); - } - public void setFieldValue(_Fields field, Object value) { switch (field) { case DB_NAME: @@ -56109,19 +62640,11 @@ public class ThriftHiveMetastore { } break; - case INDEX_NAME: - if (value == null) { - unsetIndex_name(); - } else { - setIndex_name((String)value); - } - break; - - case DELETE_DATA: + case COL_NAME: if (value == null) { - unsetDeleteData(); + unsetCol_name(); } else { - setDeleteData((Boolean)value); + setCol_name((String)value); } break; @@ -56136,11 +62659,8 @@ public class ThriftHiveMetastore { case TBL_NAME: return getTbl_name(); - case INDEX_NAME: - return getIndex_name(); - - case DELETE_DATA: - return Boolean.valueOf(isDeleteData()); + case COL_NAME: + return getCol_name(); } throw new IllegalStateException(); @@ -56157,10 +62677,8 @@ public class ThriftHiveMetastore { return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); - case DELETE_DATA: - return isSetDeleteData(); + case COL_NAME: + return isSetCol_name(); } throw new IllegalStateException(); } @@ -56169,12 +62687,12 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_index_by_name_args) - return this.equals((drop_index_by_name_args)that); + if (that instanceof get_table_column_statistics_args) + return this.equals((get_table_column_statistics_args)that); return false; } - public boolean equals(drop_index_by_name_args that) { + public boolean equals(get_table_column_statistics_args that) { if (that == null) return false; @@ -56196,21 +62714,12 @@ public class ThriftHiveMetastore { return false; } - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) + boolean this_present_col_name = true && this.isSetCol_name(); + boolean that_present_col_name = true && that.isSetCol_name(); + if (this_present_col_name || that_present_col_name) { + if (!(this_present_col_name && that_present_col_name)) return false; - if (!this.index_name.equals(that.index_name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) - return false; - if (this.deleteData != that.deleteData) + if (!this.col_name.equals(that.col_name)) return false; } @@ -56231,26 +62740,21 @@ public class ThriftHiveMetastore { if (present_tbl_name) builder.append(tbl_name); - boolean present_index_name = true && (isSetIndex_name()); - builder.append(present_index_name); - if (present_index_name) - builder.append(index_name); - - boolean present_deleteData = true; - builder.append(present_deleteData); - if (present_deleteData) - builder.append(deleteData); + boolean present_col_name = true && (isSetCol_name()); + builder.append(present_col_name); + if (present_col_name) + builder.append(col_name); return builder.toHashCode(); } - public int compareTo(drop_index_by_name_args other) { + public int compareTo(get_table_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_index_by_name_args typedOther = (drop_index_by_name_args)other; + get_table_column_statistics_args typedOther = (get_table_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -56272,22 +62776,12 @@ public class ThriftHiveMetastore { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(typedOther.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetIndex_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, typedOther.index_name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDeleteData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteData, typedOther.deleteData); + if (isSetCol_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, typedOther.col_name); if (lastComparison != 0) { return lastComparison; } @@ -56323,17 +62817,9 @@ public class ThriftHiveMetastore { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; - case 3: // INDEX_NAME + case 3: // COL_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.index_name = iprot.readString(); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); - } - break; - case 4: // DELETE_DATA - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.deleteData = iprot.readBool(); - setDeleteDataIsSet(true); + this.col_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -56361,21 +62847,18 @@ public class ThriftHiveMetastore { oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); + if (this.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(this.col_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_args("); + StringBuilder sb = new StringBuilder("get_table_column_statistics_args("); boolean first = true; sb.append("db_name:"); @@ -56394,17 +62877,13 @@ public class ThriftHiveMetastore { } first = false; if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { + sb.append("col_name:"); + if (this.col_name == null) { sb.append("null"); } else { - sb.append(this.index_name); + sb.append(this.col_name); } first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; sb.append(")"); return sb.toString(); } @@ -56423,8 +62902,6 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -56433,22 +62910,28 @@ public class ThriftHiveMetastore { } - public static class drop_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_index_by_name_result"); + public static class get_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_table_column_statistics_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private boolean success; // required + private ColumnStatistics success; // required private NoSuchObjectException o1; // required private MetaException o2; // required + private InvalidInputException o3; // required + private InvalidObjectException o4; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), O1((short)1, "o1"), - O2((short)2, "o2"); + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); private static final Map byName = new HashMap(); @@ -56469,6 +62952,10 @@ public class ThriftHiveMetastore { return O1; case 2: // O2 return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; default: return null; } @@ -56509,84 +62996,97 @@ public class ThriftHiveMetastore { } // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_table_column_statistics_result.class, metaDataMap); } - public drop_index_by_name_result() { + public get_table_column_statistics_result() { } - public drop_index_by_name_result( - boolean success, + public get_table_column_statistics_result( + ColumnStatistics success, NoSuchObjectException o1, - MetaException o2) + MetaException o2, + InvalidInputException o3, + InvalidObjectException o4) { this(); this.success = success; - setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; + this.o3 = o3; + this.o4 = o4; } /** * Performs a deep copy on other. */ - public drop_index_by_name_result(drop_index_by_name_result other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - this.success = other.success; + public get_table_column_statistics_result(get_table_column_statistics_result other) { + if (other.isSetSuccess()) { + this.success = new ColumnStatistics(other.success); + } if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } + if (other.isSetO3()) { + this.o3 = new InvalidInputException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidObjectException(other.o4); + } } - public drop_index_by_name_result deepCopy() { - return new drop_index_by_name_result(this); + public get_table_column_statistics_result deepCopy() { + return new get_table_column_statistics_result(this); } @Override public void clear() { - setSuccessIsSet(false); - this.success = false; + this.success = null; this.o1 = null; this.o2 = null; + this.o3 = null; + this.o4 = null; } - public boolean isSuccess() { + public ColumnStatistics getSuccess() { return this.success; } - public void setSuccess(boolean success) { + public void setSuccess(ColumnStatistics success) { this.success = success; - setSuccessIsSet(true); } public void unsetSuccess() { - __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + return this.success != null; } public void setSuccessIsSet(boolean value) { - __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + if (!value) { + this.success = null; + } } public NoSuchObjectException getO1() { @@ -56635,13 +63135,59 @@ public class ThriftHiveMetastore { } } + public InvalidInputException getO3() { + return this.o3; + } + + public void setO3(InvalidInputException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidObjectException getO4() { + return this.o4; + } + + public void setO4(InvalidObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((ColumnStatistics)value); } break; @@ -56661,13 +63207,29 @@ public class ThriftHiveMetastore { } break; + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidInputException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidObjectException)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return Boolean.valueOf(isSuccess()); + return getSuccess(); case O1: return getO1(); @@ -56675,6 +63237,12 @@ public class ThriftHiveMetastore { case O2: return getO2(); + case O3: + return getO3(); + + case O4: + return getO4(); + } throw new IllegalStateException(); } @@ -56692,6 +63260,10 @@ public class ThriftHiveMetastore { return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); } throw new IllegalStateException(); } @@ -56700,21 +63272,21 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_index_by_name_result) - return this.equals((drop_index_by_name_result)that); + if (that instanceof get_table_column_statistics_result) + return this.equals((get_table_column_statistics_result)that); return false; } - public boolean equals(drop_index_by_name_result that) { + public boolean equals(get_table_column_statistics_result that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (this.success != that.success) + if (!this.success.equals(that.success)) return false; } @@ -56736,6 +63308,24 @@ public class ThriftHiveMetastore { return false; } + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + return true; } @@ -56743,7 +63333,7 @@ public class ThriftHiveMetastore { public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); - boolean present_success = true; + boolean present_success = true && (isSetSuccess()); builder.append(present_success); if (present_success) builder.append(success); @@ -56758,16 +63348,26 @@ public class ThriftHiveMetastore { if (present_o2) builder.append(o2); + boolean present_o3 = true && (isSetO3()); + builder.append(present_o3); + if (present_o3) + builder.append(o3); + + boolean present_o4 = true && (isSetO4()); + builder.append(present_o4); + if (present_o4) + builder.append(o4); + return builder.toHashCode(); } - public int compareTo(drop_index_by_name_result other) { + public int compareTo(get_table_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - drop_index_by_name_result typedOther = (drop_index_by_name_result)other; + get_table_column_statistics_result typedOther = (get_table_column_statistics_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -56799,6 +63399,26 @@ public class ThriftHiveMetastore { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -56817,9 +63437,9 @@ public class ThriftHiveMetastore { } switch (field.id) { case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.BOOL) { - this.success = iprot.readBool(); - setSuccessIsSet(true); + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.success = new ColumnStatistics(); + this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -56840,6 +63460,22 @@ public class ThriftHiveMetastore { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; + case 3: // O3 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o3 = new InvalidInputException(); + this.o3.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // O4 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o4 = new InvalidObjectException(); + this.o4.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -56854,7 +63490,7 @@ public class ThriftHiveMetastore { if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + this.success.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -56864,6 +63500,14 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO4()) { + oprot.writeFieldBegin(O4_FIELD_DESC); + this.o4.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -56871,11 +63515,15 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_result("); + StringBuilder sb = new StringBuilder("get_table_column_statistics_result("); boolean first = true; sb.append("success:"); - sb.append(this.success); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -56893,6 +63541,22 @@ public class ThriftHiveMetastore { sb.append(this.o2); } first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; sb.append(")"); return sb.toString(); } @@ -56919,22 +63583,25 @@ public class ThriftHiveMetastore { } - public static class get_index_by_name_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_args"); + public static class get_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_column_statistics_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); private String db_name; // required private String tbl_name; // required - private String index_name; // required + private String part_name; // required + private String col_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - INDEX_NAME((short)3, "index_name"); + PART_NAME((short)3, "part_name"), + COL_NAME((short)4, "col_name"); private static final Map byName = new HashMap(); @@ -56953,8 +63620,10 @@ public class ThriftHiveMetastore { return DB_NAME; case 2: // TBL_NAME return TBL_NAME; - case 3: // INDEX_NAME - return INDEX_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // COL_NAME + return COL_NAME; default: return null; } @@ -57003,50 +63672,58 @@ public class ThriftHiveMetastore { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_column_statistics_args.class, metaDataMap); } - public get_index_by_name_args() { + public get_partition_column_statistics_args() { } - public get_index_by_name_args( + public get_partition_column_statistics_args( String db_name, String tbl_name, - String index_name) + String part_name, + String col_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.index_name = index_name; + this.part_name = part_name; + this.col_name = col_name; } /** * Performs a deep copy on other. */ - public get_index_by_name_args(get_index_by_name_args other) { + public get_partition_column_statistics_args(get_partition_column_statistics_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetCol_name()) { + this.col_name = other.col_name; } } - public get_index_by_name_args deepCopy() { - return new get_index_by_name_args(this); + public get_partition_column_statistics_args deepCopy() { + return new get_partition_column_statistics_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; - this.index_name = null; + this.part_name = null; + this.col_name = null; } public String getDb_name() { @@ -57095,26 +63772,49 @@ public class ThriftHiveMetastore { } } - public String getIndex_name() { - return this.index_name; + public String getPart_name() { + return this.part_name; } - public void setIndex_name(String index_name) { - this.index_name = index_name; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetIndex_name() { - this.index_name = null; + public void unsetPart_name() { + this.part_name = null; } - /** Returns true if field index_name is set (has been assigned a value) and false otherwise */ - public boolean isSetIndex_name() { - return this.index_name != null; + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; } - public void setIndex_nameIsSet(boolean value) { + public void setPart_nameIsSet(boolean value) { if (!value) { - this.index_name = null; + this.part_name = null; + } + } + + public String getCol_name() { + return this.col_name; + } + + public void setCol_name(String col_name) { + this.col_name = col_name; + } + + public void unsetCol_name() { + this.col_name = null; + } + + /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCol_name() { + return this.col_name != null; + } + + public void setCol_nameIsSet(boolean value) { + if (!value) { + this.col_name = null; } } @@ -57136,11 +63836,19 @@ public class ThriftHiveMetastore { } break; - case INDEX_NAME: + case PART_NAME: if (value == null) { - unsetIndex_name(); + unsetPart_name(); } else { - setIndex_name((String)value); + setPart_name((String)value); + } + break; + + case COL_NAME: + if (value == null) { + unsetCol_name(); + } else { + setCol_name((String)value); } break; @@ -57155,8 +63863,11 @@ public class ThriftHiveMetastore { case TBL_NAME: return getTbl_name(); - case INDEX_NAME: - return getIndex_name(); + case PART_NAME: + return getPart_name(); + + case COL_NAME: + return getCol_name(); } throw new IllegalStateException(); @@ -57173,8 +63884,10 @@ public class ThriftHiveMetastore { return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); + case PART_NAME: + return isSetPart_name(); + case COL_NAME: + return isSetCol_name(); } throw new IllegalStateException(); } @@ -57183,12 +63896,12 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_by_name_args) - return this.equals((get_index_by_name_args)that); + if (that instanceof get_partition_column_statistics_args) + return this.equals((get_partition_column_statistics_args)that); return false; } - public boolean equals(get_index_by_name_args that) { + public boolean equals(get_partition_column_statistics_args that) { if (that == null) return false; @@ -57210,12 +63923,21 @@ public class ThriftHiveMetastore { return false; } - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) return false; - if (!this.index_name.equals(that.index_name)) + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_col_name = true && this.isSetCol_name(); + boolean that_present_col_name = true && that.isSetCol_name(); + if (this_present_col_name || that_present_col_name) { + if (!(this_present_col_name && that_present_col_name)) + return false; + if (!this.col_name.equals(that.col_name)) return false; } @@ -57236,21 +63958,26 @@ public class ThriftHiveMetastore { if (present_tbl_name) builder.append(tbl_name); - boolean present_index_name = true && (isSetIndex_name()); - builder.append(present_index_name); - if (present_index_name) - builder.append(index_name); + boolean present_part_name = true && (isSetPart_name()); + builder.append(present_part_name); + if (present_part_name) + builder.append(part_name); + + boolean present_col_name = true && (isSetCol_name()); + builder.append(present_col_name); + if (present_col_name) + builder.append(col_name); return builder.toHashCode(); } - public int compareTo(get_index_by_name_args other) { + public int compareTo(get_partition_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_index_by_name_args typedOther = (get_index_by_name_args)other; + get_partition_column_statistics_args typedOther = (get_partition_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -57272,12 +63999,22 @@ public class ThriftHiveMetastore { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIndex_name()).compareTo(typedOther.isSetIndex_name()); + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetIndex_name()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, typedOther.index_name); + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(typedOther.isSetCol_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCol_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, typedOther.col_name); if (lastComparison != 0) { return lastComparison; } @@ -57313,9 +64050,16 @@ public class ThriftHiveMetastore { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; - case 3: // INDEX_NAME + case 3: // PART_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { - this.index_name = iprot.readString(); + this.part_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // COL_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.col_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -57343,9 +64087,14 @@ public class ThriftHiveMetastore { oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + if (this.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(this.col_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -57354,7 +64103,7 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_args("); + StringBuilder sb = new StringBuilder("get_partition_column_statistics_args("); boolean first = true; sb.append("db_name:"); @@ -57373,11 +64122,19 @@ public class ThriftHiveMetastore { } first = false; if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.index_name); + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("col_name:"); + if (this.col_name == null) { + sb.append("null"); + } else { + sb.append(this.col_name); } first = false; sb.append(")"); @@ -57406,22 +64163,28 @@ public class ThriftHiveMetastore { } - public static class get_index_by_name_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_by_name_result"); + public static class get_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_partition_column_statistics_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private Index success; // required - private MetaException o1; // required - private NoSuchObjectException o2; // required + private ColumnStatistics success; // required + private NoSuchObjectException o1; // required + private MetaException o2; // required + private InvalidInputException o3; // required + private InvalidObjectException o4; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), O1((short)1, "o1"), - O2((short)2, "o2"); + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); private static final Map byName = new HashMap(); @@ -57442,6 +64205,10 @@ public class ThriftHiveMetastore { return O1; case 2: // O2 return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; default: return null; } @@ -57487,46 +64254,60 @@ public class ThriftHiveMetastore { static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class))); + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatistics.class))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_column_statistics_result.class, metaDataMap); } - public get_index_by_name_result() { + public get_partition_column_statistics_result() { } - public get_index_by_name_result( - Index success, - MetaException o1, - NoSuchObjectException o2) + public get_partition_column_statistics_result( + ColumnStatistics success, + NoSuchObjectException o1, + MetaException o2, + InvalidInputException o3, + InvalidObjectException o4) { this(); this.success = success; this.o1 = o1; this.o2 = o2; + this.o3 = o3; + this.o4 = o4; } /** * Performs a deep copy on other. */ - public get_index_by_name_result(get_index_by_name_result other) { + public get_partition_column_statistics_result(get_partition_column_statistics_result other) { if (other.isSetSuccess()) { - this.success = new Index(other.success); + this.success = new ColumnStatistics(other.success); } if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + this.o2 = new MetaException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new InvalidInputException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidObjectException(other.o4); } } - public get_index_by_name_result deepCopy() { - return new get_index_by_name_result(this); + public get_partition_column_statistics_result deepCopy() { + return new get_partition_column_statistics_result(this); } @Override @@ -57534,13 +64315,15 @@ public class ThriftHiveMetastore { this.success = null; this.o1 = null; this.o2 = null; + this.o3 = null; + this.o4 = null; } - public Index getSuccess() { + public ColumnStatistics getSuccess() { return this.success; } - public void setSuccess(Index success) { + public void setSuccess(ColumnStatistics success) { this.success = success; } @@ -57559,11 +64342,11 @@ public class ThriftHiveMetastore { } } - public MetaException getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -57582,11 +64365,11 @@ public class ThriftHiveMetastore { } } - public NoSuchObjectException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(NoSuchObjectException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -57605,13 +64388,59 @@ public class ThriftHiveMetastore { } } + public InvalidInputException getO3() { + return this.o3; + } + + public void setO3(InvalidInputException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidObjectException getO4() { + return this.o4; + } + + public void setO4(InvalidObjectException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Index)value); + setSuccess((ColumnStatistics)value); } break; @@ -57619,7 +64448,7 @@ public class ThriftHiveMetastore { if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); } break; @@ -57627,7 +64456,23 @@ public class ThriftHiveMetastore { if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((MetaException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidInputException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidObjectException)value); } break; @@ -57645,6 +64490,12 @@ public class ThriftHiveMetastore { case O2: return getO2(); + case O3: + return getO3(); + + case O4: + return getO4(); + } throw new IllegalStateException(); } @@ -57662,6 +64513,10 @@ public class ThriftHiveMetastore { return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); } throw new IllegalStateException(); } @@ -57670,12 +64525,12 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_by_name_result) - return this.equals((get_index_by_name_result)that); + if (that instanceof get_partition_column_statistics_result) + return this.equals((get_partition_column_statistics_result)that); return false; } - public boolean equals(get_index_by_name_result that) { + public boolean equals(get_partition_column_statistics_result that) { if (that == null) return false; @@ -57706,6 +64561,24 @@ public class ThriftHiveMetastore { return false; } + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + return true; } @@ -57728,16 +64601,26 @@ public class ThriftHiveMetastore { if (present_o2) builder.append(o2); + boolean present_o3 = true && (isSetO3()); + builder.append(present_o3); + if (present_o3) + builder.append(o3); + + boolean present_o4 = true && (isSetO4()); + builder.append(present_o4); + if (present_o4) + builder.append(o4); + return builder.toHashCode(); } - public int compareTo(get_index_by_name_result other) { + public int compareTo(get_partition_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_index_by_name_result typedOther = (get_index_by_name_result)other; + get_partition_column_statistics_result typedOther = (get_partition_column_statistics_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -57769,6 +64652,26 @@ public class ThriftHiveMetastore { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -57788,7 +64691,7 @@ public class ThriftHiveMetastore { switch (field.id) { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.success = new Index(); + this.success = new ColumnStatistics(); this.success.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); @@ -57796,7 +64699,7 @@ public class ThriftHiveMetastore { break; case 1: // O1 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o1 = new MetaException(); + this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); @@ -57804,12 +64707,28 @@ public class ThriftHiveMetastore { break; case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + this.o2 = new MetaException(); this.o2.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; + case 3: // O3 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o3 = new InvalidInputException(); + this.o3.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // O4 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o4 = new InvalidObjectException(); + this.o4.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -57834,6 +64753,14 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO4()) { + oprot.writeFieldBegin(O4_FIELD_DESC); + this.o4.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -57841,7 +64768,7 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_result("); + StringBuilder sb = new StringBuilder("get_partition_column_statistics_result("); boolean first = true; sb.append("success:"); @@ -57867,6 +64794,22 @@ public class ThriftHiveMetastore { sb.append(this.o2); } first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; sb.append(")"); return sb.toString(); } @@ -57893,22 +64836,25 @@ public class ThriftHiveMetastore { } - public static class get_indexes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_args"); + public static class delete_partition_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_partition_column_statistics_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); + private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("part_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)4); private String db_name; // required private String tbl_name; // required - private short max_indexes; // required + private String part_name; // required + private String col_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - MAX_INDEXES((short)3, "max_indexes"); + PART_NAME((short)3, "part_name"), + COL_NAME((short)4, "col_name"); private static final Map byName = new HashMap(); @@ -57927,8 +64873,10 @@ public class ThriftHiveMetastore { return DB_NAME; case 2: // TBL_NAME return TBL_NAME; - case 3: // MAX_INDEXES - return MAX_INDEXES; + case 3: // PART_NAME + return PART_NAME; + case 4: // COL_NAME + return COL_NAME; default: return null; } @@ -57969,8 +64917,6 @@ public class ThriftHiveMetastore { } // isset id assignments - private static final int __MAX_INDEXES_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { @@ -57979,54 +64925,58 @@ public class ThriftHiveMetastore { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("part_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_partition_column_statistics_args.class, metaDataMap); } - public get_indexes_args() { - this.max_indexes = (short)-1; - + public delete_partition_column_statistics_args() { } - public get_indexes_args( + public delete_partition_column_statistics_args( String db_name, String tbl_name, - short max_indexes) + String part_name, + String col_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + this.part_name = part_name; + this.col_name = col_name; } /** * Performs a deep copy on other. */ - public get_indexes_args(get_indexes_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + public delete_partition_column_statistics_args(delete_partition_column_statistics_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } - this.max_indexes = other.max_indexes; + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetCol_name()) { + this.col_name = other.col_name; + } } - public get_indexes_args deepCopy() { - return new get_indexes_args(this); + public delete_partition_column_statistics_args deepCopy() { + return new delete_partition_column_statistics_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; - this.max_indexes = (short)-1; - + this.part_name = null; + this.col_name = null; } public String getDb_name() { @@ -58075,26 +65025,50 @@ public class ThriftHiveMetastore { } } - public short getMax_indexes() { - return this.max_indexes; + public String getPart_name() { + return this.part_name; } - public void setMax_indexes(short max_indexes) { - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetMax_indexes() { - __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + public void unsetPart_name() { + this.part_name = null; } - /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ - public boolean isSetMax_indexes() { - return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + /** Returns true if field part_name is set (has been assigned a value) and false otherwise */ + public boolean isSetPart_name() { + return this.part_name != null; } - public void setMax_indexesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public String getCol_name() { + return this.col_name; + } + + public void setCol_name(String col_name) { + this.col_name = col_name; + } + + public void unsetCol_name() { + this.col_name = null; + } + + /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCol_name() { + return this.col_name != null; + } + + public void setCol_nameIsSet(boolean value) { + if (!value) { + this.col_name = null; + } } public void setFieldValue(_Fields field, Object value) { @@ -58115,11 +65089,19 @@ public class ThriftHiveMetastore { } break; - case MAX_INDEXES: + case PART_NAME: if (value == null) { - unsetMax_indexes(); + unsetPart_name(); } else { - setMax_indexes((Short)value); + setPart_name((String)value); + } + break; + + case COL_NAME: + if (value == null) { + unsetCol_name(); + } else { + setCol_name((String)value); } break; @@ -58134,8 +65116,11 @@ public class ThriftHiveMetastore { case TBL_NAME: return getTbl_name(); - case MAX_INDEXES: - return Short.valueOf(getMax_indexes()); + case PART_NAME: + return getPart_name(); + + case COL_NAME: + return getCol_name(); } throw new IllegalStateException(); @@ -58152,8 +65137,10 @@ public class ThriftHiveMetastore { return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); + case PART_NAME: + return isSetPart_name(); + case COL_NAME: + return isSetCol_name(); } throw new IllegalStateException(); } @@ -58162,12 +65149,12 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_indexes_args) - return this.equals((get_indexes_args)that); + if (that instanceof delete_partition_column_statistics_args) + return this.equals((delete_partition_column_statistics_args)that); return false; } - public boolean equals(get_indexes_args that) { + public boolean equals(delete_partition_column_statistics_args that) { if (that == null) return false; @@ -58189,12 +65176,21 @@ public class ThriftHiveMetastore { return false; } - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) return false; - if (this.max_indexes != that.max_indexes) + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_col_name = true && this.isSetCol_name(); + boolean that_present_col_name = true && that.isSetCol_name(); + if (this_present_col_name || that_present_col_name) { + if (!(this_present_col_name && that_present_col_name)) + return false; + if (!this.col_name.equals(that.col_name)) return false; } @@ -58215,21 +65211,26 @@ public class ThriftHiveMetastore { if (present_tbl_name) builder.append(tbl_name); - boolean present_max_indexes = true; - builder.append(present_max_indexes); - if (present_max_indexes) - builder.append(max_indexes); + boolean present_part_name = true && (isSetPart_name()); + builder.append(present_part_name); + if (present_part_name) + builder.append(part_name); + + boolean present_col_name = true && (isSetCol_name()); + builder.append(present_col_name); + if (present_col_name) + builder.append(col_name); return builder.toHashCode(); } - public int compareTo(get_indexes_args other) { + public int compareTo(delete_partition_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_indexes_args typedOther = (get_indexes_args)other; + delete_partition_column_statistics_args typedOther = (delete_partition_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -58251,12 +65252,22 @@ public class ThriftHiveMetastore { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_indexes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (isSetPart_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(typedOther.isSetCol_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCol_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, typedOther.col_name); if (lastComparison != 0) { return lastComparison; } @@ -58292,10 +65303,16 @@ public class ThriftHiveMetastore { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; - case 3: // MAX_INDEXES - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); + case 3: // PART_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.part_name = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // COL_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.col_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -58323,16 +65340,23 @@ public class ThriftHiveMetastore { oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + if (this.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(this.col_name); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_args("); + StringBuilder sb = new StringBuilder("delete_partition_column_statistics_args("); boolean first = true; sb.append("db_name:"); @@ -58351,8 +65375,20 @@ public class ThriftHiveMetastore { } first = false; if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("col_name:"); + if (this.col_name == null) { + sb.append("null"); + } else { + sb.append(this.col_name); + } first = false; sb.append(")"); return sb.toString(); @@ -58372,8 +65408,6 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -58382,22 +65416,28 @@ public class ThriftHiveMetastore { } - public static class get_indexes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_indexes_result"); + public static class delete_partition_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_partition_column_statistics_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private List success; // required + private boolean success; // required private NoSuchObjectException o1; // required private MetaException o2; // required + private InvalidObjectException o3; // required + private InvalidInputException o4; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), O1((short)1, "o1"), - O2((short)2, "o2"); + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); private static final Map byName = new HashMap(); @@ -58418,6 +65458,10 @@ public class ThriftHiveMetastore { return O1; case 2: // O2 return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; default: return null; } @@ -58458,101 +65502,100 @@ public class ThriftHiveMetastore { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Index.class)))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_partition_column_statistics_result.class, metaDataMap); } - public get_indexes_result() { + public delete_partition_column_statistics_result() { } - public get_indexes_result( - List success, + public delete_partition_column_statistics_result( + boolean success, NoSuchObjectException o1, - MetaException o2) + MetaException o2, + InvalidObjectException o3, + InvalidInputException o4) { this(); this.success = success; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; + this.o3 = o3; + this.o4 = o4; } /** * Performs a deep copy on other. */ - public get_indexes_result(get_indexes_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Index other_element : other.success) { - __this__success.add(new Index(other_element)); - } - this.success = __this__success; - } + public delete_partition_column_statistics_result(delete_partition_column_statistics_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; if (other.isSetO1()) { this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } + if (other.isSetO3()) { + this.o3 = new InvalidObjectException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } } - public get_indexes_result deepCopy() { - return new get_indexes_result(this); + public delete_partition_column_statistics_result deepCopy() { + return new delete_partition_column_statistics_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; this.o1 = null; this.o2 = null; + this.o3 = null; + this.o4 = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Index elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(boolean success) { this.success = success; + setSuccessIsSet(true); } public void unsetSuccess() { - this.success = null; + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -58601,13 +65644,59 @@ public class ThriftHiveMetastore { } } + public InvalidObjectException getO3() { + return this.o3; + } + + public void setO3(InvalidObjectException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; @@ -58627,13 +65716,29 @@ public class ThriftHiveMetastore { } break; + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidObjectException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return Boolean.valueOf(isSuccess()); case O1: return getO1(); @@ -58641,6 +65746,12 @@ public class ThriftHiveMetastore { case O2: return getO2(); + case O3: + return getO3(); + + case O4: + return getO4(); + } throw new IllegalStateException(); } @@ -58658,6 +65769,10 @@ public class ThriftHiveMetastore { return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); } throw new IllegalStateException(); } @@ -58666,21 +65781,21 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_indexes_result) - return this.equals((get_indexes_result)that); + if (that instanceof delete_partition_column_statistics_result) + return this.equals((delete_partition_column_statistics_result)that); return false; } - public boolean equals(get_indexes_result that) { + public boolean equals(delete_partition_column_statistics_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) return false; } @@ -58702,6 +65817,24 @@ public class ThriftHiveMetastore { return false; } + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + return true; } @@ -58709,7 +65842,7 @@ public class ThriftHiveMetastore { public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); - boolean present_success = true && (isSetSuccess()); + boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); @@ -58724,16 +65857,26 @@ public class ThriftHiveMetastore { if (present_o2) builder.append(o2); + boolean present_o3 = true && (isSetO3()); + builder.append(present_o3); + if (present_o3) + builder.append(o3); + + boolean present_o4 = true && (isSetO4()); + builder.append(present_o4); + if (present_o4) + builder.append(o4); + return builder.toHashCode(); } - public int compareTo(get_indexes_result other) { + public int compareTo(delete_partition_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_indexes_result typedOther = (get_indexes_result)other; + delete_partition_column_statistics_result typedOther = (delete_partition_column_statistics_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -58765,6 +65908,26 @@ public class ThriftHiveMetastore { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -58783,19 +65946,9 @@ public class ThriftHiveMetastore { } switch (field.id) { case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list272 = iprot.readListBegin(); - this.success = new ArrayList(_list272.size); - for (int _i273 = 0; _i273 < _list272.size; ++_i273) - { - Index _elem274; // required - _elem274 = new Index(); - _elem274.read(iprot); - this.success.add(_elem274); - } - iprot.readListEnd(); - } + if (field.type == org.apache.thrift.protocol.TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -58816,6 +65969,22 @@ public class ThriftHiveMetastore { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; + case 3: // O3 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o3 = new InvalidObjectException(); + this.o3.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // O4 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o4 = new InvalidInputException(); + this.o4.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -58830,14 +65999,7 @@ public class ThriftHiveMetastore { if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Index _iter275 : this.success) - { - _iter275.write(oprot); - } - oprot.writeListEnd(); - } + oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -58847,6 +66009,14 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO4()) { + oprot.writeFieldBegin(O4_FIELD_DESC); + this.o4.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -58854,15 +66024,11 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_result("); + StringBuilder sb = new StringBuilder("delete_partition_column_statistics_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -58880,6 +66046,22 @@ public class ThriftHiveMetastore { sb.append(this.o2); } first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; sb.append(")"); return sb.toString(); } @@ -58898,6 +66080,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -58906,22 +66090,22 @@ public class ThriftHiveMetastore { } - public static class get_index_names_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_args"); + public static class delete_table_column_statistics_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_table_column_statistics_args"); private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("db_name", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MAX_INDEXES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_indexes", org.apache.thrift.protocol.TType.I16, (short)3); + private static final org.apache.thrift.protocol.TField COL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("col_name", org.apache.thrift.protocol.TType.STRING, (short)3); private String db_name; // required private String tbl_name; // required - private short max_indexes; // required + private String col_name; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { DB_NAME((short)1, "db_name"), TBL_NAME((short)2, "tbl_name"), - MAX_INDEXES((short)3, "max_indexes"); + COL_NAME((short)3, "col_name"); private static final Map byName = new HashMap(); @@ -58940,8 +66124,8 @@ public class ThriftHiveMetastore { return DB_NAME; case 2: // TBL_NAME return TBL_NAME; - case 3: // MAX_INDEXES - return MAX_INDEXES; + case 3: // COL_NAME + return COL_NAME; default: return null; } @@ -58982,8 +66166,6 @@ public class ThriftHiveMetastore { } // isset id assignments - private static final int __MAX_INDEXES_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { @@ -58992,54 +66174,50 @@ public class ThriftHiveMetastore { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_INDEXES, new org.apache.thrift.meta_data.FieldMetaData("max_indexes", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); + tmpMap.put(_Fields.COL_NAME, new org.apache.thrift.meta_data.FieldMetaData("col_name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_table_column_statistics_args.class, metaDataMap); } - public get_index_names_args() { - this.max_indexes = (short)-1; - + public delete_table_column_statistics_args() { } - public get_index_names_args( + public delete_table_column_statistics_args( String db_name, String tbl_name, - short max_indexes) + String col_name) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + this.col_name = col_name; } /** * Performs a deep copy on other. */ - public get_index_names_args(get_index_names_args other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); + public delete_table_column_statistics_args(delete_table_column_statistics_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } if (other.isSetTbl_name()) { this.tbl_name = other.tbl_name; } - this.max_indexes = other.max_indexes; + if (other.isSetCol_name()) { + this.col_name = other.col_name; + } } - public get_index_names_args deepCopy() { - return new get_index_names_args(this); + public delete_table_column_statistics_args deepCopy() { + return new delete_table_column_statistics_args(this); } @Override public void clear() { this.db_name = null; this.tbl_name = null; - this.max_indexes = (short)-1; - + this.col_name = null; } public String getDb_name() { @@ -59088,26 +66266,27 @@ public class ThriftHiveMetastore { } } - public short getMax_indexes() { - return this.max_indexes; + public String getCol_name() { + return this.col_name; } - public void setMax_indexes(short max_indexes) { - this.max_indexes = max_indexes; - setMax_indexesIsSet(true); + public void setCol_name(String col_name) { + this.col_name = col_name; } - public void unsetMax_indexes() { - __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); + public void unsetCol_name() { + this.col_name = null; } - /** Returns true if field max_indexes is set (has been assigned a value) and false otherwise */ - public boolean isSetMax_indexes() { - return __isset_bit_vector.get(__MAX_INDEXES_ISSET_ID); + /** Returns true if field col_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCol_name() { + return this.col_name != null; } - public void setMax_indexesIsSet(boolean value) { - __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + public void setCol_nameIsSet(boolean value) { + if (!value) { + this.col_name = null; + } } public void setFieldValue(_Fields field, Object value) { @@ -59128,11 +66307,11 @@ public class ThriftHiveMetastore { } break; - case MAX_INDEXES: + case COL_NAME: if (value == null) { - unsetMax_indexes(); + unsetCol_name(); } else { - setMax_indexes((Short)value); + setCol_name((String)value); } break; @@ -59147,8 +66326,8 @@ public class ThriftHiveMetastore { case TBL_NAME: return getTbl_name(); - case MAX_INDEXES: - return Short.valueOf(getMax_indexes()); + case COL_NAME: + return getCol_name(); } throw new IllegalStateException(); @@ -59165,8 +66344,8 @@ public class ThriftHiveMetastore { return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); + case COL_NAME: + return isSetCol_name(); } throw new IllegalStateException(); } @@ -59175,12 +66354,12 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_names_args) - return this.equals((get_index_names_args)that); + if (that instanceof delete_table_column_statistics_args) + return this.equals((delete_table_column_statistics_args)that); return false; } - public boolean equals(get_index_names_args that) { + public boolean equals(delete_table_column_statistics_args that) { if (that == null) return false; @@ -59202,12 +66381,12 @@ public class ThriftHiveMetastore { return false; } - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) + boolean this_present_col_name = true && this.isSetCol_name(); + boolean that_present_col_name = true && that.isSetCol_name(); + if (this_present_col_name || that_present_col_name) { + if (!(this_present_col_name && that_present_col_name)) return false; - if (this.max_indexes != that.max_indexes) + if (!this.col_name.equals(that.col_name)) return false; } @@ -59228,21 +66407,21 @@ public class ThriftHiveMetastore { if (present_tbl_name) builder.append(tbl_name); - boolean present_max_indexes = true; - builder.append(present_max_indexes); - if (present_max_indexes) - builder.append(max_indexes); + boolean present_col_name = true && (isSetCol_name()); + builder.append(present_col_name); + if (present_col_name) + builder.append(col_name); return builder.toHashCode(); } - public int compareTo(get_index_names_args other) { + public int compareTo(delete_table_column_statistics_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_index_names_args typedOther = (get_index_names_args)other; + delete_table_column_statistics_args typedOther = (delete_table_column_statistics_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -59264,12 +66443,12 @@ public class ThriftHiveMetastore { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMax_indexes()).compareTo(typedOther.isSetMax_indexes()); + lastComparison = Boolean.valueOf(isSetCol_name()).compareTo(typedOther.isSetCol_name()); if (lastComparison != 0) { return lastComparison; } - if (isSetMax_indexes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_indexes, typedOther.max_indexes); + if (isSetCol_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.col_name, typedOther.col_name); if (lastComparison != 0) { return lastComparison; } @@ -59305,10 +66484,9 @@ public class ThriftHiveMetastore { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; - case 3: // MAX_INDEXES - if (field.type == org.apache.thrift.protocol.TType.I16) { - this.max_indexes = iprot.readI16(); - setMax_indexesIsSet(true); + case 3: // COL_NAME + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.col_name = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -59336,16 +66514,18 @@ public class ThriftHiveMetastore { oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); + if (this.col_name != null) { + oprot.writeFieldBegin(COL_NAME_FIELD_DESC); + oprot.writeString(this.col_name); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_args("); + StringBuilder sb = new StringBuilder("delete_table_column_statistics_args("); boolean first = true; sb.append("db_name:"); @@ -59364,8 +66544,12 @@ public class ThriftHiveMetastore { } first = false; if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); + sb.append("col_name:"); + if (this.col_name == null) { + sb.append("null"); + } else { + sb.append(this.col_name); + } first = false; sb.append(")"); return sb.toString(); @@ -59385,8 +66569,6 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -59395,19 +66577,28 @@ public class ThriftHiveMetastore { } - public static class get_index_names_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_index_names_result"); + public static class delete_table_column_statistics_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("delete_table_column_statistics_result"); - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField O1_FIELD_DESC = new org.apache.thrift.protocol.TField("o1", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField O2_FIELD_DESC = new org.apache.thrift.protocol.TField("o2", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField O3_FIELD_DESC = new org.apache.thrift.protocol.TField("o3", org.apache.thrift.protocol.TType.STRUCT, (short)3); + private static final org.apache.thrift.protocol.TField O4_FIELD_DESC = new org.apache.thrift.protocol.TField("o4", org.apache.thrift.protocol.TType.STRUCT, (short)4); - private List success; // required + private boolean success; // required + private NoSuchObjectException o1; // required private MetaException o2; // required + private InvalidObjectException o3; // required + private InvalidInputException o4; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"), - O2((short)1, "o2"); + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"), + O4((short)4, "o4"); private static final Map byName = new HashMap(); @@ -59424,8 +66615,14 @@ public class ThriftHiveMetastore { switch(fieldId) { case 0: // SUCCESS return SUCCESS; - case 1: // O2 + case 1: // O1 + return O1; + case 2: // O2 return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; default: return null; } @@ -59466,92 +66663,122 @@ public class ThriftHiveMetastore { } // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(delete_table_column_statistics_result.class, metaDataMap); } - public get_index_names_result() { + public delete_table_column_statistics_result() { } - public get_index_names_result( - List success, - MetaException o2) + public delete_table_column_statistics_result( + boolean success, + NoSuchObjectException o1, + MetaException o2, + InvalidObjectException o3, + InvalidInputException o4) { this(); this.success = success; + setSuccessIsSet(true); + this.o1 = o1; this.o2 = o2; + this.o3 = o3; + this.o4 = o4; } /** * Performs a deep copy on other. */ - public get_index_names_result(get_index_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; + public delete_table_column_statistics_result(delete_table_column_statistics_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); } + if (other.isSetO3()) { + this.o3 = new InvalidObjectException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new InvalidInputException(other.o4); + } } - public get_index_names_result deepCopy() { - return new get_index_names_result(this); + public delete_table_column_statistics_result deepCopy() { + return new delete_table_column_statistics_result(this); } @Override public void clear() { - this.success = null; + setSuccessIsSet(false); + this.success = false; + this.o1 = null; this.o2 = null; + this.o3 = null; + this.o4 = null; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(boolean success) { this.success = success; + setSuccessIsSet(true); } public void unsetSuccess() { - this.success = null; + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.success != null; + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public NoSuchObjectException getO1() { + return this.o1; + } + + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + /** Returns true if field o1 is set (has been assigned a value) and false otherwise */ + public boolean isSetO1() { + return this.o1 != null; + } + + public void setO1IsSet(boolean value) { if (!value) { - this.success = null; + this.o1 = null; } } @@ -59578,13 +66805,67 @@ public class ThriftHiveMetastore { } } + public InvalidObjectException getO3() { + return this.o3; + } + + public void setO3(InvalidObjectException o3) { + this.o3 = o3; + } + + public void unsetO3() { + this.o3 = null; + } + + /** Returns true if field o3 is set (has been assigned a value) and false otherwise */ + public boolean isSetO3() { + return this.o3 != null; + } + + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public InvalidInputException getO4() { + return this.o4; + } + + public void setO4(InvalidInputException o4) { + this.o4 = o4; + } + + public void unsetO4() { + this.o4 = null; + } + + /** Returns true if field o4 is set (has been assigned a value) and false otherwise */ + public boolean isSetO4() { + return this.o4 != null; + } + + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); } break; @@ -59596,17 +66877,42 @@ public class ThriftHiveMetastore { } break; + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((InvalidObjectException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((InvalidInputException)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: - return getSuccess(); + return Boolean.valueOf(isSuccess()); + + case O1: + return getO1(); case O2: return getO2(); + case O3: + return getO3(); + + case O4: + return getO4(); + } throw new IllegalStateException(); } @@ -59620,8 +66926,14 @@ public class ThriftHiveMetastore { switch (field) { case SUCCESS: return isSetSuccess(); + case O1: + return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); } throw new IllegalStateException(); } @@ -59630,21 +66942,30 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_names_result) - return this.equals((get_index_names_result)that); + if (that instanceof delete_table_column_statistics_result) + return this.equals((delete_table_column_statistics_result)that); return false; } - public boolean equals(get_index_names_result that) { + public boolean equals(delete_table_column_statistics_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) return false; } @@ -59657,6 +66978,24 @@ public class ThriftHiveMetastore { return false; } + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + return true; } @@ -59664,26 +67003,41 @@ public class ThriftHiveMetastore { public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); - boolean present_success = true && (isSetSuccess()); + boolean present_success = true; builder.append(present_success); if (present_success) builder.append(success); + boolean present_o1 = true && (isSetO1()); + builder.append(present_o1); + if (present_o1) + builder.append(o1); + boolean present_o2 = true && (isSetO2()); builder.append(present_o2); if (present_o2) builder.append(o2); + boolean present_o3 = true && (isSetO3()); + builder.append(present_o3); + if (present_o3) + builder.append(o3); + + boolean present_o4 = true && (isSetO4()); + builder.append(present_o4); + if (present_o4) + builder.append(o4); + return builder.toHashCode(); } - public int compareTo(get_index_names_result other) { + public int compareTo(delete_table_column_statistics_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - get_index_names_result typedOther = (get_index_names_result)other; + delete_table_column_statistics_result typedOther = (delete_table_column_statistics_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -59695,6 +67049,16 @@ public class ThriftHiveMetastore { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetO2()).compareTo(typedOther.isSetO2()); if (lastComparison != 0) { return lastComparison; @@ -59705,6 +67069,26 @@ public class ThriftHiveMetastore { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO4()).compareTo(typedOther.isSetO4()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO4()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o4, typedOther.o4); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -59723,23 +67107,22 @@ public class ThriftHiveMetastore { } switch (field.id) { case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list276 = iprot.readListBegin(); - this.success = new ArrayList(_list276.size); - for (int _i277 = 0; _i277 < _list276.size; ++_i277) - { - String _elem278; // required - _elem278 = iprot.readString(); - this.success.add(_elem278); - } - iprot.readListEnd(); - } + if (field.type == org.apache.thrift.protocol.TType.BOOL) { + this.success = iprot.readBool(); + setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; - case 1: // O2 + case 1: // O1 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // O2 if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -59747,6 +67130,22 @@ public class ThriftHiveMetastore { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; + case 3: // O3 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o3 = new InvalidObjectException(); + this.o3.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // O4 + if (field.type == org.apache.thrift.protocol.TType.STRUCT) { + this.o4 = new InvalidInputException(); + this.o4.read(iprot); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } @@ -59761,19 +67160,24 @@ public class ThriftHiveMetastore { if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter279 : this.success) - { - oprot.writeString(_iter279); - } - oprot.writeListEnd(); - } + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO4()) { + oprot.writeFieldBegin(O4_FIELD_DESC); + this.o4.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -59781,14 +67185,18 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_result("); + StringBuilder sb = new StringBuilder("delete_table_column_statistics_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.o1); } first = false; if (!first) sb.append(", "); @@ -59799,6 +67207,22 @@ public class ThriftHiveMetastore { sb.append(this.o2); } first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; sb.append(")"); return sb.toString(); } @@ -59817,6 +67241,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -60512,6 +67938,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -61206,6 +68634,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -61746,13 +69176,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list280 = iprot.readListBegin(); - this.success = new ArrayList(_list280.size); - for (int _i281 = 0; _i281 < _list280.size; ++_i281) + org.apache.thrift.protocol.TList _list284 = iprot.readListBegin(); + this.success = new ArrayList(_list284.size); + for (int _i285 = 0; _i285 < _list284.size; ++_i285) { - String _elem282; // required - _elem282 = iprot.readString(); - this.success.add(_elem282); + String _elem286; // required + _elem286 = iprot.readString(); + this.success.add(_elem286); } iprot.readListEnd(); } @@ -61784,9 +69214,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter283 : this.success) + for (String _iter287 : this.success) { - oprot.writeString(_iter283); + oprot.writeString(_iter287); } oprot.writeListEnd(); } @@ -63021,6 +70451,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -63913,6 +71345,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -64657,14 +72091,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list284 = iprot.readListBegin(); - this.success = new ArrayList(_list284.size); - for (int _i285 = 0; _i285 < _list284.size; ++_i285) + org.apache.thrift.protocol.TList _list288 = iprot.readListBegin(); + this.success = new ArrayList(_list288.size); + for (int _i289 = 0; _i289 < _list288.size; ++_i289) { - Role _elem286; // required - _elem286 = new Role(); - _elem286.read(iprot); - this.success.add(_elem286); + Role _elem290; // required + _elem290 = new Role(); + _elem290.read(iprot); + this.success.add(_elem290); } iprot.readListEnd(); } @@ -64696,9 +72130,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (Role _iter287 : this.success) + for (Role _iter291 : this.success) { - _iter287.write(oprot); + _iter291.write(oprot); } oprot.writeListEnd(); } @@ -65176,13 +72610,13 @@ public class ThriftHiveMetastore { case 3: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list288 = iprot.readListBegin(); - this.group_names = new ArrayList(_list288.size); - for (int _i289 = 0; _i289 < _list288.size; ++_i289) + org.apache.thrift.protocol.TList _list292 = iprot.readListBegin(); + this.group_names = new ArrayList(_list292.size); + for (int _i293 = 0; _i293 < _list292.size; ++_i293) { - String _elem290; // required - _elem290 = iprot.readString(); - this.group_names.add(_elem290); + String _elem294; // required + _elem294 = iprot.readString(); + this.group_names.add(_elem294); } iprot.readListEnd(); } @@ -65217,9 +72651,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter291 : this.group_names) + for (String _iter295 : this.group_names) { - oprot.writeString(_iter291); + oprot.writeString(_iter295); } oprot.writeListEnd(); } @@ -66507,14 +73941,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list292 = iprot.readListBegin(); - this.success = new ArrayList(_list292.size); - for (int _i293 = 0; _i293 < _list292.size; ++_i293) + org.apache.thrift.protocol.TList _list296 = iprot.readListBegin(); + this.success = new ArrayList(_list296.size); + for (int _i297 = 0; _i297 < _list296.size; ++_i297) { - HiveObjectPrivilege _elem294; // required - _elem294 = new HiveObjectPrivilege(); - _elem294.read(iprot); - this.success.add(_elem294); + HiveObjectPrivilege _elem298; // required + _elem298 = new HiveObjectPrivilege(); + _elem298.read(iprot); + this.success.add(_elem298); } iprot.readListEnd(); } @@ -66546,9 +73980,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size())); - for (HiveObjectPrivilege _iter295 : this.success) + for (HiveObjectPrivilege _iter299 : this.success) { - _iter295.write(oprot); + _iter299.write(oprot); } oprot.writeListEnd(); } @@ -67295,6 +74729,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -67990,6 +75426,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); @@ -68335,13 +75773,13 @@ public class ThriftHiveMetastore { case 2: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list296 = iprot.readListBegin(); - this.group_names = new ArrayList(_list296.size); - for (int _i297 = 0; _i297 < _list296.size; ++_i297) + org.apache.thrift.protocol.TList _list300 = iprot.readListBegin(); + this.group_names = new ArrayList(_list300.size); + for (int _i301 = 0; _i301 < _list300.size; ++_i301) { - String _elem298; // required - _elem298 = iprot.readString(); - this.group_names.add(_elem298); + String _elem302; // required + _elem302 = iprot.readString(); + this.group_names.add(_elem302); } iprot.readListEnd(); } @@ -68371,9 +75809,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.group_names.size())); - for (String _iter299 : this.group_names) + for (String _iter303 : this.group_names) { - oprot.writeString(_iter299); + oprot.writeString(_iter303); } oprot.writeListEnd(); } @@ -68759,13 +76197,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list300 = iprot.readListBegin(); - this.success = new ArrayList(_list300.size); - for (int _i301 = 0; _i301 < _list300.size; ++_i301) + org.apache.thrift.protocol.TList _list304 = iprot.readListBegin(); + this.success = new ArrayList(_list304.size); + for (int _i305 = 0; _i305 < _list304.size; ++_i305) { - String _elem302; // required - _elem302 = iprot.readString(); - this.success.add(_elem302); + String _elem306; // required + _elem306 = iprot.readString(); + this.success.add(_elem306); } iprot.readListEnd(); } @@ -68797,9 +76235,9 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size())); - for (String _iter303 : this.success) + for (String _iter307 : this.success) { - oprot.writeString(_iter303); + oprot.writeString(_iter307); } oprot.writeListEnd(); } @@ -70332,6 +77770,8 @@ public class ThriftHiveMetastore { private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); diff --git metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php index 8969596..ae0a5fc 100644 --- metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php +++ metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php @@ -65,6 +65,12 @@ interface ThriftHiveMetastoreIf extends FacebookServiceIf { public function get_index_by_name($db_name, $tbl_name, $index_name); public function get_indexes($db_name, $tbl_name, $max_indexes); public function get_index_names($db_name, $tbl_name, $max_indexes); + public function update_table_column_statistics($stats_obj); + public function update_partition_column_statistics($stats_obj); + public function get_table_column_statistics($db_name, $tbl_name, $col_name); + public function get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); + public function delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); + public function delete_table_column_statistics($db_name, $tbl_name, $col_name); public function create_role($role); public function drop_role($role_name); public function get_role_names(); @@ -3314,34 +3320,34 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH throw new Exception("get_index_names failed: unknown result"); } - public function create_role($role) + public function update_table_column_statistics($stats_obj) { - $this->send_create_role($role); - return $this->recv_create_role(); + $this->send_update_table_column_statistics($stats_obj); + return $this->recv_update_table_column_statistics(); } - public function send_create_role($role) + public function send_update_table_column_statistics($stats_obj) { - $args = new ThriftHiveMetastore_create_role_args(); - $args->role = $role; + $args = new ThriftHiveMetastore_update_table_column_statistics_args(); + $args->stats_obj = $stats_obj; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'create_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'update_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('update_table_column_statistics', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_create_role() + public function recv_update_table_column_statistics() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_create_role_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_update_table_column_statistics_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3355,7 +3361,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_create_role_result(); + $result = new ThriftHiveMetastore_update_table_column_statistics_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3365,37 +3371,46 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("create_role failed: unknown result"); + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new Exception("update_table_column_statistics failed: unknown result"); } - public function drop_role($role_name) + public function update_partition_column_statistics($stats_obj) { - $this->send_drop_role($role_name); - return $this->recv_drop_role(); + $this->send_update_partition_column_statistics($stats_obj); + return $this->recv_update_partition_column_statistics(); } - public function send_drop_role($role_name) + public function send_update_partition_column_statistics($stats_obj) { - $args = new ThriftHiveMetastore_drop_role_args(); - $args->role_name = $role_name; + $args = new ThriftHiveMetastore_update_partition_column_statistics_args(); + $args->stats_obj = $stats_obj; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'update_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('update_partition_column_statistics', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_drop_role() + public function recv_update_partition_column_statistics() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_drop_role_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_update_partition_column_statistics_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3409,7 +3424,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_drop_role_result(); + $result = new ThriftHiveMetastore_update_partition_column_statistics_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3419,36 +3434,48 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("drop_role failed: unknown result"); + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new Exception("update_partition_column_statistics failed: unknown result"); } - public function get_role_names() + public function get_table_column_statistics($db_name, $tbl_name, $col_name) { - $this->send_get_role_names(); - return $this->recv_get_role_names(); + $this->send_get_table_column_statistics($db_name, $tbl_name, $col_name); + return $this->recv_get_table_column_statistics(); } - public function send_get_role_names() + public function send_get_table_column_statistics($db_name, $tbl_name, $col_name) { - $args = new ThriftHiveMetastore_get_role_names_args(); + $args = new ThriftHiveMetastore_get_table_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->col_name = $col_name; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'get_role_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_role_names', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_table_column_statistics', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_role_names() + public function recv_get_table_column_statistics() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_role_names_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_table_column_statistics_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3462,7 +3489,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_get_role_names_result(); + $result = new ThriftHiveMetastore_get_table_column_statistics_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3472,42 +3499,49 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("get_role_names failed: unknown result"); + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new Exception("get_table_column_statistics failed: unknown result"); } - public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + public function get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) { - $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option); - return $this->recv_grant_role(); + $this->send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); + return $this->recv_get_partition_column_statistics(); } - public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + public function send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) { - $args = new ThriftHiveMetastore_grant_role_args(); - $args->role_name = $role_name; - $args->principal_name = $principal_name; - $args->principal_type = $principal_type; - $args->grantor = $grantor; - $args->grantorType = $grantorType; - $args->grant_option = $grant_option; + $args = new ThriftHiveMetastore_get_partition_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->col_name = $col_name; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'grant_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_partition_column_statistics', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_grant_role() + public function recv_get_partition_column_statistics() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_grant_role_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_partition_column_statistics_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3521,7 +3555,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_grant_role_result(); + $result = new ThriftHiveMetastore_get_partition_column_statistics_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3531,39 +3565,49 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("grant_role failed: unknown result"); + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new Exception("get_partition_column_statistics failed: unknown result"); } - public function revoke_role($role_name, $principal_name, $principal_type) + public function delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) { - $this->send_revoke_role($role_name, $principal_name, $principal_type); - return $this->recv_revoke_role(); + $this->send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name); + return $this->recv_delete_partition_column_statistics(); } - public function send_revoke_role($role_name, $principal_name, $principal_type) + public function send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name) { - $args = new ThriftHiveMetastore_revoke_role_args(); - $args->role_name = $role_name; - $args->principal_name = $principal_name; - $args->principal_type = $principal_type; + $args = new ThriftHiveMetastore_delete_partition_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->col_name = $col_name; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'delete_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('delete_partition_column_statistics', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_revoke_role() + public function recv_delete_partition_column_statistics() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_revoke_role_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_delete_partition_column_statistics_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3577,7 +3621,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_revoke_role_result(); + $result = new ThriftHiveMetastore_delete_partition_column_statistics_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3587,38 +3631,48 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("revoke_role failed: unknown result"); + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new Exception("delete_partition_column_statistics failed: unknown result"); } - public function list_roles($principal_name, $principal_type) + public function delete_table_column_statistics($db_name, $tbl_name, $col_name) { - $this->send_list_roles($principal_name, $principal_type); - return $this->recv_list_roles(); + $this->send_delete_table_column_statistics($db_name, $tbl_name, $col_name); + return $this->recv_delete_table_column_statistics(); } - public function send_list_roles($principal_name, $principal_type) + public function send_delete_table_column_statistics($db_name, $tbl_name, $col_name) { - $args = new ThriftHiveMetastore_list_roles_args(); - $args->principal_name = $principal_name; - $args->principal_type = $principal_type; + $args = new ThriftHiveMetastore_delete_table_column_statistics_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->col_name = $col_name; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'delete_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('delete_table_column_statistics', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_list_roles() + public function recv_delete_table_column_statistics() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_list_roles_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_delete_table_column_statistics_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3632,7 +3686,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_list_roles_result(); + $result = new ThriftHiveMetastore_delete_table_column_statistics_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3642,39 +3696,46 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("list_roles failed: unknown result"); + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + if ($result->o4 !== null) { + throw $result->o4; + } + throw new Exception("delete_table_column_statistics failed: unknown result"); } - public function get_privilege_set($hiveObject, $user_name, $group_names) + public function create_role($role) { - $this->send_get_privilege_set($hiveObject, $user_name, $group_names); - return $this->recv_get_privilege_set(); + $this->send_create_role($role); + return $this->recv_create_role(); } - public function send_get_privilege_set($hiveObject, $user_name, $group_names) + public function send_create_role($role) { - $args = new ThriftHiveMetastore_get_privilege_set_args(); - $args->hiveObject = $hiveObject; - $args->user_name = $user_name; - $args->group_names = $group_names; + $args = new ThriftHiveMetastore_create_role_args(); + $args->role = $role; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'get_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'create_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_privilege_set', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_privilege_set() + public function recv_create_role() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_privilege_set_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_create_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3688,7 +3749,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_get_privilege_set_result(); + $result = new ThriftHiveMetastore_create_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3698,39 +3759,37 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("get_privilege_set failed: unknown result"); + throw new Exception("create_role failed: unknown result"); } - public function list_privileges($principal_name, $principal_type, $hiveObject) + public function drop_role($role_name) { - $this->send_list_privileges($principal_name, $principal_type, $hiveObject); - return $this->recv_list_privileges(); + $this->send_drop_role($role_name); + return $this->recv_drop_role(); } - public function send_list_privileges($principal_name, $principal_type, $hiveObject) + public function send_drop_role($role_name) { - $args = new ThriftHiveMetastore_list_privileges_args(); - $args->principal_name = $principal_name; - $args->principal_type = $principal_type; - $args->hiveObject = $hiveObject; + $args = new ThriftHiveMetastore_drop_role_args(); + $args->role_name = $role_name; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'list_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('list_privileges', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_list_privileges() + public function recv_drop_role() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_list_privileges_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_drop_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3744,7 +3803,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_list_privileges_result(); + $result = new ThriftHiveMetastore_drop_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3754,37 +3813,36 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("list_privileges failed: unknown result"); + throw new Exception("drop_role failed: unknown result"); } - public function grant_privileges($privileges) + public function get_role_names() { - $this->send_grant_privileges($privileges); - return $this->recv_grant_privileges(); + $this->send_get_role_names(); + return $this->recv_get_role_names(); } - public function send_grant_privileges($privileges) + public function send_get_role_names() { - $args = new ThriftHiveMetastore_grant_privileges_args(); - $args->privileges = $privileges; + $args = new ThriftHiveMetastore_get_role_names_args(); $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'grant_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_role_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('grant_privileges', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_role_names', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_grant_privileges() + public function recv_get_role_names() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_grant_privileges_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_role_names_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3798,7 +3856,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_grant_privileges_result(); + $result = new ThriftHiveMetastore_get_role_names_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3808,37 +3866,42 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("grant_privileges failed: unknown result"); + throw new Exception("get_role_names failed: unknown result"); } - public function revoke_privileges($privileges) + public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) { - $this->send_revoke_privileges($privileges); - return $this->recv_revoke_privileges(); + $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option); + return $this->recv_grant_role(); } - public function send_revoke_privileges($privileges) + public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) { - $args = new ThriftHiveMetastore_revoke_privileges_args(); - $args->privileges = $privileges; + $args = new ThriftHiveMetastore_grant_role_args(); + $args->role_name = $role_name; + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $args->grantor = $grantor; + $args->grantorType = $grantorType; + $args->grant_option = $grant_option; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'grant_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_revoke_privileges() + public function recv_grant_role() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_revoke_privileges_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_grant_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3852,7 +3915,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_revoke_privileges_result(); + $result = new ThriftHiveMetastore_grant_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3862,38 +3925,150 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("revoke_privileges failed: unknown result"); + throw new Exception("grant_role failed: unknown result"); } - public function set_ugi($user_name, $group_names) + public function revoke_role($role_name, $principal_name, $principal_type) { - $this->send_set_ugi($user_name, $group_names); - return $this->recv_set_ugi(); + $this->send_revoke_role($role_name, $principal_name, $principal_type); + return $this->recv_revoke_role(); } - public function send_set_ugi($user_name, $group_names) + public function send_revoke_role($role_name, $principal_name, $principal_type) { - $args = new ThriftHiveMetastore_set_ugi_args(); + $args = new ThriftHiveMetastore_revoke_role_args(); + $args->role_name = $role_name; + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_revoke_role() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_revoke_role_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new ThriftHiveMetastore_revoke_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("revoke_role failed: unknown result"); + } + + public function list_roles($principal_name, $principal_type) + { + $this->send_list_roles($principal_name, $principal_type); + return $this->recv_list_roles(); + } + + public function send_list_roles($principal_name, $principal_type) + { + $args = new ThriftHiveMetastore_list_roles_args(); + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_roles() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_list_roles_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new ThriftHiveMetastore_list_roles_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("list_roles failed: unknown result"); + } + + public function get_privilege_set($hiveObject, $user_name, $group_names) + { + $this->send_get_privilege_set($hiveObject, $user_name, $group_names); + return $this->recv_get_privilege_set(); + } + + public function send_get_privilege_set($hiveObject, $user_name, $group_names) + { + $args = new ThriftHiveMetastore_get_privilege_set_args(); + $args->hiveObject = $hiveObject; $args->user_name = $user_name; $args->group_names = $group_names; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'set_ugi', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('set_ugi', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_privilege_set', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_set_ugi() + public function recv_get_privilege_set() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_set_ugi_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_privilege_set_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3907,7 +4082,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_set_ugi_result(); + $result = new ThriftHiveMetastore_get_privilege_set_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3917,38 +4092,39 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("set_ugi failed: unknown result"); + throw new Exception("get_privilege_set failed: unknown result"); } - public function get_delegation_token($token_owner, $renewer_kerberos_principal_name) + public function list_privileges($principal_name, $principal_type, $hiveObject) { - $this->send_get_delegation_token($token_owner, $renewer_kerberos_principal_name); - return $this->recv_get_delegation_token(); + $this->send_list_privileges($principal_name, $principal_type, $hiveObject); + return $this->recv_list_privileges(); } - public function send_get_delegation_token($token_owner, $renewer_kerberos_principal_name) + public function send_list_privileges($principal_name, $principal_type, $hiveObject) { - $args = new ThriftHiveMetastore_get_delegation_token_args(); - $args->token_owner = $token_owner; - $args->renewer_kerberos_principal_name = $renewer_kerberos_principal_name; + $args = new ThriftHiveMetastore_list_privileges_args(); + $args->principal_name = $principal_name; + $args->principal_type = $principal_type; + $args->hiveObject = $hiveObject; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'get_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'list_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_delegation_token', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('list_privileges', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_get_delegation_token() + public function recv_list_privileges() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_delegation_token_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_list_privileges_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3962,7 +4138,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_get_delegation_token_result(); + $result = new ThriftHiveMetastore_list_privileges_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3972,37 +4148,37 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("get_delegation_token failed: unknown result"); + throw new Exception("list_privileges failed: unknown result"); } - public function renew_delegation_token($token_str_form) + public function grant_privileges($privileges) { - $this->send_renew_delegation_token($token_str_form); - return $this->recv_renew_delegation_token(); + $this->send_grant_privileges($privileges); + return $this->recv_grant_privileges(); } - public function send_renew_delegation_token($token_str_form) + public function send_grant_privileges($privileges) { - $args = new ThriftHiveMetastore_renew_delegation_token_args(); - $args->token_str_form = $token_str_form; + $args = new ThriftHiveMetastore_grant_privileges_args(); + $args->privileges = $privileges; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'renew_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'grant_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('renew_delegation_token', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('grant_privileges', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_renew_delegation_token() + public function recv_grant_privileges() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_renew_delegation_token_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_grant_privileges_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4016,7 +4192,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_renew_delegation_token_result(); + $result = new ThriftHiveMetastore_grant_privileges_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -4026,37 +4202,92 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("renew_delegation_token failed: unknown result"); + throw new Exception("grant_privileges failed: unknown result"); } - public function cancel_delegation_token($token_str_form) + public function revoke_privileges($privileges) { - $this->send_cancel_delegation_token($token_str_form); - $this->recv_cancel_delegation_token(); + $this->send_revoke_privileges($privileges); + return $this->recv_revoke_privileges(); } - public function send_cancel_delegation_token($token_str_form) + public function send_revoke_privileges($privileges) { - $args = new ThriftHiveMetastore_cancel_delegation_token_args(); - $args->token_str_form = $token_str_form; + $args = new ThriftHiveMetastore_revoke_privileges_args(); + $args->privileges = $privileges; $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { - thrift_protocol_write_binary($this->output_, 'cancel_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('cancel_delegation_token', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_cancel_delegation_token() + public function recv_revoke_privileges() { $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_cancel_delegation_token_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_revoke_privileges_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new ThriftHiveMetastore_revoke_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("revoke_privileges failed: unknown result"); + } + + public function set_ugi($user_name, $group_names) + { + $this->send_set_ugi($user_name, $group_names); + return $this->recv_set_ugi(); + } + + public function send_set_ugi($user_name, $group_names) + { + $args = new ThriftHiveMetastore_set_ugi_args(); + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'set_ugi', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('set_ugi', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_set_ugi() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_set_ugi_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -4070,44 +4301,1379 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_cancel_delegation_token_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); + $result = new ThriftHiveMetastore_set_ugi_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("set_ugi failed: unknown result"); + } + + public function get_delegation_token($token_owner, $renewer_kerberos_principal_name) + { + $this->send_get_delegation_token($token_owner, $renewer_kerberos_principal_name); + return $this->recv_get_delegation_token(); + } + + public function send_get_delegation_token($token_owner, $renewer_kerberos_principal_name) + { + $args = new ThriftHiveMetastore_get_delegation_token_args(); + $args->token_owner = $token_owner; + $args->renewer_kerberos_principal_name = $renewer_kerberos_principal_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_delegation_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_delegation_token() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_delegation_token_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new ThriftHiveMetastore_get_delegation_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("get_delegation_token failed: unknown result"); + } + + public function renew_delegation_token($token_str_form) + { + $this->send_renew_delegation_token($token_str_form); + return $this->recv_renew_delegation_token(); + } + + public function send_renew_delegation_token($token_str_form) + { + $args = new ThriftHiveMetastore_renew_delegation_token_args(); + $args->token_str_form = $token_str_form; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'renew_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('renew_delegation_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_renew_delegation_token() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_renew_delegation_token_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new ThriftHiveMetastore_renew_delegation_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("renew_delegation_token failed: unknown result"); + } + + public function cancel_delegation_token($token_str_form) + { + $this->send_cancel_delegation_token($token_str_form); + $this->recv_cancel_delegation_token(); + } + + public function send_cancel_delegation_token($token_str_form) + { + $args = new ThriftHiveMetastore_cancel_delegation_token_args(); + $args->token_str_form = $token_str_form; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'cancel_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('cancel_delegation_token', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_cancel_delegation_token() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_cancel_delegation_token_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new ThriftHiveMetastore_cancel_delegation_token_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + return; + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class ThriftHiveMetastore_create_database_args { + static $_TSPEC; + + public $database = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'database', + 'type' => TType::STRUCT, + 'class' => 'Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['database'])) { + $this->database = $vals['database']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->database = new Database(); + $xfer += $this->database->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args'); + if ($this->database !== null) { + if (!is_object($this->database)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); + $xfer += $this->database->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_create_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_database_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_database_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'Database', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new Database(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_database_args { + static $_TSPEC; + + public $name = null; + public $deleteData = null; + public $cascade = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'cascade', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + if (isset($vals['cascade'])) { + $this->cascade = $vals['cascade']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->cascade); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + if ($this->cascade !== null) { + $xfer += $output->writeFieldBegin('cascade', TType::BOOL, 3); + $xfer += $output->writeBool($this->cascade); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_drop_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'InvalidOperationException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new InvalidOperationException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_databases_args { + static $_TSPEC; + + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_databases_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pattern); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_args'); + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_databases_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_databases_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size227 = 0; + $_etype230 = 0; + $xfer += $input->readListBegin($_etype230, $_size227); + for ($_i231 = 0; $_i231 < $_size227; ++$_i231) + { + $elem232 = null; + $xfer += $input->readString($elem232); + $this->success []= $elem232; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter233) + { + $xfer += $output->writeString($iter233); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_databases_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_databases_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_get_all_databases_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_databases_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size234 = 0; + $_etype237 = 0; + $xfer += $input->readListBegin($_etype237, $_size234); + for ($_i238 = 0; $_i238 < $_size234; ++$_i238) + { + $elem239 = null; + $xfer += $input->readString($elem239); + $this->success []= $elem239; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter240) + { + $xfer += $output->writeString($iter240); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_database_args { + static $_TSPEC; + + public $dbname = null; + public $db = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'db', + 'type' => TType::STRUCT, + 'class' => 'Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['db'])) { + $this->db = $vals['db']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->db = new Database(); + $xfer += $this->db->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->db !== null) { + if (!is_object($this->db)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('db', TType::STRUCT, 2); + $xfer += $this->db->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_alter_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); } - if ($result->o1 !== null) { - throw $result->o1; + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); } - return; + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; } } -// HELPER FUNCTIONS AND STRUCTURES - -class ThriftHiveMetastore_create_database_args { +class ThriftHiveMetastore_get_type_args { static $_TSPEC; - public $database = null; + public $name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'database', - 'type' => TType::STRUCT, - 'class' => 'Database', + 'var' => 'name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['database'])) { - $this->database = $vals['database']; + if (isset($vals['name'])) { + $this->name = $vals['name']; } } } public function getName() { - return 'ThriftHiveMetastore_create_database_args'; + return 'ThriftHiveMetastore_get_type_args'; } public function read($input) @@ -4126,9 +5692,8 @@ class ThriftHiveMetastore_create_database_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->database = new Database(); - $xfer += $this->database->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); } else { $xfer += $input->skip($ftype); } @@ -4145,13 +5710,10 @@ class ThriftHiveMetastore_create_database_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args'); - if ($this->database !== null) { - if (!is_object($this->database)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); - $xfer += $this->database->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4161,48 +5723,48 @@ class ThriftHiveMetastore_create_database_args { } -class ThriftHiveMetastore_create_database_result { +class ThriftHiveMetastore_get_type_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'Type', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'AlreadyExistsException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_database_result'; + return 'ThriftHiveMetastore_get_type_result'; } public function read($input) @@ -4220,26 +5782,26 @@ class ThriftHiveMetastore_create_database_result { } switch ($fid) { - case 1: + case 0: if ($ftype == TType::STRUCT) { - $this->o1 = new AlreadyExistsException(); - $xfer += $this->o1->read($input); + $this->success = new Type(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new InvalidObjectException(); - $xfer += $this->o2->read($input); + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -4256,7 +5818,15 @@ class ThriftHiveMetastore_create_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -4267,11 +5837,6 @@ class ThriftHiveMetastore_create_database_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4279,29 +5844,30 @@ class ThriftHiveMetastore_create_database_result { } -class ThriftHiveMetastore_get_database_args { +class ThriftHiveMetastore_create_type_args { static $_TSPEC; - public $name = null; + public $type = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', - 'type' => TType::STRING, + 'var' => 'type', + 'type' => TType::STRUCT, + 'class' => 'Type', ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['type'])) { + $this->type = $vals['type']; } } } public function getName() { - return 'ThriftHiveMetastore_get_database_args'; + return 'ThriftHiveMetastore_create_type_args'; } public function read($input) @@ -4320,8 +5886,9 @@ class ThriftHiveMetastore_get_database_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + if ($ftype == TType::STRUCT) { + $this->type = new Type(); + $xfer += $this->type->read($input); } else { $xfer += $input->skip($ftype); } @@ -4338,10 +5905,13 @@ class ThriftHiveMetastore_get_database_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_args'); + if ($this->type !== null) { + if (!is_object($this->type)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('type', TType::STRUCT, 1); + $xfer += $this->type->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4351,29 +5921,34 @@ class ThriftHiveMetastore_get_database_args { } -class ThriftHiveMetastore_get_database_result { +class ThriftHiveMetastore_create_type_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'Database', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'AlreadyExistsException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, + 'class' => 'InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, 'class' => 'MetaException', ), ); @@ -4388,11 +5963,14 @@ class ThriftHiveMetastore_get_database_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_database_result'; + return 'ThriftHiveMetastore_create_type_result'; } public function read($input) @@ -4411,16 +5989,15 @@ class ThriftHiveMetastore_get_database_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new Database(); - $xfer += $this->success->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new NoSuchObjectException(); + $this->o1 = new AlreadyExistsException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -4428,12 +6005,20 @@ class ThriftHiveMetastore_get_database_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); + $this->o2 = new InvalidObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -4446,13 +6031,10 @@ class ThriftHiveMetastore_get_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_result'); if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -4465,6 +6047,11 @@ class ThriftHiveMetastore_get_database_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4472,45 +6059,29 @@ class ThriftHiveMetastore_get_database_result { } -class ThriftHiveMetastore_drop_database_args { +class ThriftHiveMetastore_drop_type_args { static $_TSPEC; - public $name = null; - public $deleteData = null; - public $cascade = null; + public $type = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'type', 'type' => TType::STRING, ), - 2 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), - 3 => array( - 'var' => 'cascade', - 'type' => TType::BOOL, - ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; - } - if (isset($vals['cascade'])) { - $this->cascade = $vals['cascade']; + if (isset($vals['type'])) { + $this->type = $vals['type']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_args'; + return 'ThriftHiveMetastore_drop_type_args'; } public function read($input) @@ -4523,28 +6094,14 @@ class ThriftHiveMetastore_drop_database_args { while (true) { $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->cascade); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type); } else { $xfer += $input->skip($ftype); } @@ -4561,20 +6118,10 @@ class ThriftHiveMetastore_drop_database_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2); - $xfer += $output->writeBool($this->deleteData); - $xfer += $output->writeFieldEnd(); - } - if ($this->cascade !== null) { - $xfer += $output->writeFieldBegin('cascade', TType::BOOL, 3); - $xfer += $output->writeBool($this->cascade); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_args'); + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 1); + $xfer += $output->writeString($this->type); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4584,48 +6131,47 @@ class ThriftHiveMetastore_drop_database_args { } -class ThriftHiveMetastore_drop_database_result { +class ThriftHiveMetastore_drop_type_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_result'; + return 'ThriftHiveMetastore_drop_type_result'; } public function read($input) @@ -4643,26 +6189,25 @@ class ThriftHiveMetastore_drop_database_result { } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new NoSuchObjectException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new InvalidOperationException(); - $xfer += $this->o2->read($input); + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -4679,7 +6224,12 @@ class ThriftHiveMetastore_drop_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -4690,11 +6240,6 @@ class ThriftHiveMetastore_drop_database_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4702,29 +6247,29 @@ class ThriftHiveMetastore_drop_database_result { } -class ThriftHiveMetastore_get_databases_args { +class ThriftHiveMetastore_get_type_all_args { static $_TSPEC; - public $pattern = null; + public $name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'pattern', + 'var' => 'name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + if (isset($vals['name'])) { + $this->name = $vals['name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_args'; + return 'ThriftHiveMetastore_get_type_all_args'; } public function read($input) @@ -4744,7 +6289,7 @@ class ThriftHiveMetastore_get_databases_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->name); } else { $xfer += $input->skip($ftype); } @@ -4761,10 +6306,10 @@ class ThriftHiveMetastore_get_databases_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_args'); - if ($this->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1); - $xfer += $output->writeString($this->pattern); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4774,25 +6319,30 @@ class ThriftHiveMetastore_get_databases_args { } -class ThriftHiveMetastore_get_databases_result { +class ThriftHiveMetastore_get_type_all_result { static $_TSPEC; public $success = null; - public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRUCT, + 'key' => array( 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => 'Type', ), ), 1 => array( - 'var' => 'o1', + 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'MetaException', ), @@ -4802,14 +6352,14 @@ class ThriftHiveMetastore_get_databases_result { if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_result'; + return 'ThriftHiveMetastore_get_type_all_result'; } public function read($input) @@ -4828,26 +6378,30 @@ class ThriftHiveMetastore_get_databases_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { + if ($ftype == TType::MAP) { $this->success = array(); - $_size220 = 0; - $_etype223 = 0; - $xfer += $input->readListBegin($_etype223, $_size220); - for ($_i224 = 0; $_i224 < $_size220; ++$_i224) + $_size241 = 0; + $_ktype242 = 0; + $_vtype243 = 0; + $xfer += $input->readMapBegin($_ktype242, $_vtype243, $_size241); + for ($_i245 = 0; $_i245 < $_size241; ++$_i245) { - $elem225 = null; - $xfer += $input->readString($elem225); - $this->success []= $elem225; + $key246 = ''; + $val247 = new Type(); + $xfer += $input->readString($key246); + $val247 = new Type(); + $xfer += $val247->read($input); + $this->success[$key246] = $val247; } - $xfer += $input->readListEnd(); + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); - $xfer += $this->o1->read($input); + $this->o2 = new MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -4864,27 +6418,28 @@ class ThriftHiveMetastore_get_databases_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter226) + foreach ($this->success as $kiter248 => $viter249) { - $xfer += $output->writeString($iter226); + $xfer += $output->writeString($kiter248); + $xfer += $viter249->write($output); } } - $output->writeListEnd(); + $output->writeMapEnd(); } $xfer += $output->writeFieldEnd(); } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4894,19 +6449,37 @@ class ThriftHiveMetastore_get_databases_result { } -class ThriftHiveMetastore_get_all_databases_args { +class ThriftHiveMetastore_get_fields_args { static $_TSPEC; + public $db_name = null; + public $table_name = null; - public function __construct() { + public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), ); } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + } } public function getName() { - return 'ThriftHiveMetastore_get_all_databases_args'; + return 'ThriftHiveMetastore_get_fields_args'; } public function read($input) @@ -4924,6 +6497,20 @@ class ThriftHiveMetastore_get_all_databases_args { } switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -4936,7 +6523,17 @@ class ThriftHiveMetastore_get_all_databases_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4944,11 +6541,13 @@ class ThriftHiveMetastore_get_all_databases_args { } -class ThriftHiveMetastore_get_all_databases_result { +class ThriftHiveMetastore_get_fields_result { static $_TSPEC; public $success = null; public $o1 = null; + public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4956,9 +6555,10 @@ class ThriftHiveMetastore_get_all_databases_result { 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => 'FieldSchema', ), ), 1 => array( @@ -4966,6 +6566,16 @@ class ThriftHiveMetastore_get_all_databases_result { 'type' => TType::STRUCT, 'class' => 'MetaException', ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'UnknownDBException', + ), ); } if (is_array($vals)) { @@ -4975,11 +6585,17 @@ class ThriftHiveMetastore_get_all_databases_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_all_databases_result'; + return 'ThriftHiveMetastore_get_fields_result'; } public function read($input) @@ -5000,14 +6616,15 @@ class ThriftHiveMetastore_get_all_databases_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size227 = 0; - $_etype230 = 0; - $xfer += $input->readListBegin($_etype230, $_size227); - for ($_i231 = 0; $_i231 < $_size227; ++$_i231) + $_size250 = 0; + $_etype253 = 0; + $xfer += $input->readListBegin($_etype253, $_size250); + for ($_i254 = 0; $_i254 < $_size250; ++$_i254) { - $elem232 = null; - $xfer += $input->readString($elem232); - $this->success []= $elem232; + $elem255 = null; + $elem255 = new FieldSchema(); + $xfer += $elem255->read($input); + $this->success []= $elem255; } $xfer += $input->readListEnd(); } else { @@ -5016,8 +6633,24 @@ class ThriftHiveMetastore_get_all_databases_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); - $xfer += $this->o1->read($input); + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new UnknownTableException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new UnknownDBException(); + $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } @@ -5034,18 +6667,18 @@ class ThriftHiveMetastore_get_all_databases_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter233) + foreach ($this->success as $iter256) { - $xfer += $output->writeString($iter233); + $xfer += $iter256->write($output); } } $output->writeListEnd(); @@ -5057,6 +6690,16 @@ class ThriftHiveMetastore_get_all_databases_result { $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -5064,38 +6707,37 @@ class ThriftHiveMetastore_get_all_databases_result { } -class ThriftHiveMetastore_alter_database_args { +class ThriftHiveMetastore_get_schema_args { static $_TSPEC; - public $dbname = null; - public $db = null; + public $db_name = null; + public $table_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'db', - 'type' => TType::STRUCT, - 'class' => 'Database', + 'var' => 'table_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['db'])) { - $this->db = $vals['db']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_database_args'; + return 'ThriftHiveMetastore_get_schema_args'; } public function read($input) @@ -5115,15 +6757,14 @@ class ThriftHiveMetastore_alter_database_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRUCT) { - $this->db = new Database(); - $xfer += $this->db->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } @@ -5140,18 +6781,15 @@ class ThriftHiveMetastore_alter_database_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->db !== null) { - if (!is_object($this->db)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('db', TType::STRUCT, 2); - $xfer += $this->db->write($output); + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5161,15 +6799,26 @@ class ThriftHiveMetastore_alter_database_args { } -class ThriftHiveMetastore_alter_database_result { +class ThriftHiveMetastore_get_schema_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'FieldSchema', + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, @@ -5178,22 +6827,33 @@ class ThriftHiveMetastore_alter_database_result { 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'UnknownDBException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_alter_database_result'; + return 'ThriftHiveMetastore_get_schema_result'; } public function read($input) @@ -5211,6 +6871,24 @@ class ThriftHiveMetastore_alter_database_result { } switch ($fid) { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size257 = 0; + $_etype260 = 0; + $xfer += $input->readListBegin($_etype260, $_size257); + for ($_i261 = 0; $_i261 < $_size257; ++$_i261) + { + $elem262 = null; + $elem262 = new FieldSchema(); + $xfer += $elem262->read($input); + $this->success []= $elem262; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { $this->o1 = new MetaException(); @@ -5221,12 +6899,20 @@ class ThriftHiveMetastore_alter_database_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); + $this->o2 = new UnknownTableException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -5239,7 +6925,24 @@ class ThriftHiveMetastore_alter_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter263) + { + $xfer += $iter263->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -5250,6 +6953,11 @@ class ThriftHiveMetastore_alter_database_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -5257,29 +6965,30 @@ class ThriftHiveMetastore_alter_database_result { } -class ThriftHiveMetastore_get_type_args { +class ThriftHiveMetastore_create_table_args { static $_TSPEC; - public $name = null; + public $tbl = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', - 'type' => TType::STRING, + 'var' => 'tbl', + 'type' => TType::STRUCT, + 'class' => 'Table', ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_args'; + return 'ThriftHiveMetastore_create_table_args'; } public function read($input) @@ -5298,8 +7007,9 @@ class ThriftHiveMetastore_get_type_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + if ($ftype == TType::STRUCT) { + $this->tbl = new Table(); + $xfer += $this->tbl->read($input); } else { $xfer += $input->skip($ftype); } @@ -5316,10 +7026,13 @@ class ThriftHiveMetastore_get_type_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_args'); + if ($this->tbl !== null) { + if (!is_object($this->tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); + $xfer += $this->tbl->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5329,48 +7042,57 @@ class ThriftHiveMetastore_get_type_args { } -class ThriftHiveMetastore_get_type_result { +class ThriftHiveMetastore_create_table_result { static $_TSPEC; - public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; + public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'Type', - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'AlreadyExistsException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, + 'class' => 'InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, 'class' => 'NoSuchObjectException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_type_result'; + return 'ThriftHiveMetastore_create_table_result'; } public function read($input) @@ -5388,26 +7110,34 @@ class ThriftHiveMetastore_get_type_result { } switch ($fid) { - case 0: + case 1: if ($ftype == TType::STRUCT) { - $this->success = new Type(); - $xfer += $this->success->read($input); + $this->o1 = new AlreadyExistsException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 1: + case 2: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); - $xfer += $this->o1->read($input); + $this->o2 = new InvalidObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 3: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); - $xfer += $this->o2->read($input); + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new NoSuchObjectException(); + $xfer += $this->o4->read($input); } else { $xfer += $input->skip($ftype); } @@ -5424,23 +7154,25 @@ class ThriftHiveMetastore_get_type_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5450,30 +7182,39 @@ class ThriftHiveMetastore_get_type_result { } -class ThriftHiveMetastore_create_type_args { +class ThriftHiveMetastore_create_table_with_environment_context_args { static $_TSPEC; - public $type = null; + public $tbl = null; + public $environment_context = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'type', + 'var' => 'tbl', 'type' => TType::STRUCT, - 'class' => 'Type', + 'class' => 'Table', + ), + 2 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => 'EnvironmentContext', ), ); } if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; } } } public function getName() { - return 'ThriftHiveMetastore_create_type_args'; + return 'ThriftHiveMetastore_create_table_with_environment_context_args'; } public function read($input) @@ -5493,8 +7234,16 @@ class ThriftHiveMetastore_create_type_args { { case 1: if ($ftype == TType::STRUCT) { - $this->type = new Type(); - $xfer += $this->type->read($input); + $this->tbl = new Table(); + $xfer += $this->tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->environment_context = new EnvironmentContext(); + $xfer += $this->environment_context->read($input); } else { $xfer += $input->skip($ftype); } @@ -5511,13 +7260,21 @@ class ThriftHiveMetastore_create_type_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_args'); - if ($this->type !== null) { - if (!is_object($this->type)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_with_environment_context_args'); + if ($this->tbl !== null) { + if (!is_object($this->tbl)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('type', TType::STRUCT, 1); - $xfer += $this->type->write($output); + $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); + $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2); + $xfer += $this->environment_context->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5527,21 +7284,17 @@ class ThriftHiveMetastore_create_type_args { } -class ThriftHiveMetastore_create_type_result { +class ThriftHiveMetastore_create_table_with_environment_context_result { static $_TSPEC; - public $success = null; public $o1 = null; public $o2 = null; public $o3 = null; + public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::BOOL, - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, @@ -5557,12 +7310,14 @@ class ThriftHiveMetastore_create_type_result { 'type' => TType::STRUCT, 'class' => 'MetaException', ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'NoSuchObjectException', + ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -5572,11 +7327,14 @@ class ThriftHiveMetastore_create_type_result { if (isset($vals['o3'])) { $this->o3 = $vals['o3']; } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_create_type_result'; + return 'ThriftHiveMetastore_create_table_with_environment_context_result'; } public function read($input) @@ -5594,13 +7352,6 @@ class ThriftHiveMetastore_create_type_result { } switch ($fid) { - case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; case 1: if ($ftype == TType::STRUCT) { $this->o1 = new AlreadyExistsException(); @@ -5625,6 +7376,14 @@ class ThriftHiveMetastore_create_type_result { $xfer += $input->skip($ftype); } break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new NoSuchObjectException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -5637,12 +7396,7 @@ class ThriftHiveMetastore_create_type_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_with_environment_context_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -5658,6 +7412,11 @@ class ThriftHiveMetastore_create_type_result { $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -5665,29 +7424,45 @@ class ThriftHiveMetastore_create_type_result { } -class ThriftHiveMetastore_drop_type_args { +class ThriftHiveMetastore_drop_table_args { static $_TSPEC; - public $type = null; + public $dbname = null; + public $name = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'type', + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'name', 'type' => TType::STRING, ), + 3 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), ); } if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_type_args'; + return 'ThriftHiveMetastore_drop_table_args'; } public function read($input) @@ -5707,7 +7482,21 @@ class ThriftHiveMetastore_drop_type_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -5724,10 +7513,20 @@ class ThriftHiveMetastore_drop_type_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_args'); - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 1); - $xfer += $output->writeString($this->type); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 2); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); + $xfer += $output->writeBool($this->deleteData); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5737,47 +7536,39 @@ class ThriftHiveMetastore_drop_type_args { } -class ThriftHiveMetastore_drop_type_result { +class ThriftHiveMetastore_drop_table_result { static $_TSPEC; - public $success = null; public $o1 = null; - public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::BOOL, - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), 2 => array( - 'var' => 'o2', + 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_type_result'; + return 'ThriftHiveMetastore_drop_table_result'; } public function read($input) @@ -5795,16 +7586,9 @@ class ThriftHiveMetastore_drop_type_result { } switch ($fid) { - case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -5812,8 +7596,8 @@ class ThriftHiveMetastore_drop_type_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); - $xfer += $this->o2->read($input); + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } @@ -5830,20 +7614,15 @@ class ThriftHiveMetastore_drop_type_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5853,29 +7632,37 @@ class ThriftHiveMetastore_drop_type_result { } -class ThriftHiveMetastore_get_type_all_args { +class ThriftHiveMetastore_get_tables_args { static $_TSPEC; - public $name = null; + public $db_name = null; + public $pattern = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'pattern', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_all_args'; + return 'ThriftHiveMetastore_get_tables_args'; } public function read($input) @@ -5895,7 +7682,14 @@ class ThriftHiveMetastore_get_type_all_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pattern); } else { $xfer += $input->skip($ftype); } @@ -5912,10 +7706,15 @@ class ThriftHiveMetastore_get_type_all_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5925,30 +7724,25 @@ class ThriftHiveMetastore_get_type_all_args { } -class ThriftHiveMetastore_get_type_all_result { +class ThriftHiveMetastore_get_tables_result { static $_TSPEC; public $success = null; - public $o2 = null; + public $o1 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRUCT, - 'key' => array( + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRUCT, - 'class' => 'Type', ), ), 1 => array( - 'var' => 'o2', + 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'MetaException', ), @@ -5958,14 +7752,14 @@ class ThriftHiveMetastore_get_type_all_result { if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_all_result'; + return 'ThriftHiveMetastore_get_tables_result'; } public function read($input) @@ -5984,30 +7778,26 @@ class ThriftHiveMetastore_get_type_all_result { switch ($fid) { case 0: - if ($ftype == TType::MAP) { + if ($ftype == TType::LST) { $this->success = array(); - $_size234 = 0; - $_ktype235 = 0; - $_vtype236 = 0; - $xfer += $input->readMapBegin($_ktype235, $_vtype236, $_size234); - for ($_i238 = 0; $_i238 < $_size234; ++$_i238) + $_size264 = 0; + $_etype267 = 0; + $xfer += $input->readListBegin($_etype267, $_size264); + for ($_i268 = 0; $_i268 < $_size264; ++$_i268) { - $key239 = ''; - $val240 = new Type(); - $xfer += $input->readString($key239); - $val240 = new Type(); - $xfer += $val240->read($input); - $this->success[$key239] = $val240; + $elem269 = null; + $xfer += $input->readString($elem269); + $this->success []= $elem269; } - $xfer += $input->readMapEnd(); + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -6024,28 +7814,27 @@ class ThriftHiveMetastore_get_type_all_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $kiter241 => $viter242) + foreach ($this->success as $iter270) { - $xfer += $output->writeString($kiter241); - $xfer += $viter242->write($output); + $xfer += $output->writeString($iter270); } } - $output->writeMapEnd(); + $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); - $xfer += $this->o2->write($output); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6055,11 +7844,10 @@ class ThriftHiveMetastore_get_type_all_result { } -class ThriftHiveMetastore_get_fields_args { +class ThriftHiveMetastore_get_all_tables_args { static $_TSPEC; public $db_name = null; - public $table_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6068,24 +7856,17 @@ class ThriftHiveMetastore_get_fields_args { 'var' => 'db_name', 'type' => TType::STRING, ), - 2 => array( - 'var' => 'table_name', - 'type' => TType::STRING, - ), ); } if (is_array($vals)) { if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_fields_args'; + return 'ThriftHiveMetastore_get_all_tables_args'; } public function read($input) @@ -6110,13 +7891,6 @@ class ThriftHiveMetastore_get_fields_args { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6129,17 +7903,12 @@ class ThriftHiveMetastore_get_fields_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6147,13 +7916,11 @@ class ThriftHiveMetastore_get_fields_args { } -class ThriftHiveMetastore_get_fields_result { +class ThriftHiveMetastore_get_all_tables_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6161,10 +7928,9 @@ class ThriftHiveMetastore_get_fields_result { 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRUCT, + 'etype' => TType::STRING, 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'FieldSchema', + 'type' => TType::STRING, ), ), 1 => array( @@ -6172,16 +7938,6 @@ class ThriftHiveMetastore_get_fields_result { 'type' => TType::STRUCT, 'class' => 'MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'UnknownDBException', - ), ); } if (is_array($vals)) { @@ -6191,17 +7947,11 @@ class ThriftHiveMetastore_get_fields_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_fields_result'; + return 'ThriftHiveMetastore_get_all_tables_result'; } public function read($input) @@ -6222,15 +7972,14 @@ class ThriftHiveMetastore_get_fields_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size243 = 0; - $_etype246 = 0; - $xfer += $input->readListBegin($_etype246, $_size243); - for ($_i247 = 0; $_i247 < $_size243; ++$_i247) + $_size271 = 0; + $_etype274 = 0; + $xfer += $input->readListBegin($_etype274, $_size271); + for ($_i275 = 0; $_i275 < $_size271; ++$_i275) { - $elem248 = null; - $elem248 = new FieldSchema(); - $xfer += $elem248->read($input); - $this->success []= $elem248; + $elem276 = null; + $xfer += $input->readString($elem276); + $this->success []= $elem276; } $xfer += $input->readListEnd(); } else { @@ -6245,22 +7994,6 @@ class ThriftHiveMetastore_get_fields_result { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new UnknownTableException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new UnknownDBException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6273,18 +8006,18 @@ class ThriftHiveMetastore_get_fields_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeListBegin(TType::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter249) + foreach ($this->success as $iter277) { - $xfer += $iter249->write($output); + $xfer += $output->writeString($iter277); } } $output->writeListEnd(); @@ -6296,16 +8029,6 @@ class ThriftHiveMetastore_get_fields_result { $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6313,37 +8036,37 @@ class ThriftHiveMetastore_get_fields_result { } -class ThriftHiveMetastore_get_schema_args { +class ThriftHiveMetastore_get_table_args { static $_TSPEC; - public $db_name = null; - public $table_name = null; + public $dbname = null; + public $tbl_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'dbname', 'type' => TType::STRING, ), 2 => array( - 'var' => 'table_name', + 'var' => 'tbl_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_schema_args'; + return 'ThriftHiveMetastore_get_table_args'; } public function read($input) @@ -6363,14 +8086,14 @@ class ThriftHiveMetastore_get_schema_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->dbname); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } @@ -6387,15 +8110,15 @@ class ThriftHiveMetastore_get_schema_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); $xfer += $output->writeFieldEnd(); } - if ($this->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6405,25 +8128,20 @@ class ThriftHiveMetastore_get_schema_args { } -class ThriftHiveMetastore_get_schema_result { +class ThriftHiveMetastore_get_table_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'FieldSchema', - ), + 'type' => TType::STRUCT, + 'class' => 'Table', ), 1 => array( 'var' => 'o1', @@ -6433,12 +8151,7 @@ class ThriftHiveMetastore_get_schema_result { 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'UnknownDBException', + 'class' => 'NoSuchObjectException', ), ); } @@ -6452,14 +8165,11 @@ class ThriftHiveMetastore_get_schema_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_schema_result'; + return 'ThriftHiveMetastore_get_table_result'; } public function read($input) @@ -6478,19 +8188,9 @@ class ThriftHiveMetastore_get_schema_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size250 = 0; - $_etype253 = 0; - $xfer += $input->readListBegin($_etype253, $_size250); - for ($_i254 = 0; $_i254 < $_size250; ++$_i254) - { - $elem255 = null; - $elem255 = new FieldSchema(); - $xfer += $elem255->read($input); - $this->success []= $elem255; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new Table(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -6505,20 +8205,12 @@ class ThriftHiveMetastore_get_schema_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new UnknownTableException(); + $this->o2 = new NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new UnknownDBException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6529,24 +8221,15 @@ class ThriftHiveMetastore_get_schema_result { return $xfer; } - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter256) - { - $xfer += $iter256->write($output); - } - } - $output->writeListEnd(); + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -6559,11 +8242,6 @@ class ThriftHiveMetastore_get_schema_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6571,30 +8249,41 @@ class ThriftHiveMetastore_get_schema_result { } -class ThriftHiveMetastore_create_table_args { +class ThriftHiveMetastore_get_table_objects_by_name_args { static $_TSPEC; - public $tbl = null; + public $dbname = null; + public $tbl_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'tbl', - 'type' => TType::STRUCT, - 'class' => 'Table', + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } if (is_array($vals)) { - if (isset($vals['tbl'])) { - $this->tbl = $vals['tbl']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_names'])) { + $this->tbl_names = $vals['tbl_names']; } } } public function getName() { - return 'ThriftHiveMetastore_create_table_args'; + return 'ThriftHiveMetastore_get_table_objects_by_name_args'; } public function read($input) @@ -6613,9 +8302,25 @@ class ThriftHiveMetastore_create_table_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->tbl = new Table(); - $xfer += $this->tbl->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->tbl_names = array(); + $_size278 = 0; + $_etype281 = 0; + $xfer += $input->readListBegin($_etype281, $_size278); + for ($_i282 = 0; $_i282 < $_size278; ++$_i282) + { + $elem283 = null; + $xfer += $input->readString($elem283); + $this->tbl_names []= $elem283; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -6632,13 +8337,27 @@ class ThriftHiveMetastore_create_table_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_args'); - if ($this->tbl !== null) { - if (!is_object($this->tbl)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_names !== null) { + if (!is_array($this->tbl_names)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); - $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldBegin('tbl_names', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->tbl_names)); + { + foreach ($this->tbl_names as $iter284) + { + $xfer += $output->writeString($iter284); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6648,40 +8367,47 @@ class ThriftHiveMetastore_create_table_args { } -class ThriftHiveMetastore_create_table_result { +class ThriftHiveMetastore_get_table_objects_by_name_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; public $o3 = null; - public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Table', + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'AlreadyExistsException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'InvalidObjectException', + 'class' => 'InvalidOperationException', ), 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => 'MetaException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'UnknownDBException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -6691,14 +8417,11 @@ class ThriftHiveMetastore_create_table_result { if (isset($vals['o3'])) { $this->o3 = $vals['o3']; } - if (isset($vals['o4'])) { - $this->o4 = $vals['o4']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_table_result'; + return 'ThriftHiveMetastore_get_table_objects_by_name_result'; } public function read($input) @@ -6716,9 +8439,27 @@ class ThriftHiveMetastore_create_table_result { } switch ($fid) { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size285 = 0; + $_etype288 = 0; + $xfer += $input->readListBegin($_etype288, $_size285); + for ($_i289 = 0; $_i289 < $_size285; ++$_i289) + { + $elem290 = null; + $elem290 = new Table(); + $xfer += $elem290->read($input); + $this->success []= $elem290; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new AlreadyExistsException(); + $this->o1 = new MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -6726,7 +8467,7 @@ class ThriftHiveMetastore_create_table_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new InvalidObjectException(); + $this->o2 = new InvalidOperationException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -6734,20 +8475,12 @@ class ThriftHiveMetastore_create_table_result { break; case 3: if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); + $this->o3 = new UnknownDBException(); $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new NoSuchObjectException(); - $xfer += $this->o4->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6760,7 +8493,24 @@ class ThriftHiveMetastore_create_table_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter291) + { + $xfer += $iter291->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -6776,11 +8526,6 @@ class ThriftHiveMetastore_create_table_result { $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o4 !== null) { - $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); - $xfer += $this->o4->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6788,39 +8533,45 @@ class ThriftHiveMetastore_create_table_result { } -class ThriftHiveMetastore_create_table_with_environment_context_args { +class ThriftHiveMetastore_get_table_names_by_filter_args { static $_TSPEC; - public $tbl = null; - public $environment_context = null; + public $dbname = null; + public $filter = null; + public $max_tables = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'tbl', - 'type' => TType::STRUCT, - 'class' => 'Table', + 'var' => 'dbname', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => 'EnvironmentContext', + 'var' => 'filter', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_tables', + 'type' => TType::I16, ), ); } if (is_array($vals)) { - if (isset($vals['tbl'])) { - $this->tbl = $vals['tbl']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_tables'])) { + $this->max_tables = $vals['max_tables']; } } } public function getName() { - return 'ThriftHiveMetastore_create_table_with_environment_context_args'; + return 'ThriftHiveMetastore_get_table_names_by_filter_args'; } public function read($input) @@ -6839,17 +8590,22 @@ class ThriftHiveMetastore_create_table_with_environment_context_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->tbl = new Table(); - $xfer += $this->tbl->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRUCT) { - $this->environment_context = new EnvironmentContext(); - $xfer += $this->environment_context->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->filter); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_tables); } else { $xfer += $input->skip($ftype); } @@ -6866,21 +8622,20 @@ class ThriftHiveMetastore_create_table_with_environment_context_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_with_environment_context_args'); - if ($this->tbl !== null) { - if (!is_object($this->tbl)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); - $xfer += $this->tbl->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); $xfer += $output->writeFieldEnd(); } - if ($this->environment_context !== null) { - if (!is_object($this->environment_context)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2); - $xfer += $this->environment_context->write($output); + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 2); + $xfer += $output->writeString($this->filter); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_tables !== null) { + $xfer += $output->writeFieldBegin('max_tables', TType::I16, 3); + $xfer += $output->writeI16($this->max_tables); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6890,40 +8645,46 @@ class ThriftHiveMetastore_create_table_with_environment_context_args { } -class ThriftHiveMetastore_create_table_with_environment_context_result { +class ThriftHiveMetastore_get_table_names_by_filter_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; public $o3 = null; - public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'AlreadyExistsException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'InvalidObjectException', + 'class' => 'InvalidOperationException', ), 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => 'MetaException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'UnknownDBException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -6933,14 +8694,11 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { if (isset($vals['o3'])) { $this->o3 = $vals['o3']; } - if (isset($vals['o4'])) { - $this->o4 = $vals['o4']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_table_with_environment_context_result'; + return 'ThriftHiveMetastore_get_table_names_by_filter_result'; } public function read($input) @@ -6958,9 +8716,26 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { } switch ($fid) { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size292 = 0; + $_etype295 = 0; + $xfer += $input->readListBegin($_etype295, $_size292); + for ($_i296 = 0; $_i296 < $_size292; ++$_i296) + { + $elem297 = null; + $xfer += $input->readString($elem297); + $this->success []= $elem297; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new AlreadyExistsException(); + $this->o1 = new MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -6968,7 +8743,7 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new InvalidObjectException(); + $this->o2 = new InvalidOperationException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -6976,20 +8751,12 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { break; case 3: if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); + $this->o3 = new UnknownDBException(); $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new NoSuchObjectException(); - $xfer += $this->o4->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7002,7 +8769,24 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter298) + { + $xfer += $output->writeString($iter298); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -7018,11 +8802,6 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o4 !== null) { - $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); - $xfer += $this->o4->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7030,12 +8809,12 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { } -class ThriftHiveMetastore_drop_table_args { +class ThriftHiveMetastore_alter_table_args { static $_TSPEC; public $dbname = null; - public $name = null; - public $deleteData = null; + public $tbl_name = null; + public $new_tbl = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7045,12 +8824,13 @@ class ThriftHiveMetastore_drop_table_args { 'type' => TType::STRING, ), 2 => array( - 'var' => 'name', + 'var' => 'tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'new_tbl', + 'type' => TType::STRUCT, + 'class' => 'Table', ), ); } @@ -7058,17 +8838,17 @@ class ThriftHiveMetastore_drop_table_args { if (isset($vals['dbname'])) { $this->dbname = $vals['dbname']; } - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['new_tbl'])) { + $this->new_tbl = $vals['new_tbl']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_args'; + return 'ThriftHiveMetastore_alter_table_args'; } public function read($input) @@ -7095,14 +8875,15 @@ class ThriftHiveMetastore_drop_table_args { break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::STRUCT) { + $this->new_tbl = new Table(); + $xfer += $this->new_tbl->read($input); } else { $xfer += $input->skip($ftype); } @@ -7119,20 +8900,23 @@ class ThriftHiveMetastore_drop_table_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_args'); if ($this->dbname !== null) { $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); $xfer += $output->writeString($this->dbname); $xfer += $output->writeFieldEnd(); } - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); - $xfer += $output->writeString($this->name); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); - $xfer += $output->writeBool($this->deleteData); + if ($this->new_tbl !== null) { + if (!is_object($this->new_tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7142,11 +8926,11 @@ class ThriftHiveMetastore_drop_table_args { } -class ThriftHiveMetastore_drop_table_result { +class ThriftHiveMetastore_alter_table_result { static $_TSPEC; public $o1 = null; - public $o3 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7154,10 +8938,10 @@ class ThriftHiveMetastore_drop_table_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'InvalidOperationException', ), 2 => array( - 'var' => 'o3', + 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'MetaException', ), @@ -7167,14 +8951,14 @@ class ThriftHiveMetastore_drop_table_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_result'; + return 'ThriftHiveMetastore_alter_table_result'; } public function read($input) @@ -7194,7 +8978,7 @@ class ThriftHiveMetastore_drop_table_result { { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new NoSuchObjectException(); + $this->o1 = new InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -7202,8 +8986,8 @@ class ThriftHiveMetastore_drop_table_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -7220,15 +9004,15 @@ class ThriftHiveMetastore_drop_table_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); - $xfer += $this->o3->write($output); + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7238,37 +9022,55 @@ class ThriftHiveMetastore_drop_table_result { } -class ThriftHiveMetastore_get_tables_args { +class ThriftHiveMetastore_alter_table_with_environment_context_args { static $_TSPEC; - public $db_name = null; - public $pattern = null; + public $dbname = null; + public $tbl_name = null; + public $new_tbl = null; + public $environment_context = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'dbname', 'type' => TType::STRING, ), 2 => array( - 'var' => 'pattern', + 'var' => 'tbl_name', 'type' => TType::STRING, ), + 3 => array( + 'var' => 'new_tbl', + 'type' => TType::STRUCT, + 'class' => 'Table', + ), + 4 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => 'EnvironmentContext', + ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; } - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_tbl'])) { + $this->new_tbl = $vals['new_tbl']; + } + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; } } } public function getName() { - return 'ThriftHiveMetastore_get_tables_args'; + return 'ThriftHiveMetastore_alter_table_with_environment_context_args'; } public function read($input) @@ -7288,14 +9090,30 @@ class ThriftHiveMetastore_get_tables_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->dbname); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_tbl = new Table(); + $xfer += $this->new_tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->environment_context = new EnvironmentContext(); + $xfer += $this->environment_context->read($input); } else { $xfer += $input->skip($ftype); } @@ -7312,15 +9130,31 @@ class ThriftHiveMetastore_get_tables_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_with_environment_context_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); $xfer += $output->writeFieldEnd(); } - if ($this->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); - $xfer += $output->writeString($this->pattern); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_tbl !== null) { + if (!is_object($this->new_tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 4); + $xfer += $this->environment_context->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7330,42 +9164,39 @@ class ThriftHiveMetastore_get_tables_args { } -class ThriftHiveMetastore_get_tables_result { +class ThriftHiveMetastore_alter_table_with_environment_context_result { static $_TSPEC; - public $success = null; public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, + 'class' => 'InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, 'class' => 'MetaException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_tables_result'; + return 'ThriftHiveMetastore_alter_table_with_environment_context_result'; } public function read($input) @@ -7383,27 +9214,18 @@ class ThriftHiveMetastore_get_tables_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size257 = 0; - $_etype260 = 0; - $xfer += $input->readListBegin($_etype260, $_size257); - for ($_i261 = 0; $_i261 < $_size257; ++$_i261) - { - $elem262 = null; - $xfer += $input->readString($elem262); - $this->success []= $elem262; - } - $xfer += $input->readListEnd(); + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new InvalidOperationException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 1: + case 2: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); - $xfer += $this->o1->read($input); + $this->o2 = new MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -7420,29 +9242,17 @@ class ThriftHiveMetastore_get_tables_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter263) - { - $xfer += $output->writeString($iter263); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_with_environment_context_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7450,29 +9260,30 @@ class ThriftHiveMetastore_get_tables_result { } -class ThriftHiveMetastore_get_all_tables_args { +class ThriftHiveMetastore_add_partition_args { static $_TSPEC; - public $db_name = null; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'Partition', ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_get_all_tables_args'; + return 'ThriftHiveMetastore_add_partition_args'; } public function read($input) @@ -7491,8 +9302,9 @@ class ThriftHiveMetastore_get_all_tables_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + if ($ftype == TType::STRUCT) { + $this->new_part = new Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -7509,10 +9321,13 @@ class ThriftHiveMetastore_get_all_tables_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args'); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7522,26 +9337,35 @@ class ThriftHiveMetastore_get_all_tables_args { } -class ThriftHiveMetastore_get_all_tables_result { +class ThriftHiveMetastore_add_partition_result { static $_TSPEC; public $success = null; public $o1 = null; + public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRUCT, + 'class' => 'Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, + 'class' => 'InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, 'class' => 'MetaException', ), ); @@ -7553,11 +9377,17 @@ class ThriftHiveMetastore_get_all_tables_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_all_tables_result'; + return 'ThriftHiveMetastore_add_partition_result'; } public function read($input) @@ -7576,30 +9406,37 @@ class ThriftHiveMetastore_get_all_tables_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size264 = 0; - $_etype267 = 0; - $xfer += $input->readListBegin($_etype267, $_size264); - for ($_i268 = 0; $_i268 < $_size264; ++$_i268) - { - $elem269 = null; - $xfer += $input->readString($elem269); - $this->success []= $elem269; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new Partition(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -7612,22 +9449,13 @@ class ThriftHiveMetastore_get_all_tables_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter270) - { - $xfer += $output->writeString($iter270); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -7635,6 +9463,16 @@ class ThriftHiveMetastore_get_all_tables_result { $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7642,37 +9480,39 @@ class ThriftHiveMetastore_get_all_tables_result { } -class ThriftHiveMetastore_get_table_args { +class ThriftHiveMetastore_add_partition_with_environment_context_args { static $_TSPEC; - public $dbname = null; - public $tbl_name = null; + public $new_part = null; + public $environment_context = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'Partition', ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => 'EnvironmentContext', ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_args'; + return 'ThriftHiveMetastore_add_partition_with_environment_context_args'; } public function read($input) @@ -7691,15 +9531,17 @@ class ThriftHiveMetastore_get_table_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + if ($ftype == TType::STRUCT) { + $this->new_part = new Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::STRUCT) { + $this->environment_context = new EnvironmentContext(); + $xfer += $this->environment_context->read($input); } else { $xfer += $input->skip($ftype); } @@ -7716,15 +9558,21 @@ class ThriftHiveMetastore_get_table_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_args'); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2); + $xfer += $this->environment_context->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7734,12 +9582,13 @@ class ThriftHiveMetastore_get_table_args { } -class ThriftHiveMetastore_get_table_result { +class ThriftHiveMetastore_add_partition_with_environment_context_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7747,17 +9596,22 @@ class ThriftHiveMetastore_get_table_result { 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'Table', + 'class' => 'Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'MetaException', ), ); } @@ -7771,11 +9625,14 @@ class ThriftHiveMetastore_get_table_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_table_result'; + return 'ThriftHiveMetastore_add_partition_with_environment_context_result'; } public function read($input) @@ -7795,7 +9652,7 @@ class ThriftHiveMetastore_get_table_result { { case 0: if ($ftype == TType::STRUCT) { - $this->success = new Table(); + $this->success = new Partition(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -7803,7 +9660,7 @@ class ThriftHiveMetastore_get_table_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -7811,12 +9668,20 @@ class ThriftHiveMetastore_get_table_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); + $this->o2 = new AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -7829,7 +9694,7 @@ class ThriftHiveMetastore_get_table_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -7848,6 +9713,11 @@ class ThriftHiveMetastore_get_table_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7855,41 +9725,34 @@ class ThriftHiveMetastore_get_table_result { } -class ThriftHiveMetastore_get_table_objects_by_name_args { +class ThriftHiveMetastore_add_partitions_args { static $_TSPEC; - public $dbname = null; - public $tbl_names = null; + public $new_parts = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_names', + 'var' => 'new_parts', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => 'Partition', ), ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tbl_names'])) { - $this->tbl_names = $vals['tbl_names']; + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_objects_by_name_args'; + return 'ThriftHiveMetastore_add_partitions_args'; } public function read($input) @@ -7908,23 +9771,17 @@ class ThriftHiveMetastore_get_table_objects_by_name_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: if ($ftype == TType::LST) { - $this->tbl_names = array(); - $_size271 = 0; - $_etype274 = 0; - $xfer += $input->readListBegin($_etype274, $_size271); - for ($_i275 = 0; $_i275 < $_size271; ++$_i275) + $this->new_parts = array(); + $_size299 = 0; + $_etype302 = 0; + $xfer += $input->readListBegin($_etype302, $_size299); + for ($_i303 = 0; $_i303 < $_size299; ++$_i303) { - $elem276 = null; - $xfer += $input->readString($elem276); - $this->tbl_names []= $elem276; + $elem304 = null; + $elem304 = new Partition(); + $xfer += $elem304->read($input); + $this->new_parts []= $elem304; } $xfer += $input->readListEnd(); } else { @@ -7943,23 +9800,18 @@ class ThriftHiveMetastore_get_table_objects_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_names !== null) { - if (!is_array($this->tbl_names)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_args'); + if ($this->new_parts !== null) { + if (!is_array($this->new_parts)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('tbl_names', TType::LST, 2); + $xfer += $output->writeFieldBegin('new_parts', TType::LST, 1); { - $output->writeListBegin(TType::STRING, count($this->tbl_names)); + $output->writeListBegin(TType::STRUCT, count($this->new_parts)); { - foreach ($this->tbl_names as $iter277) + foreach ($this->new_parts as $iter305) { - $xfer += $output->writeString($iter277); + $xfer += $iter305->write($output); } } $output->writeListEnd(); @@ -7973,7 +9825,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_args { } -class ThriftHiveMetastore_get_table_objects_by_name_result { +class ThriftHiveMetastore_add_partitions_result { static $_TSPEC; public $success = null; @@ -7986,27 +9838,22 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Table', - ), + 'type' => TType::I32, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', + 'class' => 'AlreadyExistsException', ), 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => 'UnknownDBException', + 'class' => 'MetaException', ), ); } @@ -8027,7 +9874,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { } public function getName() { - return 'ThriftHiveMetastore_get_table_objects_by_name_result'; + return 'ThriftHiveMetastore_add_partitions_result'; } public function read($input) @@ -8046,26 +9893,15 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size278 = 0; - $_etype281 = 0; - $xfer += $input->readListBegin($_etype281, $_size278); - for ($_i282 = 0; $_i282 < $_size278; ++$_i282) - { - $elem283 = null; - $elem283 = new Table(); - $xfer += $elem283->read($input); - $this->success []= $elem283; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -8073,7 +9909,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new InvalidOperationException(); + $this->o2 = new AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -8081,7 +9917,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { break; case 3: if ($ftype == TType::STRUCT) { - $this->o3 = new UnknownDBException(); + $this->o3 = new MetaException(); $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); @@ -8099,22 +9935,10 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_objects_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter284) - { - $xfer += $iter284->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8139,45 +9963,49 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { } -class ThriftHiveMetastore_get_table_names_by_filter_args { +class ThriftHiveMetastore_append_partition_args { static $_TSPEC; - public $dbname = null; - public $filter = null; - public $max_tables = -1; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'filter', + 'var' => 'tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_tables', - 'type' => TType::I16, + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['filter'])) { - $this->filter = $vals['filter']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['max_tables'])) { - $this->max_tables = $vals['max_tables']; + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_names_by_filter_args'; + return 'ThriftHiveMetastore_append_partition_args'; } public function read($input) @@ -8197,21 +10025,31 @@ class ThriftHiveMetastore_get_table_names_by_filter_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->filter); + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_tables); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size306 = 0; + $_etype309 = 0; + $xfer += $input->readListBegin($_etype309, $_size306); + for ($_i310 = 0; $_i310 < $_size306; ++$_i310) + { + $elem311 = null; + $xfer += $input->readString($elem311); + $this->part_vals []= $elem311; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -8228,20 +10066,32 @@ class ThriftHiveMetastore_get_table_names_by_filter_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->filter !== null) { - $xfer += $output->writeFieldBegin('filter', TType::STRING, 2); - $xfer += $output->writeString($this->filter); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_tables !== null) { - $xfer += $output->writeFieldBegin('max_tables', TType::I16, 3); - $xfer += $output->writeI16($this->max_tables); + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter312) + { + $xfer += $output->writeString($iter312); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8251,7 +10101,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_args { } -class ThriftHiveMetastore_get_table_names_by_filter_result { +class ThriftHiveMetastore_append_partition_result { static $_TSPEC; public $success = null; @@ -8264,26 +10114,23 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRUCT, + 'class' => 'Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', + 'class' => 'AlreadyExistsException', ), 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, - 'class' => 'UnknownDBException', + 'class' => 'MetaException', ), ); } @@ -8304,7 +10151,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { } public function getName() { - return 'ThriftHiveMetastore_get_table_names_by_filter_result'; + return 'ThriftHiveMetastore_append_partition_result'; } public function read($input) @@ -8323,25 +10170,16 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size285 = 0; - $_etype288 = 0; - $xfer += $input->readListBegin($_etype288, $_size285); - for ($_i289 = 0; $_i289 < $_size285; ++$_i289) - { - $elem290 = null; - $xfer += $input->readString($elem290); - $this->success []= $elem290; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new Partition(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -8349,7 +10187,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new InvalidOperationException(); + $this->o2 = new AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -8357,7 +10195,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { break; case 3: if ($ftype == TType::STRUCT) { - $this->o3 = new UnknownDBException(); + $this->o3 = new MetaException(); $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); @@ -8372,25 +10210,16 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { $xfer += $input->readStructEnd(); return $xfer; } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter291) - { - $xfer += $output->writeString($iter291); - } - } - $output->writeListEnd(); + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8415,18 +10244,18 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { } -class ThriftHiveMetastore_alter_table_args { +class ThriftHiveMetastore_append_partition_by_name_args { static $_TSPEC; - public $dbname = null; + public $db_name = null; public $tbl_name = null; - public $new_tbl = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( @@ -8434,27 +10263,26 @@ class ThriftHiveMetastore_alter_table_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_tbl', - 'type' => TType::STRUCT, - 'class' => 'Table', + 'var' => 'part_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['new_tbl'])) { - $this->new_tbl = $vals['new_tbl']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_table_args'; + return 'ThriftHiveMetastore_append_partition_by_name_args'; } public function read($input) @@ -8474,7 +10302,7 @@ class ThriftHiveMetastore_alter_table_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -8487,9 +10315,8 @@ class ThriftHiveMetastore_alter_table_args { } break; case 3: - if ($ftype == TType::STRUCT) { - $this->new_tbl = new Table(); - $xfer += $this->new_tbl->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -8506,10 +10333,10 @@ class ThriftHiveMetastore_alter_table_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } if ($this->tbl_name !== null) { @@ -8517,12 +10344,9 @@ class ThriftHiveMetastore_alter_table_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_tbl !== null) { - if (!is_object($this->new_tbl)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); - $xfer += $this->new_tbl->write($output); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8532,39 +10356,57 @@ class ThriftHiveMetastore_alter_table_args { } -class ThriftHiveMetastore_alter_table_result { +class ThriftHiveMetastore_append_partition_by_name_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'Partition', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', + 'class' => 'InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, + 'class' => 'AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, 'class' => 'MetaException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_alter_table_result'; + return 'ThriftHiveMetastore_append_partition_by_name_result'; } public function read($input) @@ -8582,9 +10424,17 @@ class ThriftHiveMetastore_alter_table_result { } switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidOperationException(); + $this->o1 = new InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -8592,12 +10442,20 @@ class ThriftHiveMetastore_alter_table_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); + $this->o2 = new AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -8610,7 +10468,15 @@ class ThriftHiveMetastore_alter_table_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -8621,6 +10487,11 @@ class ThriftHiveMetastore_alter_table_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -8628,19 +10499,19 @@ class ThriftHiveMetastore_alter_table_result { } -class ThriftHiveMetastore_alter_table_with_environment_context_args { +class ThriftHiveMetastore_drop_partition_args { static $_TSPEC; - public $dbname = null; + public $db_name = null; public $tbl_name = null; - public $new_tbl = null; - public $environment_context = null; + public $part_vals = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( @@ -8648,35 +10519,37 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_tbl', - 'type' => TType::STRUCT, - 'class' => 'Table', + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 4 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => 'EnvironmentContext', + 'var' => 'deleteData', + 'type' => TType::BOOL, ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['new_tbl'])) { - $this->new_tbl = $vals['new_tbl']; + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_table_with_environment_context_args'; + return 'ThriftHiveMetastore_drop_partition_args'; } public function read($input) @@ -8696,7 +10569,7 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -8709,17 +10582,25 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { } break; case 3: - if ($ftype == TType::STRUCT) { - $this->new_tbl = new Table(); - $xfer += $this->new_tbl->read($input); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size313 = 0; + $_etype316 = 0; + $xfer += $input->readListBegin($_etype316, $_size313); + for ($_i317 = 0; $_i317 < $_size313; ++$_i317) + { + $elem318 = null; + $xfer += $input->readString($elem318); + $this->part_vals []= $elem318; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::STRUCT) { - $this->environment_context = new EnvironmentContext(); - $xfer += $this->environment_context->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -8736,10 +10617,10 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_with_environment_context_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } if ($this->tbl_name !== null) { @@ -8747,20 +10628,26 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_tbl !== null) { - if (!is_object($this->new_tbl)) { + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); - $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter319) + { + $xfer += $output->writeString($iter319); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->environment_context !== null) { - if (!is_object($this->environment_context)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 4); - $xfer += $this->environment_context->write($output); + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8770,19 +10657,24 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { } -class ThriftHiveMetastore_alter_table_with_environment_context_result { +class ThriftHiveMetastore_drop_partition_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', + 'class' => 'NoSuchObjectException', ), 2 => array( 'var' => 'o2', @@ -8792,6 +10684,9 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -8802,7 +10697,7 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { } public function getName() { - return 'ThriftHiveMetastore_alter_table_with_environment_context_result'; + return 'ThriftHiveMetastore_drop_partition_result'; } public function read($input) @@ -8820,9 +10715,16 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { } switch ($fid) { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidOperationException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -8848,7 +10750,12 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -8866,30 +10773,53 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { } -class ThriftHiveMetastore_add_partition_args { +class ThriftHiveMetastore_drop_partition_by_name_args { static $_TSPEC; - public $new_part = null; + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, ), ); } if (is_array($vals)) { - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_add_partition_args'; + return 'ThriftHiveMetastore_drop_partition_by_name_args'; } public function read($input) @@ -8908,9 +10838,29 @@ class ThriftHiveMetastore_add_partition_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->new_part = new Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -8927,13 +10877,25 @@ class ThriftHiveMetastore_add_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args'); - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); - $xfer += $this->new_part->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8943,35 +10905,28 @@ class ThriftHiveMetastore_add_partition_args { } -class ThriftHiveMetastore_add_partition_result { +class ThriftHiveMetastore_drop_partition_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidObjectException', + 'class' => 'NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'MetaException', ), ); @@ -8986,14 +10941,11 @@ class ThriftHiveMetastore_add_partition_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_partition_result'; + return 'ThriftHiveMetastore_drop_partition_by_name_result'; } public function read($input) @@ -9012,16 +10964,15 @@ class ThriftHiveMetastore_add_partition_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidObjectException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9029,20 +10980,12 @@ class ThriftHiveMetastore_add_partition_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new AlreadyExistsException(); + $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -9055,13 +10998,10 @@ class ThriftHiveMetastore_add_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9074,11 +11014,6 @@ class ThriftHiveMetastore_add_partition_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -9086,39 +11021,49 @@ class ThriftHiveMetastore_add_partition_result { } -class ThriftHiveMetastore_add_partition_with_environment_context_args { +class ThriftHiveMetastore_get_partition_args { static $_TSPEC; - public $new_part = null; - public $environment_context = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'var' => 'db_name', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => 'EnvironmentContext', + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } if (is_array($vals)) { - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; } } } public function getName() { - return 'ThriftHiveMetastore_add_partition_with_environment_context_args'; + return 'ThriftHiveMetastore_get_partition_args'; } public function read($input) @@ -9137,17 +11082,32 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->new_part = new Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRUCT) { - $this->environment_context = new EnvironmentContext(); - $xfer += $this->environment_context->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size320 = 0; + $_etype323 = 0; + $xfer += $input->readListBegin($_etype323, $_size320); + for ($_i324 = 0; $_i324 < $_size320; ++$_i324) + { + $elem325 = null; + $xfer += $input->readString($elem325); + $this->part_vals []= $elem325; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -9164,21 +11124,32 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_args'); - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); - $xfer += $this->new_part->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->environment_context !== null) { - if (!is_object($this->environment_context)) { + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2); - $xfer += $this->environment_context->write($output); + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter326) + { + $xfer += $output->writeString($iter326); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9188,13 +11159,12 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args { } -class ThriftHiveMetastore_add_partition_with_environment_context_result { +class ThriftHiveMetastore_get_partition_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -9207,17 +11177,12 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidObjectException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), ); } @@ -9231,14 +11196,11 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_partition_with_environment_context_result'; + return 'ThriftHiveMetastore_get_partition_result'; } public function read($input) @@ -9266,7 +11228,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidObjectException(); + $this->o1 = new MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9274,20 +11236,12 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new AlreadyExistsException(); + $this->o2 = new NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -9300,7 +11254,7 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -9319,11 +11273,6 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -9331,34 +11280,69 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { } -class ThriftHiveMetastore_add_partitions_args { +class ThriftHiveMetastore_get_partition_with_auth_args { static $_TSPEC; - public $new_parts = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'new_parts', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', 'type' => TType::LST, - 'etype' => TType::STRUCT, + 'etype' => TType::STRING, 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, ), ), ); } if (is_array($vals)) { - if (isset($vals['new_parts'])) { - $this->new_parts = $vals['new_parts']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_add_partitions_args'; + return 'ThriftHiveMetastore_get_partition_with_auth_args'; } public function read($input) @@ -9377,17 +11361,54 @@ class ThriftHiveMetastore_add_partitions_args { switch ($fid) { case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: if ($ftype == TType::LST) { - $this->new_parts = array(); - $_size292 = 0; - $_etype295 = 0; - $xfer += $input->readListBegin($_etype295, $_size292); - for ($_i296 = 0; $_i296 < $_size292; ++$_i296) + $this->part_vals = array(); + $_size327 = 0; + $_etype330 = 0; + $xfer += $input->readListBegin($_etype330, $_size327); + for ($_i331 = 0; $_i331 < $_size327; ++$_i331) { - $elem297 = null; - $elem297 = new Partition(); - $xfer += $elem297->read($input); - $this->new_parts []= $elem297; + $elem332 = null; + $xfer += $input->readString($elem332); + $this->part_vals []= $elem332; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size333 = 0; + $_etype336 = 0; + $xfer += $input->readListBegin($_etype336, $_size333); + for ($_i337 = 0; $_i337 < $_size333; ++$_i337) + { + $elem338 = null; + $xfer += $input->readString($elem338); + $this->group_names []= $elem338; } $xfer += $input->readListEnd(); } else { @@ -9406,18 +11427,50 @@ class ThriftHiveMetastore_add_partitions_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_args'); - if ($this->new_parts !== null) { - if (!is_array($this->new_parts)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('new_parts', TType::LST, 1); + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); { - $output->writeListBegin(TType::STRUCT, count($this->new_parts)); + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter339) + { + $xfer += $output->writeString($iter339); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->new_parts as $iter298) + foreach ($this->group_names as $iter340) { - $xfer += $iter298->write($output); + $xfer += $output->writeString($iter340); } } $output->writeListEnd(); @@ -9431,35 +11484,30 @@ class ThriftHiveMetastore_add_partitions_args { } -class ThriftHiveMetastore_add_partitions_result { +class ThriftHiveMetastore_get_partition_with_auth_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::I32, + 'type' => TType::STRUCT, + 'class' => 'Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidObjectException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), ); } @@ -9473,14 +11521,11 @@ class ThriftHiveMetastore_add_partitions_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_partitions_result'; + return 'ThriftHiveMetastore_get_partition_with_auth_result'; } public function read($input) @@ -9499,15 +11544,16 @@ class ThriftHiveMetastore_add_partitions_result { switch ($fid) { case 0: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->success); + if ($ftype == TType::STRUCT) { + $this->success = new Partition(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidObjectException(); + $this->o1 = new MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9515,20 +11561,12 @@ class ThriftHiveMetastore_add_partitions_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new AlreadyExistsException(); + $this->o2 = new NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -9541,10 +11579,13 @@ class ThriftHiveMetastore_add_partitions_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partitions_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::I32, 0); - $xfer += $output->writeI32($this->success); + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9557,11 +11598,6 @@ class ThriftHiveMetastore_add_partitions_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -9569,12 +11605,12 @@ class ThriftHiveMetastore_add_partitions_result { } -class ThriftHiveMetastore_append_partition_args { +class ThriftHiveMetastore_get_partition_by_name_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -9588,12 +11624,8 @@ class ThriftHiveMetastore_append_partition_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'part_name', + 'type' => TType::STRING, ), ); } @@ -9604,14 +11636,14 @@ class ThriftHiveMetastore_append_partition_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_args'; + return 'ThriftHiveMetastore_get_partition_by_name_args'; } public function read($input) @@ -9644,18 +11676,8 @@ class ThriftHiveMetastore_append_partition_args { } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size299 = 0; - $_etype302 = 0; - $xfer += $input->readListBegin($_etype302, $_size299); - for ($_i303 = 0; $_i303 < $_size299; ++$_i303) - { - $elem304 = null; - $xfer += $input->readString($elem304); - $this->part_vals []= $elem304; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -9672,7 +11694,7 @@ class ThriftHiveMetastore_append_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -9683,21 +11705,9 @@ class ThriftHiveMetastore_append_partition_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter305) - { - $xfer += $output->writeString($iter305); - } - } - $output->writeListEnd(); - } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9707,13 +11717,12 @@ class ThriftHiveMetastore_append_partition_args { } -class ThriftHiveMetastore_append_partition_result { +class ThriftHiveMetastore_get_partition_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -9726,17 +11735,12 @@ class ThriftHiveMetastore_append_partition_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidObjectException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), ); } @@ -9750,14 +11754,11 @@ class ThriftHiveMetastore_append_partition_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_result'; + return 'ThriftHiveMetastore_get_partition_by_name_result'; } public function read($input) @@ -9785,24 +11786,16 @@ class ThriftHiveMetastore_append_partition_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new AlreadyExistsException(); - $xfer += $this->o2->read($input); + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -9819,7 +11812,7 @@ class ThriftHiveMetastore_append_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -9838,11 +11831,6 @@ class ThriftHiveMetastore_append_partition_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -9850,12 +11838,12 @@ class ThriftHiveMetastore_append_partition_result { } -class ThriftHiveMetastore_append_partition_by_name_args { +class ThriftHiveMetastore_get_partitions_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -9869,8 +11857,8 @@ class ThriftHiveMetastore_append_partition_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -9881,14 +11869,14 @@ class ThriftHiveMetastore_append_partition_by_name_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_args'; + return 'ThriftHiveMetastore_get_partitions_args'; } public function read($input) @@ -9921,8 +11909,8 @@ class ThriftHiveMetastore_append_partition_by_name_args { } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -9939,7 +11927,7 @@ class ThriftHiveMetastore_append_partition_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -9950,9 +11938,9 @@ class ThriftHiveMetastore_append_partition_by_name_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9962,35 +11950,33 @@ class ThriftHiveMetastore_append_partition_by_name_args { } -class ThriftHiveMetastore_append_partition_by_name_result { +class ThriftHiveMetastore_get_partitions_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Partition', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidObjectException', + 'class' => 'NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'MetaException', ), ); @@ -10005,14 +11991,11 @@ class ThriftHiveMetastore_append_partition_by_name_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_result'; + return 'ThriftHiveMetastore_get_partitions_result'; } public function read($input) @@ -10031,16 +12014,26 @@ class ThriftHiveMetastore_append_partition_by_name_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size341 = 0; + $_etype344 = 0; + $xfer += $input->readListBegin($_etype344, $_size341); + for ($_i345 = 0; $_i345 < $_size341; ++$_i345) + { + $elem346 = null; + $elem346 = new Partition(); + $xfer += $elem346->read($input); + $this->success []= $elem346; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidObjectException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -10048,20 +12041,12 @@ class ThriftHiveMetastore_append_partition_by_name_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new AlreadyExistsException(); + $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -10074,13 +12059,22 @@ class ThriftHiveMetastore_append_partition_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter347) + { + $xfer += $iter347->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10093,11 +12087,6 @@ class ThriftHiveMetastore_append_partition_by_name_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10105,13 +12094,14 @@ class ThriftHiveMetastore_append_partition_by_name_result { } -class ThriftHiveMetastore_drop_partition_args { +class ThriftHiveMetastore_get_partitions_with_auth_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $deleteData = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -10125,17 +12115,21 @@ class ThriftHiveMetastore_drop_partition_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', 'type' => TType::LST, 'etype' => TType::STRING, 'elem' => array( 'type' => TType::STRING, ), ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), ); } if (is_array($vals)) { @@ -10145,17 +12139,20 @@ class ThriftHiveMetastore_drop_partition_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_args'; + return 'ThriftHiveMetastore_get_partitions_with_auth_args'; } public function read($input) @@ -10188,25 +12185,32 @@ class ThriftHiveMetastore_drop_partition_args { } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size306 = 0; - $_etype309 = 0; - $xfer += $input->readListBegin($_etype309, $_size306); - for ($_i310 = 0; $_i310 < $_size306; ++$_i310) - { - $elem311 = null; - $xfer += $input->readString($elem311); - $this->part_vals []= $elem311; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size348 = 0; + $_etype351 = 0; + $xfer += $input->readListBegin($_etype351, $_size348); + for ($_i352 = 0; $_i352 < $_size348; ++$_i352) + { + $elem353 = null; + $xfer += $input->readString($elem353); + $this->group_names []= $elem353; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -10223,7 +12227,7 @@ class ThriftHiveMetastore_drop_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -10234,28 +12238,33 @@ class ThriftHiveMetastore_drop_partition_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); { - $output->writeListBegin(TType::STRING, count($this->part_vals)); + $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->part_vals as $iter312) + foreach ($this->group_names as $iter354) { - $xfer += $output->writeString($iter312); + $xfer += $output->writeString($iter354); } } $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10263,7 +12272,7 @@ class ThriftHiveMetastore_drop_partition_args { } -class ThriftHiveMetastore_drop_partition_result { +class ThriftHiveMetastore_get_partitions_with_auth_result { static $_TSPEC; public $success = null; @@ -10275,7 +12284,12 @@ class ThriftHiveMetastore_drop_partition_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Partition', + ), ), 1 => array( 'var' => 'o1', @@ -10303,7 +12317,7 @@ class ThriftHiveMetastore_drop_partition_result { } public function getName() { - return 'ThriftHiveMetastore_drop_partition_result'; + return 'ThriftHiveMetastore_get_partitions_with_auth_result'; } public function read($input) @@ -10322,8 +12336,19 @@ class ThriftHiveMetastore_drop_partition_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size355 = 0; + $_etype358 = 0; + $xfer += $input->readListBegin($_etype358, $_size355); + for ($_i359 = 0; $_i359 < $_size355; ++$_i359) + { + $elem360 = null; + $elem360 = new Partition(); + $xfer += $elem360->read($input); + $this->success []= $elem360; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -10356,10 +12381,22 @@ class ThriftHiveMetastore_drop_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter361) + { + $xfer += $iter361->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10379,13 +12416,12 @@ class ThriftHiveMetastore_drop_partition_result { } -class ThriftHiveMetastore_drop_partition_by_name_args { +class ThriftHiveMetastore_get_partition_names_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; - public $deleteData = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -10399,12 +12435,8 @@ class ThriftHiveMetastore_drop_partition_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -10415,17 +12447,14 @@ class ThriftHiveMetastore_drop_partition_by_name_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_args'; + return 'ThriftHiveMetastore_get_partition_names_args'; } public function read($input) @@ -10458,15 +12487,8 @@ class ThriftHiveMetastore_drop_partition_by_name_args { } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -10483,7 +12505,7 @@ class ThriftHiveMetastore_drop_partition_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -10494,14 +12516,9 @@ class ThriftHiveMetastore_drop_partition_by_name_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10511,11 +12528,10 @@ class ThriftHiveMetastore_drop_partition_by_name_args { } -class ThriftHiveMetastore_drop_partition_by_name_result { +class ThriftHiveMetastore_get_partition_names_result { static $_TSPEC; public $success = null; - public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -10523,14 +12539,13 @@ class ThriftHiveMetastore_drop_partition_by_name_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', - ), - 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'MetaException', @@ -10541,9 +12556,6 @@ class ThriftHiveMetastore_drop_partition_by_name_result { if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } @@ -10551,7 +12563,7 @@ class ThriftHiveMetastore_drop_partition_by_name_result { } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_result'; + return 'ThriftHiveMetastore_get_partition_names_result'; } public function read($input) @@ -10570,22 +12582,24 @@ class ThriftHiveMetastore_drop_partition_by_name_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size362 = 0; + $_etype365 = 0; + $xfer += $input->readListBegin($_etype365, $_size362); + for ($_i366 = 0; $_i366 < $_size362; ++$_i366) + { + $elem367 = null; + $xfer += $input->readString($elem367); + $this->success []= $elem367; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { @@ -10604,19 +12618,26 @@ class ThriftHiveMetastore_drop_partition_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter368) + { + $xfer += $output->writeString($iter368); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -10627,12 +12648,13 @@ class ThriftHiveMetastore_drop_partition_by_name_result { } -class ThriftHiveMetastore_get_partition_args { +class ThriftHiveMetastore_get_partitions_ps_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; public $part_vals = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -10653,6 +12675,10 @@ class ThriftHiveMetastore_get_partition_args { 'type' => TType::STRING, ), ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } if (is_array($vals)) { @@ -10665,11 +12691,14 @@ class ThriftHiveMetastore_get_partition_args { if (isset($vals['part_vals'])) { $this->part_vals = $vals['part_vals']; } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_args'; + return 'ThriftHiveMetastore_get_partitions_ps_args'; } public function read($input) @@ -10704,20 +12733,27 @@ class ThriftHiveMetastore_get_partition_args { case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size313 = 0; - $_etype316 = 0; - $xfer += $input->readListBegin($_etype316, $_size313); - for ($_i317 = 0; $_i317 < $_size313; ++$_i317) + $_size369 = 0; + $_etype372 = 0; + $xfer += $input->readListBegin($_etype372, $_size369); + for ($_i373 = 0; $_i373 < $_size369; ++$_i373) { - $elem318 = null; - $xfer += $input->readString($elem318); - $this->part_vals []= $elem318; + $elem374 = null; + $xfer += $input->readString($elem374); + $this->part_vals []= $elem374; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -10730,7 +12766,7 @@ class ThriftHiveMetastore_get_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -10749,15 +12785,20 @@ class ThriftHiveMetastore_get_partition_args { { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter319) + foreach ($this->part_vals as $iter375) { - $xfer += $output->writeString($iter319); + $xfer += $output->writeString($iter375); } } $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10765,7 +12806,7 @@ class ThriftHiveMetastore_get_partition_args { } -class ThriftHiveMetastore_get_partition_result { +class ThriftHiveMetastore_get_partitions_ps_result { static $_TSPEC; public $success = null; @@ -10777,8 +12818,12 @@ class ThriftHiveMetastore_get_partition_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Partition', + ), ), 1 => array( 'var' => 'o1', @@ -10806,7 +12851,7 @@ class ThriftHiveMetastore_get_partition_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_result'; + return 'ThriftHiveMetastore_get_partitions_ps_result'; } public function read($input) @@ -10825,9 +12870,19 @@ class ThriftHiveMetastore_get_partition_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size376 = 0; + $_etype379 = 0; + $xfer += $input->readListBegin($_etype379, $_size376); + for ($_i380 = 0; $_i380 < $_size376; ++$_i380) + { + $elem381 = null; + $elem381 = new Partition(); + $xfer += $elem381->read($input); + $this->success []= $elem381; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -10860,13 +12915,22 @@ class ThriftHiveMetastore_get_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter382) + { + $xfer += $iter382->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10886,12 +12950,13 @@ class ThriftHiveMetastore_get_partition_result { } -class ThriftHiveMetastore_get_partition_with_auth_args { +class ThriftHiveMetastore_get_partitions_ps_with_auth_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; public $part_vals = null; + public $max_parts = -1; public $user_name = null; public $group_names = null; @@ -10915,10 +12980,14 @@ class ThriftHiveMetastore_get_partition_with_auth_args { ), ), 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 5 => array( 'var' => 'user_name', 'type' => TType::STRING, ), - 5 => array( + 6 => array( 'var' => 'group_names', 'type' => TType::LST, 'etype' => TType::STRING, @@ -10938,6 +13007,9 @@ class ThriftHiveMetastore_get_partition_with_auth_args { if (isset($vals['part_vals'])) { $this->part_vals = $vals['part_vals']; } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } if (isset($vals['user_name'])) { $this->user_name = $vals['user_name']; } @@ -10948,7 +13020,7 @@ class ThriftHiveMetastore_get_partition_with_auth_args { } public function getName() { - return 'ThriftHiveMetastore_get_partition_with_auth_args'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_args'; } public function read($input) @@ -10983,14 +13055,14 @@ class ThriftHiveMetastore_get_partition_with_auth_args { case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size320 = 0; - $_etype323 = 0; - $xfer += $input->readListBegin($_etype323, $_size320); - for ($_i324 = 0; $_i324 < $_size320; ++$_i324) + $_size383 = 0; + $_etype386 = 0; + $xfer += $input->readListBegin($_etype386, $_size383); + for ($_i387 = 0; $_i387 < $_size383; ++$_i387) { - $elem325 = null; - $xfer += $input->readString($elem325); - $this->part_vals []= $elem325; + $elem388 = null; + $xfer += $input->readString($elem388); + $this->part_vals []= $elem388; } $xfer += $input->readListEnd(); } else { @@ -10998,23 +13070,30 @@ class ThriftHiveMetastore_get_partition_with_auth_args { } break; case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: if ($ftype == TType::STRING) { $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; - case 5: + case 6: if ($ftype == TType::LST) { $this->group_names = array(); - $_size326 = 0; - $_etype329 = 0; - $xfer += $input->readListBegin($_etype329, $_size326); - for ($_i330 = 0; $_i330 < $_size326; ++$_i330) + $_size389 = 0; + $_etype392 = 0; + $xfer += $input->readListBegin($_etype392, $_size389); + for ($_i393 = 0; $_i393 < $_size389; ++$_i393) { - $elem331 = null; - $xfer += $input->readString($elem331); - $this->group_names []= $elem331; + $elem394 = null; + $xfer += $input->readString($elem394); + $this->group_names []= $elem394; } $xfer += $input->readListEnd(); } else { @@ -11033,7 +13112,7 @@ class ThriftHiveMetastore_get_partition_with_auth_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -11052,17 +13131,22 @@ class ThriftHiveMetastore_get_partition_with_auth_args { { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter332) + foreach ($this->part_vals as $iter395) { - $xfer += $output->writeString($iter332); + $xfer += $output->writeString($iter395); } } $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } if ($this->user_name !== null) { - $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 5); $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } @@ -11070,13 +13154,13 @@ class ThriftHiveMetastore_get_partition_with_auth_args { if (!is_array($this->group_names)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter333) + foreach ($this->group_names as $iter396) { - $xfer += $output->writeString($iter333); + $xfer += $output->writeString($iter396); } } $output->writeListEnd(); @@ -11090,7 +13174,7 @@ class ThriftHiveMetastore_get_partition_with_auth_args { } -class ThriftHiveMetastore_get_partition_with_auth_result { +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { static $_TSPEC; public $success = null; @@ -11102,18 +13186,22 @@ class ThriftHiveMetastore_get_partition_with_auth_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Partition', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), ); } @@ -11131,7 +13219,7 @@ class ThriftHiveMetastore_get_partition_with_auth_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_with_auth_result'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_result'; } public function read($input) @@ -11150,16 +13238,26 @@ class ThriftHiveMetastore_get_partition_with_auth_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size397 = 0; + $_etype400 = 0; + $xfer += $input->readListBegin($_etype400, $_size397); + for ($_i401 = 0; $_i401 < $_size397; ++$_i401) + { + $elem402 = null; + $elem402 = new Partition(); + $xfer += $elem402->read($input); + $this->success []= $elem402; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -11167,7 +13265,7 @@ class ThriftHiveMetastore_get_partition_with_auth_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); + $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -11185,13 +13283,22 @@ class ThriftHiveMetastore_get_partition_with_auth_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter403) + { + $xfer += $iter403->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -11211,12 +13318,13 @@ class ThriftHiveMetastore_get_partition_with_auth_result { } -class ThriftHiveMetastore_get_partition_by_name_args { +class ThriftHiveMetastore_get_partition_names_ps_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; + public $part_vals = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -11230,8 +13338,16 @@ class ThriftHiveMetastore_get_partition_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -11242,14 +13358,17 @@ class ThriftHiveMetastore_get_partition_by_name_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_args'; + return 'ThriftHiveMetastore_get_partition_names_ps_args'; } public function read($input) @@ -11282,8 +13401,25 @@ class ThriftHiveMetastore_get_partition_by_name_args { } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size404 = 0; + $_etype407 = 0; + $xfer += $input->readListBegin($_etype407, $_size404); + for ($_i408 = 0; $_i408 < $_size404; ++$_i408) + { + $elem409 = null; + $xfer += $input->readString($elem409); + $this->part_vals []= $elem409; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -11300,7 +13436,7 @@ class ThriftHiveMetastore_get_partition_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -11311,9 +13447,26 @@ class ThriftHiveMetastore_get_partition_by_name_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter410) + { + $xfer += $output->writeString($iter410); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -11323,7 +13476,7 @@ class ThriftHiveMetastore_get_partition_by_name_args { } -class ThriftHiveMetastore_get_partition_by_name_result { +class ThriftHiveMetastore_get_partition_names_ps_result { static $_TSPEC; public $success = null; @@ -11335,8 +13488,11 @@ class ThriftHiveMetastore_get_partition_by_name_result { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( 'var' => 'o1', @@ -11364,7 +13520,7 @@ class ThriftHiveMetastore_get_partition_by_name_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_result'; + return 'ThriftHiveMetastore_get_partition_names_ps_result'; } public function read($input) @@ -11383,9 +13539,18 @@ class ThriftHiveMetastore_get_partition_by_name_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size411 = 0; + $_etype414 = 0; + $xfer += $input->readListBegin($_etype414, $_size411); + for ($_i415 = 0; $_i415 < $_size411; ++$_i415) + { + $elem416 = null; + $xfer += $input->readString($elem416); + $this->success []= $elem416; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -11418,13 +13583,22 @@ class ThriftHiveMetastore_get_partition_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter417) + { + $xfer += $output->writeString($iter417); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -11444,11 +13618,12 @@ class ThriftHiveMetastore_get_partition_by_name_result { } -class ThriftHiveMetastore_get_partitions_args { +class ThriftHiveMetastore_get_partitions_by_filter_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; + public $filter = null; public $max_parts = -1; public function __construct($vals=null) { @@ -11463,6 +13638,10 @@ class ThriftHiveMetastore_get_partitions_args { 'type' => TType::STRING, ), 3 => array( + 'var' => 'filter', + 'type' => TType::STRING, + ), + 4 => array( 'var' => 'max_parts', 'type' => TType::I16, ), @@ -11475,6 +13654,9 @@ class ThriftHiveMetastore_get_partitions_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } + if (isset($vals['filter'])) { + $this->filter = $vals['filter']; + } if (isset($vals['max_parts'])) { $this->max_parts = $vals['max_parts']; } @@ -11482,7 +13664,7 @@ class ThriftHiveMetastore_get_partitions_args { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_args'; + return 'ThriftHiveMetastore_get_partitions_by_filter_args'; } public function read($input) @@ -11515,6 +13697,13 @@ class ThriftHiveMetastore_get_partitions_args { } break; case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->filter); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: if ($ftype == TType::I16) { $xfer += $input->readI16($this->max_parts); } else { @@ -11533,7 +13722,7 @@ class ThriftHiveMetastore_get_partitions_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -11544,8 +13733,13 @@ class ThriftHiveMetastore_get_partitions_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 3); + $xfer += $output->writeString($this->filter); + $xfer += $output->writeFieldEnd(); + } if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } @@ -11556,7 +13750,7 @@ class ThriftHiveMetastore_get_partitions_args { } -class ThriftHiveMetastore_get_partitions_result { +class ThriftHiveMetastore_get_partitions_by_filter_result { static $_TSPEC; public $success = null; @@ -11578,12 +13772,12 @@ class ThriftHiveMetastore_get_partitions_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), ); } @@ -11601,7 +13795,7 @@ class ThriftHiveMetastore_get_partitions_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_result'; + return 'ThriftHiveMetastore_get_partitions_by_filter_result'; } public function read($input) @@ -11622,15 +13816,15 @@ class ThriftHiveMetastore_get_partitions_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size334 = 0; - $_etype337 = 0; - $xfer += $input->readListBegin($_etype337, $_size334); - for ($_i338 = 0; $_i338 < $_size334; ++$_i338) + $_size418 = 0; + $_etype421 = 0; + $xfer += $input->readListBegin($_etype421, $_size418); + for ($_i422 = 0; $_i422 < $_size418; ++$_i422) { - $elem339 = null; - $elem339 = new Partition(); - $xfer += $elem339->read($input); - $this->success []= $elem339; + $elem423 = null; + $elem423 = new Partition(); + $xfer += $elem423->read($input); + $this->success []= $elem423; } $xfer += $input->readListEnd(); } else { @@ -11639,7 +13833,7 @@ class ThriftHiveMetastore_get_partitions_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new NoSuchObjectException(); + $this->o1 = new MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -11647,7 +13841,7 @@ class ThriftHiveMetastore_get_partitions_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); + $this->o2 = new NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -11665,7 +13859,7 @@ class ThriftHiveMetastore_get_partitions_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -11674,9 +13868,9 @@ class ThriftHiveMetastore_get_partitions_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter340) + foreach ($this->success as $iter424) { - $xfer += $iter340->write($output); + $xfer += $iter424->write($output); } } $output->writeListEnd(); @@ -11700,14 +13894,12 @@ class ThriftHiveMetastore_get_partitions_result { } -class ThriftHiveMetastore_get_partitions_with_auth_args { +class ThriftHiveMetastore_get_partitions_by_names_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $max_parts = -1; - public $user_name = null; - public $group_names = null; + public $names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -11721,15 +13913,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, - ), - 4 => array( - 'var' => 'user_name', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'group_names', + 'var' => 'names', 'type' => TType::LST, 'etype' => TType::STRING, 'elem' => array( @@ -11745,20 +13929,14 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; - } - if (isset($vals['user_name'])) { - $this->user_name = $vals['user_name']; - } - if (isset($vals['group_names'])) { - $this->group_names = $vals['group_names']; + if (isset($vals['names'])) { + $this->names = $vals['names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_with_auth_args'; + return 'ThriftHiveMetastore_get_partitions_by_names_args'; } public function read($input) @@ -11791,30 +13969,16 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->user_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: if ($ftype == TType::LST) { - $this->group_names = array(); - $_size341 = 0; - $_etype344 = 0; - $xfer += $input->readListBegin($_etype344, $_size341); - for ($_i345 = 0; $_i345 < $_size341; ++$_i345) + $this->names = array(); + $_size425 = 0; + $_etype428 = 0; + $xfer += $input->readListBegin($_etype428, $_size425); + for ($_i429 = 0; $_i429 < $_size425; ++$_i429) { - $elem346 = null; - $xfer += $input->readString($elem346); - $this->group_names []= $elem346; + $elem430 = null; + $xfer += $input->readString($elem430); + $this->names []= $elem430; } $xfer += $input->readListEnd(); } else { @@ -11833,7 +13997,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_names_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -11844,27 +14008,17 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); - $xfer += $output->writeFieldEnd(); - } - if ($this->user_name !== null) { - $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); - $xfer += $output->writeString($this->user_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->group_names !== null) { - if (!is_array($this->group_names)) { + if ($this->names !== null) { + if (!is_array($this->names)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + $xfer += $output->writeFieldBegin('names', TType::LST, 3); { - $output->writeListBegin(TType::STRING, count($this->group_names)); + $output->writeListBegin(TType::STRING, count($this->names)); { - foreach ($this->group_names as $iter347) + foreach ($this->names as $iter431) { - $xfer += $output->writeString($iter347); + $xfer += $output->writeString($iter431); } } $output->writeListEnd(); @@ -11878,7 +14032,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { } -class ThriftHiveMetastore_get_partitions_with_auth_result { +class ThriftHiveMetastore_get_partitions_by_names_result { static $_TSPEC; public $success = null; @@ -11900,12 +14054,12 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), ); } @@ -11923,7 +14077,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_with_auth_result'; + return 'ThriftHiveMetastore_get_partitions_by_names_result'; } public function read($input) @@ -11944,15 +14098,15 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size348 = 0; - $_etype351 = 0; - $xfer += $input->readListBegin($_etype351, $_size348); - for ($_i352 = 0; $_i352 < $_size348; ++$_i352) + $_size432 = 0; + $_etype435 = 0; + $xfer += $input->readListBegin($_etype435, $_size432); + for ($_i436 = 0; $_i436 < $_size432; ++$_i436) { - $elem353 = null; - $elem353 = new Partition(); - $xfer += $elem353->read($input); - $this->success []= $elem353; + $elem437 = null; + $elem437 = new Partition(); + $xfer += $elem437->read($input); + $this->success []= $elem437; } $xfer += $input->readListEnd(); } else { @@ -11961,7 +14115,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new NoSuchObjectException(); + $this->o1 = new MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -11969,7 +14123,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); + $this->o2 = new NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -11987,7 +14141,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_names_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -11996,9 +14150,9 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter354) + foreach ($this->success as $iter438) { - $xfer += $iter354->write($output); + $xfer += $iter438->write($output); } } $output->writeListEnd(); @@ -12022,12 +14176,12 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { } -class ThriftHiveMetastore_get_partition_names_args { +class ThriftHiveMetastore_alter_partition_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $max_parts = -1; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -12041,8 +14195,9 @@ class ThriftHiveMetastore_get_partition_names_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'Partition', ), ); } @@ -12053,14 +14208,14 @@ class ThriftHiveMetastore_get_partition_names_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_args'; + return 'ThriftHiveMetastore_alter_partition_args'; } public function read($input) @@ -12093,8 +14248,9 @@ class ThriftHiveMetastore_get_partition_names_args { } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRUCT) { + $this->new_part = new Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -12111,7 +14267,7 @@ class ThriftHiveMetastore_get_partition_names_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -12122,9 +14278,12 @@ class ThriftHiveMetastore_get_partition_names_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -12134,24 +14293,21 @@ class ThriftHiveMetastore_get_partition_names_args { } -class ThriftHiveMetastore_get_partition_names_result { +class ThriftHiveMetastore_alter_partition_result { static $_TSPEC; - public $success = null; + public $o1 = null; public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'InvalidOperationException', + ), + 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'MetaException', @@ -12159,8 +14315,8 @@ class ThriftHiveMetastore_get_partition_names_result { ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; @@ -12169,7 +14325,7 @@ class ThriftHiveMetastore_get_partition_names_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_result'; + return 'ThriftHiveMetastore_alter_partition_result'; } public function read($input) @@ -12187,24 +14343,15 @@ class ThriftHiveMetastore_get_partition_names_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size355 = 0; - $_etype358 = 0; - $xfer += $input->readListBegin($_etype358, $_size355); - for ($_i359 = 0; $_i359 < $_size355; ++$_i359) - { - $elem360 = null; - $xfer += $input->readString($elem360); - $this->success []= $elem360; - } - $xfer += $input->readListEnd(); + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new InvalidOperationException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 1: + case 2: if ($ftype == TType::STRUCT) { $this->o2 = new MetaException(); $xfer += $this->o2->read($input); @@ -12224,26 +14371,14 @@ class ThriftHiveMetastore_get_partition_names_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter361) - { - $xfer += $output->writeString($iter361); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -12254,13 +14389,12 @@ class ThriftHiveMetastore_get_partition_names_result { } -class ThriftHiveMetastore_get_partitions_ps_args { +class ThriftHiveMetastore_alter_partitions_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; + public $new_parts = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -12274,17 +14408,14 @@ class ThriftHiveMetastore_get_partitions_ps_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', + 'var' => 'new_parts', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => 'Partition', ), ), - 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, - ), ); } if (is_array($vals)) { @@ -12294,17 +14425,14 @@ class ThriftHiveMetastore_get_partitions_ps_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_args'; + return 'ThriftHiveMetastore_alter_partitions_args'; } public function read($input) @@ -12338,28 +14466,22 @@ class ThriftHiveMetastore_get_partitions_ps_args { break; case 3: if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size362 = 0; - $_etype365 = 0; - $xfer += $input->readListBegin($_etype365, $_size362); - for ($_i366 = 0; $_i366 < $_size362; ++$_i366) + $this->new_parts = array(); + $_size439 = 0; + $_etype442 = 0; + $xfer += $input->readListBegin($_etype442, $_size439); + for ($_i443 = 0; $_i443 < $_size439; ++$_i443) { - $elem367 = null; - $xfer += $input->readString($elem367); - $this->part_vals []= $elem367; + $elem444 = null; + $elem444 = new Partition(); + $xfer += $elem444->read($input); + $this->new_parts []= $elem444; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -12372,7 +14494,7 @@ class ThriftHiveMetastore_get_partitions_ps_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partitions_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -12383,28 +14505,23 @@ class ThriftHiveMetastore_get_partitions_ps_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + if ($this->new_parts !== null) { + if (!is_array($this->new_parts)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + $xfer += $output->writeFieldBegin('new_parts', TType::LST, 3); { - $output->writeListBegin(TType::STRING, count($this->part_vals)); + $output->writeListBegin(TType::STRUCT, count($this->new_parts)); { - foreach ($this->part_vals as $iter368) + foreach ($this->new_parts as $iter445) { - $xfer += $output->writeString($iter368); + $xfer += $iter445->write($output); } } $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -12412,41 +14529,28 @@ class ThriftHiveMetastore_get_partitions_ps_args { } -class ThriftHiveMetastore_get_partitions_ps_result { +class ThriftHiveMetastore_alter_partitions_result { static $_TSPEC; - public $success = null; public $o1 = null; public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Partition', - ), - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'InvalidOperationException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -12457,7 +14561,7 @@ class ThriftHiveMetastore_get_partitions_ps_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_result'; + return 'ThriftHiveMetastore_alter_partitions_result'; } public function read($input) @@ -12475,27 +14579,9 @@ class ThriftHiveMetastore_get_partitions_ps_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size369 = 0; - $_etype372 = 0; - $xfer += $input->readListBegin($_etype372, $_size369); - for ($_i373 = 0; $_i373 < $_size369; ++$_i373) - { - $elem374 = null; - $elem374 = new Partition(); - $xfer += $elem374->read($input); - $this->success []= $elem374; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -12503,7 +14589,7 @@ class ThriftHiveMetastore_get_partitions_ps_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); + $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -12521,24 +14607,7 @@ class ThriftHiveMetastore_get_partitions_ps_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter375) - { - $xfer += $iter375->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partitions_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -12556,15 +14625,13 @@ class ThriftHiveMetastore_get_partitions_ps_result { } -class ThriftHiveMetastore_get_partitions_ps_with_auth_args { +class ThriftHiveMetastore_alter_partition_with_environment_context_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; - public $user_name = null; - public $group_names = null; + public $new_part = null; + public $environment_context = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -12578,28 +14645,14 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, - ), - 5 => array( - 'var' => 'user_name', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'group_names', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'Partition', + ), + 4 => array( + 'var' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => 'EnvironmentContext', ), ); } @@ -12610,23 +14663,17 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; - } - if (isset($vals['user_name'])) { - $this->user_name = $vals['user_name']; + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } - if (isset($vals['group_names'])) { - $this->group_names = $vals['group_names']; + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_with_auth_args'; + return 'ThriftHiveMetastore_alter_partition_with_environment_context_args'; } public function read($input) @@ -12659,49 +14706,17 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size376 = 0; - $_etype379 = 0; - $xfer += $input->readListBegin($_etype379, $_size376); - for ($_i380 = 0; $_i380 < $_size376; ++$_i380) - { - $elem381 = null; - $xfer += $input->readString($elem381); - $this->part_vals []= $elem381; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->new_part = new Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->user_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::LST) { - $this->group_names = array(); - $_size382 = 0; - $_etype385 = 0; - $xfer += $input->readListBegin($_etype385, $_size382); - for ($_i386 = 0; $_i386 < $_size382; ++$_i386) - { - $elem387 = null; - $xfer += $input->readString($elem387); - $this->group_names []= $elem387; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->environment_context = new EnvironmentContext(); + $xfer += $this->environment_context->read($input); } else { $xfer += $input->skip($ftype); } @@ -12718,7 +14733,7 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -12729,48 +14744,20 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter388) - { - $xfer += $output->writeString($iter388); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); - $xfer += $output->writeFieldEnd(); - } - if ($this->user_name !== null) { - $xfer += $output->writeFieldBegin('user_name', TType::STRING, 5); - $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->group_names !== null) { - if (!is_array($this->group_names)) { + if ($this->environment_context !== null) { + if (!is_object($this->environment_context)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); - { - $output->writeListBegin(TType::STRING, count($this->group_names)); - { - foreach ($this->group_names as $iter389) - { - $xfer += $output->writeString($iter389); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 4); + $xfer += $this->environment_context->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -12780,29 +14767,19 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { } -class ThriftHiveMetastore_get_partitions_ps_with_auth_result { +class ThriftHiveMetastore_alter_partition_with_environment_context_result { static $_TSPEC; - public $success = null; public $o1 = null; public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Partition', - ), - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'InvalidOperationException', ), 2 => array( 'var' => 'o2', @@ -12812,9 +14789,6 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -12825,7 +14799,7 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_with_auth_result'; + return 'ThriftHiveMetastore_alter_partition_with_environment_context_result'; } public function read($input) @@ -12843,27 +14817,9 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size390 = 0; - $_etype393 = 0; - $xfer += $input->readListBegin($_etype393, $_size390); - for ($_i394 = 0; $_i394 < $_size390; ++$_i394) - { - $elem395 = null; - $elem395 = new Partition(); - $xfer += $elem395->read($input); - $this->success []= $elem395; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new NoSuchObjectException(); + $this->o1 = new InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -12889,24 +14845,7 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter396) - { - $xfer += $iter396->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -12924,13 +14863,13 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_result { } -class ThriftHiveMetastore_get_partition_names_ps_args { +class ThriftHiveMetastore_rename_partition_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; public $part_vals = null; - public $max_parts = -1; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -12952,8 +14891,9 @@ class ThriftHiveMetastore_get_partition_names_ps_args { ), ), 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'Partition', ), ); } @@ -12967,14 +14907,14 @@ class ThriftHiveMetastore_get_partition_names_ps_args { if (isset($vals['part_vals'])) { $this->part_vals = $vals['part_vals']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_args'; + return 'ThriftHiveMetastore_rename_partition_args'; } public function read($input) @@ -13009,14 +14949,14 @@ class ThriftHiveMetastore_get_partition_names_ps_args { case 3: if ($ftype == TType::LST) { $this->part_vals = array(); - $_size397 = 0; - $_etype400 = 0; - $xfer += $input->readListBegin($_etype400, $_size397); - for ($_i401 = 0; $_i401 < $_size397; ++$_i401) + $_size446 = 0; + $_etype449 = 0; + $xfer += $input->readListBegin($_etype449, $_size446); + for ($_i450 = 0; $_i450 < $_size446; ++$_i450) { - $elem402 = null; - $xfer += $input->readString($elem402); - $this->part_vals []= $elem402; + $elem451 = null; + $xfer += $input->readString($elem451); + $this->part_vals []= $elem451; } $xfer += $input->readListEnd(); } else { @@ -13024,8 +14964,9 @@ class ThriftHiveMetastore_get_partition_names_ps_args { } break; case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRUCT) { + $this->new_part = new Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -13042,7 +14983,7 @@ class ThriftHiveMetastore_get_partition_names_ps_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -13061,18 +15002,21 @@ class ThriftHiveMetastore_get_partition_names_ps_args { { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter403) + foreach ($this->part_vals as $iter452) { - $xfer += $output->writeString($iter403); + $xfer += $output->writeString($iter452); } } $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 4); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -13082,40 +15026,28 @@ class ThriftHiveMetastore_get_partition_names_ps_args { } -class ThriftHiveMetastore_get_partition_names_ps_result { +class ThriftHiveMetastore_rename_partition_result { static $_TSPEC; - public $success = null; public $o1 = null; public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'InvalidOperationException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -13126,7 +15058,7 @@ class ThriftHiveMetastore_get_partition_names_ps_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_result'; + return 'ThriftHiveMetastore_rename_partition_result'; } public function read($input) @@ -13144,26 +15076,9 @@ class ThriftHiveMetastore_get_partition_names_ps_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size404 = 0; - $_etype407 = 0; - $xfer += $input->readListBegin($_etype407, $_size404); - for ($_i408 = 0; $_i408 < $_size404; ++$_i408) - { - $elem409 = null; - $xfer += $input->readString($elem409); - $this->success []= $elem409; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -13171,7 +15086,7 @@ class ThriftHiveMetastore_get_partition_names_ps_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); + $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -13189,24 +15104,7 @@ class ThriftHiveMetastore_get_partition_names_ps_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter410) - { - $xfer += $output->writeString($iter410); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -13224,53 +15122,37 @@ class ThriftHiveMetastore_get_partition_names_ps_result { } -class ThriftHiveMetastore_get_partitions_by_filter_args { +class ThriftHiveMetastore_get_config_value_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $filter = null; - public $max_parts = -1; + public $name = null; + public $defaultValue = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'filter', + 'var' => 'defaultValue', 'type' => TType::STRING, ), - 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, - ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['filter'])) { - $this->filter = $vals['filter']; + if (isset($vals['name'])) { + $this->name = $vals['name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['defaultValue'])) { + $this->defaultValue = $vals['defaultValue']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_args'; + return 'ThriftHiveMetastore_get_config_value_args'; } public function read($input) @@ -13290,28 +15172,14 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->filter); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + $xfer += $input->readString($this->defaultValue); } else { $xfer += $input->skip($ftype); } @@ -13328,25 +15196,15 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->filter !== null) { - $xfer += $output->writeFieldBegin('filter', TType::STRING, 3); - $xfer += $output->writeString($this->filter); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + if ($this->defaultValue !== null) { + $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); + $xfer += $output->writeString($this->defaultValue); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -13356,34 +15214,23 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { } -class ThriftHiveMetastore_get_partitions_by_filter_result { +class ThriftHiveMetastore_get_config_value_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Partition', - ), + 'type' => TType::STRING, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'ConfigValSecurityException', ), ); } @@ -13394,14 +15241,11 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_result'; + return 'ThriftHiveMetastore_get_config_value_result'; } public function read($input) @@ -13420,39 +15264,20 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size411 = 0; - $_etype414 = 0; - $xfer += $input->readListBegin($_etype414, $_size411); - for ($_i415 = 0; $_i415 < $_size411; ++$_i415) - { - $elem416 = null; - $elem416 = new Partition(); - $xfer += $elem416->read($input); - $this->success []= $elem416; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new ConfigValSecurityException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -13465,22 +15290,10 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter417) - { - $xfer += $iter417->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -13488,11 +15301,6 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -13500,49 +15308,29 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { } -class ThriftHiveMetastore_get_partitions_by_names_args { +class ThriftHiveMetastore_partition_name_to_vals_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $names = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', + 'var' => 'part_name', 'type' => TType::STRING, ), - 3 => array( - 'var' => 'names', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['names'])) { - $this->names = $vals['names']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_names_args'; + return 'ThriftHiveMetastore_partition_name_to_vals_args'; } public function read($input) @@ -13562,31 +15350,7 @@ class ThriftHiveMetastore_get_partitions_by_names_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->names = array(); - $_size418 = 0; - $_etype421 = 0; - $xfer += $input->readListBegin($_etype421, $_size418); - for ($_i422 = 0; $_i422 < $_size418; ++$_i422) - { - $elem423 = null; - $xfer += $input->readString($elem423); - $this->names []= $elem423; - } - $xfer += $input->readListEnd(); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -13603,32 +15367,10 @@ class ThriftHiveMetastore_get_partitions_by_names_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_names_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->names !== null) { - if (!is_array($this->names)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('names', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->names)); - { - foreach ($this->names as $iter424) - { - $xfer += $output->writeString($iter424); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -13638,12 +15380,11 @@ class ThriftHiveMetastore_get_partitions_by_names_args { } -class ThriftHiveMetastore_get_partitions_by_names_result { +class ThriftHiveMetastore_partition_name_to_vals_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -13651,10 +15392,9 @@ class ThriftHiveMetastore_get_partitions_by_names_result { 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRUCT, + 'etype' => TType::STRING, 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'type' => TType::STRING, ), ), 1 => array( @@ -13662,11 +15402,6 @@ class ThriftHiveMetastore_get_partitions_by_names_result { 'type' => TType::STRUCT, 'class' => 'MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -13676,14 +15411,11 @@ class ThriftHiveMetastore_get_partitions_by_names_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_names_result'; + return 'ThriftHiveMetastore_partition_name_to_vals_result'; } public function read($input) @@ -13704,33 +15436,24 @@ class ThriftHiveMetastore_get_partitions_by_names_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size425 = 0; - $_etype428 = 0; - $xfer += $input->readListBegin($_etype428, $_size425); - for ($_i429 = 0; $_i429 < $_size425; ++$_i429) + $_size453 = 0; + $_etype456 = 0; + $xfer += $input->readListBegin($_etype456, $_size453); + for ($_i457 = 0; $_i457 < $_size453; ++$_i457) { - $elem430 = null; - $elem430 = new Partition(); - $xfer += $elem430->read($input); - $this->success []= $elem430; + $elem458 = null; + $xfer += $input->readString($elem458); + $this->success []= $elem458; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); - $xfer += $this->o2->read($input); + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -13747,18 +15470,18 @@ class ThriftHiveMetastore_get_partitions_by_names_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_names_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeListBegin(TType::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter431) + foreach ($this->success as $iter459) { - $xfer += $iter431->write($output); + $xfer += $output->writeString($iter459); } } $output->writeListEnd(); @@ -13770,11 +15493,6 @@ class ThriftHiveMetastore_get_partitions_by_names_result { $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -13782,46 +15500,29 @@ class ThriftHiveMetastore_get_partitions_by_names_result { } -class ThriftHiveMetastore_alter_partition_args { +class ThriftHiveMetastore_partition_name_to_spec_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $new_part = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', + 'var' => 'part_name', 'type' => TType::STRING, ), - 3 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'Partition', - ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_args'; + return 'ThriftHiveMetastore_partition_name_to_spec_args'; } public function read($input) @@ -13841,22 +15542,7 @@ class ThriftHiveMetastore_alter_partition_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->new_part = new Partition(); - $xfer += $this->new_part->read($input); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -13873,23 +15559,10 @@ class ThriftHiveMetastore_alter_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); - $xfer += $this->new_part->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -13899,39 +15572,46 @@ class ThriftHiveMetastore_alter_partition_args { } -class ThriftHiveMetastore_alter_partition_result { +class ThriftHiveMetastore_partition_name_to_spec_result { static $_TSPEC; + public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'MetaException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_result'; + return 'ThriftHiveMetastore_partition_name_to_spec_result'; } public function read($input) @@ -13949,18 +15629,30 @@ class ThriftHiveMetastore_alter_partition_result { } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidOperationException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::MAP) { + $this->success = array(); + $_size460 = 0; + $_ktype461 = 0; + $_vtype462 = 0; + $xfer += $input->readMapBegin($_ktype461, $_vtype462, $_size460); + for ($_i464 = 0; $_i464 < $_size460; ++$_i464) + { + $key465 = ''; + $val466 = ''; + $xfer += $input->readString($key465); + $xfer += $input->readString($val466); + $this->success[$key465] = $val466; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -13977,17 +15669,30 @@ class ThriftHiveMetastore_alter_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); + { + foreach ($this->success as $kiter467 => $viter468) + { + $xfer += $output->writeString($kiter467); + $xfer += $output->writeString($viter468); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -13995,12 +15700,13 @@ class ThriftHiveMetastore_alter_partition_result { } -class ThriftHiveMetastore_alter_partitions_args { +class ThriftHiveMetastore_markPartitionForEvent_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $new_parts = null; + public $part_vals = null; + public $eventType = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -14014,14 +15720,21 @@ class ThriftHiveMetastore_alter_partitions_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_parts', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'var' => 'part_vals', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, ), ), + 4 => array( + 'var' => 'eventType', + 'type' => TType::I32, + ), ); } if (is_array($vals)) { @@ -14031,14 +15744,17 @@ class ThriftHiveMetastore_alter_partitions_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['new_parts'])) { - $this->new_parts = $vals['new_parts']; + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partitions_args'; + return 'ThriftHiveMetastore_markPartitionForEvent_args'; } public function read($input) @@ -14071,19 +15787,28 @@ class ThriftHiveMetastore_alter_partitions_args { } break; case 3: - if ($ftype == TType::LST) { - $this->new_parts = array(); - $_size432 = 0; - $_etype435 = 0; - $xfer += $input->readListBegin($_etype435, $_size432); - for ($_i436 = 0; $_i436 < $_size432; ++$_i436) + if ($ftype == TType::MAP) { + $this->part_vals = array(); + $_size469 = 0; + $_ktype470 = 0; + $_vtype471 = 0; + $xfer += $input->readMapBegin($_ktype470, $_vtype471, $_size469); + for ($_i473 = 0; $_i473 < $_size469; ++$_i473) { - $elem437 = null; - $elem437 = new Partition(); - $xfer += $elem437->read($input); - $this->new_parts []= $elem437; + $key474 = ''; + $val475 = ''; + $xfer += $input->readString($key474); + $xfer += $input->readString($val475); + $this->part_vals[$key474] = $val475; } - $xfer += $input->readListEnd(); + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventType); } else { $xfer += $input->skip($ftype); } @@ -14100,7 +15825,7 @@ class ThriftHiveMetastore_alter_partitions_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partitions_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -14111,23 +15836,29 @@ class ThriftHiveMetastore_alter_partitions_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_parts !== null) { - if (!is_array($this->new_parts)) { + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('new_parts', TType::LST, 3); + $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); { - $output->writeListBegin(TType::STRUCT, count($this->new_parts)); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); { - foreach ($this->new_parts as $iter438) + foreach ($this->part_vals as $kiter476 => $viter477) { - $xfer += $iter438->write($output); + $xfer += $output->writeString($kiter476); + $xfer += $output->writeString($viter477); } } - $output->writeListEnd(); + $output->writeMapEnd(); } $xfer += $output->writeFieldEnd(); } + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); + $xfer += $output->writeI32($this->eventType); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -14135,11 +15866,15 @@ class ThriftHiveMetastore_alter_partitions_args { } -class ThriftHiveMetastore_alter_partitions_result { +class ThriftHiveMetastore_markPartitionForEvent_result { static $_TSPEC; public $o1 = null; public $o2 = null; + public $o3 = null; + public $o4 = null; + public $o5 = null; + public $o6 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -14147,12 +15882,32 @@ class ThriftHiveMetastore_alter_partitions_result { 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'UnknownDBException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'UnknownTableException', + ), + 5 => array( + 'var' => 'o5', + 'type' => TType::STRUCT, + 'class' => 'UnknownPartitionException', + ), + 6 => array( + 'var' => 'o6', + 'type' => TType::STRUCT, + 'class' => 'InvalidPartitionException', ), ); } @@ -14160,14 +15915,26 @@ class ThriftHiveMetastore_alter_partitions_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + if (isset($vals['o5'])) { + $this->o5 = $vals['o5']; + } + if (isset($vals['o6'])) { + $this->o6 = $vals['o6']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partitions_result'; + return 'ThriftHiveMetastore_markPartitionForEvent_result'; } public function read($input) @@ -14187,7 +15954,7 @@ class ThriftHiveMetastore_alter_partitions_result { { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidOperationException(); + $this->o1 = new MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -14195,12 +15962,44 @@ class ThriftHiveMetastore_alter_partitions_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); + $this->o2 = new NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new UnknownTableException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->o5 = new UnknownPartitionException(); + $xfer += $this->o5->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->o6 = new InvalidPartitionException(); + $xfer += $this->o6->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -14213,7 +16012,7 @@ class ThriftHiveMetastore_alter_partitions_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partitions_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -14224,6 +16023,26 @@ class ThriftHiveMetastore_alter_partitions_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o5 !== null) { + $xfer += $output->writeFieldBegin('o5', TType::STRUCT, 5); + $xfer += $this->o5->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o6 !== null) { + $xfer += $output->writeFieldBegin('o6', TType::STRUCT, 6); + $xfer += $this->o6->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -14231,13 +16050,13 @@ class ThriftHiveMetastore_alter_partitions_result { } -class ThriftHiveMetastore_alter_partition_with_environment_context_args { +class ThriftHiveMetastore_isPartitionMarkedForEvent_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $new_part = null; - public $environment_context = null; + public $part_vals = null; + public $eventType = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -14251,14 +16070,20 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'var' => 'part_vals', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), ), 4 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => 'EnvironmentContext', + 'var' => 'eventType', + 'type' => TType::I32, ), ); } @@ -14269,17 +16094,17 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; } - if (isset($vals['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_with_environment_context_args'; + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_args'; } public function read($input) @@ -14312,17 +16137,28 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { } break; case 3: - if ($ftype == TType::STRUCT) { - $this->new_part = new Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::MAP) { + $this->part_vals = array(); + $_size478 = 0; + $_ktype479 = 0; + $_vtype480 = 0; + $xfer += $input->readMapBegin($_ktype479, $_vtype480, $_size478); + for ($_i482 = 0; $_i482 < $_size478; ++$_i482) + { + $key483 = ''; + $val484 = ''; + $xfer += $input->readString($key483); + $xfer += $input->readString($val484); + $this->part_vals[$key483] = $val484; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::STRUCT) { - $this->environment_context = new EnvironmentContext(); - $xfer += $this->environment_context->read($input); + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventType); } else { $xfer += $input->skip($ftype); } @@ -14339,7 +16175,7 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -14350,20 +16186,27 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); - $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $kiter485 => $viter486) + { + $xfer += $output->writeString($kiter485); + $xfer += $output->writeString($viter486); + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->environment_context !== null) { - if (!is_object($this->environment_context)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 4); - $xfer += $this->environment_context->write($output); + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); + $xfer += $output->writeI32($this->eventType); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -14373,39 +16216,83 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { } -class ThriftHiveMetastore_alter_partition_with_environment_context_result { +class ThriftHiveMetastore_isPartitionMarkedForEvent_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; + public $o4 = null; + public $o5 = null; + public $o6 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'UnknownDBException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'UnknownTableException', + ), + 5 => array( + 'var' => 'o5', + 'type' => TType::STRUCT, + 'class' => 'UnknownPartitionException', + ), + 6 => array( + 'var' => 'o6', + 'type' => TType::STRUCT, + 'class' => 'InvalidPartitionException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + if (isset($vals['o5'])) { + $this->o5 = $vals['o5']; + } + if (isset($vals['o6'])) { + $this->o6 = $vals['o6']; + } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_with_environment_context_result'; + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_result'; } public function read($input) @@ -14423,9 +16310,16 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { } switch ($fid) { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidOperationException(); + $this->o1 = new MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -14433,12 +16327,44 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); + $this->o2 = new NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new UnknownDBException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new UnknownTableException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->o5 = new UnknownPartitionException(); + $xfer += $this->o5->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->o6 = new InvalidPartitionException(); + $xfer += $this->o6->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -14451,15 +16377,40 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_with_environment_context_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o5 !== null) { + $xfer += $output->writeFieldBegin('o5', TType::STRUCT, 5); + $xfer += $this->o5->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o6 !== null) { + $xfer += $output->writeFieldBegin('o6', TType::STRUCT, 6); + $xfer += $this->o6->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -14469,58 +16420,39 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { } -class ThriftHiveMetastore_rename_partition_args { +class ThriftHiveMetastore_add_index_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_vals = null; - public $new_part = null; + public $new_index = null; + public $index_table = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, + 'var' => 'new_index', + 'type' => TType::STRUCT, + 'class' => 'Index', ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'new_part', + 'var' => 'index_table', 'type' => TType::STRUCT, - 'class' => 'Partition', + 'class' => 'Table', ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['new_index'])) { + $this->new_index = $vals['new_index']; } - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['index_table'])) { + $this->index_table = $vals['index_table']; } } } public function getName() { - return 'ThriftHiveMetastore_rename_partition_args'; + return 'ThriftHiveMetastore_add_index_args'; } public function read($input) @@ -14539,40 +16471,17 @@ class ThriftHiveMetastore_rename_partition_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + if ($ftype == TType::STRUCT) { + $this->new_index = new Index(); + $xfer += $this->new_index->read($input); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size439 = 0; - $_etype442 = 0; - $xfer += $input->readListBegin($_etype442, $_size439); - for ($_i443 = 0; $_i443 < $_size439; ++$_i443) - { - $elem444 = null; - $xfer += $input->readString($elem444); - $this->part_vals []= $elem444; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: if ($ftype == TType::STRUCT) { - $this->new_part = new Partition(); - $xfer += $this->new_part->read($input); + $this->index_table = new Table(); + $xfer += $this->index_table->read($input); } else { $xfer += $input->skip($ftype); } @@ -14589,40 +16498,21 @@ class ThriftHiveMetastore_rename_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_args'); + if ($this->new_index !== null) { + if (!is_object($this->new_index)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter445) - { - $xfer += $output->writeString($iter445); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); + $xfer += $this->new_index->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { + if ($this->index_table !== null) { + if (!is_object($this->index_table)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 4); - $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldBegin('index_table', TType::STRUCT, 2); + $xfer += $this->index_table->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -14632,39 +16522,57 @@ class ThriftHiveMetastore_rename_partition_args { } -class ThriftHiveMetastore_rename_partition_result { +class ThriftHiveMetastore_add_index_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'Index', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', + 'class' => 'InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, + 'class' => 'AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, 'class' => 'MetaException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_rename_partition_result'; + return 'ThriftHiveMetastore_add_index_result'; } public function read($input) @@ -14682,9 +16590,17 @@ class ThriftHiveMetastore_rename_partition_result { } switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new Index(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidOperationException(); + $this->o1 = new InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -14692,12 +16608,20 @@ class ThriftHiveMetastore_rename_partition_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); + $this->o2 = new AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -14710,7 +16634,15 @@ class ThriftHiveMetastore_rename_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -14721,6 +16653,11 @@ class ThriftHiveMetastore_rename_partition_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -14728,37 +16665,54 @@ class ThriftHiveMetastore_rename_partition_result { } -class ThriftHiveMetastore_get_config_value_args { +class ThriftHiveMetastore_alter_index_args { static $_TSPEC; - public $name = null; - public $defaultValue = null; + public $dbname = null; + public $base_tbl_name = null; + public $idx_name = null; + public $new_idx = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'dbname', 'type' => TType::STRING, ), 2 => array( - 'var' => 'defaultValue', + 'var' => 'base_tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'idx_name', 'type' => TType::STRING, ), + 4 => array( + 'var' => 'new_idx', + 'type' => TType::STRUCT, + 'class' => 'Index', + ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; } - if (isset($vals['defaultValue'])) { - $this->defaultValue = $vals['defaultValue']; + if (isset($vals['base_tbl_name'])) { + $this->base_tbl_name = $vals['base_tbl_name']; + } + if (isset($vals['idx_name'])) { + $this->idx_name = $vals['idx_name']; + } + if (isset($vals['new_idx'])) { + $this->new_idx = $vals['new_idx']; } } } public function getName() { - return 'ThriftHiveMetastore_get_config_value_args'; + return 'ThriftHiveMetastore_alter_index_args'; } public function read($input) @@ -14778,14 +16732,29 @@ class ThriftHiveMetastore_get_config_value_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->dbname); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->defaultValue); + $xfer += $input->readString($this->base_tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->idx_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->new_idx = new Index(); + $xfer += $this->new_idx->read($input); } else { $xfer += $input->skip($ftype); } @@ -14796,21 +16765,34 @@ class ThriftHiveMetastore_get_config_value_args { } $xfer += $input->readFieldEnd(); } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->base_tbl_name !== null) { + $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->base_tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->idx_name !== null) { + $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); + $xfer += $output->writeString($this->idx_name); $xfer += $output->writeFieldEnd(); } - if ($this->defaultValue !== null) { - $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); - $xfer += $output->writeString($this->defaultValue); + if ($this->new_idx !== null) { + if (!is_object($this->new_idx)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); + $xfer += $this->new_idx->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -14820,38 +16802,39 @@ class ThriftHiveMetastore_get_config_value_args { } -class ThriftHiveMetastore_get_config_value_result { +class ThriftHiveMetastore_alter_index_result { static $_TSPEC; - public $success = null; public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRING, - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'ConfigValSecurityException', + 'class' => 'InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'MetaException', ), ); } if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_config_value_result'; + return 'ThriftHiveMetastore_alter_index_result'; } public function read($input) @@ -14869,17 +16852,18 @@ class ThriftHiveMetastore_get_config_value_result { } switch ($fid) { - case 0: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->success); + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new InvalidOperationException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 1: + case 2: if ($ftype == TType::STRUCT) { - $this->o1 = new ConfigValSecurityException(); - $xfer += $this->o1->read($input); + $this->o2 = new MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -14896,17 +16880,17 @@ class ThriftHiveMetastore_get_config_value_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::STRING, 0); - $xfer += $output->writeString($this->success); - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -14914,29 +16898,53 @@ class ThriftHiveMetastore_get_config_value_result { } -class ThriftHiveMetastore_partition_name_to_vals_args { +class ThriftHiveMetastore_drop_index_by_name_args { static $_TSPEC; - public $part_name = null; + public $db_name = null; + public $tbl_name = null; + public $index_name = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'part_name', + 'var' => 'db_name', 'type' => TType::STRING, ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), ); } if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_args'; + return 'ThriftHiveMetastore_drop_index_by_name_args'; } public function read($input) @@ -14956,7 +16964,28 @@ class ThriftHiveMetastore_partition_name_to_vals_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -14973,10 +17002,25 @@ class ThriftHiveMetastore_partition_name_to_vals_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_args'); - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); - $xfer += $output->writeString($this->part_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -14986,26 +17030,28 @@ class ThriftHiveMetastore_partition_name_to_vals_args { } -class ThriftHiveMetastore_partition_name_to_vals_result { +class ThriftHiveMetastore_drop_index_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, + 'class' => 'NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, 'class' => 'MetaException', ), ); @@ -15017,11 +17063,14 @@ class ThriftHiveMetastore_partition_name_to_vals_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_result'; + return 'ThriftHiveMetastore_drop_index_by_name_result'; } public function read($input) @@ -15040,30 +17089,28 @@ class ThriftHiveMetastore_partition_name_to_vals_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size446 = 0; - $_etype449 = 0; - $xfer += $input->readListBegin($_etype449, $_size446); - for ($_i450 = 0; $_i450 < $_size446; ++$_i450) - { - $elem451 = null; - $xfer += $input->readString($elem451); - $this->success []= $elem451; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -15076,22 +17123,10 @@ class ThriftHiveMetastore_partition_name_to_vals_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter452) - { - $xfer += $output->writeString($iter452); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -15099,6 +17134,11 @@ class ThriftHiveMetastore_partition_name_to_vals_result { $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -15106,29 +17146,45 @@ class ThriftHiveMetastore_partition_name_to_vals_result { } -class ThriftHiveMetastore_partition_name_to_spec_args { +class ThriftHiveMetastore_get_index_by_name_args { static $_TSPEC; - public $part_name = null; + public $db_name = null; + public $tbl_name = null; + public $index_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'part_name', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_args'; + return 'ThriftHiveMetastore_get_index_by_name_args'; } public function read($input) @@ -15148,7 +17204,21 @@ class ThriftHiveMetastore_partition_name_to_spec_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); } else { $xfer += $input->skip($ftype); } @@ -15165,10 +17235,20 @@ class ThriftHiveMetastore_partition_name_to_spec_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args'); - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); - $xfer += $output->writeString($this->part_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -15178,32 +17258,31 @@ class ThriftHiveMetastore_partition_name_to_spec_args { } -class ThriftHiveMetastore_partition_name_to_spec_result { +class ThriftHiveMetastore_get_index_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRUCT, + 'class' => 'Index', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'MetaException', ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'NoSuchObjectException', + ), ); } if (is_array($vals)) { @@ -15213,11 +17292,14 @@ class ThriftHiveMetastore_partition_name_to_spec_result { if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_result'; + return 'ThriftHiveMetastore_get_index_by_name_result'; } public function read($input) @@ -15236,21 +17318,9 @@ class ThriftHiveMetastore_partition_name_to_spec_result { switch ($fid) { case 0: - if ($ftype == TType::MAP) { - $this->success = array(); - $_size453 = 0; - $_ktype454 = 0; - $_vtype455 = 0; - $xfer += $input->readMapBegin($_ktype454, $_vtype455, $_size453); - for ($_i457 = 0; $_i457 < $_size453; ++$_i457) - { - $key458 = ''; - $val459 = ''; - $xfer += $input->readString($key458); - $xfer += $input->readString($val459); - $this->success[$key458] = $val459; - } - $xfer += $input->readMapEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new Index(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -15263,6 +17333,14 @@ class ThriftHiveMetastore_partition_name_to_spec_result { $xfer += $input->skip($ftype); } break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -15275,23 +17353,13 @@ class ThriftHiveMetastore_partition_name_to_spec_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::MAP, 0); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); - { - foreach ($this->success as $kiter460 => $viter461) - { - $xfer += $output->writeString($kiter460); - $xfer += $output->writeString($viter461); - } - } - $output->writeMapEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -15299,6 +17367,11 @@ class ThriftHiveMetastore_partition_name_to_spec_result { $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -15306,13 +17379,12 @@ class ThriftHiveMetastore_partition_name_to_spec_result { } -class ThriftHiveMetastore_markPartitionForEvent_args { +class ThriftHiveMetastore_get_indexes_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $eventType = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -15326,20 +17398,8 @@ class ThriftHiveMetastore_markPartitionForEvent_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'eventType', - 'type' => TType::I32, + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -15350,17 +17410,14 @@ class ThriftHiveMetastore_markPartitionForEvent_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['eventType'])) { - $this->eventType = $vals['eventType']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_markPartitionForEvent_args'; + return 'ThriftHiveMetastore_get_indexes_args'; } public function read($input) @@ -15393,28 +17450,8 @@ class ThriftHiveMetastore_markPartitionForEvent_args { } break; case 3: - if ($ftype == TType::MAP) { - $this->part_vals = array(); - $_size462 = 0; - $_ktype463 = 0; - $_vtype464 = 0; - $xfer += $input->readMapBegin($_ktype463, $_vtype464, $_size462); - for ($_i466 = 0; $_i466 < $_size462; ++$_i466) - { - $key467 = ''; - $val468 = ''; - $xfer += $input->readString($key467); - $xfer += $input->readString($val468); - $this->part_vals[$key467] = $val468; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->eventType); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -15431,7 +17468,7 @@ class ThriftHiveMetastore_markPartitionForEvent_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -15442,27 +17479,9 @@ class ThriftHiveMetastore_markPartitionForEvent_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $kiter469 => $viter470) - { - $xfer += $output->writeString($kiter469); - $xfer += $output->writeString($viter470); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->eventType !== null) { - $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); - $xfer += $output->writeI32($this->eventType); + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -15472,136 +17491,99 @@ class ThriftHiveMetastore_markPartitionForEvent_args { } -class ThriftHiveMetastore_markPartitionForEvent_result { +class ThriftHiveMetastore_get_indexes_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; - public $o4 = null; - public $o5 = null; - public $o6 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Index', + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'UnknownDBException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => 'UnknownTableException', - ), - 5 => array( - 'var' => 'o5', - 'type' => TType::STRUCT, - 'class' => 'UnknownPartitionException', - ), - 6 => array( - 'var' => 'o6', - 'type' => TType::STRUCT, - 'class' => 'InvalidPartitionException', + 'class' => 'MetaException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } - if (isset($vals['o4'])) { - $this->o4 = $vals['o4']; - } - if (isset($vals['o5'])) { - $this->o5 = $vals['o5']; - } - if (isset($vals['o6'])) { - $this->o6 = $vals['o6']; - } } - } - - public function getName() { - return 'ThriftHiveMetastore_markPartitionForEvent_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new UnknownDBException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new UnknownTableException(); - $xfer += $this->o4->read($input); + } + + public function getName() { + return 'ThriftHiveMetastore_get_indexes_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size487 = 0; + $_etype490 = 0; + $xfer += $input->readListBegin($_etype490, $_size487); + for ($_i491 = 0; $_i491 < $_size487; ++$_i491) + { + $elem492 = null; + $elem492 = new Index(); + $xfer += $elem492->read($input); + $this->success []= $elem492; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 5: + case 1: if ($ftype == TType::STRUCT) { - $this->o5 = new UnknownPartitionException(); - $xfer += $this->o5->read($input); + $this->o1 = new NoSuchObjectException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 6: + case 2: if ($ftype == TType::STRUCT) { - $this->o6 = new InvalidPartitionException(); - $xfer += $this->o6->read($input); + $this->o2 = new MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -15618,7 +17600,24 @@ class ThriftHiveMetastore_markPartitionForEvent_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter493) + { + $xfer += $iter493->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -15629,26 +17628,6 @@ class ThriftHiveMetastore_markPartitionForEvent_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o4 !== null) { - $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); - $xfer += $this->o4->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o5 !== null) { - $xfer += $output->writeFieldBegin('o5', TType::STRUCT, 5); - $xfer += $this->o5->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o6 !== null) { - $xfer += $output->writeFieldBegin('o6', TType::STRUCT, 6); - $xfer += $this->o6->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -15656,13 +17635,12 @@ class ThriftHiveMetastore_markPartitionForEvent_result { } -class ThriftHiveMetastore_isPartitionMarkedForEvent_args { +class ThriftHiveMetastore_get_index_names_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $eventType = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -15676,20 +17654,8 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'eventType', - 'type' => TType::I32, + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -15700,17 +17666,14 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['eventType'])) { - $this->eventType = $vals['eventType']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_isPartitionMarkedForEvent_args'; + return 'ThriftHiveMetastore_get_index_names_args'; } public function read($input) @@ -15743,28 +17706,8 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { } break; case 3: - if ($ftype == TType::MAP) { - $this->part_vals = array(); - $_size471 = 0; - $_ktype472 = 0; - $_vtype473 = 0; - $xfer += $input->readMapBegin($_ktype472, $_vtype473, $_size471); - for ($_i475 = 0; $_i475 < $_size471; ++$_i475) - { - $key476 = ''; - $val477 = ''; - $xfer += $input->readString($key476); - $xfer += $input->readString($val477); - $this->part_vals[$key476] = $val477; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->eventType); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -15781,7 +17724,7 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -15792,27 +17735,9 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $kiter478 => $viter479) - { - $xfer += $output->writeString($kiter478); - $xfer += $output->writeString($viter479); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->eventType !== null) { - $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); - $xfer += $output->writeI32($this->eventType); + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -15822,53 +17747,27 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { } -class ThriftHiveMetastore_isPartitionMarkedForEvent_result { +class ThriftHiveMetastore_get_index_names_result { static $_TSPEC; public $success = null; - public $o1 = null; public $o2 = null; - public $o3 = null; - public $o4 = null; - public $o5 = null; - public $o6 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'MetaException', - ), - 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'UnknownDBException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => 'UnknownTableException', - ), - 5 => array( - 'var' => 'o5', - 'type' => TType::STRUCT, - 'class' => 'UnknownPartitionException', - ), - 6 => array( - 'var' => 'o6', - 'type' => TType::STRUCT, - 'class' => 'InvalidPartitionException', + 'class' => 'MetaException', ), ); } @@ -15876,29 +17775,14 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } - if (isset($vals['o4'])) { - $this->o4 = $vals['o4']; - } - if (isset($vals['o5'])) { - $this->o5 = $vals['o5']; - } - if (isset($vals['o6'])) { - $this->o6 = $vals['o6']; - } } } public function getName() { - return 'ThriftHiveMetastore_isPartitionMarkedForEvent_result'; + return 'ThriftHiveMetastore_get_index_names_result'; } public function read($input) @@ -15910,63 +17794,33 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { $xfer += $input->readStructBegin($fname); while (true) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new UnknownDBException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new UnknownTableException(); - $xfer += $this->o4->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRUCT) { - $this->o5 = new UnknownPartitionException(); - $xfer += $this->o5->read($input); + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size494 = 0; + $_etype497 = 0; + $xfer += $input->readListBegin($_etype497, $_size494); + for ($_i498 = 0; $_i498 < $_size494; ++$_i498) + { + $elem499 = null; + $xfer += $input->readString($elem499); + $this->success []= $elem499; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 6: + case 1: if ($ftype == TType::STRUCT) { - $this->o6 = new InvalidPartitionException(); - $xfer += $this->o6->read($input); + $this->o2 = new MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -15983,42 +17837,29 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter500) + { + $xfer += $output->writeString($iter500); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o4 !== null) { - $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); - $xfer += $this->o4->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o5 !== null) { - $xfer += $output->writeFieldBegin('o5', TType::STRUCT, 5); - $xfer += $this->o5->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o6 !== null) { - $xfer += $output->writeFieldBegin('o6', TType::STRUCT, 6); - $xfer += $this->o6->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -16026,39 +17867,30 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { } -class ThriftHiveMetastore_add_index_args { +class ThriftHiveMetastore_update_table_column_statistics_args { static $_TSPEC; - public $new_index = null; - public $index_table = null; + public $stats_obj = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'new_index', - 'type' => TType::STRUCT, - 'class' => 'Index', - ), - 2 => array( - 'var' => 'index_table', + 'var' => 'stats_obj', 'type' => TType::STRUCT, - 'class' => 'Table', + 'class' => 'ColumnStatistics', ), ); } if (is_array($vals)) { - if (isset($vals['new_index'])) { - $this->new_index = $vals['new_index']; - } - if (isset($vals['index_table'])) { - $this->index_table = $vals['index_table']; + if (isset($vals['stats_obj'])) { + $this->stats_obj = $vals['stats_obj']; } } } public function getName() { - return 'ThriftHiveMetastore_add_index_args'; + return 'ThriftHiveMetastore_update_table_column_statistics_args'; } public function read($input) @@ -16078,16 +17910,8 @@ class ThriftHiveMetastore_add_index_args { { case 1: if ($ftype == TType::STRUCT) { - $this->new_index = new Index(); - $xfer += $this->new_index->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->index_table = new Table(); - $xfer += $this->index_table->read($input); + $this->stats_obj = new ColumnStatistics(); + $xfer += $this->stats_obj->read($input); } else { $xfer += $input->skip($ftype); } @@ -16104,21 +17928,13 @@ class ThriftHiveMetastore_add_index_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_args'); - if ($this->new_index !== null) { - if (!is_object($this->new_index)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); - $xfer += $this->new_index->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->index_table !== null) { - if (!is_object($this->index_table)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_update_table_column_statistics_args'); + if ($this->stats_obj !== null) { + if (!is_object($this->stats_obj)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('index_table', TType::STRUCT, 2); - $xfer += $this->index_table->write($output); + $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); + $xfer += $this->stats_obj->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -16128,37 +17944,42 @@ class ThriftHiveMetastore_add_index_args { } -class ThriftHiveMetastore_add_index_result { +class ThriftHiveMetastore_update_table_column_statistics_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; public $o3 = null; + public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'Index', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidObjectException', + 'class' => 'NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'AlreadyExistsException', + 'class' => 'InvalidObjectException', ), 3 => array( 'var' => 'o3', 'type' => TType::STRUCT, 'class' => 'MetaException', ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'InvalidInputException', + ), ); } if (is_array($vals)) { @@ -16174,11 +17995,14 @@ class ThriftHiveMetastore_add_index_result { if (isset($vals['o3'])) { $this->o3 = $vals['o3']; } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_add_index_result'; + return 'ThriftHiveMetastore_update_table_column_statistics_result'; } public function read($input) @@ -16197,16 +18021,15 @@ class ThriftHiveMetastore_add_index_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new Index(); - $xfer += $this->success->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidObjectException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -16214,7 +18037,7 @@ class ThriftHiveMetastore_add_index_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new AlreadyExistsException(); + $this->o2 = new InvalidObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -16228,6 +18051,14 @@ class ThriftHiveMetastore_add_index_result { $xfer += $input->skip($ftype); } break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new InvalidInputException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -16240,13 +18071,10 @@ class ThriftHiveMetastore_add_index_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_update_table_column_statistics_result'); if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -16264,6 +18092,11 @@ class ThriftHiveMetastore_add_index_result { $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -16271,54 +18104,30 @@ class ThriftHiveMetastore_add_index_result { } -class ThriftHiveMetastore_alter_index_args { +class ThriftHiveMetastore_update_partition_column_statistics_args { static $_TSPEC; - public $dbname = null; - public $base_tbl_name = null; - public $idx_name = null; - public $new_idx = null; + public $stats_obj = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'base_tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'idx_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'new_idx', + 'var' => 'stats_obj', 'type' => TType::STRUCT, - 'class' => 'Index', + 'class' => 'ColumnStatistics', ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['base_tbl_name'])) { - $this->base_tbl_name = $vals['base_tbl_name']; - } - if (isset($vals['idx_name'])) { - $this->idx_name = $vals['idx_name']; - } - if (isset($vals['new_idx'])) { - $this->new_idx = $vals['new_idx']; + if (isset($vals['stats_obj'])) { + $this->stats_obj = $vals['stats_obj']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_index_args'; + return 'ThriftHiveMetastore_update_partition_column_statistics_args'; } public function read($input) @@ -16337,30 +18146,9 @@ class ThriftHiveMetastore_alter_index_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->base_tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->idx_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: if ($ftype == TType::STRUCT) { - $this->new_idx = new Index(); - $xfer += $this->new_idx->read($input); + $this->stats_obj = new ColumnStatistics(); + $xfer += $this->stats_obj->read($input); } else { $xfer += $input->skip($ftype); } @@ -16377,28 +18165,13 @@ class ThriftHiveMetastore_alter_index_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->base_tbl_name !== null) { - $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->base_tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->idx_name !== null) { - $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); - $xfer += $output->writeString($this->idx_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->new_idx !== null) { - if (!is_object($this->new_idx)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_update_partition_column_statistics_args'); + if ($this->stats_obj !== null) { + if (!is_object($this->stats_obj)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); - $xfer += $this->new_idx->write($output); + $xfer += $output->writeFieldBegin('stats_obj', TType::STRUCT, 1); + $xfer += $this->stats_obj->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -16408,39 +18181,65 @@ class ThriftHiveMetastore_alter_index_args { } -class ThriftHiveMetastore_alter_index_result { +class ThriftHiveMetastore_update_partition_column_statistics_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; + public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', + 'class' => 'NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, + 'class' => 'InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, 'class' => 'MetaException', ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'InvalidInputException', + ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_index_result'; + return 'ThriftHiveMetastore_update_partition_column_statistics_result'; } public function read($input) @@ -16458,9 +18257,16 @@ class ThriftHiveMetastore_alter_index_result { } switch ($fid) { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new InvalidOperationException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -16468,12 +18274,28 @@ class ThriftHiveMetastore_alter_index_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); + $this->o2 = new InvalidObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new InvalidInputException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -16486,7 +18308,12 @@ class ThriftHiveMetastore_alter_index_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_update_partition_column_statistics_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -16497,6 +18324,16 @@ class ThriftHiveMetastore_alter_index_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -16504,13 +18341,12 @@ class ThriftHiveMetastore_alter_index_result { } -class ThriftHiveMetastore_drop_index_by_name_args { +class ThriftHiveMetastore_get_table_column_statistics_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $index_name = null; - public $deleteData = null; + public $col_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -16524,13 +18360,9 @@ class ThriftHiveMetastore_drop_index_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'index_name', + 'var' => 'col_name', 'type' => TType::STRING, ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), ); } if (is_array($vals)) { @@ -16540,17 +18372,14 @@ class ThriftHiveMetastore_drop_index_by_name_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['index_name'])) { - $this->index_name = $vals['index_name']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_index_by_name_args'; + return 'ThriftHiveMetastore_get_table_column_statistics_args'; } public function read($input) @@ -16584,14 +18413,7 @@ class ThriftHiveMetastore_drop_index_by_name_args { break; case 3: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->index_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + $xfer += $input->readString($this->col_name); } else { $xfer += $input->skip($ftype); } @@ -16608,7 +18430,7 @@ class ThriftHiveMetastore_drop_index_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_column_statistics_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -16619,14 +18441,9 @@ class ThriftHiveMetastore_drop_index_by_name_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + if ($this->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); + $xfer += $output->writeString($this->col_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -16636,19 +18453,22 @@ class ThriftHiveMetastore_drop_index_by_name_args { } -class ThriftHiveMetastore_drop_index_by_name_result { +class ThriftHiveMetastore_get_table_column_statistics_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; + public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::STRUCT, + 'class' => 'ColumnStatistics', ), 1 => array( 'var' => 'o1', @@ -16660,6 +18480,16 @@ class ThriftHiveMetastore_drop_index_by_name_result { 'type' => TType::STRUCT, 'class' => 'MetaException', ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'InvalidInputException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'InvalidObjectException', + ), ); } if (is_array($vals)) { @@ -16672,11 +18502,17 @@ class ThriftHiveMetastore_drop_index_by_name_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_drop_index_by_name_result'; + return 'ThriftHiveMetastore_get_table_column_statistics_result'; } public function read($input) @@ -16695,8 +18531,9 @@ class ThriftHiveMetastore_drop_index_by_name_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::STRUCT) { + $this->success = new ColumnStatistics(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -16717,6 +18554,22 @@ class ThriftHiveMetastore_drop_index_by_name_result { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new InvalidInputException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new InvalidObjectException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -16729,10 +18582,13 @@ class ThriftHiveMetastore_drop_index_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_column_statistics_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -16745,6 +18601,16 @@ class ThriftHiveMetastore_drop_index_by_name_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -16752,12 +18618,13 @@ class ThriftHiveMetastore_drop_index_by_name_result { } -class ThriftHiveMetastore_get_index_by_name_args { +class ThriftHiveMetastore_get_partition_column_statistics_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $index_name = null; + public $part_name = null; + public $col_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -16771,7 +18638,11 @@ class ThriftHiveMetastore_get_index_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'index_name', + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'col_name', 'type' => TType::STRING, ), ); @@ -16783,14 +18654,17 @@ class ThriftHiveMetastore_get_index_by_name_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['index_name'])) { - $this->index_name = $vals['index_name']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_by_name_args'; + return 'ThriftHiveMetastore_get_partition_column_statistics_args'; } public function read($input) @@ -16824,7 +18698,14 @@ class ThriftHiveMetastore_get_index_by_name_args { break; case 3: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->index_name); + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col_name); } else { $xfer += $input->skip($ftype); } @@ -16841,7 +18722,7 @@ class ThriftHiveMetastore_get_index_by_name_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_column_statistics_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -16852,9 +18733,14 @@ class ThriftHiveMetastore_get_index_by_name_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_name); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 4); + $xfer += $output->writeString($this->col_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -16864,12 +18750,14 @@ class ThriftHiveMetastore_get_index_by_name_args { } -class ThriftHiveMetastore_get_index_by_name_result { +class ThriftHiveMetastore_get_partition_column_statistics_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; + public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -16877,17 +18765,27 @@ class ThriftHiveMetastore_get_index_by_name_result { 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'Index', + 'class' => 'ColumnStatistics', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'InvalidInputException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'InvalidObjectException', ), ); } @@ -16901,11 +18799,17 @@ class ThriftHiveMetastore_get_index_by_name_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_index_by_name_result'; + return 'ThriftHiveMetastore_get_partition_column_statistics_result'; } public function read($input) @@ -16925,7 +18829,7 @@ class ThriftHiveMetastore_get_index_by_name_result { { case 0: if ($ftype == TType::STRUCT) { - $this->success = new Index(); + $this->success = new ColumnStatistics(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -16933,7 +18837,7 @@ class ThriftHiveMetastore_get_index_by_name_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -16941,12 +18845,28 @@ class ThriftHiveMetastore_get_index_by_name_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); + $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new InvalidInputException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new InvalidObjectException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -16959,7 +18879,7 @@ class ThriftHiveMetastore_get_index_by_name_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_column_statistics_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -16978,6 +18898,16 @@ class ThriftHiveMetastore_get_index_by_name_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -16985,12 +18915,13 @@ class ThriftHiveMetastore_get_index_by_name_result { } -class ThriftHiveMetastore_get_indexes_args { +class ThriftHiveMetastore_delete_partition_column_statistics_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $max_indexes = -1; + public $part_name = null; + public $col_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -17004,8 +18935,12 @@ class ThriftHiveMetastore_get_indexes_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_indexes', - 'type' => TType::I16, + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'col_name', + 'type' => TType::STRING, ), ); } @@ -17016,14 +18951,17 @@ class ThriftHiveMetastore_get_indexes_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_indexes_args'; + return 'ThriftHiveMetastore_delete_partition_column_statistics_args'; } public function read($input) @@ -17056,8 +18994,15 @@ class ThriftHiveMetastore_get_indexes_args { } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_indexes); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col_name); } else { $xfer += $input->skip($ftype); } @@ -17074,7 +19019,7 @@ class ThriftHiveMetastore_get_indexes_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_partition_column_statistics_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -17085,9 +19030,14 @@ class ThriftHiveMetastore_get_indexes_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_indexes !== null) { - $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); - $xfer += $output->writeI16($this->max_indexes); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 4); + $xfer += $output->writeString($this->col_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -17097,24 +19047,21 @@ class ThriftHiveMetastore_get_indexes_args { } -class ThriftHiveMetastore_get_indexes_result { +class ThriftHiveMetastore_delete_partition_column_statistics_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; + public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Index', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', @@ -17126,6 +19073,16 @@ class ThriftHiveMetastore_get_indexes_result { 'type' => TType::STRUCT, 'class' => 'MetaException', ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'InvalidObjectException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'InvalidInputException', + ), ); } if (is_array($vals)) { @@ -17138,11 +19095,17 @@ class ThriftHiveMetastore_get_indexes_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_indexes_result'; + return 'ThriftHiveMetastore_delete_partition_column_statistics_result'; } public function read($input) @@ -17161,19 +19124,8 @@ class ThriftHiveMetastore_get_indexes_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size480 = 0; - $_etype483 = 0; - $xfer += $input->readListBegin($_etype483, $_size480); - for ($_i484 = 0; $_i484 < $_size480; ++$_i484) - { - $elem485 = null; - $elem485 = new Index(); - $xfer += $elem485->read($input); - $this->success []= $elem485; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -17194,6 +19146,22 @@ class ThriftHiveMetastore_get_indexes_result { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new InvalidObjectException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new InvalidInputException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -17206,22 +19174,10 @@ class ThriftHiveMetastore_get_indexes_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_partition_column_statistics_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter486) - { - $xfer += $iter486->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -17234,6 +19190,16 @@ class ThriftHiveMetastore_get_indexes_result { $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -17241,12 +19207,12 @@ class ThriftHiveMetastore_get_indexes_result { } -class ThriftHiveMetastore_get_index_names_args { +class ThriftHiveMetastore_delete_table_column_statistics_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $max_indexes = -1; + public $col_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -17260,8 +19226,8 @@ class ThriftHiveMetastore_get_index_names_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_indexes', - 'type' => TType::I16, + 'var' => 'col_name', + 'type' => TType::STRING, ), ); } @@ -17272,14 +19238,14 @@ class ThriftHiveMetastore_get_index_names_args { if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + if (isset($vals['col_name'])) { + $this->col_name = $vals['col_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_names_args'; + return 'ThriftHiveMetastore_delete_table_column_statistics_args'; } public function read($input) @@ -17312,8 +19278,8 @@ class ThriftHiveMetastore_get_index_names_args { } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_indexes); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col_name); } else { $xfer += $input->skip($ftype); } @@ -17330,7 +19296,7 @@ class ThriftHiveMetastore_get_index_names_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_table_column_statistics_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -17341,9 +19307,9 @@ class ThriftHiveMetastore_get_index_names_args { $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_indexes !== null) { - $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); - $xfer += $output->writeI16($this->max_indexes); + if ($this->col_name !== null) { + $xfer += $output->writeFieldBegin('col_name', TType::STRING, 3); + $xfer += $output->writeString($this->col_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -17353,42 +19319,65 @@ class ThriftHiveMetastore_get_index_names_args { } -class ThriftHiveMetastore_get_index_names_result { +class ThriftHiveMetastore_delete_table_column_statistics_result { static $_TSPEC; public $success = null; + public $o1 = null; public $o2 = null; + public $o3 = null; + public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::BOOL, ), 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'NoSuchObjectException', + ), + 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'MetaException', ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'InvalidObjectException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'InvalidInputException', + ), ); } if (is_array($vals)) { if (isset($vals['success'])) { $this->success = $vals['success']; } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_index_names_result'; + return 'ThriftHiveMetastore_delete_table_column_statistics_result'; } public function read($input) @@ -17407,30 +19396,44 @@ class ThriftHiveMetastore_get_index_names_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size487 = 0; - $_etype490 = 0; - $xfer += $input->readListBegin($_etype490, $_size487); - for ($_i491 = 0; $_i491 < $_size487; ++$_i491) - { - $elem492 = null; - $xfer += $input->readString($elem492); - $this->success []= $elem492; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { + $this->o1 = new NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new InvalidObjectException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new InvalidInputException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -17443,29 +19446,32 @@ class ThriftHiveMetastore_get_index_names_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_table_column_statistics_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter493) - { - $xfer += $output->writeString($iter493); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -17916,14 +19922,14 @@ class ThriftHiveMetastore_get_role_names_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size494 = 0; - $_etype497 = 0; - $xfer += $input->readListBegin($_etype497, $_size494); - for ($_i498 = 0; $_i498 < $_size494; ++$_i498) + $_size501 = 0; + $_etype504 = 0; + $xfer += $input->readListBegin($_etype504, $_size501); + for ($_i505 = 0; $_i505 < $_size501; ++$_i505) { - $elem499 = null; - $xfer += $input->readString($elem499); - $this->success []= $elem499; + $elem506 = null; + $xfer += $input->readString($elem506); + $this->success []= $elem506; } $xfer += $input->readListEnd(); } else { @@ -17959,9 +19965,9 @@ class ThriftHiveMetastore_get_role_names_result { { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter500) + foreach ($this->success as $iter507) { - $xfer += $output->writeString($iter500); + $xfer += $output->writeString($iter507); } } $output->writeListEnd(); @@ -18601,15 +20607,15 @@ class ThriftHiveMetastore_list_roles_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size501 = 0; - $_etype504 = 0; - $xfer += $input->readListBegin($_etype504, $_size501); - for ($_i505 = 0; $_i505 < $_size501; ++$_i505) + $_size508 = 0; + $_etype511 = 0; + $xfer += $input->readListBegin($_etype511, $_size508); + for ($_i512 = 0; $_i512 < $_size508; ++$_i512) { - $elem506 = null; - $elem506 = new Role(); - $xfer += $elem506->read($input); - $this->success []= $elem506; + $elem513 = null; + $elem513 = new Role(); + $xfer += $elem513->read($input); + $this->success []= $elem513; } $xfer += $input->readListEnd(); } else { @@ -18645,9 +20651,9 @@ class ThriftHiveMetastore_list_roles_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter507) + foreach ($this->success as $iter514) { - $xfer += $iter507->write($output); + $xfer += $iter514->write($output); } } $output->writeListEnd(); @@ -18745,14 +20751,14 @@ class ThriftHiveMetastore_get_privilege_set_args { case 3: if ($ftype == TType::LST) { $this->group_names = array(); - $_size508 = 0; - $_etype511 = 0; - $xfer += $input->readListBegin($_etype511, $_size508); - for ($_i512 = 0; $_i512 < $_size508; ++$_i512) + $_size515 = 0; + $_etype518 = 0; + $xfer += $input->readListBegin($_etype518, $_size515); + for ($_i519 = 0; $_i519 < $_size515; ++$_i519) { - $elem513 = null; - $xfer += $input->readString($elem513); - $this->group_names []= $elem513; + $elem520 = null; + $xfer += $input->readString($elem520); + $this->group_names []= $elem520; } $xfer += $input->readListEnd(); } else { @@ -18793,9 +20799,9 @@ class ThriftHiveMetastore_get_privilege_set_args { { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter514) + foreach ($this->group_names as $iter521) { - $xfer += $output->writeString($iter514); + $xfer += $output->writeString($iter521); } } $output->writeListEnd(); @@ -19082,15 +21088,15 @@ class ThriftHiveMetastore_list_privileges_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size515 = 0; - $_etype518 = 0; - $xfer += $input->readListBegin($_etype518, $_size515); - for ($_i519 = 0; $_i519 < $_size515; ++$_i519) + $_size522 = 0; + $_etype525 = 0; + $xfer += $input->readListBegin($_etype525, $_size522); + for ($_i526 = 0; $_i526 < $_size522; ++$_i526) { - $elem520 = null; - $elem520 = new HiveObjectPrivilege(); - $xfer += $elem520->read($input); - $this->success []= $elem520; + $elem527 = null; + $elem527 = new HiveObjectPrivilege(); + $xfer += $elem527->read($input); + $this->success []= $elem527; } $xfer += $input->readListEnd(); } else { @@ -19126,9 +21132,9 @@ class ThriftHiveMetastore_list_privileges_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter521) + foreach ($this->success as $iter528) { - $xfer += $iter521->write($output); + $xfer += $iter528->write($output); } } $output->writeListEnd(); @@ -19551,14 +21557,14 @@ class ThriftHiveMetastore_set_ugi_args { case 2: if ($ftype == TType::LST) { $this->group_names = array(); - $_size522 = 0; - $_etype525 = 0; - $xfer += $input->readListBegin($_etype525, $_size522); - for ($_i526 = 0; $_i526 < $_size522; ++$_i526) + $_size529 = 0; + $_etype532 = 0; + $xfer += $input->readListBegin($_etype532, $_size529); + for ($_i533 = 0; $_i533 < $_size529; ++$_i533) { - $elem527 = null; - $xfer += $input->readString($elem527); - $this->group_names []= $elem527; + $elem534 = null; + $xfer += $input->readString($elem534); + $this->group_names []= $elem534; } $xfer += $input->readListEnd(); } else { @@ -19591,9 +21597,9 @@ class ThriftHiveMetastore_set_ugi_args { { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter528) + foreach ($this->group_names as $iter535) { - $xfer += $output->writeString($iter528); + $xfer += $output->writeString($iter535); } } $output->writeListEnd(); @@ -19663,14 +21669,14 @@ class ThriftHiveMetastore_set_ugi_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size529 = 0; - $_etype532 = 0; - $xfer += $input->readListBegin($_etype532, $_size529); - for ($_i533 = 0; $_i533 < $_size529; ++$_i533) + $_size536 = 0; + $_etype539 = 0; + $xfer += $input->readListBegin($_etype539, $_size536); + for ($_i540 = 0; $_i540 < $_size536; ++$_i540) { - $elem534 = null; - $xfer += $input->readString($elem534); - $this->success []= $elem534; + $elem541 = null; + $xfer += $input->readString($elem541); + $this->success []= $elem541; } $xfer += $input->readListEnd(); } else { @@ -19706,9 +21712,9 @@ class ThriftHiveMetastore_set_ugi_result { { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter535) + foreach ($this->success as $iter542) { - $xfer += $output->writeString($iter535); + $xfer += $output->writeString($iter542); } } $output->writeListEnd(); diff --git metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php index 006b10f..cc17146 100644 --- metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php +++ metastore/src/gen/thrift/gen-php/hive_metastore/hive_metastore_types.php @@ -3424,6 +3424,1197 @@ class Index { } +class BooleanColumnStatsData { + static $_TSPEC; + + public $numTrues = null; + public $numFalses = null; + public $numNulls = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'numTrues', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'numFalses', + 'type' => TType::I64, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['numTrues'])) { + $this->numTrues = $vals['numTrues']; + } + if (isset($vals['numFalses'])) { + $this->numFalses = $vals['numFalses']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + } + } + + public function getName() { + return 'BooleanColumnStatsData'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numTrues); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numFalses); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('BooleanColumnStatsData'); + if ($this->numTrues !== null) { + $xfer += $output->writeFieldBegin('numTrues', TType::I64, 1); + $xfer += $output->writeI64($this->numTrues); + $xfer += $output->writeFieldEnd(); + } + if ($this->numFalses !== null) { + $xfer += $output->writeFieldBegin('numFalses', TType::I64, 2); + $xfer += $output->writeI64($this->numFalses); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class DoubleColumnStatsData { + static $_TSPEC; + + public $lowValue = null; + public $highValue = null; + public $numNulls = null; + public $numDVs = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lowValue', + 'type' => TType::DOUBLE, + ), + 2 => array( + 'var' => 'highValue', + 'type' => TType::DOUBLE, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lowValue'])) { + $this->lowValue = $vals['lowValue']; + } + if (isset($vals['highValue'])) { + $this->highValue = $vals['highValue']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + } + } + + public function getName() { + return 'DoubleColumnStatsData'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->lowValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->highValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('DoubleColumnStatsData'); + if ($this->lowValue !== null) { + $xfer += $output->writeFieldBegin('lowValue', TType::DOUBLE, 1); + $xfer += $output->writeDouble($this->lowValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->highValue !== null) { + $xfer += $output->writeFieldBegin('highValue', TType::DOUBLE, 2); + $xfer += $output->writeDouble($this->highValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class LongColumnStatsData { + static $_TSPEC; + + public $lowValue = null; + public $highValue = null; + public $numNulls = null; + public $numDVs = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'lowValue', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'highValue', + 'type' => TType::I64, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['lowValue'])) { + $this->lowValue = $vals['lowValue']; + } + if (isset($vals['highValue'])) { + $this->highValue = $vals['highValue']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + } + } + + public function getName() { + return 'LongColumnStatsData'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->lowValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->highValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('LongColumnStatsData'); + if ($this->lowValue !== null) { + $xfer += $output->writeFieldBegin('lowValue', TType::I64, 1); + $xfer += $output->writeI64($this->lowValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->highValue !== null) { + $xfer += $output->writeFieldBegin('highValue', TType::I64, 2); + $xfer += $output->writeI64($this->highValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class StringColumnStatsData { + static $_TSPEC; + + public $maxColLen = null; + public $avgColLen = null; + public $numNulls = null; + public $numDVs = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'maxColLen', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'avgColLen', + 'type' => TType::DOUBLE, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['maxColLen'])) { + $this->maxColLen = $vals['maxColLen']; + } + if (isset($vals['avgColLen'])) { + $this->avgColLen = $vals['avgColLen']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + if (isset($vals['numDVs'])) { + $this->numDVs = $vals['numDVs']; + } + } + } + + public function getName() { + return 'StringColumnStatsData'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->maxColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->avgColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('StringColumnStatsData'); + if ($this->maxColLen !== null) { + $xfer += $output->writeFieldBegin('maxColLen', TType::I64, 1); + $xfer += $output->writeI64($this->maxColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->avgColLen !== null) { + $xfer += $output->writeFieldBegin('avgColLen', TType::DOUBLE, 2); + $xfer += $output->writeDouble($this->avgColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 4); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class BinaryColumnStatsData { + static $_TSPEC; + + public $maxColLen = null; + public $avgColLen = null; + public $numNulls = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'maxColLen', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'avgColLen', + 'type' => TType::DOUBLE, + ), + 3 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['maxColLen'])) { + $this->maxColLen = $vals['maxColLen']; + } + if (isset($vals['avgColLen'])) { + $this->avgColLen = $vals['avgColLen']; + } + if (isset($vals['numNulls'])) { + $this->numNulls = $vals['numNulls']; + } + } + } + + public function getName() { + return 'BinaryColumnStatsData'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->maxColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->avgColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('BinaryColumnStatsData'); + if ($this->maxColLen !== null) { + $xfer += $output->writeFieldBegin('maxColLen', TType::I64, 1); + $xfer += $output->writeI64($this->maxColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->avgColLen !== null) { + $xfer += $output->writeFieldBegin('avgColLen', TType::DOUBLE, 2); + $xfer += $output->writeDouble($this->avgColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 3); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatisticsData { + static $_TSPEC; + + public $booleanStats = null; + public $longStats = null; + public $doubleStats = null; + public $stringStats = null; + public $binaryStats = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'booleanStats', + 'type' => TType::STRUCT, + 'class' => 'BooleanColumnStatsData', + ), + 2 => array( + 'var' => 'longStats', + 'type' => TType::STRUCT, + 'class' => 'LongColumnStatsData', + ), + 3 => array( + 'var' => 'doubleStats', + 'type' => TType::STRUCT, + 'class' => 'DoubleColumnStatsData', + ), + 4 => array( + 'var' => 'stringStats', + 'type' => TType::STRUCT, + 'class' => 'StringColumnStatsData', + ), + 5 => array( + 'var' => 'binaryStats', + 'type' => TType::STRUCT, + 'class' => 'BinaryColumnStatsData', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['booleanStats'])) { + $this->booleanStats = $vals['booleanStats']; + } + if (isset($vals['longStats'])) { + $this->longStats = $vals['longStats']; + } + if (isset($vals['doubleStats'])) { + $this->doubleStats = $vals['doubleStats']; + } + if (isset($vals['stringStats'])) { + $this->stringStats = $vals['stringStats']; + } + if (isset($vals['binaryStats'])) { + $this->binaryStats = $vals['binaryStats']; + } + } + } + + public function getName() { + return 'ColumnStatisticsData'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->booleanStats = new BooleanColumnStatsData(); + $xfer += $this->booleanStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->longStats = new LongColumnStatsData(); + $xfer += $this->longStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->doubleStats = new DoubleColumnStatsData(); + $xfer += $this->doubleStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->stringStats = new StringColumnStatsData(); + $xfer += $this->stringStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->binaryStats = new BinaryColumnStatsData(); + $xfer += $this->binaryStats->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ColumnStatisticsData'); + if ($this->booleanStats !== null) { + if (!is_object($this->booleanStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('booleanStats', TType::STRUCT, 1); + $xfer += $this->booleanStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->longStats !== null) { + if (!is_object($this->longStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('longStats', TType::STRUCT, 2); + $xfer += $this->longStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->doubleStats !== null) { + if (!is_object($this->doubleStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('doubleStats', TType::STRUCT, 3); + $xfer += $this->doubleStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->stringStats !== null) { + if (!is_object($this->stringStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stringStats', TType::STRUCT, 4); + $xfer += $this->stringStats->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->binaryStats !== null) { + if (!is_object($this->binaryStats)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('binaryStats', TType::STRUCT, 5); + $xfer += $this->binaryStats->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatisticsObj { + static $_TSPEC; + + public $colName = null; + public $colType = null; + public $statsData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'colName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'colType', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'statsData', + 'type' => TType::STRUCT, + 'class' => 'ColumnStatisticsData', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['colName'])) { + $this->colName = $vals['colName']; + } + if (isset($vals['colType'])) { + $this->colType = $vals['colType']; + } + if (isset($vals['statsData'])) { + $this->statsData = $vals['statsData']; + } + } + } + + public function getName() { + return 'ColumnStatisticsObj'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->colName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->colType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->statsData = new ColumnStatisticsData(); + $xfer += $this->statsData->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ColumnStatisticsObj'); + if ($this->colName !== null) { + $xfer += $output->writeFieldBegin('colName', TType::STRING, 1); + $xfer += $output->writeString($this->colName); + $xfer += $output->writeFieldEnd(); + } + if ($this->colType !== null) { + $xfer += $output->writeFieldBegin('colType', TType::STRING, 2); + $xfer += $output->writeString($this->colType); + $xfer += $output->writeFieldEnd(); + } + if ($this->statsData !== null) { + if (!is_object($this->statsData)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('statsData', TType::STRUCT, 3); + $xfer += $this->statsData->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatisticsDesc { + static $_TSPEC; + + public $isTblLevel = null; + public $dbName = null; + public $tableName = null; + public $partName = null; + public $lastAnalyzed = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'isTblLevel', + 'type' => TType::BOOL, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'partName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'lastAnalyzed', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['isTblLevel'])) { + $this->isTblLevel = $vals['isTblLevel']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['partName'])) { + $this->partName = $vals['partName']; + } + if (isset($vals['lastAnalyzed'])) { + $this->lastAnalyzed = $vals['lastAnalyzed']; + } + } + } + + public function getName() { + return 'ColumnStatisticsDesc'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isTblLevel); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->lastAnalyzed); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ColumnStatisticsDesc'); + if ($this->isTblLevel !== null) { + $xfer += $output->writeFieldBegin('isTblLevel', TType::BOOL, 1); + $xfer += $output->writeBool($this->isTblLevel); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 3); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partName !== null) { + $xfer += $output->writeFieldBegin('partName', TType::STRING, 4); + $xfer += $output->writeString($this->partName); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAnalyzed !== null) { + $xfer += $output->writeFieldBegin('lastAnalyzed', TType::I64, 5); + $xfer += $output->writeI64($this->lastAnalyzed); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnStatistics { + static $_TSPEC; + + public $statsDesc = null; + public $statsObj = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'statsDesc', + 'type' => TType::STRUCT, + 'class' => 'ColumnStatisticsDesc', + ), + 2 => array( + 'var' => 'statsObj', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'ColumnStatisticsObj', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['statsDesc'])) { + $this->statsDesc = $vals['statsDesc']; + } + if (isset($vals['statsObj'])) { + $this->statsObj = $vals['statsObj']; + } + } + } + + public function getName() { + return 'ColumnStatistics'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->statsDesc = new ColumnStatisticsDesc(); + $xfer += $this->statsDesc->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->statsObj = array(); + $_size195 = 0; + $_etype198 = 0; + $xfer += $input->readListBegin($_etype198, $_size195); + for ($_i199 = 0; $_i199 < $_size195; ++$_i199) + { + $elem200 = null; + $elem200 = new ColumnStatisticsObj(); + $xfer += $elem200->read($input); + $this->statsObj []= $elem200; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ColumnStatistics'); + if ($this->statsDesc !== null) { + if (!is_object($this->statsDesc)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('statsDesc', TType::STRUCT, 1); + $xfer += $this->statsDesc->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->statsObj !== null) { + if (!is_array($this->statsObj)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('statsObj', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->statsObj)); + { + foreach ($this->statsObj as $iter201) + { + $xfer += $iter201->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class Schema { static $_TSPEC; @@ -3488,15 +4679,15 @@ class Schema { case 1: if ($ftype == TType::LST) { $this->fieldSchemas = array(); - $_size195 = 0; - $_etype198 = 0; - $xfer += $input->readListBegin($_etype198, $_size195); - for ($_i199 = 0; $_i199 < $_size195; ++$_i199) + $_size202 = 0; + $_etype205 = 0; + $xfer += $input->readListBegin($_etype205, $_size202); + for ($_i206 = 0; $_i206 < $_size202; ++$_i206) { - $elem200 = null; - $elem200 = new FieldSchema(); - $xfer += $elem200->read($input); - $this->fieldSchemas []= $elem200; + $elem207 = null; + $elem207 = new FieldSchema(); + $xfer += $elem207->read($input); + $this->fieldSchemas []= $elem207; } $xfer += $input->readListEnd(); } else { @@ -3506,17 +4697,17 @@ class Schema { case 2: if ($ftype == TType::MAP) { $this->properties = array(); - $_size201 = 0; - $_ktype202 = 0; - $_vtype203 = 0; - $xfer += $input->readMapBegin($_ktype202, $_vtype203, $_size201); - for ($_i205 = 0; $_i205 < $_size201; ++$_i205) + $_size208 = 0; + $_ktype209 = 0; + $_vtype210 = 0; + $xfer += $input->readMapBegin($_ktype209, $_vtype210, $_size208); + for ($_i212 = 0; $_i212 < $_size208; ++$_i212) { - $key206 = ''; - $val207 = ''; - $xfer += $input->readString($key206); - $xfer += $input->readString($val207); - $this->properties[$key206] = $val207; + $key213 = ''; + $val214 = ''; + $xfer += $input->readString($key213); + $xfer += $input->readString($val214); + $this->properties[$key213] = $val214; } $xfer += $input->readMapEnd(); } else { @@ -3544,9 +4735,9 @@ class Schema { { $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); { - foreach ($this->fieldSchemas as $iter208) + foreach ($this->fieldSchemas as $iter215) { - $xfer += $iter208->write($output); + $xfer += $iter215->write($output); } } $output->writeListEnd(); @@ -3561,10 +4752,10 @@ class Schema { { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); { - foreach ($this->properties as $kiter209 => $viter210) + foreach ($this->properties as $kiter216 => $viter217) { - $xfer += $output->writeString($kiter209); - $xfer += $output->writeString($viter210); + $xfer += $output->writeString($kiter216); + $xfer += $output->writeString($viter217); } } $output->writeMapEnd(); @@ -3629,17 +4820,17 @@ class EnvironmentContext { case 1: if ($ftype == TType::MAP) { $this->properties = array(); - $_size211 = 0; - $_ktype212 = 0; - $_vtype213 = 0; - $xfer += $input->readMapBegin($_ktype212, $_vtype213, $_size211); - for ($_i215 = 0; $_i215 < $_size211; ++$_i215) + $_size218 = 0; + $_ktype219 = 0; + $_vtype220 = 0; + $xfer += $input->readMapBegin($_ktype219, $_vtype220, $_size218); + for ($_i222 = 0; $_i222 < $_size218; ++$_i222) { - $key216 = ''; - $val217 = ''; - $xfer += $input->readString($key216); - $xfer += $input->readString($val217); - $this->properties[$key216] = $val217; + $key223 = ''; + $val224 = ''; + $xfer += $input->readString($key223); + $xfer += $input->readString($val224); + $this->properties[$key223] = $val224; } $xfer += $input->readMapEnd(); } else { @@ -3667,10 +4858,10 @@ class EnvironmentContext { { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); { - foreach ($this->properties as $kiter218 => $viter219) + foreach ($this->properties as $kiter225 => $viter226) { - $xfer += $output->writeString($kiter218); - $xfer += $output->writeString($viter219); + $xfer += $output->writeString($kiter225); + $xfer += $output->writeString($viter226); } } $output->writeMapEnd(); @@ -4476,4 +5667,76 @@ class ConfigValSecurityException extends TException { } +class InvalidInputException extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'InvalidInputException'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('InvalidInputException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + ?> diff --git metastore/src/gen/thrift/gen-py/__init__.py metastore/src/gen/thrift/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote old mode 100644 new mode 100755 index c6db430..83cbe32 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -76,6 +76,12 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' Index get_index_by_name(string db_name, string tbl_name, string index_name)' print ' get_indexes(string db_name, string tbl_name, i16 max_indexes)' print ' get_index_names(string db_name, string tbl_name, i16 max_indexes)' + print ' bool update_table_column_statistics(ColumnStatistics stats_obj)' + print ' bool update_partition_column_statistics(ColumnStatistics stats_obj)' + print ' ColumnStatistics get_table_column_statistics(string db_name, string tbl_name, string col_name)' + print ' ColumnStatistics get_partition_column_statistics(string db_name, string tbl_name, string part_name, string col_name)' + print ' bool delete_partition_column_statistics(string db_name, string tbl_name, string part_name, string col_name)' + print ' bool delete_table_column_statistics(string db_name, string tbl_name, string col_name)' print ' bool create_role(Role role)' print ' bool drop_role(string role_name)' print ' get_role_names()' @@ -470,6 +476,42 @@ elif cmd == 'get_index_names': sys.exit(1) pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) +elif cmd == 'update_table_column_statistics': + if len(args) != 1: + print 'update_table_column_statistics requires 1 args' + sys.exit(1) + pp.pprint(client.update_table_column_statistics(eval(args[0]),)) + +elif cmd == 'update_partition_column_statistics': + if len(args) != 1: + print 'update_partition_column_statistics requires 1 args' + sys.exit(1) + pp.pprint(client.update_partition_column_statistics(eval(args[0]),)) + +elif cmd == 'get_table_column_statistics': + if len(args) != 3: + print 'get_table_column_statistics requires 3 args' + sys.exit(1) + pp.pprint(client.get_table_column_statistics(args[0],args[1],args[2],)) + +elif cmd == 'get_partition_column_statistics': + if len(args) != 4: + print 'get_partition_column_statistics requires 4 args' + sys.exit(1) + pp.pprint(client.get_partition_column_statistics(args[0],args[1],args[2],args[3],)) + +elif cmd == 'delete_partition_column_statistics': + if len(args) != 4: + print 'delete_partition_column_statistics requires 4 args' + sys.exit(1) + pp.pprint(client.delete_partition_column_statistics(args[0],args[1],args[2],args[3],)) + +elif cmd == 'delete_table_column_statistics': + if len(args) != 3: + print 'delete_table_column_statistics requires 3 args' + sys.exit(1) + pp.pprint(client.delete_table_column_statistics(args[0],args[1],args[2],)) + elif cmd == 'create_role': if len(args) != 1: print 'create_role requires 1 args' diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py index 27fed37..89ba78b 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -492,6 +492,58 @@ class Iface(fb303.FacebookService.Iface): """ pass + def update_table_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + pass + + def update_partition_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + pass + + def get_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + pass + + def get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + pass + + def delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + pass + + def delete_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + pass + def create_role(self, role): """ Parameters: @@ -2657,6 +2709,254 @@ class Client(fb303.FacebookService.Client, Iface): raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); + def update_table_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + self.send_update_table_column_statistics(stats_obj) + return self.recv_update_table_column_statistics() + + def send_update_table_column_statistics(self, stats_obj): + self._oprot.writeMessageBegin('update_table_column_statistics', TMessageType.CALL, self._seqid) + args = update_table_column_statistics_args() + args.stats_obj = stats_obj + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_table_column_statistics(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = update_table_column_statistics_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "update_table_column_statistics failed: unknown result"); + + def update_partition_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + self.send_update_partition_column_statistics(stats_obj) + return self.recv_update_partition_column_statistics() + + def send_update_partition_column_statistics(self, stats_obj): + self._oprot.writeMessageBegin('update_partition_column_statistics', TMessageType.CALL, self._seqid) + args = update_partition_column_statistics_args() + args.stats_obj = stats_obj + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_update_partition_column_statistics(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = update_partition_column_statistics_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "update_partition_column_statistics failed: unknown result"); + + def get_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + self.send_get_table_column_statistics(db_name, tbl_name, col_name) + return self.recv_get_table_column_statistics() + + def send_get_table_column_statistics(self, db_name, tbl_name, col_name): + self._oprot.writeMessageBegin('get_table_column_statistics', TMessageType.CALL, self._seqid) + args = get_table_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_table_column_statistics(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_table_column_statistics_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_column_statistics failed: unknown result"); + + def get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + self.send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) + return self.recv_get_partition_column_statistics() + + def send_get_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + self._oprot.writeMessageBegin('get_partition_column_statistics', TMessageType.CALL, self._seqid) + args = get_partition_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_column_statistics(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partition_column_statistics_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_column_statistics failed: unknown result"); + + def delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + self.send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) + return self.recv_delete_partition_column_statistics() + + def send_delete_partition_column_statistics(self, db_name, tbl_name, part_name, col_name): + self._oprot.writeMessageBegin('delete_partition_column_statistics', TMessageType.CALL, self._seqid) + args = delete_partition_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_name = part_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_delete_partition_column_statistics(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = delete_partition_column_statistics_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_partition_column_statistics failed: unknown result"); + + def delete_table_column_statistics(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + self.send_delete_table_column_statistics(db_name, tbl_name, col_name) + return self.recv_delete_table_column_statistics() + + def send_delete_table_column_statistics(self, db_name, tbl_name, col_name): + self._oprot.writeMessageBegin('delete_table_column_statistics', TMessageType.CALL, self._seqid) + args = delete_table_column_statistics_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.col_name = col_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_delete_table_column_statistics(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = delete_table_column_statistics_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.o1 is not None: + raise result.o1 + if result.o2 is not None: + raise result.o2 + if result.o3 is not None: + raise result.o3 + if result.o4 is not None: + raise result.o4 + raise TApplicationException(TApplicationException.MISSING_RESULT, "delete_table_column_statistics failed: unknown result"); + def create_role(self, role): """ Parameters: @@ -3185,6 +3485,12 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor): self._processMap["get_index_by_name"] = Processor.process_get_index_by_name self._processMap["get_indexes"] = Processor.process_get_indexes self._processMap["get_index_names"] = Processor.process_get_index_names + self._processMap["update_table_column_statistics"] = Processor.process_update_table_column_statistics + self._processMap["update_partition_column_statistics"] = Processor.process_update_partition_column_statistics + self._processMap["get_table_column_statistics"] = Processor.process_get_table_column_statistics + self._processMap["get_partition_column_statistics"] = Processor.process_get_partition_column_statistics + self._processMap["delete_partition_column_statistics"] = Processor.process_delete_partition_column_statistics + self._processMap["delete_table_column_statistics"] = Processor.process_delete_table_column_statistics self._processMap["create_role"] = Processor.process_create_role self._processMap["drop_role"] = Processor.process_drop_role self._processMap["get_role_names"] = Processor.process_get_role_names @@ -4125,47 +4431,167 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_create_role(self, seqid, iprot, oprot): - args = create_role_args() + def process_update_table_column_statistics(self, seqid, iprot, oprot): + args = update_table_column_statistics_args() args.read(iprot) iprot.readMessageEnd() - result = create_role_result() + result = update_table_column_statistics_result() try: - result.success = self._handler.create_role(args.role) - except MetaException, o1: + result.success = self._handler.update_table_column_statistics(args.stats_obj) + except NoSuchObjectException, o1: result.o1 = o1 - oprot.writeMessageBegin("create_role", TMessageType.REPLY, seqid) + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + except InvalidInputException, o4: + result.o4 = o4 + oprot.writeMessageBegin("update_table_column_statistics", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_drop_role(self, seqid, iprot, oprot): - args = drop_role_args() + def process_update_partition_column_statistics(self, seqid, iprot, oprot): + args = update_partition_column_statistics_args() args.read(iprot) iprot.readMessageEnd() - result = drop_role_result() + result = update_partition_column_statistics_result() try: - result.success = self._handler.drop_role(args.role_name) - except MetaException, o1: + result.success = self._handler.update_partition_column_statistics(args.stats_obj) + except NoSuchObjectException, o1: result.o1 = o1 - oprot.writeMessageBegin("drop_role", TMessageType.REPLY, seqid) + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + except InvalidInputException, o4: + result.o4 = o4 + oprot.writeMessageBegin("update_partition_column_statistics", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_get_role_names(self, seqid, iprot, oprot): - args = get_role_names_args() + def process_get_table_column_statistics(self, seqid, iprot, oprot): + args = get_table_column_statistics_args() args.read(iprot) iprot.readMessageEnd() - result = get_role_names_result() + result = get_table_column_statistics_result() try: - result.success = self._handler.get_role_names() - except MetaException, o1: + result.success = self._handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name) + except NoSuchObjectException, o1: result.o1 = o1 - oprot.writeMessageBegin("get_role_names", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + except MetaException, o2: + result.o2 = o2 + except InvalidInputException, o3: + result.o3 = o3 + except InvalidObjectException, o4: + result.o4 = o4 + oprot.writeMessageBegin("get_table_column_statistics", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_column_statistics(self, seqid, iprot, oprot): + args = get_partition_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_column_statistics_result() + try: + result.success = self._handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + except InvalidInputException, o3: + result.o3 = o3 + except InvalidObjectException, o4: + result.o4 = o4 + oprot.writeMessageBegin("get_partition_column_statistics", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_delete_partition_column_statistics(self, seqid, iprot, oprot): + args = delete_partition_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_partition_column_statistics_result() + try: + result.success = self._handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + except InvalidObjectException, o3: + result.o3 = o3 + except InvalidInputException, o4: + result.o4 = o4 + oprot.writeMessageBegin("delete_partition_column_statistics", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_delete_table_column_statistics(self, seqid, iprot, oprot): + args = delete_table_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_table_column_statistics_result() + try: + result.success = self._handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + except InvalidObjectException, o3: + result.o3 = o3 + except InvalidInputException, o4: + result.o4 = o4 + oprot.writeMessageBegin("delete_table_column_statistics", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_role(self, seqid, iprot, oprot): + args = create_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_role_result() + try: + result.success = self._handler.create_role(args.role) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("create_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_role(self, seqid, iprot, oprot): + args = drop_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_role_result() + try: + result.success = self._handler.drop_role(args.role_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("drop_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_role_names(self, seqid, iprot, oprot): + args = get_role_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_role_names_result() + try: + result.success = self._handler.get_role_names() + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_role_names", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() def process_grant_role(self, seqid, iprot, oprot): args = grant_role_args() @@ -4877,10 +5303,10 @@ class get_databases_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype223, _size220) = iprot.readListBegin() - for _i224 in xrange(_size220): - _elem225 = iprot.readString(); - self.success.append(_elem225) + (_etype230, _size227) = iprot.readListBegin() + for _i231 in xrange(_size227): + _elem232 = iprot.readString(); + self.success.append(_elem232) iprot.readListEnd() else: iprot.skip(ftype) @@ -4903,8 +5329,8 @@ class get_databases_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter226 in self.success: - oprot.writeString(iter226) + for iter233 in self.success: + oprot.writeString(iter233) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -4999,10 +5425,10 @@ class get_all_databases_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype230, _size227) = iprot.readListBegin() - for _i231 in xrange(_size227): - _elem232 = iprot.readString(); - self.success.append(_elem232) + (_etype237, _size234) = iprot.readListBegin() + for _i238 in xrange(_size234): + _elem239 = iprot.readString(); + self.success.append(_elem239) iprot.readListEnd() else: iprot.skip(ftype) @@ -5025,8 +5451,8 @@ class get_all_databases_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter233 in self.success: - oprot.writeString(iter233) + for iter240 in self.success: + oprot.writeString(iter240) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -5736,12 +6162,12 @@ class get_type_all_result: if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype235, _vtype236, _size234 ) = iprot.readMapBegin() - for _i238 in xrange(_size234): - _key239 = iprot.readString(); - _val240 = Type() - _val240.read(iprot) - self.success[_key239] = _val240 + (_ktype242, _vtype243, _size241 ) = iprot.readMapBegin() + for _i245 in xrange(_size241): + _key246 = iprot.readString(); + _val247 = Type() + _val247.read(iprot) + self.success[_key246] = _val247 iprot.readMapEnd() else: iprot.skip(ftype) @@ -5764,9 +6190,9 @@ class get_type_all_result: if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) - for kiter241,viter242 in self.success.items(): - oprot.writeString(kiter241) - viter242.write(oprot) + for kiter248,viter249 in self.success.items(): + oprot.writeString(kiter248) + viter249.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() if self.o2 is not None: @@ -5897,11 +6323,11 @@ class get_fields_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype246, _size243) = iprot.readListBegin() - for _i247 in xrange(_size243): - _elem248 = FieldSchema() - _elem248.read(iprot) - self.success.append(_elem248) + (_etype253, _size250) = iprot.readListBegin() + for _i254 in xrange(_size250): + _elem255 = FieldSchema() + _elem255.read(iprot) + self.success.append(_elem255) iprot.readListEnd() else: iprot.skip(ftype) @@ -5936,8 +6362,8 @@ class get_fields_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter249 in self.success: - iter249.write(oprot) + for iter256 in self.success: + iter256.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -6076,11 +6502,11 @@ class get_schema_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype253, _size250) = iprot.readListBegin() - for _i254 in xrange(_size250): - _elem255 = FieldSchema() - _elem255.read(iprot) - self.success.append(_elem255) + (_etype260, _size257) = iprot.readListBegin() + for _i261 in xrange(_size257): + _elem262 = FieldSchema() + _elem262.read(iprot) + self.success.append(_elem262) iprot.readListEnd() else: iprot.skip(ftype) @@ -6115,8 +6541,8 @@ class get_schema_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter256 in self.success: - iter256.write(oprot) + for iter263 in self.success: + iter263.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -6742,10 +7168,10 @@ class get_tables_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype260, _size257) = iprot.readListBegin() - for _i261 in xrange(_size257): - _elem262 = iprot.readString(); - self.success.append(_elem262) + (_etype267, _size264) = iprot.readListBegin() + for _i268 in xrange(_size264): + _elem269 = iprot.readString(); + self.success.append(_elem269) iprot.readListEnd() else: iprot.skip(ftype) @@ -6768,8 +7194,8 @@ class get_tables_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter263 in self.success: - oprot.writeString(iter263) + for iter270 in self.success: + oprot.writeString(iter270) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -6882,10 +7308,10 @@ class get_all_tables_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype267, _size264) = iprot.readListBegin() - for _i268 in xrange(_size264): - _elem269 = iprot.readString(); - self.success.append(_elem269) + (_etype274, _size271) = iprot.readListBegin() + for _i275 in xrange(_size271): + _elem276 = iprot.readString(); + self.success.append(_elem276) iprot.readListEnd() else: iprot.skip(ftype) @@ -6908,8 +7334,8 @@ class get_all_tables_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter270 in self.success: - oprot.writeString(iter270) + for iter277 in self.success: + oprot.writeString(iter277) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -7126,10 +7552,10 @@ class get_table_objects_by_name_args: elif fid == 2: if ftype == TType.LIST: self.tbl_names = [] - (_etype274, _size271) = iprot.readListBegin() - for _i275 in xrange(_size271): - _elem276 = iprot.readString(); - self.tbl_names.append(_elem276) + (_etype281, _size278) = iprot.readListBegin() + for _i282 in xrange(_size278): + _elem283 = iprot.readString(); + self.tbl_names.append(_elem283) iprot.readListEnd() else: iprot.skip(ftype) @@ -7150,8 +7576,8 @@ class get_table_objects_by_name_args: if self.tbl_names is not None: oprot.writeFieldBegin('tbl_names', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.tbl_names)) - for iter277 in self.tbl_names: - oprot.writeString(iter277) + for iter284 in self.tbl_names: + oprot.writeString(iter284) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -7206,11 +7632,11 @@ class get_table_objects_by_name_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype281, _size278) = iprot.readListBegin() - for _i282 in xrange(_size278): - _elem283 = Table() - _elem283.read(iprot) - self.success.append(_elem283) + (_etype288, _size285) = iprot.readListBegin() + for _i289 in xrange(_size285): + _elem290 = Table() + _elem290.read(iprot) + self.success.append(_elem290) iprot.readListEnd() else: iprot.skip(ftype) @@ -7245,8 +7671,8 @@ class get_table_objects_by_name_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter284 in self.success: - iter284.write(oprot) + for iter291 in self.success: + iter291.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -7397,10 +7823,10 @@ class get_table_names_by_filter_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype288, _size285) = iprot.readListBegin() - for _i289 in xrange(_size285): - _elem290 = iprot.readString(); - self.success.append(_elem290) + (_etype295, _size292) = iprot.readListBegin() + for _i296 in xrange(_size292): + _elem297 = iprot.readString(); + self.success.append(_elem297) iprot.readListEnd() else: iprot.skip(ftype) @@ -7435,8 +7861,8 @@ class get_table_names_by_filter_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter291 in self.success: - oprot.writeString(iter291) + for iter298 in self.success: + oprot.writeString(iter298) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -8159,11 +8585,11 @@ class add_partitions_args: if fid == 1: if ftype == TType.LIST: self.new_parts = [] - (_etype295, _size292) = iprot.readListBegin() - for _i296 in xrange(_size292): - _elem297 = Partition() - _elem297.read(iprot) - self.new_parts.append(_elem297) + (_etype302, _size299) = iprot.readListBegin() + for _i303 in xrange(_size299): + _elem304 = Partition() + _elem304.read(iprot) + self.new_parts.append(_elem304) iprot.readListEnd() else: iprot.skip(ftype) @@ -8180,8 +8606,8 @@ class add_partitions_args: if self.new_parts is not None: oprot.writeFieldBegin('new_parts', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) - for iter298 in self.new_parts: - iter298.write(oprot) + for iter305 in self.new_parts: + iter305.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8342,10 +8768,10 @@ class append_partition_args: elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype302, _size299) = iprot.readListBegin() - for _i303 in xrange(_size299): - _elem304 = iprot.readString(); - self.part_vals.append(_elem304) + (_etype309, _size306) = iprot.readListBegin() + for _i310 in xrange(_size306): + _elem311 = iprot.readString(); + self.part_vals.append(_elem311) iprot.readListEnd() else: iprot.skip(ftype) @@ -8370,8 +8796,8 @@ class append_partition_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter305 in self.part_vals: - oprot.writeString(iter305) + for iter312 in self.part_vals: + oprot.writeString(iter312) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -8719,10 +9145,10 @@ class drop_partition_args: elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype309, _size306) = iprot.readListBegin() - for _i310 in xrange(_size306): - _elem311 = iprot.readString(); - self.part_vals.append(_elem311) + (_etype316, _size313) = iprot.readListBegin() + for _i317 in xrange(_size313): + _elem318 = iprot.readString(); + self.part_vals.append(_elem318) iprot.readListEnd() else: iprot.skip(ftype) @@ -8752,8 +9178,8 @@ class drop_partition_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter312 in self.part_vals: - oprot.writeString(iter312) + for iter319 in self.part_vals: + oprot.writeString(iter319) oprot.writeListEnd() oprot.writeFieldEnd() if self.deleteData is not None: @@ -9086,10 +9512,10 @@ class get_partition_args: elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype316, _size313) = iprot.readListBegin() - for _i317 in xrange(_size313): - _elem318 = iprot.readString(); - self.part_vals.append(_elem318) + (_etype323, _size320) = iprot.readListBegin() + for _i324 in xrange(_size320): + _elem325 = iprot.readString(); + self.part_vals.append(_elem325) iprot.readListEnd() else: iprot.skip(ftype) @@ -9114,8 +9540,8 @@ class get_partition_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter319 in self.part_vals: - oprot.writeString(iter319) + for iter326 in self.part_vals: + oprot.writeString(iter326) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9270,10 +9696,10 @@ class get_partition_with_auth_args: elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype323, _size320) = iprot.readListBegin() - for _i324 in xrange(_size320): - _elem325 = iprot.readString(); - self.part_vals.append(_elem325) + (_etype330, _size327) = iprot.readListBegin() + for _i331 in xrange(_size327): + _elem332 = iprot.readString(); + self.part_vals.append(_elem332) iprot.readListEnd() else: iprot.skip(ftype) @@ -9285,10 +9711,10 @@ class get_partition_with_auth_args: elif fid == 5: if ftype == TType.LIST: self.group_names = [] - (_etype329, _size326) = iprot.readListBegin() - for _i330 in xrange(_size326): - _elem331 = iprot.readString(); - self.group_names.append(_elem331) + (_etype336, _size333) = iprot.readListBegin() + for _i337 in xrange(_size333): + _elem338 = iprot.readString(); + self.group_names.append(_elem338) iprot.readListEnd() else: iprot.skip(ftype) @@ -9313,8 +9739,8 @@ class get_partition_with_auth_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter332 in self.part_vals: - oprot.writeString(iter332) + for iter339 in self.part_vals: + oprot.writeString(iter339) oprot.writeListEnd() oprot.writeFieldEnd() if self.user_name is not None: @@ -9324,8 +9750,8 @@ class get_partition_with_auth_args: if self.group_names is not None: oprot.writeFieldBegin('group_names', TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter333 in self.group_names: - oprot.writeString(iter333) + for iter340 in self.group_names: + oprot.writeString(iter340) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9717,11 +10143,11 @@ class get_partitions_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype337, _size334) = iprot.readListBegin() - for _i338 in xrange(_size334): - _elem339 = Partition() - _elem339.read(iprot) - self.success.append(_elem339) + (_etype344, _size341) = iprot.readListBegin() + for _i345 in xrange(_size341): + _elem346 = Partition() + _elem346.read(iprot) + self.success.append(_elem346) iprot.readListEnd() else: iprot.skip(ftype) @@ -9750,8 +10176,8 @@ class get_partitions_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter340 in self.success: - iter340.write(oprot) + for iter347 in self.success: + iter347.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -9838,10 +10264,10 @@ class get_partitions_with_auth_args: elif fid == 5: if ftype == TType.LIST: self.group_names = [] - (_etype344, _size341) = iprot.readListBegin() - for _i345 in xrange(_size341): - _elem346 = iprot.readString(); - self.group_names.append(_elem346) + (_etype351, _size348) = iprot.readListBegin() + for _i352 in xrange(_size348): + _elem353 = iprot.readString(); + self.group_names.append(_elem353) iprot.readListEnd() else: iprot.skip(ftype) @@ -9874,8 +10300,8 @@ class get_partitions_with_auth_args: if self.group_names is not None: oprot.writeFieldBegin('group_names', TType.LIST, 5) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter347 in self.group_names: - oprot.writeString(iter347) + for iter354 in self.group_names: + oprot.writeString(iter354) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -9927,11 +10353,11 @@ class get_partitions_with_auth_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype351, _size348) = iprot.readListBegin() - for _i352 in xrange(_size348): - _elem353 = Partition() - _elem353.read(iprot) - self.success.append(_elem353) + (_etype358, _size355) = iprot.readListBegin() + for _i359 in xrange(_size355): + _elem360 = Partition() + _elem360.read(iprot) + self.success.append(_elem360) iprot.readListEnd() else: iprot.skip(ftype) @@ -9960,8 +10386,8 @@ class get_partitions_with_auth_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter354 in self.success: - iter354.write(oprot) + for iter361 in self.success: + iter361.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -10102,10 +10528,10 @@ class get_partition_names_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype358, _size355) = iprot.readListBegin() - for _i359 in xrange(_size355): - _elem360 = iprot.readString(); - self.success.append(_elem360) + (_etype365, _size362) = iprot.readListBegin() + for _i366 in xrange(_size362): + _elem367 = iprot.readString(); + self.success.append(_elem367) iprot.readListEnd() else: iprot.skip(ftype) @@ -10128,8 +10554,8 @@ class get_partition_names_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter361 in self.success: - oprot.writeString(iter361) + for iter368 in self.success: + oprot.writeString(iter368) oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 is not None: @@ -10199,10 +10625,10 @@ class get_partitions_ps_args: elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype365, _size362) = iprot.readListBegin() - for _i366 in xrange(_size362): - _elem367 = iprot.readString(); - self.part_vals.append(_elem367) + (_etype372, _size369) = iprot.readListBegin() + for _i373 in xrange(_size369): + _elem374 = iprot.readString(); + self.part_vals.append(_elem374) iprot.readListEnd() else: iprot.skip(ftype) @@ -10232,8 +10658,8 @@ class get_partitions_ps_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter368 in self.part_vals: - oprot.writeString(iter368) + for iter375 in self.part_vals: + oprot.writeString(iter375) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts is not None: @@ -10289,11 +10715,11 @@ class get_partitions_ps_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype372, _size369) = iprot.readListBegin() - for _i373 in xrange(_size369): - _elem374 = Partition() - _elem374.read(iprot) - self.success.append(_elem374) + (_etype379, _size376) = iprot.readListBegin() + for _i380 in xrange(_size376): + _elem381 = Partition() + _elem381.read(iprot) + self.success.append(_elem381) iprot.readListEnd() else: iprot.skip(ftype) @@ -10322,8 +10748,8 @@ class get_partitions_ps_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter375 in self.success: - iter375.write(oprot) + for iter382 in self.success: + iter382.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -10403,10 +10829,10 @@ class get_partitions_ps_with_auth_args: elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype379, _size376) = iprot.readListBegin() - for _i380 in xrange(_size376): - _elem381 = iprot.readString(); - self.part_vals.append(_elem381) + (_etype386, _size383) = iprot.readListBegin() + for _i387 in xrange(_size383): + _elem388 = iprot.readString(); + self.part_vals.append(_elem388) iprot.readListEnd() else: iprot.skip(ftype) @@ -10423,10 +10849,10 @@ class get_partitions_ps_with_auth_args: elif fid == 6: if ftype == TType.LIST: self.group_names = [] - (_etype385, _size382) = iprot.readListBegin() - for _i386 in xrange(_size382): - _elem387 = iprot.readString(); - self.group_names.append(_elem387) + (_etype392, _size389) = iprot.readListBegin() + for _i393 in xrange(_size389): + _elem394 = iprot.readString(); + self.group_names.append(_elem394) iprot.readListEnd() else: iprot.skip(ftype) @@ -10451,8 +10877,8 @@ class get_partitions_ps_with_auth_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter388 in self.part_vals: - oprot.writeString(iter388) + for iter395 in self.part_vals: + oprot.writeString(iter395) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts is not None: @@ -10466,8 +10892,8 @@ class get_partitions_ps_with_auth_args: if self.group_names is not None: oprot.writeFieldBegin('group_names', TType.LIST, 6) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter389 in self.group_names: - oprot.writeString(iter389) + for iter396 in self.group_names: + oprot.writeString(iter396) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -10519,11 +10945,11 @@ class get_partitions_ps_with_auth_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype393, _size390) = iprot.readListBegin() - for _i394 in xrange(_size390): - _elem395 = Partition() - _elem395.read(iprot) - self.success.append(_elem395) + (_etype400, _size397) = iprot.readListBegin() + for _i401 in xrange(_size397): + _elem402 = Partition() + _elem402.read(iprot) + self.success.append(_elem402) iprot.readListEnd() else: iprot.skip(ftype) @@ -10552,8 +10978,8 @@ class get_partitions_ps_with_auth_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter396 in self.success: - iter396.write(oprot) + for iter403 in self.success: + iter403.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -10627,10 +11053,10 @@ class get_partition_names_ps_args: elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype400, _size397) = iprot.readListBegin() - for _i401 in xrange(_size397): - _elem402 = iprot.readString(); - self.part_vals.append(_elem402) + (_etype407, _size404) = iprot.readListBegin() + for _i408 in xrange(_size404): + _elem409 = iprot.readString(); + self.part_vals.append(_elem409) iprot.readListEnd() else: iprot.skip(ftype) @@ -10660,8 +11086,8 @@ class get_partition_names_ps_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter403 in self.part_vals: - oprot.writeString(iter403) + for iter410 in self.part_vals: + oprot.writeString(iter410) oprot.writeListEnd() oprot.writeFieldEnd() if self.max_parts is not None: @@ -10717,10 +11143,10 @@ class get_partition_names_ps_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype407, _size404) = iprot.readListBegin() - for _i408 in xrange(_size404): - _elem409 = iprot.readString(); - self.success.append(_elem409) + (_etype414, _size411) = iprot.readListBegin() + for _i415 in xrange(_size411): + _elem416 = iprot.readString(); + self.success.append(_elem416) iprot.readListEnd() else: iprot.skip(ftype) @@ -10749,8 +11175,8 @@ class get_partition_names_ps_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter410 in self.success: - oprot.writeString(iter410) + for iter417 in self.success: + oprot.writeString(iter417) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -10906,11 +11332,11 @@ class get_partitions_by_filter_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype414, _size411) = iprot.readListBegin() - for _i415 in xrange(_size411): - _elem416 = Partition() - _elem416.read(iprot) - self.success.append(_elem416) + (_etype421, _size418) = iprot.readListBegin() + for _i422 in xrange(_size418): + _elem423 = Partition() + _elem423.read(iprot) + self.success.append(_elem423) iprot.readListEnd() else: iprot.skip(ftype) @@ -10939,8 +11365,8 @@ class get_partitions_by_filter_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter417 in self.success: - iter417.write(oprot) + for iter424 in self.success: + iter424.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -11011,10 +11437,10 @@ class get_partitions_by_names_args: elif fid == 3: if ftype == TType.LIST: self.names = [] - (_etype421, _size418) = iprot.readListBegin() - for _i422 in xrange(_size418): - _elem423 = iprot.readString(); - self.names.append(_elem423) + (_etype428, _size425) = iprot.readListBegin() + for _i429 in xrange(_size425): + _elem430 = iprot.readString(); + self.names.append(_elem430) iprot.readListEnd() else: iprot.skip(ftype) @@ -11039,8 +11465,8 @@ class get_partitions_by_names_args: if self.names is not None: oprot.writeFieldBegin('names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.names)) - for iter424 in self.names: - oprot.writeString(iter424) + for iter431 in self.names: + oprot.writeString(iter431) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11092,11 +11518,11 @@ class get_partitions_by_names_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype428, _size425) = iprot.readListBegin() - for _i429 in xrange(_size425): - _elem430 = Partition() - _elem430.read(iprot) - self.success.append(_elem430) + (_etype435, _size432) = iprot.readListBegin() + for _i436 in xrange(_size432): + _elem437 = Partition() + _elem437.read(iprot) + self.success.append(_elem437) iprot.readListEnd() else: iprot.skip(ftype) @@ -11125,8 +11551,8 @@ class get_partitions_by_names_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter431 in self.success: - iter431.write(oprot) + for iter438 in self.success: + iter438.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -11356,11 +11782,11 @@ class alter_partitions_args: elif fid == 3: if ftype == TType.LIST: self.new_parts = [] - (_etype435, _size432) = iprot.readListBegin() - for _i436 in xrange(_size432): - _elem437 = Partition() - _elem437.read(iprot) - self.new_parts.append(_elem437) + (_etype442, _size439) = iprot.readListBegin() + for _i443 in xrange(_size439): + _elem444 = Partition() + _elem444.read(iprot) + self.new_parts.append(_elem444) iprot.readListEnd() else: iprot.skip(ftype) @@ -11385,8 +11811,8 @@ class alter_partitions_args: if self.new_parts is not None: oprot.writeFieldBegin('new_parts', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.new_parts)) - for iter438 in self.new_parts: - iter438.write(oprot) + for iter445 in self.new_parts: + iter445.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -11698,10 +12124,10 @@ class rename_partition_args: elif fid == 3: if ftype == TType.LIST: self.part_vals = [] - (_etype442, _size439) = iprot.readListBegin() - for _i443 in xrange(_size439): - _elem444 = iprot.readString(); - self.part_vals.append(_elem444) + (_etype449, _size446) = iprot.readListBegin() + for _i450 in xrange(_size446): + _elem451 = iprot.readString(); + self.part_vals.append(_elem451) iprot.readListEnd() else: iprot.skip(ftype) @@ -11732,8 +12158,8 @@ class rename_partition_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter445 in self.part_vals: - oprot.writeString(iter445) + for iter452 in self.part_vals: + oprot.writeString(iter452) oprot.writeListEnd() oprot.writeFieldEnd() if self.new_part is not None: @@ -12064,10 +12490,10 @@ class partition_name_to_vals_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype449, _size446) = iprot.readListBegin() - for _i450 in xrange(_size446): - _elem451 = iprot.readString(); - self.success.append(_elem451) + (_etype456, _size453) = iprot.readListBegin() + for _i457 in xrange(_size453): + _elem458 = iprot.readString(); + self.success.append(_elem458) iprot.readListEnd() else: iprot.skip(ftype) @@ -12090,8 +12516,8 @@ class partition_name_to_vals_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter452 in self.success: - oprot.writeString(iter452) + for iter459 in self.success: + oprot.writeString(iter459) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -12204,11 +12630,11 @@ class partition_name_to_spec_result: if fid == 0: if ftype == TType.MAP: self.success = {} - (_ktype454, _vtype455, _size453 ) = iprot.readMapBegin() - for _i457 in xrange(_size453): - _key458 = iprot.readString(); - _val459 = iprot.readString(); - self.success[_key458] = _val459 + (_ktype461, _vtype462, _size460 ) = iprot.readMapBegin() + for _i464 in xrange(_size460): + _key465 = iprot.readString(); + _val466 = iprot.readString(); + self.success[_key465] = _val466 iprot.readMapEnd() else: iprot.skip(ftype) @@ -12231,9 +12657,9 @@ class partition_name_to_spec_result: if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter460,viter461 in self.success.items(): - oprot.writeString(kiter460) - oprot.writeString(viter461) + for kiter467,viter468 in self.success.items(): + oprot.writeString(kiter467) + oprot.writeString(viter468) oprot.writeMapEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -12303,11 +12729,11 @@ class markPartitionForEvent_args: elif fid == 3: if ftype == TType.MAP: self.part_vals = {} - (_ktype463, _vtype464, _size462 ) = iprot.readMapBegin() - for _i466 in xrange(_size462): - _key467 = iprot.readString(); - _val468 = iprot.readString(); - self.part_vals[_key467] = _val468 + (_ktype470, _vtype471, _size469 ) = iprot.readMapBegin() + for _i473 in xrange(_size469): + _key474 = iprot.readString(); + _val475 = iprot.readString(); + self.part_vals[_key474] = _val475 iprot.readMapEnd() else: iprot.skip(ftype) @@ -12337,9 +12763,9 @@ class markPartitionForEvent_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) - for kiter469,viter470 in self.part_vals.items(): - oprot.writeString(kiter469) - oprot.writeString(viter470) + for kiter476,viter477 in self.part_vals.items(): + oprot.writeString(kiter476) + oprot.writeString(viter477) oprot.writeMapEnd() oprot.writeFieldEnd() if self.eventType is not None: @@ -12535,11 +12961,11 @@ class isPartitionMarkedForEvent_args: elif fid == 3: if ftype == TType.MAP: self.part_vals = {} - (_ktype472, _vtype473, _size471 ) = iprot.readMapBegin() - for _i475 in xrange(_size471): - _key476 = iprot.readString(); - _val477 = iprot.readString(); - self.part_vals[_key476] = _val477 + (_ktype479, _vtype480, _size478 ) = iprot.readMapBegin() + for _i482 in xrange(_size478): + _key483 = iprot.readString(); + _val484 = iprot.readString(); + self.part_vals[_key483] = _val484 iprot.readMapEnd() else: iprot.skip(ftype) @@ -12569,9 +12995,9 @@ class isPartitionMarkedForEvent_args: if self.part_vals is not None: oprot.writeFieldBegin('part_vals', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.part_vals)) - for kiter478,viter479 in self.part_vals.items(): - oprot.writeString(kiter478) - oprot.writeString(viter479) + for kiter485,viter486 in self.part_vals.items(): + oprot.writeString(kiter485) + oprot.writeString(viter486) oprot.writeMapEnd() oprot.writeFieldEnd() if self.eventType is not None: @@ -13543,11 +13969,11 @@ class get_indexes_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype483, _size480) = iprot.readListBegin() - for _i484 in xrange(_size480): - _elem485 = Index() - _elem485.read(iprot) - self.success.append(_elem485) + (_etype490, _size487) = iprot.readListBegin() + for _i491 in xrange(_size487): + _elem492 = Index() + _elem492.read(iprot) + self.success.append(_elem492) iprot.readListEnd() else: iprot.skip(ftype) @@ -13576,8 +14002,8 @@ class get_indexes_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter486 in self.success: - iter486.write(oprot) + for iter493 in self.success: + iter493.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -13718,10 +14144,10 @@ class get_index_names_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype490, _size487) = iprot.readListBegin() - for _i491 in xrange(_size487): - _elem492 = iprot.readString(); - self.success.append(_elem492) + (_etype497, _size494) = iprot.readListBegin() + for _i498 in xrange(_size494): + _elem499 = iprot.readString(); + self.success.append(_elem499) iprot.readListEnd() else: iprot.skip(ftype) @@ -13744,8 +14170,8 @@ class get_index_names_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter493 in self.success: - oprot.writeString(iter493) + for iter500 in self.success: + oprot.writeString(iter500) oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 is not None: @@ -13770,19 +14196,19 @@ class get_index_names_result: def __ne__(self, other): return not (self == other) -class create_role_args: +class update_table_column_statistics_args: """ Attributes: - - role + - stats_obj """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'role', (Role, Role.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'stats_obj', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 1 ) - def __init__(self, role=None,): - self.role = role + def __init__(self, stats_obj=None,): + self.stats_obj = stats_obj def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -13795,8 +14221,8 @@ class create_role_args: break if fid == 1: if ftype == TType.STRUCT: - self.role = Role() - self.role.read(iprot) + self.stats_obj = ColumnStatistics() + self.stats_obj.read(iprot) else: iprot.skip(ftype) else: @@ -13808,10 +14234,10 @@ class create_role_args: if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('create_role_args') - if self.role is not None: - oprot.writeFieldBegin('role', TType.STRUCT, 1) - self.role.write(oprot) + oprot.writeStructBegin('update_table_column_statistics_args') + if self.stats_obj is not None: + oprot.writeFieldBegin('stats_obj', TType.STRUCT, 1) + self.stats_obj.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13831,21 +14257,30 @@ class create_role_args: def __ne__(self, other): return not (self == other) -class create_role_result: +class update_table_column_statistics_result: """ Attributes: - success - o1 + - o2 + - o3 + - o4 """ thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 ) - def __init__(self, success=None, o1=None,): + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): self.success = success self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -13863,10 +14298,28 @@ class create_role_result: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -13876,7 +14329,7 @@ class create_role_result: if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('create_role_result') + oprot.writeStructBegin('update_table_column_statistics_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) @@ -13885,6 +14338,18 @@ class create_role_result: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13903,19 +14368,19 @@ class create_role_result: def __ne__(self, other): return not (self == other) -class drop_role_args: +class update_partition_column_statistics_args: """ Attributes: - - role_name + - stats_obj """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'role_name', None, None, ), # 1 + (1, TType.STRUCT, 'stats_obj', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 1 ) - def __init__(self, role_name=None,): - self.role_name = role_name + def __init__(self, stats_obj=None,): + self.stats_obj = stats_obj def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -13927,8 +14392,9 @@ class drop_role_args: if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRING: - self.role_name = iprot.readString(); + if ftype == TType.STRUCT: + self.stats_obj = ColumnStatistics() + self.stats_obj.read(iprot) else: iprot.skip(ftype) else: @@ -13940,10 +14406,10 @@ class drop_role_args: if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_role_args') - if self.role_name is not None: - oprot.writeFieldBegin('role_name', TType.STRING, 1) - oprot.writeString(self.role_name) + oprot.writeStructBegin('update_partition_column_statistics_args') + if self.stats_obj is not None: + oprot.writeFieldBegin('stats_obj', TType.STRUCT, 1) + self.stats_obj.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -13963,21 +14429,30 @@ class drop_role_args: def __ne__(self, other): return not (self == other) -class drop_role_result: +class update_partition_column_statistics_result: """ Attributes: - success - o1 + - o2 + - o3 + - o4 """ thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 ) - def __init__(self, success=None, o1=None,): + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): self.success = success self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -13995,10 +14470,28 @@ class drop_role_result: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -14008,7 +14501,7 @@ class drop_role_result: if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_role_result') + oprot.writeStructBegin('update_partition_column_statistics_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) @@ -14017,6 +14510,18 @@ class drop_role_result: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14035,11 +14540,26 @@ class drop_role_result: def __ne__(self, other): return not (self == other) -class get_role_names_args: +class get_table_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - col_name + """ thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'col_name', None, None, ), # 3 ) + def __init__(self, db_name=None, tbl_name=None, col_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.col_name = col_name + def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) @@ -14049,6 +14569,21 @@ class get_role_names_args: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.col_name = iprot.readString(); + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -14058,7 +14593,19 @@ class get_role_names_args: if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_role_names_args') + oprot.writeStructBegin('get_table_column_statistics_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin('col_name', TType.STRING, 3) + oprot.writeString(self.col_name) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14077,21 +14624,30 @@ class get_role_names_args: def __ne__(self, other): return not (self == other) -class get_role_names_result: +class get_table_column_statistics_result: """ Attributes: - success - o1 + - o2 + - o3 + - o4 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.STRUCT, 'success', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 4 ) - def __init__(self, success=None, o1=None,): + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): self.success = success self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -14103,21 +14659,35 @@ class get_role_names_result: if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype497, _size494) = iprot.readListBegin() - for _i498 in xrange(_size494): - _elem499 = iprot.readString(); - self.success.append(_elem499) - iprot.readListEnd() + if ftype == TType.STRUCT: + self.success = ColumnStatistics() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidInputException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -14127,18 +14697,27 @@ class get_role_names_result: if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_role_names_result') + oprot.writeStructBegin('get_table_column_statistics_result') if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter500 in self.success: - oprot.writeString(iter500) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() if self.o1 is not None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -14157,21 +14736,1018 @@ class get_role_names_result: def __ne__(self, other): return not (self == other) -class grant_role_args: +class get_partition_column_statistics_args: """ Attributes: - - role_name - - principal_name - - principal_type - - grantor - - grantorType - - grant_option + - db_name + - tbl_name + - part_name + - col_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'role_name', None, None, ), # 1 - (2, TType.STRING, 'principal_name', None, None, ), # 2 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.STRING, 'col_name', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None, col_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.col_name = col_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.col_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_column_statistics_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin('col_name', TType.STRING, 4) + oprot.writeString(self.col_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_partition_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = ColumnStatistics() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidInputException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_partition_column_statistics_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_partition_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - col_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.STRING, 'col_name', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None, col_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.col_name = col_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.col_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_partition_column_statistics_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name is not None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin('col_name', TType.STRING, 4) + oprot.writeString(self.col_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_partition_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_partition_column_statistics_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_table_column_statistics_args: + """ + Attributes: + - db_name + - tbl_name + - col_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'col_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, col_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.col_name = col_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.col_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_table_column_statistics_args') + if self.db_name is not None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name is not None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.col_name is not None: + oprot.writeFieldBegin('col_name', TType.STRING, 3) + oprot.writeString(self.col_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class delete_table_column_statistics_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (InvalidInputException, InvalidInputException.thrift_spec), None, ), # 4 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None, o4=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = InvalidObjectException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = InvalidInputException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('delete_table_column_statistics_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 is not None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 is not None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 is not None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_role_args: + """ + Attributes: + - role + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'role', (Role, Role.thrift_spec), None, ), # 1 + ) + + def __init__(self, role=None,): + self.role = role + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.role = Role() + self.role.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_role_args') + if self.role is not None: + oprot.writeFieldBegin('role', TType.STRUCT, 1) + self.role.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_role_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_role_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_role_args: + """ + Attributes: + - role_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'role_name', None, None, ), # 1 + ) + + def __init__(self, role_name=None,): + self.role_name = role_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.role_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_role_args') + if self.role_name is not None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_role_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_role_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_role_names_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_role_names_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_role_names_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype504, _size501) = iprot.readListBegin() + for _i505 in xrange(_size501): + _elem506 = iprot.readString(); + self.success.append(_elem506) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_role_names_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter507 in self.success: + oprot.writeString(iter507) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 is not None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class grant_role_args: + """ + Attributes: + - role_name + - principal_name + - principal_type + - grantor + - grantorType + - grant_option + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'principal_name', None, None, ), # 2 (3, TType.I32, 'principal_type', None, None, ), # 3 (4, TType.STRING, 'grantor', None, None, ), # 4 (5, TType.I32, 'grantorType', None, None, ), # 5 @@ -14605,11 +16181,11 @@ class list_roles_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype504, _size501) = iprot.readListBegin() - for _i505 in xrange(_size501): - _elem506 = Role() - _elem506.read(iprot) - self.success.append(_elem506) + (_etype511, _size508) = iprot.readListBegin() + for _i512 in xrange(_size508): + _elem513 = Role() + _elem513.read(iprot) + self.success.append(_elem513) iprot.readListEnd() else: iprot.skip(ftype) @@ -14632,8 +16208,8 @@ class list_roles_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter507 in self.success: - iter507.write(oprot) + for iter514 in self.success: + iter514.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -14701,10 +16277,10 @@ class get_privilege_set_args: elif fid == 3: if ftype == TType.LIST: self.group_names = [] - (_etype511, _size508) = iprot.readListBegin() - for _i512 in xrange(_size508): - _elem513 = iprot.readString(); - self.group_names.append(_elem513) + (_etype518, _size515) = iprot.readListBegin() + for _i519 in xrange(_size515): + _elem520 = iprot.readString(); + self.group_names.append(_elem520) iprot.readListEnd() else: iprot.skip(ftype) @@ -14729,8 +16305,8 @@ class get_privilege_set_args: if self.group_names is not None: oprot.writeFieldBegin('group_names', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter514 in self.group_names: - oprot.writeString(iter514) + for iter521 in self.group_names: + oprot.writeString(iter521) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14937,11 +16513,11 @@ class list_privileges_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype518, _size515) = iprot.readListBegin() - for _i519 in xrange(_size515): - _elem520 = HiveObjectPrivilege() - _elem520.read(iprot) - self.success.append(_elem520) + (_etype525, _size522) = iprot.readListBegin() + for _i526 in xrange(_size522): + _elem527 = HiveObjectPrivilege() + _elem527.read(iprot) + self.success.append(_elem527) iprot.readListEnd() else: iprot.skip(ftype) @@ -14964,8 +16540,8 @@ class list_privileges_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter521 in self.success: - iter521.write(oprot) + for iter528 in self.success: + iter528.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -15290,10 +16866,10 @@ class set_ugi_args: elif fid == 2: if ftype == TType.LIST: self.group_names = [] - (_etype525, _size522) = iprot.readListBegin() - for _i526 in xrange(_size522): - _elem527 = iprot.readString(); - self.group_names.append(_elem527) + (_etype532, _size529) = iprot.readListBegin() + for _i533 in xrange(_size529): + _elem534 = iprot.readString(); + self.group_names.append(_elem534) iprot.readListEnd() else: iprot.skip(ftype) @@ -15314,8 +16890,8 @@ class set_ugi_args: if self.group_names is not None: oprot.writeFieldBegin('group_names', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.group_names)) - for iter528 in self.group_names: - oprot.writeString(iter528) + for iter535 in self.group_names: + oprot.writeString(iter535) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15364,10 +16940,10 @@ class set_ugi_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype532, _size529) = iprot.readListBegin() - for _i533 in xrange(_size529): - _elem534 = iprot.readString(); - self.success.append(_elem534) + (_etype539, _size536) = iprot.readListBegin() + for _i540 in xrange(_size536): + _elem541 = iprot.readString(); + self.success.append(_elem541) iprot.readListEnd() else: iprot.skip(ftype) @@ -15390,8 +16966,8 @@ class set_ugi_result: if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter535 in self.success: - oprot.writeString(iter535) + for iter542 in self.success: + oprot.writeString(iter542) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: diff --git metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py index 52019ad..95c3b93 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -2142,6 +2142,902 @@ class Index: def __ne__(self, other): return not (self == other) +class BooleanColumnStatsData: + """ + Attributes: + - numTrues + - numFalses + - numNulls + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'numTrues', None, None, ), # 1 + (2, TType.I64, 'numFalses', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + ) + + def __init__(self, numTrues=None, numFalses=None, numNulls=None,): + self.numTrues = numTrues + self.numFalses = numFalses + self.numNulls = numNulls + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.numTrues = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.numFalses = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('BooleanColumnStatsData') + if self.numTrues is not None: + oprot.writeFieldBegin('numTrues', TType.I64, 1) + oprot.writeI64(self.numTrues) + oprot.writeFieldEnd() + if self.numFalses is not None: + oprot.writeFieldBegin('numFalses', TType.I64, 2) + oprot.writeI64(self.numFalses) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.numTrues is None: + raise TProtocol.TProtocolException(message='Required field numTrues is unset!') + if self.numFalses is None: + raise TProtocol.TProtocolException(message='Required field numFalses is unset!') + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class DoubleColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + """ + + thrift_spec = ( + None, # 0 + (1, TType.DOUBLE, 'lowValue', None, None, ), # 1 + (2, TType.DOUBLE, 'highValue', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.I64, 'numDVs', None, None, ), # 4 + ) + + def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None,): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.DOUBLE: + self.lowValue = iprot.readDouble(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.highValue = iprot.readDouble(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DoubleColumnStatsData') + if self.lowValue is not None: + oprot.writeFieldBegin('lowValue', TType.DOUBLE, 1) + oprot.writeDouble(self.lowValue) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin('highValue', TType.DOUBLE, 2) + oprot.writeDouble(self.highValue) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin('numDVs', TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lowValue is None: + raise TProtocol.TProtocolException(message='Required field lowValue is unset!') + if self.highValue is None: + raise TProtocol.TProtocolException(message='Required field highValue is unset!') + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + if self.numDVs is None: + raise TProtocol.TProtocolException(message='Required field numDVs is unset!') + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class LongColumnStatsData: + """ + Attributes: + - lowValue + - highValue + - numNulls + - numDVs + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'lowValue', None, None, ), # 1 + (2, TType.I64, 'highValue', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.I64, 'numDVs', None, None, ), # 4 + ) + + def __init__(self, lowValue=None, highValue=None, numNulls=None, numDVs=None,): + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.lowValue = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.highValue = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('LongColumnStatsData') + if self.lowValue is not None: + oprot.writeFieldBegin('lowValue', TType.I64, 1) + oprot.writeI64(self.lowValue) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin('highValue', TType.I64, 2) + oprot.writeI64(self.highValue) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin('numDVs', TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.lowValue is None: + raise TProtocol.TProtocolException(message='Required field lowValue is unset!') + if self.highValue is None: + raise TProtocol.TProtocolException(message='Required field highValue is unset!') + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + if self.numDVs is None: + raise TProtocol.TProtocolException(message='Required field numDVs is unset!') + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class StringColumnStatsData: + """ + Attributes: + - maxColLen + - avgColLen + - numNulls + - numDVs + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'maxColLen', None, None, ), # 1 + (2, TType.DOUBLE, 'avgColLen', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + (4, TType.I64, 'numDVs', None, None, ), # 4 + ) + + def __init__(self, maxColLen=None, avgColLen=None, numNulls=None, numDVs=None,): + self.maxColLen = maxColLen + self.avgColLen = avgColLen + self.numNulls = numNulls + self.numDVs = numDVs + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.maxColLen = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.avgColLen = iprot.readDouble(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.numDVs = iprot.readI64(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('StringColumnStatsData') + if self.maxColLen is not None: + oprot.writeFieldBegin('maxColLen', TType.I64, 1) + oprot.writeI64(self.maxColLen) + oprot.writeFieldEnd() + if self.avgColLen is not None: + oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2) + oprot.writeDouble(self.avgColLen) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin('numDVs', TType.I64, 4) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.maxColLen is None: + raise TProtocol.TProtocolException(message='Required field maxColLen is unset!') + if self.avgColLen is None: + raise TProtocol.TProtocolException(message='Required field avgColLen is unset!') + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + if self.numDVs is None: + raise TProtocol.TProtocolException(message='Required field numDVs is unset!') + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class BinaryColumnStatsData: + """ + Attributes: + - maxColLen + - avgColLen + - numNulls + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'maxColLen', None, None, ), # 1 + (2, TType.DOUBLE, 'avgColLen', None, None, ), # 2 + (3, TType.I64, 'numNulls', None, None, ), # 3 + ) + + def __init__(self, maxColLen=None, avgColLen=None, numNulls=None,): + self.maxColLen = maxColLen + self.avgColLen = avgColLen + self.numNulls = numNulls + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.maxColLen = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.DOUBLE: + self.avgColLen = iprot.readDouble(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.numNulls = iprot.readI64(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('BinaryColumnStatsData') + if self.maxColLen is not None: + oprot.writeFieldBegin('maxColLen', TType.I64, 1) + oprot.writeI64(self.maxColLen) + oprot.writeFieldEnd() + if self.avgColLen is not None: + oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 2) + oprot.writeDouble(self.avgColLen) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 3) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.maxColLen is None: + raise TProtocol.TProtocolException(message='Required field maxColLen is unset!') + if self.avgColLen is None: + raise TProtocol.TProtocolException(message='Required field avgColLen is unset!') + if self.numNulls is None: + raise TProtocol.TProtocolException(message='Required field numNulls is unset!') + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ColumnStatisticsData: + """ + Attributes: + - booleanStats + - longStats + - doubleStats + - stringStats + - binaryStats + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'booleanStats', (BooleanColumnStatsData, BooleanColumnStatsData.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'longStats', (LongColumnStatsData, LongColumnStatsData.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'doubleStats', (DoubleColumnStatsData, DoubleColumnStatsData.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'stringStats', (StringColumnStatsData, StringColumnStatsData.thrift_spec), None, ), # 4 + (5, TType.STRUCT, 'binaryStats', (BinaryColumnStatsData, BinaryColumnStatsData.thrift_spec), None, ), # 5 + ) + + def __init__(self, booleanStats=None, longStats=None, doubleStats=None, stringStats=None, binaryStats=None,): + self.booleanStats = booleanStats + self.longStats = longStats + self.doubleStats = doubleStats + self.stringStats = stringStats + self.binaryStats = binaryStats + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.booleanStats = BooleanColumnStatsData() + self.booleanStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.longStats = LongColumnStatsData() + self.longStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.doubleStats = DoubleColumnStatsData() + self.doubleStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.stringStats = StringColumnStatsData() + self.stringStats.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.binaryStats = BinaryColumnStatsData() + self.binaryStats.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ColumnStatisticsData') + if self.booleanStats is not None: + oprot.writeFieldBegin('booleanStats', TType.STRUCT, 1) + self.booleanStats.write(oprot) + oprot.writeFieldEnd() + if self.longStats is not None: + oprot.writeFieldBegin('longStats', TType.STRUCT, 2) + self.longStats.write(oprot) + oprot.writeFieldEnd() + if self.doubleStats is not None: + oprot.writeFieldBegin('doubleStats', TType.STRUCT, 3) + self.doubleStats.write(oprot) + oprot.writeFieldEnd() + if self.stringStats is not None: + oprot.writeFieldBegin('stringStats', TType.STRUCT, 4) + self.stringStats.write(oprot) + oprot.writeFieldEnd() + if self.binaryStats is not None: + oprot.writeFieldBegin('binaryStats', TType.STRUCT, 5) + self.binaryStats.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ColumnStatisticsObj: + """ + Attributes: + - colName + - colType + - statsData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'colName', None, None, ), # 1 + (2, TType.STRING, 'colType', None, None, ), # 2 + (3, TType.STRUCT, 'statsData', (ColumnStatisticsData, ColumnStatisticsData.thrift_spec), None, ), # 3 + ) + + def __init__(self, colName=None, colType=None, statsData=None,): + self.colName = colName + self.colType = colType + self.statsData = statsData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.colName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.colType = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.statsData = ColumnStatisticsData() + self.statsData.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ColumnStatisticsObj') + if self.colName is not None: + oprot.writeFieldBegin('colName', TType.STRING, 1) + oprot.writeString(self.colName) + oprot.writeFieldEnd() + if self.colType is not None: + oprot.writeFieldBegin('colType', TType.STRING, 2) + oprot.writeString(self.colType) + oprot.writeFieldEnd() + if self.statsData is not None: + oprot.writeFieldBegin('statsData', TType.STRUCT, 3) + self.statsData.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.colName is None: + raise TProtocol.TProtocolException(message='Required field colName is unset!') + if self.colType is None: + raise TProtocol.TProtocolException(message='Required field colType is unset!') + if self.statsData is None: + raise TProtocol.TProtocolException(message='Required field statsData is unset!') + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ColumnStatisticsDesc: + """ + Attributes: + - isTblLevel + - dbName + - tableName + - partName + - lastAnalyzed + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'isTblLevel', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'tableName', None, None, ), # 3 + (4, TType.STRING, 'partName', None, None, ), # 4 + (5, TType.I64, 'lastAnalyzed', None, None, ), # 5 + ) + + def __init__(self, isTblLevel=None, dbName=None, tableName=None, partName=None, lastAnalyzed=None,): + self.isTblLevel = isTblLevel + self.dbName = dbName + self.tableName = tableName + self.partName = partName + self.lastAnalyzed = lastAnalyzed + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.isTblLevel = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.partName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.lastAnalyzed = iprot.readI64(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ColumnStatisticsDesc') + if self.isTblLevel is not None: + oprot.writeFieldBegin('isTblLevel', TType.BOOL, 1) + oprot.writeBool(self.isTblLevel) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 2) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 3) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.partName is not None: + oprot.writeFieldBegin('partName', TType.STRING, 4) + oprot.writeString(self.partName) + oprot.writeFieldEnd() + if self.lastAnalyzed is not None: + oprot.writeFieldBegin('lastAnalyzed', TType.I64, 5) + oprot.writeI64(self.lastAnalyzed) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.isTblLevel is None: + raise TProtocol.TProtocolException(message='Required field isTblLevel is unset!') + if self.dbName is None: + raise TProtocol.TProtocolException(message='Required field dbName is unset!') + if self.tableName is None: + raise TProtocol.TProtocolException(message='Required field tableName is unset!') + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ColumnStatistics: + """ + Attributes: + - statsDesc + - statsObj + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'statsDesc', (ColumnStatisticsDesc, ColumnStatisticsDesc.thrift_spec), None, ), # 1 + (2, TType.LIST, 'statsObj', (TType.STRUCT,(ColumnStatisticsObj, ColumnStatisticsObj.thrift_spec)), None, ), # 2 + ) + + def __init__(self, statsDesc=None, statsObj=None,): + self.statsDesc = statsDesc + self.statsObj = statsObj + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.statsDesc = ColumnStatisticsDesc() + self.statsDesc.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.statsObj = [] + (_etype198, _size195) = iprot.readListBegin() + for _i199 in xrange(_size195): + _elem200 = ColumnStatisticsObj() + _elem200.read(iprot) + self.statsObj.append(_elem200) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ColumnStatistics') + if self.statsDesc is not None: + oprot.writeFieldBegin('statsDesc', TType.STRUCT, 1) + self.statsDesc.write(oprot) + oprot.writeFieldEnd() + if self.statsObj is not None: + oprot.writeFieldBegin('statsObj', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.statsObj)) + for iter201 in self.statsObj: + iter201.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.statsDesc is None: + raise TProtocol.TProtocolException(message='Required field statsDesc is unset!') + if self.statsObj is None: + raise TProtocol.TProtocolException(message='Required field statsObj is unset!') + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + class Schema: """ Attributes: @@ -2171,22 +3067,22 @@ class Schema: if fid == 1: if ftype == TType.LIST: self.fieldSchemas = [] - (_etype198, _size195) = iprot.readListBegin() - for _i199 in xrange(_size195): - _elem200 = FieldSchema() - _elem200.read(iprot) - self.fieldSchemas.append(_elem200) + (_etype205, _size202) = iprot.readListBegin() + for _i206 in xrange(_size202): + _elem207 = FieldSchema() + _elem207.read(iprot) + self.fieldSchemas.append(_elem207) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.MAP: self.properties = {} - (_ktype202, _vtype203, _size201 ) = iprot.readMapBegin() - for _i205 in xrange(_size201): - _key206 = iprot.readString(); - _val207 = iprot.readString(); - self.properties[_key206] = _val207 + (_ktype209, _vtype210, _size208 ) = iprot.readMapBegin() + for _i212 in xrange(_size208): + _key213 = iprot.readString(); + _val214 = iprot.readString(); + self.properties[_key213] = _val214 iprot.readMapEnd() else: iprot.skip(ftype) @@ -2203,16 +3099,16 @@ class Schema: if self.fieldSchemas is not None: oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas)) - for iter208 in self.fieldSchemas: - iter208.write(oprot) + for iter215 in self.fieldSchemas: + iter215.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.properties is not None: oprot.writeFieldBegin('properties', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) - for kiter209,viter210 in self.properties.items(): - oprot.writeString(kiter209) - oprot.writeString(viter210) + for kiter216,viter217 in self.properties.items(): + oprot.writeString(kiter216) + oprot.writeString(viter217) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2259,11 +3155,11 @@ class EnvironmentContext: if fid == 1: if ftype == TType.MAP: self.properties = {} - (_ktype212, _vtype213, _size211 ) = iprot.readMapBegin() - for _i215 in xrange(_size211): - _key216 = iprot.readString(); - _val217 = iprot.readString(); - self.properties[_key216] = _val217 + (_ktype219, _vtype220, _size218 ) = iprot.readMapBegin() + for _i222 in xrange(_size218): + _key223 = iprot.readString(); + _val224 = iprot.readString(); + self.properties[_key223] = _val224 iprot.readMapEnd() else: iprot.skip(ftype) @@ -2280,9 +3176,9 @@ class EnvironmentContext: if self.properties is not None: oprot.writeFieldBegin('properties', TType.MAP, 1) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties)) - for kiter218,viter219 in self.properties.items(): - oprot.writeString(kiter218) - oprot.writeString(viter219) + for kiter225,viter226 in self.properties.items(): + oprot.writeString(kiter225) + oprot.writeString(viter226) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -2995,3 +3891,66 @@ class ConfigValSecurityException(Exception): def __ne__(self, other): return not (self == other) + +class InvalidInputException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('InvalidInputException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb index 8aa2b5b..004a24b 100644 --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -448,6 +448,247 @@ class Index ::Thrift::Struct.generate_accessors self end +class BooleanColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + NUMTRUES = 1 + NUMFALSES = 2 + NUMNULLS = 3 + + FIELDS = { + NUMTRUES => {:type => ::Thrift::Types::I64, :name => 'numTrues'}, + NUMFALSES => {:type => ::Thrift::Types::I64, :name => 'numFalses'}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numTrues is unset!') unless @numTrues + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numFalses is unset!') unless @numFalses + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + end + + ::Thrift::Struct.generate_accessors self +end + +class DoubleColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + LOWVALUE = 1 + HIGHVALUE = 2 + NUMNULLS = 3 + NUMDVS = 4 + + FIELDS = { + LOWVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'lowValue'}, + HIGHVALUE => {:type => ::Thrift::Types::DOUBLE, :name => 'highValue'}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lowValue is unset!') unless @lowValue + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field highValue is unset!') unless @highValue + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs + end + + ::Thrift::Struct.generate_accessors self +end + +class LongColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + LOWVALUE = 1 + HIGHVALUE = 2 + NUMNULLS = 3 + NUMDVS = 4 + + FIELDS = { + LOWVALUE => {:type => ::Thrift::Types::I64, :name => 'lowValue'}, + HIGHVALUE => {:type => ::Thrift::Types::I64, :name => 'highValue'}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lowValue is unset!') unless @lowValue + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field highValue is unset!') unless @highValue + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs + end + + ::Thrift::Struct.generate_accessors self +end + +class StringColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + MAXCOLLEN = 1 + AVGCOLLEN = 2 + NUMNULLS = 3 + NUMDVS = 4 + + FIELDS = { + MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'}, + AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'}, + NUMDVS => {:type => ::Thrift::Types::I64, :name => 'numDVs'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numDVs is unset!') unless @numDVs + end + + ::Thrift::Struct.generate_accessors self +end + +class BinaryColumnStatsData + include ::Thrift::Struct, ::Thrift::Struct_Union + MAXCOLLEN = 1 + AVGCOLLEN = 2 + NUMNULLS = 3 + + FIELDS = { + MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'}, + AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'}, + NUMNULLS => {:type => ::Thrift::Types::I64, :name => 'numNulls'} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxColLen is unset!') unless @maxColLen + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field avgColLen is unset!') unless @avgColLen + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field numNulls is unset!') unless @numNulls + end + + ::Thrift::Struct.generate_accessors self +end + +class ColumnStatisticsData < ::Thrift::Union + include ::Thrift::Struct_Union + class << self + def booleanStats(val) + ColumnStatisticsData.new(:booleanStats, val) + end + + def longStats(val) + ColumnStatisticsData.new(:longStats, val) + end + + def doubleStats(val) + ColumnStatisticsData.new(:doubleStats, val) + end + + def stringStats(val) + ColumnStatisticsData.new(:stringStats, val) + end + + def binaryStats(val) + ColumnStatisticsData.new(:binaryStats, val) + end + end + + BOOLEANSTATS = 1 + LONGSTATS = 2 + DOUBLESTATS = 3 + STRINGSTATS = 4 + BINARYSTATS = 5 + + FIELDS = { + BOOLEANSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'booleanStats', :class => BooleanColumnStatsData}, + LONGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'longStats', :class => LongColumnStatsData}, + DOUBLESTATS => {:type => ::Thrift::Types::STRUCT, :name => 'doubleStats', :class => DoubleColumnStatsData}, + STRINGSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'stringStats', :class => StringColumnStatsData}, + BINARYSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'binaryStats', :class => BinaryColumnStatsData} + } + + def struct_fields; FIELDS; end + + def validate + raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? + end + + ::Thrift::Union.generate_accessors self +end + +class ColumnStatisticsObj + include ::Thrift::Struct, ::Thrift::Struct_Union + COLNAME = 1 + COLTYPE = 2 + STATSDATA = 3 + + FIELDS = { + COLNAME => {:type => ::Thrift::Types::STRING, :name => 'colName'}, + COLTYPE => {:type => ::Thrift::Types::STRING, :name => 'colType'}, + STATSDATA => {:type => ::Thrift::Types::STRUCT, :name => 'statsData', :class => ColumnStatisticsData} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colName is unset!') unless @colName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field colType is unset!') unless @colType + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsData is unset!') unless @statsData + end + + ::Thrift::Struct.generate_accessors self +end + +class ColumnStatisticsDesc + include ::Thrift::Struct, ::Thrift::Struct_Union + ISTBLLEVEL = 1 + DBNAME = 2 + TABLENAME = 3 + PARTNAME = 4 + LASTANALYZED = 5 + + FIELDS = { + ISTBLLEVEL => {:type => ::Thrift::Types::BOOL, :name => 'isTblLevel'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName', :optional => true}, + LASTANALYZED => {:type => ::Thrift::Types::I64, :name => 'lastAnalyzed', :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isTblLevel is unset!') if @isTblLevel.nil? + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field dbName is unset!') unless @dbName + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field tableName is unset!') unless @tableName + end + + ::Thrift::Struct.generate_accessors self +end + +class ColumnStatistics + include ::Thrift::Struct, ::Thrift::Struct_Union + STATSDESC = 1 + STATSOBJ = 2 + + FIELDS = { + STATSDESC => {:type => ::Thrift::Types::STRUCT, :name => 'statsDesc', :class => ColumnStatisticsDesc}, + STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ColumnStatisticsObj}} + } + + def struct_fields; FIELDS; end + + def validate + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsDesc is unset!') unless @statsDesc + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsObj is unset!') unless @statsObj + end + + ::Thrift::Struct.generate_accessors self +end + class Schema include ::Thrift::Struct, ::Thrift::Struct_Union FIELDSCHEMAS = 1 @@ -713,3 +954,24 @@ class ConfigValSecurityException < ::Thrift::Exception ::Thrift::Struct.generate_accessors self end +class InvalidInputException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + diff --git metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb index 38b97cc..7448364 100644 --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb @@ -948,6 +948,120 @@ module ThriftHiveMetastore raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_names failed: unknown result') end + def update_table_column_statistics(stats_obj) + send_update_table_column_statistics(stats_obj) + return recv_update_table_column_statistics() + end + + def send_update_table_column_statistics(stats_obj) + send_message('update_table_column_statistics', Update_table_column_statistics_args, :stats_obj => stats_obj) + end + + def recv_update_table_column_statistics() + result = receive_message(Update_table_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_table_column_statistics failed: unknown result') + end + + def update_partition_column_statistics(stats_obj) + send_update_partition_column_statistics(stats_obj) + return recv_update_partition_column_statistics() + end + + def send_update_partition_column_statistics(stats_obj) + send_message('update_partition_column_statistics', Update_partition_column_statistics_args, :stats_obj => stats_obj) + end + + def recv_update_partition_column_statistics() + result = receive_message(Update_partition_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'update_partition_column_statistics failed: unknown result') + end + + def get_table_column_statistics(db_name, tbl_name, col_name) + send_get_table_column_statistics(db_name, tbl_name, col_name) + return recv_get_table_column_statistics() + end + + def send_get_table_column_statistics(db_name, tbl_name, col_name) + send_message('get_table_column_statistics', Get_table_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name) + end + + def recv_get_table_column_statistics() + result = receive_message(Get_table_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table_column_statistics failed: unknown result') + end + + def get_partition_column_statistics(db_name, tbl_name, part_name, col_name) + send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) + return recv_get_partition_column_statistics() + end + + def send_get_partition_column_statistics(db_name, tbl_name, part_name, col_name) + send_message('get_partition_column_statistics', Get_partition_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name) + end + + def recv_get_partition_column_statistics() + result = receive_message(Get_partition_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_column_statistics failed: unknown result') + end + + def delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) + send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) + return recv_delete_partition_column_statistics() + end + + def send_delete_partition_column_statistics(db_name, tbl_name, part_name, col_name) + send_message('delete_partition_column_statistics', Delete_partition_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name) + end + + def recv_delete_partition_column_statistics() + result = receive_message(Delete_partition_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'delete_partition_column_statistics failed: unknown result') + end + + def delete_table_column_statistics(db_name, tbl_name, col_name) + send_delete_table_column_statistics(db_name, tbl_name, col_name) + return recv_delete_table_column_statistics() + end + + def send_delete_table_column_statistics(db_name, tbl_name, col_name) + send_message('delete_table_column_statistics', Delete_table_column_statistics_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name) + end + + def recv_delete_table_column_statistics() + result = receive_message(Delete_table_column_statistics_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + raise result.o4 unless result.o4.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'delete_table_column_statistics failed: unknown result') + end + def create_role(role) send_create_role(role) return recv_create_role() @@ -1921,6 +2035,108 @@ module ThriftHiveMetastore write_result(result, oprot, 'get_index_names', seqid) end + def process_update_table_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Update_table_column_statistics_args) + result = Update_table_column_statistics_result.new() + begin + result.success = @handler.update_table_column_statistics(args.stats_obj) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue InvalidObjectException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + rescue InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'update_table_column_statistics', seqid) + end + + def process_update_partition_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Update_partition_column_statistics_args) + result = Update_partition_column_statistics_result.new() + begin + result.success = @handler.update_partition_column_statistics(args.stats_obj) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue InvalidObjectException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + rescue InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'update_partition_column_statistics', seqid) + end + + def process_get_table_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Get_table_column_statistics_args) + result = Get_table_column_statistics_result.new() + begin + result.success = @handler.get_table_column_statistics(args.db_name, args.tbl_name, args.col_name) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + rescue InvalidInputException => o3 + result.o3 = o3 + rescue InvalidObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'get_table_column_statistics', seqid) + end + + def process_get_partition_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_column_statistics_args) + result = Get_partition_column_statistics_result.new() + begin + result.success = @handler.get_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + rescue InvalidInputException => o3 + result.o3 = o3 + rescue InvalidObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'get_partition_column_statistics', seqid) + end + + def process_delete_partition_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Delete_partition_column_statistics_args) + result = Delete_partition_column_statistics_result.new() + begin + result.success = @handler.delete_partition_column_statistics(args.db_name, args.tbl_name, args.part_name, args.col_name) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + rescue InvalidObjectException => o3 + result.o3 = o3 + rescue InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'delete_partition_column_statistics', seqid) + end + + def process_delete_table_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Delete_table_column_statistics_args) + result = Delete_table_column_statistics_result.new() + begin + result.success = @handler.delete_table_column_statistics(args.db_name, args.tbl_name, args.col_name) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + rescue InvalidObjectException => o3 + result.o3 = o3 + rescue InvalidInputException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'delete_table_column_statistics', seqid) + end + def process_create_role(seqid, iprot, oprot) args = read_args(iprot, Create_role_args) result = Create_role_result.new() @@ -4248,6 +4464,266 @@ module ThriftHiveMetastore ::Thrift::Struct.generate_accessors self end + class Update_table_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + STATS_OBJ = 1 + + FIELDS = { + STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ColumnStatistics} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Update_table_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Update_partition_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + STATS_OBJ = 1 + + FIELDS = { + STATS_OBJ => {:type => ::Thrift::Types::STRUCT, :name => 'stats_obj', :class => ColumnStatistics} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Update_partition_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + COL_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ColumnStatistics}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidInputException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + COL_NAME = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ColumnStatistics}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidInputException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Delete_partition_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + COL_NAME = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'}, + COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Delete_partition_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidObjectException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Delete_table_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + COL_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + COL_NAME => {:type => ::Thrift::Types::STRING, :name => 'col_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Delete_table_column_statistics_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => InvalidObjectException}, + O4 => {:type => ::Thrift::Types::STRUCT, :name => 'o4', :class => InvalidInputException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + class Create_role_args include ::Thrift::Struct, ::Thrift::Struct_Union ROLE = 1 diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index 8fec13d..9e38d25 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -55,6 +55,9 @@ import org.apache.hadoop.hive.common.metrics.Metrics; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; +import org.apache.hadoop.hive.metastore.api.ColumnStatistics; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsDesc; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException; import org.apache.hadoop.hive.metastore.api.Constants; import org.apache.hadoop.hive.metastore.api.Database; @@ -65,6 +68,7 @@ import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.HiveObjectType; import org.apache.hadoop.hive.metastore.api.Index; import org.apache.hadoop.hive.metastore.api.IndexAlreadyExistsException; +import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; import org.apache.hadoop.hive.metastore.api.InvalidPartitionException; @@ -620,7 +624,7 @@ public class HiveMetaStore extends ThriftHiveMetastore { private void drop_database_core(RawStore ms, final String name, final boolean deleteData, final boolean cascade) throws NoSuchObjectException, InvalidOperationException, MetaException, - IOException { + IOException, InvalidObjectException, InvalidInputException { boolean success = false; Database db = null; List tablePaths = new ArrayList(); @@ -753,6 +757,10 @@ public class HiveMetaStore extends ThriftHiveMetastore { success = true; } catch (IOException e) { throw new MetaException(e.getMessage()); + } catch (InvalidInputException e) { + throw new MetaException(e.getMessage()); + } catch (InvalidObjectException e) { + throw new MetaException(e.getMessage()); } finally { endFunction("drop_database", success); } @@ -1006,7 +1014,7 @@ public class HiveMetaStore extends ThriftHiveMetastore { private void drop_table_core(final RawStore ms, final String dbname, final String name, final boolean deleteData) - throws NoSuchObjectException, MetaException, IOException { + throws NoSuchObjectException, MetaException, IOException, InvalidObjectException, InvalidInputException { boolean success = false; boolean isExternal = false; @@ -1140,10 +1148,13 @@ public class HiveMetaStore extends ThriftHiveMetastore { * @return * @throws MetaException * @throws IOException + * @throws InvalidInputException + * @throws InvalidObjectException + * @throws NoSuchObjectException */ private List dropPartitionsAndGetLocations(RawStore ms, String dbName, String tableName, Path tablePath, List partitionKeys, boolean checkLocation) - throws MetaException, IOException { + throws MetaException, IOException, NoSuchObjectException, InvalidObjectException, InvalidInputException { int partitionBatchSize = HiveConf.getIntVar(hiveConf, ConfVars.METASTORE_BATCH_RETRIEVE_MAX); @@ -1193,6 +1204,10 @@ public class HiveMetaStore extends ThriftHiveMetastore { success = true; } catch (IOException e) { throw new MetaException(e.getMessage()); + } catch (InvalidInputException e) { + throw new MetaException(e.getMessage()); + } catch (InvalidObjectException e) { + throw new MetaException(e.getMessage()); } finally { endFunction("drop_table", success); } @@ -1605,7 +1620,7 @@ public class HiveMetaStore extends ThriftHiveMetastore { private boolean drop_partition_common(RawStore ms, String db_name, String tbl_name, List part_vals, final boolean deleteData) - throws MetaException, NoSuchObjectException, IOException { + throws MetaException, NoSuchObjectException, IOException, InvalidObjectException, InvalidInputException { boolean success = false; Path partPath = null; @@ -1688,6 +1703,10 @@ public class HiveMetaStore extends ThriftHiveMetastore { ret = drop_partition_common(getMS(), db_name, tbl_name, part_vals, deleteData); } catch (IOException e) { throw new MetaException(e.getMessage()); + } catch (InvalidInputException e) { + throw new MetaException(e.getMessage()); + } catch (InvalidObjectException e) { + throw new MetaException(e.getMessage()); } finally { endFunction("drop_partition", ret); } @@ -2210,7 +2229,7 @@ public class HiveMetaStore extends ThriftHiveMetastore { private boolean drop_partition_by_name_core(final RawStore ms, final String db_name, final String tbl_name, final String part_name, final boolean deleteData) throws NoSuchObjectException, - MetaException, TException, IOException { + MetaException, TException, IOException, InvalidObjectException, InvalidInputException { List partVals = null; try { @@ -2235,6 +2254,10 @@ public class HiveMetaStore extends ThriftHiveMetastore { part_name, deleteData); } catch (IOException e) { throw new MetaException(e.getMessage()); + } catch (InvalidInputException e) { + throw new MetaException(e.getMessage()); + } catch (InvalidObjectException e) { + throw new MetaException(e.getMessage()); } finally { endFunction("drop_partition_by_name", ret); } @@ -2396,6 +2419,10 @@ public class HiveMetaStore extends ThriftHiveMetastore { indexName, deleteData); } catch (IOException e) { throw new MetaException(e.getMessage()); + } catch (InvalidInputException e) { + throw new MetaException(e.getMessage()); + } catch (InvalidObjectException e) { + throw new MetaException(e.getMessage()); } finally { endFunction("drop_index_by_name", ret); } @@ -2406,7 +2433,7 @@ public class HiveMetaStore extends ThriftHiveMetastore { private boolean drop_index_by_name_core(final RawStore ms, final String dbName, final String tblName, final String indexName, final boolean deleteData) throws NoSuchObjectException, - MetaException, TException, IOException { + MetaException, TException, IOException, InvalidObjectException, InvalidInputException { boolean success = false; Path tblPath = null; @@ -2520,6 +2547,195 @@ public class HiveMetaStore extends ThriftHiveMetastore { return ret; } + private String lowerCaseConvertPartName(String partName) throws MetaException { + boolean isFirst = true; + Map partSpec = Warehouse.makeEscSpecFromName(partName); + String convertedPartName = new String(); + + for (Map.Entry entry : partSpec.entrySet()) { + String partColName = entry.getKey(); + String partColVal = entry.getValue(); + + if (!isFirst) { + convertedPartName += "/"; + } else { + isFirst = false; + } + convertedPartName += partColName.toLowerCase() + "=" + partColVal; + } + return convertedPartName; + } + + public ColumnStatistics get_table_column_statistics(String dbName, String tableName, + String colName) throws NoSuchObjectException, MetaException, TException, InvalidInputException, + InvalidObjectException + { + dbName = dbName.toLowerCase(); + tableName = tableName.toLowerCase(); + colName = colName.toLowerCase(); + startFunction("get_column_statistics_by_table: db=" + dbName + " table=" + tableName + + " column=" + colName); + ColumnStatistics statsObj = null; + try { + statsObj = getMS().getTableColumnStatistics(dbName, tableName, colName); + } finally { + endFunction("get_column_statistics_by_table: ", statsObj != null); + } + return statsObj; + } + + public ColumnStatistics get_partition_column_statistics(String dbName, String tableName, + String partName, String colName) throws NoSuchObjectException, MetaException, + InvalidInputException, TException,InvalidObjectException + { + dbName = dbName.toLowerCase(); + tableName = tableName.toLowerCase(); + colName = colName.toLowerCase(); + String convertedPartName = lowerCaseConvertPartName(partName); + startFunction("get_column_statistics_by_partition: db=" + dbName + " table=" + tableName + + " partition=" + convertedPartName + " column=" + colName); + ColumnStatistics statsObj = null; + + try { + List partVals = getPartValsFromName(getMS(), dbName, tableName, partName); + statsObj = getMS().getPartitionColumnStatistics(dbName, tableName, convertedPartName, + partVals, colName); + } finally { + endFunction("get_column_statistics_by_partition: ", statsObj != null); + } + return statsObj; + } + + public boolean update_table_column_statistics(ColumnStatistics colStats) + throws NoSuchObjectException,InvalidObjectException,MetaException,TException, + InvalidInputException + { + String dbName = null; + String tableName = null; + String colName = null; + ColumnStatisticsDesc statsDesc = colStats.getStatsDesc(); + dbName = statsDesc.getDbName().toLowerCase(); + tableName = statsDesc.getTableName().toLowerCase(); + + statsDesc.setDbName(dbName); + statsDesc.setTableName(tableName); + long time = System.currentTimeMillis() / 1000; + statsDesc.setLastAnalyzed(time); + + List statsObjs = colStats.getStatsObj(); + + for (ColumnStatisticsObj statsObj:statsObjs) { + colName = statsObj.getColName().toLowerCase(); + statsObj.setColName(colName); + startFunction("write_column_statistics: db=" + dbName + " table=" + tableName + + " column=" + colName); + } + + colStats.setStatsDesc(statsDesc); + colStats.setStatsObj(statsObjs); + + boolean ret = false; + + try { + ret = getMS().updateTableColumnStatistics(colStats); + return ret; + } finally { + endFunction("write_column_statistics: ", ret != false); + } + } + + public boolean update_partition_column_statistics(ColumnStatistics colStats) + throws NoSuchObjectException,InvalidObjectException,MetaException,TException, + InvalidInputException + { + + String dbName = null; + String tableName = null; + String partName = null; + String colName = null; + + ColumnStatisticsDesc statsDesc = colStats.getStatsDesc(); + dbName = statsDesc.getDbName().toLowerCase(); + tableName = statsDesc.getTableName().toLowerCase(); + partName = lowerCaseConvertPartName(statsDesc.getPartName()); + + statsDesc.setDbName(dbName); + statsDesc.setTableName(tableName); + statsDesc.setPartName(partName); + + long time = System.currentTimeMillis() / 1000; + statsDesc.setLastAnalyzed(time); + + List statsObjs = colStats.getStatsObj(); + + for (ColumnStatisticsObj statsObj:statsObjs) { + colName = statsObj.getColName().toLowerCase(); + statsObj.setColName(colName); + startFunction("write_partition_column_statistics: db=" + dbName + " table=" + tableName + + " part=" + partName + "column=" + colName); + } + + colStats.setStatsDesc(statsDesc); + colStats.setStatsObj(statsObjs); + + boolean ret = false; + + try { + List partVals = getPartValsFromName(getMS(), dbName, + tableName, partName); + ret = getMS().updatePartitionColumnStatistics(colStats, partVals); + return ret; + } finally { + endFunction("write_partition_column_statistics: ", ret != false); + } + } + + public boolean delete_partition_column_statistics(String dbName, String tableName, + String partName, String colName) throws NoSuchObjectException, MetaException, + InvalidObjectException, TException, InvalidInputException + { + dbName = dbName.toLowerCase(); + tableName = tableName.toLowerCase(); + if (colName != null) { + colName = colName.toLowerCase(); + } + String convertedPartName = lowerCaseConvertPartName(partName); + startFunction("delete_column_statistics_by_partition: db=" + dbName + " table=" + tableName + + " partition=" + convertedPartName + " column=" + colName); + boolean ret = false; + + try { + List partVals = getPartValsFromName(getMS(), dbName, tableName, convertedPartName); + ret = getMS().deletePartitionColumnStatistics(dbName, tableName, + convertedPartName, partVals, colName); + } finally { + endFunction("delete_column_statistics_by_partition: ", ret != false); + } + return ret; + } + + public boolean delete_table_column_statistics(String dbName, String tableName, String colName) + throws NoSuchObjectException, MetaException, InvalidObjectException, TException, + InvalidInputException + { + dbName = dbName.toLowerCase(); + tableName = tableName.toLowerCase(); + + if (colName != null) { + colName = colName.toLowerCase(); + } + startFunction("delete_column_statistics_by_table: db=" + dbName + " table=" + tableName + + " column=" + colName); + + boolean ret = false; + try { + ret = getMS().deleteTableColumnStatistics(dbName, tableName, colName); + } finally { + endFunction("delete_column_statistics_by_table: ", ret != false); + } + return ret; + } + @Override public List get_partitions_by_filter(final String dbName, final String tblName, final String filter, final short maxParts) @@ -3197,6 +3413,7 @@ public class HiveMetaStore extends ThriftHiveMetastore { } + /** * Discard a current delegation token. * diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index 17b986c..0ae8a4c 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -40,12 +40,14 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; +import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.Index; +import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; import org.apache.hadoop.hive.metastore.api.InvalidPartitionException; @@ -935,6 +937,50 @@ public class HiveMetaStoreClient implements IMetaStoreClient { return client.get_indexes(dbName, tblName, max); } + /** {@inheritDoc} */ + public boolean updateTableColumnStatistics(ColumnStatistics statsObj) + throws NoSuchObjectException, InvalidObjectException, MetaException, TException, + InvalidInputException{ + return client.update_table_column_statistics(statsObj); + } + + /** {@inheritDoc} */ + public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj) + throws NoSuchObjectException, InvalidObjectException, MetaException, TException, + InvalidInputException{ + return client.update_partition_column_statistics(statsObj); + } + + /** {@inheritDoc} */ + public ColumnStatistics getTableColumnStatistics(String dbName, String tableName,String colName) + throws NoSuchObjectException, MetaException, TException, InvalidInputException, + InvalidObjectException { + return client.get_table_column_statistics(dbName, tableName, colName); + } + + /** {@inheritDoc} */ + public ColumnStatistics getPartitionColumnStatistics(String dbName, String tableName, + String partName, String colName) throws NoSuchObjectException, MetaException, TException, + InvalidInputException, InvalidObjectException { + return client.get_partition_column_statistics(dbName, tableName, partName, colName); + } + + /** {@inheritDoc} */ + public boolean deletePartitionColumnStatistics(String dbName, String tableName, String partName, + String colName) throws NoSuchObjectException, InvalidObjectException, MetaException, + TException, InvalidInputException + { + return client.delete_partition_column_statistics(dbName, tableName, partName, colName); + } + + /** {@inheritDoc} */ + public boolean deleteTableColumnStatistics(String dbName, String tableName, String colName) + throws NoSuchObjectException, InvalidObjectException, MetaException, TException, + InvalidInputException + { + return client.delete_table_column_statistics(dbName, tableName, colName); + } + /** * @param db * @param tableName diff --git metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java index 3883b5b..a7c68db 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java @@ -22,12 +22,14 @@ import java.util.List; import java.util.Map; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; +import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.Index; +import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; import org.apache.hadoop.hive.metastore.api.InvalidPartitionException; @@ -726,6 +728,103 @@ public interface IMetaStoreClient { MetaException, TException; /** + * Write table level column statistics to persistent store + * @param statsObj + * @return boolean indicating the status of the operation + * @throws NoSuchObjectException + * @throws InvalidObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + */ + + public boolean updateTableColumnStatistics(ColumnStatistics statsObj) + throws NoSuchObjectException, InvalidObjectException, MetaException, TException, InvalidInputException; + + /** + * Write partition level column statistics to persistent store + * @param statsObj + * @return boolean indicating the status of the operation + * @throws NoSuchObjectException + * @throws InvalidObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + */ + + public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj) + throws NoSuchObjectException, InvalidObjectException, MetaException, TException, InvalidInputException; + + /** + * Get table level column statistics given dbName, tableName and colName + * @param dbName + * @param tableName + * @param colName + * @return ColumnStatistics struct for a given db, table and col + * @throws NoSuchObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + * @throws InvalidObjectException + */ + + public ColumnStatistics getTableColumnStatistics(String dbName, String tableName, String colName) + throws NoSuchObjectException, MetaException, TException, + InvalidInputException, InvalidObjectException; + + /** + * Get partition level column statistics given dbName, tableName, partitionName and colName + * @param dbName + * @param tableName + * @param partitionName + * @param colName + * @return ColumnStatistics struct for a given db, table, partition and col + * @throws NoSuchObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + * @throws InvalidObjectException + */ + + public ColumnStatistics getPartitionColumnStatistics(String dbName, String tableName, + String partitionName, String colName) throws NoSuchObjectException, MetaException, TException, + InvalidInputException, InvalidObjectException; + + /** + * Delete partition level column statistics given dbName, tableName, partName and colName + * @param dbName + * @param tableName + * @param partName + * @param colName + * @return boolean indicating outcome of the operation + * @throws NoSuchObjectException + * @throws InvalidObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + */ + + public boolean deletePartitionColumnStatistics(String dbName, String tableName, + String partName, String colName) throws NoSuchObjectException, MetaException, + InvalidObjectException, TException, InvalidInputException; + + /** + * Delete table level column statistics given dbName, tableName and colName + * @param dbName + * @param tableName + * @param colName + * @return boolean indicating the outcome of the operation + * @throws NoSuchObjectException + * @throws MetaException + * @throws InvalidObjectException + * @throws TException + * @throws InvalidInputException + */ + + public boolean deleteTableColumnStatistics(String dbName, String tableName, String colName) throws + NoSuchObjectException, MetaException, InvalidObjectException, TException, InvalidInputException; + + /** * @param role * role object * @return true on success diff --git metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java index eff44b1..dc78b09 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -56,14 +56,23 @@ import org.apache.hadoop.hive.common.classification.InterfaceAudience; import org.apache.hadoop.hive.common.classification.InterfaceStability; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; +import org.apache.hadoop.hive.metastore.api.BinaryColumnStatsData; +import org.apache.hadoop.hive.metastore.api.BooleanColumnStatsData; +import org.apache.hadoop.hive.metastore.api.ColumnStatistics; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsData; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsDesc; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; import org.apache.hadoop.hive.metastore.api.Database; +import org.apache.hadoop.hive.metastore.api.DoubleColumnStatsData; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.HiveObjectType; import org.apache.hadoop.hive.metastore.api.Index; +import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidPartitionException; +import org.apache.hadoop.hive.metastore.api.LongColumnStatsData; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Order; @@ -77,6 +86,7 @@ import org.apache.hadoop.hive.metastore.api.Role; import org.apache.hadoop.hive.metastore.api.SerDeInfo; import org.apache.hadoop.hive.metastore.api.SkewedInfo; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; +import org.apache.hadoop.hive.metastore.api.StringColumnStatsData; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.Type; import org.apache.hadoop.hive.metastore.api.UnknownDBException; @@ -91,6 +101,7 @@ import org.apache.hadoop.hive.metastore.model.MIndex; import org.apache.hadoop.hive.metastore.model.MOrder; import org.apache.hadoop.hive.metastore.model.MPartition; import org.apache.hadoop.hive.metastore.model.MPartitionColumnPrivilege; +import org.apache.hadoop.hive.metastore.model.MPartitionColumnStatistics; import org.apache.hadoop.hive.metastore.model.MPartitionEvent; import org.apache.hadoop.hive.metastore.model.MPartitionPrivilege; import org.apache.hadoop.hive.metastore.model.MRole; @@ -100,6 +111,7 @@ import org.apache.hadoop.hive.metastore.model.MStorageDescriptor; import org.apache.hadoop.hive.metastore.model.MStringList; import org.apache.hadoop.hive.metastore.model.MTable; import org.apache.hadoop.hive.metastore.model.MTableColumnPrivilege; +import org.apache.hadoop.hive.metastore.model.MTableColumnStatistics; import org.apache.hadoop.hive.metastore.model.MTablePrivilege; import org.apache.hadoop.hive.metastore.model.MType; import org.apache.hadoop.hive.metastore.parser.ExpressionTree.ANTLRNoCaseStringStream; @@ -673,7 +685,7 @@ public class ObjectStore implements RawStore, Configurable { } } - public boolean dropTable(String dbName, String tableName) throws MetaException { + public boolean dropTable(String dbName, String tableName) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException { boolean success = false; try { openTransaction(); @@ -701,6 +713,13 @@ public class ObjectStore implements RawStore, Configurable { if (partColGrants != null && partColGrants.size() > 0) { pm.deletePersistentAll(partColGrants); } + // delete column statistics if present + try { + deleteTableColumnStatistics(dbName, tableName, null); + } catch (NoSuchObjectException e) { + LOG.info("Found no table level column statistics associated with db " + dbName + + " table " + tableName + " record to delete"); + } preDropStorageDescriptor(tbl.getSd()); // then remove the table @@ -1267,7 +1286,7 @@ public class ObjectStore implements RawStore, Configurable { @Override public boolean dropPartition(String dbName, String tableName, - List part_vals) throws MetaException { + List part_vals) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException { boolean success = false; try { openTransaction(); @@ -1287,8 +1306,12 @@ public class ObjectStore implements RawStore, Configurable { * drop the storage descriptor cleanly, etc.) * @param part - the MPartition to drop * @return whether the transaction committed successfully + * @throws InvalidInputException + * @throws InvalidObjectException + * @throws MetaException + * @throws NoSuchObjectException */ - private boolean dropPartitionCommon(MPartition part) { + private boolean dropPartitionCommon(MPartition part) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException { boolean success = false; try { openTransaction(); @@ -1316,6 +1339,17 @@ public class ObjectStore implements RawStore, Configurable { if (partColumnGrants != null && partColumnGrants.size() > 0) { pm.deletePersistentAll(partColumnGrants); } + + String dbName = part.getTable().getDatabase().getName(); + String tableName = part.getTable().getTableName(); + + // delete partition level column stats if it exists + try { + deletePartitionColumnStatistics(dbName, tableName, partName, part.getValues(), null); + } catch (NoSuchObjectException e) { + LOG.info("No column statistics records found to delete"); + } + preDropStorageDescriptor(part.getSd()); pm.deletePersistent(part); } @@ -4455,6 +4489,738 @@ public class ObjectStore implements RawStore, Configurable { } } + // Methods to persist, maintain and retrieve Column Statistics + private MTableColumnStatistics convertToMTableColumnStatistics(ColumnStatisticsDesc statsDesc, + ColumnStatisticsObj statsObj) throws NoSuchObjectException, + MetaException, InvalidObjectException + { + if (statsObj == null || statsDesc == null) { + throw new InvalidObjectException("Invalid column stats object"); + } + + String dbName = statsDesc.getDbName(); + String tableName = statsDesc.getTableName(); + MTable table = getMTable(dbName, tableName); + + if (table == null) { + throw new NoSuchObjectException("Table " + tableName + + " for which stats is gathered doesn't exist."); + } + + MTableColumnStatistics mColStats = new MTableColumnStatistics(); + mColStats.setTable(table); + mColStats.setDbName(statsDesc.getDbName()); + mColStats.setTableName(statsDesc.getTableName()); + mColStats.setLastAnalyzed(statsDesc.getLastAnalyzed()); + mColStats.setColName(statsObj.getColName()); + mColStats.setColType(statsObj.getColType()); + + if (statsObj.getStatsData().isSetBooleanStats()) { + BooleanColumnStatsData boolStats = statsObj.getStatsData().getBooleanStats(); + mColStats.setBooleanStats(boolStats.getNumTrues(), boolStats.getNumFalses(), + boolStats.getNumNulls()); + } else if (statsObj.getStatsData().isSetLongStats()) { + LongColumnStatsData longStats = statsObj.getStatsData().getLongStats(); + mColStats.setLongStats(longStats.getNumNulls(), longStats.getNumDVs(), + longStats.getLowValue(), longStats.getHighValue()); + } else if (statsObj.getStatsData().isSetDoubleStats()) { + DoubleColumnStatsData doubleStats = statsObj.getStatsData().getDoubleStats(); + mColStats.setDoubleStats(doubleStats.getNumNulls(), doubleStats.getNumDVs(), + doubleStats.getLowValue(), doubleStats.getHighValue()); + } else if (statsObj.getStatsData().isSetStringStats()) { + StringColumnStatsData stringStats = statsObj.getStatsData().getStringStats(); + mColStats.setStringStats(stringStats.getNumNulls(), stringStats.getNumDVs(), + stringStats.getMaxColLen(), stringStats.getAvgColLen()); + } else if (statsObj.getStatsData().isSetBinaryStats()) { + BinaryColumnStatsData binaryStats = statsObj.getStatsData().getBinaryStats(); + mColStats.setBinaryStats(binaryStats.getNumNulls(), binaryStats.getMaxColLen(), + binaryStats.getAvgColLen()); + } + return mColStats; + } + + private ColumnStatisticsObj getColumnStatisticsObj(MTableColumnStatistics mStatsObj) { + ColumnStatisticsObj statsObj = new ColumnStatisticsObj(); + statsObj.setColType(mStatsObj.getColType()); + statsObj.setColName(mStatsObj.getColName()); + String colType = mStatsObj.getColType(); + ColumnStatisticsData colStatsData = new ColumnStatisticsData(); + + if (colType.equalsIgnoreCase("boolean")) { + BooleanColumnStatsData boolStats = new BooleanColumnStatsData(); + boolStats.setNumFalses(mStatsObj.getNumFalses()); + boolStats.setNumTrues(mStatsObj.getNumTrues()); + boolStats.setNumNulls(mStatsObj.getNumNulls()); + colStatsData.setBooleanStats(boolStats); + } else if (colType.equalsIgnoreCase("string")) { + StringColumnStatsData stringStats = new StringColumnStatsData(); + stringStats.setNumNulls(mStatsObj.getNumNulls()); + stringStats.setAvgColLen(mStatsObj.getAvgColLen()); + stringStats.setMaxColLen(mStatsObj.getMaxColLen()); + stringStats.setNumDVs(mStatsObj.getNumDVs()); + colStatsData.setStringStats(stringStats); + } else if (colType.equalsIgnoreCase("binary")) { + BinaryColumnStatsData binaryStats = new BinaryColumnStatsData(); + binaryStats.setNumNulls(mStatsObj.getNumNulls()); + binaryStats.setAvgColLen(mStatsObj.getAvgColLen()); + binaryStats.setMaxColLen(mStatsObj.getMaxColLen()); + colStatsData.setBinaryStats(binaryStats); + } else if (colType.equalsIgnoreCase("long")) { + LongColumnStatsData longStats = new LongColumnStatsData(); + longStats.setNumNulls(mStatsObj.getNumNulls()); + longStats.setHighValue(mStatsObj.getHighValueAsLong()); + longStats.setLowValue(mStatsObj.getLowValueAsLong()); + longStats.setNumDVs(mStatsObj.getNumDVs()); + colStatsData.setLongStats(longStats); + } else if (colType.equalsIgnoreCase("double")) { + DoubleColumnStatsData doubleStats = new DoubleColumnStatsData(); + doubleStats.setNumNulls(mStatsObj.getNumNulls()); + doubleStats.setHighValue(mStatsObj.getHighValueAsDouble()); + doubleStats.setLowValue(mStatsObj.getLowValueAsDouble()); + doubleStats.setNumDVs(mStatsObj.getNumDVs()); + colStatsData.setDoubleStats(doubleStats); + } + statsObj.setStatsData(colStatsData); + return statsObj; + } + + private ColumnStatisticsDesc getTableColumnStatisticsDesc(MTableColumnStatistics mStatsObj) { + ColumnStatisticsDesc statsDesc = new ColumnStatisticsDesc(); + statsDesc.setIsTblLevel(true); + statsDesc.setDbName(mStatsObj.getDbName()); + statsDesc.setTableName(mStatsObj.getTableName()); + statsDesc.setLastAnalyzed(mStatsObj.getLastAnalyzed()); + return statsDesc; + } + + private ColumnStatistics convertToTableColumnStatistics(MTableColumnStatistics mStatsObj) + throws MetaException + { + if (mStatsObj == null) { + return null; + } + + ColumnStatisticsDesc statsDesc = getTableColumnStatisticsDesc(mStatsObj); + ColumnStatisticsObj statsObj = getColumnStatisticsObj(mStatsObj); + List statsObjs = new ArrayList(); + statsObjs.add(statsObj); + + ColumnStatistics colStats = new ColumnStatistics(); + colStats.setStatsDesc(statsDesc); + colStats.setStatsObj(statsObjs); + return colStats; + } + + private MPartitionColumnStatistics convertToMPartitionColumnStatistics(ColumnStatisticsDesc statsDesc, + ColumnStatisticsObj statsObj, List partVal) + throws MetaException, NoSuchObjectException + { + if (statsDesc == null || statsObj == null || partVal == null) { + return null; + } + + MPartition partition = getMPartition(statsDesc.getDbName(), statsDesc.getTableName(), partVal); + + if (partition == null) { + throw new NoSuchObjectException("Partition for which stats is gathered doesn't exist."); + } + + MPartitionColumnStatistics mColStats = new MPartitionColumnStatistics(); + mColStats.setPartition(partition); + mColStats.setDbName(statsDesc.getDbName()); + mColStats.setTableName(statsDesc.getTableName()); + mColStats.setPartitionName(statsDesc.getPartName()); + mColStats.setLastAnalyzed(statsDesc.getLastAnalyzed()); + mColStats.setColName(statsObj.getColName()); + mColStats.setColType(statsObj.getColType()); + + if (statsObj.getStatsData().isSetBooleanStats()) { + BooleanColumnStatsData boolStats = statsObj.getStatsData().getBooleanStats(); + mColStats.setBooleanStats(boolStats.getNumTrues(), boolStats.getNumFalses(), + boolStats.getNumNulls()); + } else if (statsObj.getStatsData().isSetLongStats()) { + LongColumnStatsData longStats = statsObj.getStatsData().getLongStats(); + mColStats.setLongStats(longStats.getNumNulls(), longStats.getNumDVs(), + longStats.getLowValue(), longStats.getHighValue()); + } else if (statsObj.getStatsData().isSetDoubleStats()) { + DoubleColumnStatsData doubleStats = statsObj.getStatsData().getDoubleStats(); + mColStats.setDoubleStats(doubleStats.getNumNulls(), doubleStats.getNumDVs(), + doubleStats.getLowValue(), doubleStats.getHighValue()); + } else if (statsObj.getStatsData().isSetStringStats()) { + StringColumnStatsData stringStats = statsObj.getStatsData().getStringStats(); + mColStats.setStringStats(stringStats.getNumNulls(), stringStats.getNumDVs(), + stringStats.getMaxColLen(), stringStats.getAvgColLen()); + } else if (statsObj.getStatsData().isSetBinaryStats()) { + BinaryColumnStatsData binaryStats = statsObj.getStatsData().getBinaryStats(); + mColStats.setBinaryStats(binaryStats.getNumNulls(), binaryStats.getMaxColLen(), + binaryStats.getAvgColLen()); + } + return mColStats; + } + + private void writeMTableColumnStatistics(MTableColumnStatistics mStatsObj) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException + { + String dbName = mStatsObj.getDbName(); + String tableName = mStatsObj.getTableName(); + String colName = mStatsObj.getColName(); + + LOG.info("Updating table level column statistics for db=" + dbName + " tableName=" + tableName + + " colName=" + colName); + + MTable mTable = getMTable(mStatsObj.getDbName(), mStatsObj.getTableName()); + boolean foundCol = false; + + if (mTable == null) { + throw new + NoSuchObjectException("Table " + tableName + + " for which stats gathering is requested doesn't exist."); + } + + MStorageDescriptor mSDS = mTable.getSd(); + List colList = mSDS.getCD().getCols(); + + for(MFieldSchema mCol:colList) { + if (mCol.getName().equals(mStatsObj.getColName().trim())) { + foundCol = true; + break; + } + } + + if (!foundCol) { + throw new + NoSuchObjectException("Column " + colName + + " for which stats gathering is requested doesn't exist."); + } + + MTableColumnStatistics oldStatsObj = getMTableColumnStatistics(dbName, tableName, colName); + + if (oldStatsObj != null) { + oldStatsObj.setAvgColLen(mStatsObj.getAvgColLen()); + oldStatsObj.setHighValue(mStatsObj.getHighValue()); + oldStatsObj.setLastAnalyzed(mStatsObj.getLastAnalyzed()); + oldStatsObj.setLowValue(mStatsObj.getLowValue()); + oldStatsObj.setMaxColLen(mStatsObj.getMaxColLen()); + oldStatsObj.setNumDVs(mStatsObj.getNumDVs()); + oldStatsObj.setNumFalses(mStatsObj.getNumFalses()); + oldStatsObj.setNumTrues(mStatsObj.getNumTrues()); + oldStatsObj.setNumNulls(mStatsObj.getNumNulls()); + } else { + pm.makePersistent(mStatsObj); + } + } + + private ColumnStatisticsObj getColumnStatisticsObj(MPartitionColumnStatistics mStatsObj) { + ColumnStatisticsObj statsObj = new ColumnStatisticsObj(); + statsObj.setColType(mStatsObj.getColType()); + statsObj.setColName(mStatsObj.getColName()); + String colType = mStatsObj.getColType(); + ColumnStatisticsData colStatsData = new ColumnStatisticsData(); + + if (colType.equalsIgnoreCase("boolean")) { + BooleanColumnStatsData boolStats = new BooleanColumnStatsData(); + boolStats.setNumFalses(mStatsObj.getNumFalses()); + boolStats.setNumTrues(mStatsObj.getNumTrues()); + boolStats.setNumNulls(mStatsObj.getNumNulls()); + colStatsData.setBooleanStats(boolStats); + } else if (colType.equalsIgnoreCase("string")) { + StringColumnStatsData stringStats = new StringColumnStatsData(); + stringStats.setNumNulls(mStatsObj.getNumNulls()); + stringStats.setAvgColLen(mStatsObj.getAvgColLen()); + stringStats.setMaxColLen(mStatsObj.getMaxColLen()); + stringStats.setNumDVs(mStatsObj.getNumDVs()); + colStatsData.setStringStats(stringStats); + } else if (colType.equalsIgnoreCase("binary")) { + BinaryColumnStatsData binaryStats = new BinaryColumnStatsData(); + binaryStats.setNumNulls(mStatsObj.getNumNulls()); + binaryStats.setAvgColLen(mStatsObj.getAvgColLen()); + binaryStats.setMaxColLen(mStatsObj.getMaxColLen()); + colStatsData.setBinaryStats(binaryStats); + } else if (colType.equalsIgnoreCase("long")) { + LongColumnStatsData longStats = new LongColumnStatsData(); + longStats.setNumNulls(mStatsObj.getNumNulls()); + longStats.setHighValue(mStatsObj.getHighValueAsLong()); + longStats.setLowValue(mStatsObj.getLowValueAsLong()); + longStats.setNumDVs(mStatsObj.getNumDVs()); + colStatsData.setLongStats(longStats); + } else if (colType.equalsIgnoreCase("double")) { + DoubleColumnStatsData doubleStats = new DoubleColumnStatsData(); + doubleStats.setNumNulls(mStatsObj.getNumNulls()); + doubleStats.setHighValue(mStatsObj.getHighValueAsDouble()); + doubleStats.setLowValue(mStatsObj.getLowValueAsDouble()); + doubleStats.setNumDVs(mStatsObj.getNumDVs()); + colStatsData.setDoubleStats(doubleStats); + } + statsObj.setStatsData(colStatsData); + return statsObj; + } + + private ColumnStatisticsDesc getPartitionColumnStatisticsDesc(MPartitionColumnStatistics mStatsObj) { + ColumnStatisticsDesc statsDesc = new ColumnStatisticsDesc(); + statsDesc.setIsTblLevel(false); + statsDesc.setDbName(mStatsObj.getDbName()); + statsDesc.setTableName(mStatsObj.getTableName()); + statsDesc.setPartName(mStatsObj.getPartitionName()); + statsDesc.setLastAnalyzed(mStatsObj.getLastAnalyzed()); + return statsDesc; + } + + private void writeMPartitionColumnStatistics(MPartitionColumnStatistics mStatsObj, + List partVal) throws NoSuchObjectException, MetaException, InvalidObjectException, + InvalidInputException + { + String dbName = mStatsObj.getDbName(); + String tableName = mStatsObj.getTableName(); + String partName = mStatsObj.getPartitionName(); + String colName = mStatsObj.getColName(); + + LOG.info("Updating partition level column statistics for db=" + dbName + " tableName=" + + tableName + " partName=" + partName + " colName=" + colName); + + MTable mTable = getMTable(mStatsObj.getDbName(), mStatsObj.getTableName()); + boolean foundCol = false; + + if (mTable == null) { + throw new + NoSuchObjectException("Table " + tableName + + " for which stats gathering is requested doesn't exist."); + } + + MPartition mPartition = + getMPartition(mStatsObj.getDbName(), mStatsObj.getTableName(), partVal); + + if (mPartition == null) { + throw new + NoSuchObjectException("Partition " + partName + + " for which stats gathering is requested doesn't exist"); + } + + MStorageDescriptor mSDS = mPartition.getSd(); + List colList = mSDS.getCD().getCols(); + + for(MFieldSchema mCol:colList) { + if (mCol.getName().equals(mStatsObj.getColName().trim())) { + foundCol = true; + break; + } + } + + if (!foundCol) { + throw new + NoSuchObjectException("Column " + colName + + " for which stats gathering is requested doesn't exist."); + } + + MPartitionColumnStatistics oldStatsObj = getMPartitionColumnStatistics(dbName, tableName, + partName, partVal, colName); + if (oldStatsObj != null) { + oldStatsObj.setAvgColLen(mStatsObj.getAvgColLen()); + oldStatsObj.setHighValue(mStatsObj.getHighValue()); + oldStatsObj.setLastAnalyzed(mStatsObj.getLastAnalyzed()); + oldStatsObj.setLowValue(mStatsObj.getLowValue()); + oldStatsObj.setMaxColLen(mStatsObj.getMaxColLen()); + oldStatsObj.setNumDVs(mStatsObj.getNumDVs()); + oldStatsObj.setNumFalses(mStatsObj.getNumFalses()); + oldStatsObj.setNumTrues(mStatsObj.getNumTrues()); + oldStatsObj.setNumNulls(mStatsObj.getNumNulls()); + } else { + pm.makePersistent(mStatsObj); + } + } + + public boolean updateTableColumnStatistics(ColumnStatistics colStats) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException + { + boolean committed = false; + + try { + openTransaction(); + List statsObjs = colStats.getStatsObj(); + ColumnStatisticsDesc statsDesc = colStats.getStatsDesc(); + + for (ColumnStatisticsObj statsObj:statsObjs) { + MTableColumnStatistics mStatsObj = convertToMTableColumnStatistics(statsDesc, statsObj); + writeMTableColumnStatistics(mStatsObj); + } + committed = commitTransaction(); + return committed; + } finally { + if (!committed) { + rollbackTransaction(); + } + } + } + + public boolean updatePartitionColumnStatistics(ColumnStatistics colStats, List partVals) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException + { + boolean committed = false; + + try { + openTransaction(); + List statsObjs = colStats.getStatsObj(); + ColumnStatisticsDesc statsDesc = colStats.getStatsDesc(); + + for (ColumnStatisticsObj statsObj:statsObjs) { + MPartitionColumnStatistics mStatsObj = + convertToMPartitionColumnStatistics(statsDesc, statsObj, partVals); + writeMPartitionColumnStatistics(mStatsObj, partVals); + } + committed = commitTransaction(); + return committed; + } finally { + if (!committed) { + rollbackTransaction(); + } + } + } + + private MTableColumnStatistics getMTableColumnStatistics(String dbName, String tableName, + String colName) throws NoSuchObjectException, InvalidInputException, MetaException + { + boolean committed = false; + + if (dbName == null) { + dbName = MetaStoreUtils.DEFAULT_DATABASE_NAME; + } + + if (tableName == null || colName == null) { + throw new InvalidInputException("TableName/ColName passed to get_table_column_statistics " + + "is null"); + } + + try { + openTransaction(); + MTableColumnStatistics mStatsObj = null; + MTable mTable = getMTable(dbName.trim(), tableName.trim()); + boolean foundCol = false; + + if (mTable == null) { + throw new NoSuchObjectException("Table " + tableName + + " for which stats is requested doesn't exist."); + } + + MStorageDescriptor mSDS = mTable.getSd(); + List colList = mSDS.getCD().getCols(); + + for(MFieldSchema mCol:colList) { + if (mCol.getName().equals(colName.trim())) { + foundCol = true; + break; + } + } + + if (!foundCol) { + throw new NoSuchObjectException("Column " + colName + + " for which stats is requested doesn't exist."); + } + + Query query = pm.newQuery(MTableColumnStatistics.class); + query.setFilter("table.tableName == t1 && " + + "dbName == t2 && " + "colName == t3"); + query + .declareParameters("java.lang.String t1, java.lang.String t2, java.lang.String t3"); + query.setUnique(true); + + mStatsObj = (MTableColumnStatistics) query.execute(tableName.trim(), + dbName.trim(), colName.trim()); + pm.retrieve(mStatsObj); + committed = commitTransaction(); + return mStatsObj; + } finally { + if (!committed) { + rollbackTransaction(); + return null; + } + } + } + + public ColumnStatistics getTableColumnStatistics(String dbName, String tableName, String colName) + throws MetaException, NoSuchObjectException, InvalidInputException + { + ColumnStatistics statsObj; + MTableColumnStatistics mStatsObj = getMTableColumnStatistics(dbName, tableName, colName); + + if (mStatsObj == null) { + throw new NoSuchObjectException("Statistics for dbName=" + dbName + " tableName=" + tableName + + " columnName=" + colName + " doesn't exist."); + } + + statsObj = convertToTableColumnStatistics(mStatsObj); + return statsObj; + } + + public ColumnStatistics getPartitionColumnStatistics(String dbName, String tableName, + String partName, List partVal, String colName) + throws MetaException, NoSuchObjectException, InvalidInputException + { + ColumnStatistics statsObj; + MPartitionColumnStatistics mStatsObj = + getMPartitionColumnStatistics(dbName, tableName, partName, partVal, colName); + + if (mStatsObj == null) { + throw new NoSuchObjectException("Statistics for dbName=" + dbName + " tableName=" + tableName + + " partName= " + partName + " columnName=" + colName + " doesn't exist."); + } + statsObj = convertToPartColumnStatistics(mStatsObj); + return statsObj; + } + + private ColumnStatistics convertToPartColumnStatistics(MPartitionColumnStatistics mStatsObj) + { + if (mStatsObj == null) { + return null; + } + + ColumnStatisticsDesc statsDesc = getPartitionColumnStatisticsDesc(mStatsObj); + ColumnStatisticsObj statsObj = getColumnStatisticsObj(mStatsObj); + List statsObjs = new ArrayList(); + statsObjs.add(statsObj); + + ColumnStatistics colStats = new ColumnStatistics(); + colStats.setStatsDesc(statsDesc); + colStats.setStatsObj(statsObjs); + return colStats; + } + + private MPartitionColumnStatistics getMPartitionColumnStatistics(String dbName, String tableName, + String partName, List partVal, String colName) throws NoSuchObjectException, + InvalidInputException, MetaException + { + boolean committed = false; + MPartitionColumnStatistics mStatsObj = null; + + if (dbName == null) { + dbName = MetaStoreUtils.DEFAULT_DATABASE_NAME; + } + + if (tableName == null || partVal == null || colName == null) { + throw new InvalidInputException("TableName/PartName/ColName passed to " + + " get_partition_column_statistics is null"); + } + + try { + openTransaction(); + MTable mTable = getMTable(dbName.trim(), tableName.trim()); + boolean foundCol = false; + + if (mTable == null) { + throw new NoSuchObjectException("Table " + tableName + + " for which stats is requested doesn't exist."); + } + + MPartition mPartition = + getMPartition(dbName, tableName, partVal); + + if (mPartition == null) { + throw new + NoSuchObjectException("Partition " + partName + + " for which stats is requested doesn't exist"); + } + + MStorageDescriptor mSDS = mPartition.getSd(); + List colList = mSDS.getCD().getCols(); + + for(MFieldSchema mCol:colList) { + if (mCol.getName().equals(colName.trim())) { + foundCol = true; + break; + } + } + + if (!foundCol) { + throw new NoSuchObjectException("Column " + colName + + " for which stats is requested doesn't exist."); + } + + Query query = pm.newQuery(MPartitionColumnStatistics.class); + query.setFilter("partition.partitionName == t1 && " + + "dbName == t2 && " + "tableName == t3 && " + "colName == t4"); + query + .declareParameters("java.lang.String t1, java.lang.String t2, " + + "java.lang.String t3, java.lang.String t4"); + query.setUnique(true); + + mStatsObj = (MPartitionColumnStatistics) query.executeWithArray(partName.trim(), + dbName.trim(), tableName.trim(), + colName.trim()); + pm.retrieve(mStatsObj); + committed = commitTransaction(); + return mStatsObj; + + } finally { + if (!committed) { + rollbackTransaction(); + } + } + } + + public boolean deletePartitionColumnStatistics(String dbName, String tableName, + String partName, List partVals,String colName) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException + { + boolean ret = false; + + if (dbName == null) { + dbName = MetaStoreUtils.DEFAULT_DATABASE_NAME; + } + + if (tableName == null) { + throw new InvalidInputException("Table name is null."); + } + + try { + openTransaction(); + MTable mTable = getMTable(dbName, tableName); + MPartitionColumnStatistics mStatsObj; + List mStatsObjColl; + + if (mTable == null) { + throw new + NoSuchObjectException("Table " + tableName + + " for which stats deletion is requested doesn't exist"); + } + + MPartition mPartition = + getMPartition(dbName, tableName, partVals); + + if (mPartition == null) { + throw new + NoSuchObjectException("Partition " + partName + + " for which stats deletion is requested doesn't exist"); + } + + Query query = pm.newQuery(MPartitionColumnStatistics.class); + String filter; + String parameters; + + if (colName != null) { + filter = "partition.partitionName == t1 && dbName == t2 && tableName == t3 && colName == t4"; + parameters = "java.lang.String t1, java.lang.String t2, " + + "java.lang.String t3, java.lang.String t4"; + } else { + filter = "partition.partitionName == t1 && dbName == t2 && tableName == t3"; + parameters = "java.lang.String t1, java.lang.String t2, java.lang.String t3"; + } + + query.setFilter(filter); + query + .declareParameters(parameters); + + if (colName != null) { + query.setUnique(true); + mStatsObj = (MPartitionColumnStatistics)query.executeWithArray(partName.trim(), + dbName.trim(), tableName.trim(), colName.trim()); + pm.retrieve(mStatsObj); + + if (mStatsObj != null) { + pm.deletePersistent(mStatsObj); + } else { + throw new NoSuchObjectException("Column stats doesn't exist for db=" +dbName + " table=" + + tableName + " partition=" + partName + " col=" + colName); + } + } else { + + mStatsObjColl= (List)query.execute(partName.trim(), + dbName.trim(), tableName.trim()); + pm.retrieveAll(mStatsObjColl); + + if (mStatsObjColl != null) { + pm.deletePersistentAll(mStatsObjColl); + } else { + throw new NoSuchObjectException("Column stats doesn't exist for db=" + dbName + + " table=" + tableName + " partition" + partName); + } + } + ret = commitTransaction(); + } catch(NoSuchObjectException e) { + rollbackTransaction(); + throw e; + } finally { + if (!ret) { + rollbackTransaction(); + } + } + return ret; + } + + public boolean deleteTableColumnStatistics(String dbName, String tableName, String colName) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException + { + boolean ret = false; + + if (dbName == null) { + dbName = MetaStoreUtils.DEFAULT_DATABASE_NAME; + } + + if (tableName == null) { + throw new InvalidInputException("Table name is null."); + } + + try { + openTransaction(); + MTable mTable = getMTable(dbName, tableName); + MTableColumnStatistics mStatsObj; + List mStatsObjColl; + + if (mTable == null) { + throw new + NoSuchObjectException("Table " + tableName + + " for which stats deletion is requested doesn't exist"); + } + + Query query = pm.newQuery(MTableColumnStatistics.class); + String filter; + String parameters; + + if (colName != null) { + filter = "table.tableName == t1 && dbName == t2 && colName == t3"; + parameters = "java.lang.String t1, java.lang.String t2, java.lang.String t3"; + } else { + filter = "table.tableName == t1 && dbName == t2"; + parameters = "java.lang.String t1, java.lang.String t2"; + } + + query.setFilter(filter); + query + .declareParameters(parameters); + + if (colName != null) { + query.setUnique(true); + mStatsObj = (MTableColumnStatistics)query.execute(tableName.trim(), + dbName.trim(), colName.trim()); + pm.retrieve(mStatsObj); + + if (mStatsObj != null) { + pm.deletePersistent(mStatsObj); + } else { + throw new NoSuchObjectException("Column stats doesn't exist for db=" +dbName + " table=" + + tableName + " col=" + colName); + } + } else { + + mStatsObjColl= (List)query.execute(tableName.trim(), dbName.trim()); + pm.retrieveAll(mStatsObjColl); + + if (mStatsObjColl != null) { + pm.deletePersistentAll(mStatsObjColl); + } else { + throw new NoSuchObjectException("Column stats doesn't exist for db=" + dbName + + " table=" + tableName); + } + } + ret = commitTransaction(); + } catch(NoSuchObjectException e) { + rollbackTransaction(); + throw e; + } finally { + if (!ret) { + rollbackTransaction(); + } + } + return ret; + } + @Override public long cleanupEvents() { boolean commited = false; @@ -4477,4 +5243,5 @@ public class ObjectStore implements RawStore, Configurable { } return delCnt; } + } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java index bf5ae3a..3dc9031 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java @@ -22,8 +22,10 @@ import java.util.List; import java.util.Map; import org.apache.hadoop.conf.Configurable; +import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.Index; +import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidPartitionException; import org.apache.hadoop.hive.metastore.api.MetaException; @@ -97,7 +99,7 @@ public interface RawStore extends Configurable { MetaException; public abstract boolean dropTable(String dbName, String tableName) - throws MetaException; + throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException; public abstract Table getTable(String dbName, String tableName) throws MetaException; @@ -109,7 +111,7 @@ public interface RawStore extends Configurable { List part_vals) throws MetaException, NoSuchObjectException; public abstract boolean dropPartition(String dbName, String tableName, - List part_vals) throws MetaException; + List part_vals) throws MetaException, NoSuchObjectException, InvalidObjectException, InvalidInputException; public abstract List getPartitions(String dbName, String tableName, int max) throws MetaException; @@ -306,5 +308,116 @@ public interface RawStore extends Configurable { List part_vals, short max_parts, String userName, List groupNames) throws MetaException, InvalidObjectException, NoSuchObjectException; + /** Persists the given column statistics object to the metastore + * @param partVals + * + * @param ColumnStats object to persist + * @param List of partVals + * @return Boolean indicating the outcome of the operation + * @throws NoSuchObjectException + * @throws MetaException + * @throws InvalidObjectException + * @throws InvalidInputException + */ + public abstract boolean updateTableColumnStatistics(ColumnStatistics colStats) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException; + + /** Persists the given column statistics object to the metastore + * @param partVals + * + * @param ColumnStats object to persist + * @param List of partVals + * @return Boolean indicating the outcome of the operation + * @throws NoSuchObjectException + * @throws MetaException + * @throws InvalidObjectException + * @throws InvalidInputException + */ + public abstract boolean updatePartitionColumnStatistics(ColumnStatistics statsObj, + List partVals) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException; + + /** + * Returns the relevant column statistics for a given column in a given table in a given database + * if such statistics exist. + * + * @param The name of the database, defaults to current database + * @param The name of the table + * @param The name of the column for which statistics is requested + * @return Relevant column statistics for the column for the given table + * @throws NoSuchObjectException + * @throws MetaException + * @throws InvalidInputException + * + */ + public abstract ColumnStatistics getTableColumnStatistics(String dbName, String tableName, + String colName) throws MetaException, NoSuchObjectException, InvalidInputException, + InvalidObjectException; + + /** + * Returns the relevant column statistics for a given column in a given partition in a given + * table in a given database if such statistics exist. + * @param partName + * + * @param The name of the database, defaults to current database + * @param The name of the table + * @param The name of the partition + * @param List of partVals for the partition + * @param The name of the column for which statistics is requested + * @return Relevant column statistics for the column for the given partition in a given table + * @throws NoSuchObjectException + * @throws MetaException + * @throws InvalidInputException + * @throws InvalidObjectException + * + */ + + public abstract ColumnStatistics getPartitionColumnStatistics(String dbName, String tableName, + String partName, List partVals, String colName) + throws MetaException, NoSuchObjectException, InvalidInputException, InvalidObjectException; + + /** + * Deletes column statistics if present associated with a given db, table, partition and col. If + * null is passed instead of a colName, stats when present for all columns associated + * with a given db, table and partition are deleted. + * + * @param dbName + * @param tableName + * @param partName + * @param partVals + * @param colName + * @return Boolean indicating the outcome of the operation + * @throws NoSuchObjectException + * @throws MetaException + * @throws InvalidObjectException + * @throws InvalidInputException + */ + + public abstract boolean deletePartitionColumnStatistics(String dbName, String tableName, + String partName, List partVals, String colName) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException; + + /** + * Deletes column statistics if present associated with a given db, table and col. If + * null is passed instead of a colName, stats when present for all columns associated + * with a given db and table are deleted. + * + * @param dbName + * @param tableName + * @param colName + * @return Boolean indicating the outcome of the operation + * @throws NoSuchObjectException + * @throws MetaException + * @throws InvalidObjectException + * @throws InvalidInputException + */ + + public abstract boolean deleteTableColumnStatistics(String dbName, String tableName, + String colName) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException; + public abstract long cleanupEvents(); + + + } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java index 77d1caa..9f3b9ff 100755 --- metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java @@ -376,6 +376,38 @@ public class Warehouse { } } + public static Map makeEscSpecFromName(String name) throws MetaException { + + if (name == null || name.isEmpty()) { + throw new MetaException("Partition name is invalid. " + name); + } + LinkedHashMap partSpec = new LinkedHashMap(); + + Path currPath = new Path(name); + + List kvs = new ArrayList(); + do { + String component = currPath.getName(); + Matcher m = pat.matcher(component); + if (m.matches()) { + String k = m.group(1); + String v = m.group(2); + String[] kv = new String[2]; + kv[0] = k; + kv[1] = v; + kvs.add(kv); + } + currPath = currPath.getParent(); + } while (currPath != null && !currPath.getName().isEmpty()); + + // reverse the list since we checked the part from leaf dir to table's base dir + for (int i = kvs.size(); i > 0; i--) { + partSpec.put(kvs.get(i - 1)[0], kvs.get(i - 1)[1]); + } + + return partSpec; + } + public Path getPartitionPath(Database db, String tableName, LinkedHashMap pm) throws MetaException { return new Path(getTablePath(db, tableName), makePartPath(pm)); diff --git metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java new file mode 100644 index 0000000..067cb49 --- /dev/null +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java @@ -0,0 +1,232 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + */ +package org.apache.hadoop.hive.metastore.model; + +import java.nio.ByteBuffer; + + +/** + * + * MPartitionColumnStatistics - Represents Hive's partiton level Column Statistics Description. + * The fields in this class with the exception of partition are persisted in the metastore. + * In case of partition, part_id is persisted in its place. + * + */ +public class MPartitionColumnStatistics { + + private MPartition partition; + + private String dbName; + private String tableName; + private String partitionName; + private String colName; + private String colType; + + private byte[] lowValue; + private byte[] highValue; + private long numNulls; + private long numDVs; + private double avgColLen; + private long maxColLen; + private long numTrues; + private long numFalses; + private long lastAnalyzed; + + public MPartitionColumnStatistics() {} + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getColName() { + return colName; + } + + public void setColName(String colName) { + this.colName = colName; + } + + public byte[] getLowValue() { + return lowValue; + } + + public long getLowValueAsLong() { + ByteBuffer byteBuf = ByteBuffer.wrap(lowValue); + return byteBuf.getLong(); + } + + public double getLowValueAsDouble() { + ByteBuffer byteBuf = ByteBuffer.wrap(lowValue); + return byteBuf.getDouble(); + } + + public byte[] getHighValue() { + return highValue; + } + + public long getHighValueAsLong() { + ByteBuffer byteBuf = ByteBuffer.wrap(highValue); + return byteBuf.getLong(); + } + + public double getHighValueAsDouble() { + ByteBuffer byteBuf = ByteBuffer.wrap(highValue); + return byteBuf.getDouble(); + } + + public void setHighValue(byte[] b) { + this.highValue = b; + } + + public void setLowValue(byte[] b) { + this.lowValue = b; + } + + public long getNumNulls() { + return numNulls; + } + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + } + + public long getNumDVs() { + return numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + } + + public double getAvgColLen() { + return avgColLen; + } + + public void setAvgColLen(double avgColLen) { + this.avgColLen = avgColLen; + } + + public long getMaxColLen() { + return maxColLen; + } + + public void setMaxColLen(long maxColLen) { + this.maxColLen = maxColLen; + } + + public long getNumTrues() { + return numTrues; + } + + public void setNumTrues(long numTrues) { + this.numTrues = numTrues; + } + + public long getNumFalses() { + return numFalses; + } + + public void setNumFalses(long numFalses) { + this.numFalses = numFalses; + } + + public long getLastAnalyzed() { + return lastAnalyzed; + } + + public void setLastAnalyzed(long lastAnalyzed) { + this.lastAnalyzed = lastAnalyzed; + } + + public String getDbName() { + return dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public MPartition getPartition() { + return partition; + } + + public void setPartition(MPartition partition) { + this.partition = partition; + } + + public String getPartitionName() { + return partitionName; + } + + public void setPartitionName(String partitionName) { + this.partitionName = partitionName; + } + + public String getColType() { + return colType; + } + + public void setColType(String colType) { + this.colType = colType; + } + + public void setBooleanStats(long numTrues, long numFalses, long numNulls) { + this.numTrues = numTrues; + this.numFalses = numFalses; + this.numNulls = numNulls; + } + + public void setLongStats(long numNulls, long numNDVs, long lowValue, long highValue) { + this.numNulls = numNulls; + this.numDVs = numNDVs; + byte[] bytes = ByteBuffer.allocate(Long.SIZE/8).putLong(lowValue).array(); + this.lowValue = bytes; + bytes = ByteBuffer.allocate(Long.SIZE/8).putLong(highValue).array(); + this.highValue = bytes; + } + + public void setDoubleStats(long numNulls, long numNDVs, double lowValue, double highValue) { + this.numNulls = numNulls; + this.numDVs = numNDVs; + byte[] bytes = ByteBuffer.allocate(Double.SIZE/8).putDouble(lowValue).array(); + this.lowValue = bytes; + bytes = ByteBuffer.allocate(Double.SIZE/8).putDouble(highValue).array(); + this.highValue = bytes; + } + + public void setStringStats(long numNulls, long numNDVs, long maxColLen, double avgColLen) { + this.numNulls = numNulls; + this.numDVs = numNDVs; + this.maxColLen = maxColLen; + this.avgColLen = avgColLen; + } + + public void setBinaryStats(long numNulls, long maxColLen, double avgColLen) { + this.numNulls = numNulls; + this.maxColLen = maxColLen; + this.avgColLen = avgColLen; + } +} \ No newline at end of file diff --git metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java new file mode 100644 index 0000000..8572c5a --- /dev/null +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java @@ -0,0 +1,223 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * + */ +package org.apache.hadoop.hive.metastore.model; + +import java.nio.ByteBuffer; + + +/** + * + * MTableColumnStatistics - Represents Hive's Column Statistics Description. The fields in this class + * with the exception of table are persisted in the metastore. In case of table, tbl_id is persisted + * in its place. + * + */ +public class MTableColumnStatistics { + + private MTable table; + private String dbName; + private String tableName; + private String colName; + private String colType; + + private byte[] lowValue; + private byte[] highValue; + private long numNulls; + private long numDVs; + private double avgColLen; + private long maxColLen; + private long numTrues; + private long numFalses; + private long lastAnalyzed; + + public MTableColumnStatistics() {} + + public MTable getTable() { + return table; + } + + public void setTable(MTable table) { + this.table = table; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getColName() { + return colName; + } + + public void setColName(String colName) { + this.colName = colName; + } + + public String getColType() { + return colType; + } + + public void setColType(String colType) { + this.colType = colType; + } + + public byte[] getLowValue() { + return lowValue; + } + + public long getLowValueAsLong() { + ByteBuffer byteBuf = ByteBuffer.wrap(lowValue); + return byteBuf.getLong(); + } + + public double getLowValueAsDouble() { + ByteBuffer byteBuf = ByteBuffer.wrap(lowValue); + return byteBuf.getDouble(); + } + + public byte[] getHighValue() { + return highValue; + } + + public long getHighValueAsLong() { + ByteBuffer byteBuf = ByteBuffer.wrap(highValue); + return byteBuf.getLong(); + } + + public double getHighValueAsDouble() { + ByteBuffer byteBuf = ByteBuffer.wrap(highValue); + return byteBuf.getDouble(); + } + + public void setHighValue(byte[] b) { + this.highValue = b; + } + + public void setLowValue(byte[] b) { + this.lowValue = b; + } + + public long getNumNulls() { + return numNulls; + } + + + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + } + + public long getNumDVs() { + return numDVs; + } + + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + } + + public double getAvgColLen() { + return avgColLen; + } + + public void setAvgColLen(double avgColLen) { + this.avgColLen = avgColLen; + } + + public long getMaxColLen() { + return maxColLen; + } + + public void setMaxColLen(long maxColLen) { + this.maxColLen = maxColLen; + } + + public long getNumTrues() { + return numTrues; + } + + public void setNumTrues(long numTrues) { + this.numTrues = numTrues; + } + + public long getNumFalses() { + return numFalses; + } + + public void setNumFalses(long numFalses) { + this.numFalses = numFalses; + } + + public long getLastAnalyzed() { + return lastAnalyzed; + } + + public void setLastAnalyzed(long lastAnalyzed) { + this.lastAnalyzed = lastAnalyzed; + } + + public String getDbName() { + return dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void setBooleanStats(long numTrues, long numFalses, long numNulls) { + this.numTrues = numTrues; + this.numFalses = numFalses; + this.numNulls = numNulls; + } + + public void setLongStats(long numNulls, long numNDVs, long lowValue, long highValue) { + this.numNulls = numNulls; + this.numDVs = numNDVs; + byte[] bytes = ByteBuffer.allocate(Long.SIZE/8).putLong(lowValue).array(); + this.lowValue = bytes; + bytes = ByteBuffer.allocate(Long.SIZE/8).putLong(highValue).array(); + this.highValue = bytes; + } + + public void setDoubleStats(long numNulls, long numNDVs, double lowValue, double highValue) { + this.numNulls = numNulls; + this.numDVs = numNDVs; + byte[] bytes = ByteBuffer.allocate(Double.SIZE/8).putDouble(lowValue).array(); + this.lowValue = bytes; + bytes = ByteBuffer.allocate(Double.SIZE/8).putDouble(highValue).array(); + this.highValue = bytes; + } + + public void setStringStats(long numNulls, long numNDVs, long maxColLen, double avgColLen) { + this.numNulls = numNulls; + this.numDVs = numNDVs; + this.maxColLen = maxColLen; + this.avgColLen = avgColLen; + } + + public void setBinaryStats(long numNulls, long maxColLen, double avgColLen) { + this.numNulls = numNulls; + this.maxColLen = maxColLen; + this.avgColLen = avgColLen; + } +} \ No newline at end of file diff --git metastore/src/model/package.jdo metastore/src/model/package.jdo index 38ce6d5..703b110 100644 --- metastore/src/model/package.jdo +++ metastore/src/model/package.jdo @@ -751,5 +751,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java index 528a100..ce7bd65 100644 --- metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java +++ metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java @@ -25,8 +25,10 @@ import junit.framework.Assert; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.Index; +import org.apache.hadoop.hive.metastore.api.InvalidInputException; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidPartitionException; import org.apache.hadoop.hive.metastore.api.MetaException; @@ -512,4 +514,45 @@ public class DummyRawStoreForJdoConnection implements RawStore { return 0; } + @Override + public ColumnStatistics getTableColumnStatistics(String dbName, String tableName, String colName) + throws MetaException, NoSuchObjectException { + return null; + } + + + @Override + public boolean deleteTableColumnStatistics(String dbName, String tableName, + String colName) + throws NoSuchObjectException, MetaException, InvalidObjectException { + return false; + } + + + public boolean deletePartitionColumnStatistics(String dbName, String tableName, + String partName, List partVals, String colName) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException { + return false; + + } + + @Override + public ColumnStatistics getPartitionColumnStatistics(String dbName, String tableName, String partName, + List partVal, String colName) throws MetaException, NoSuchObjectException, + InvalidInputException, InvalidObjectException { + return null; + } + + @Override + public boolean updateTableColumnStatistics(ColumnStatistics statsObj) + throws NoSuchObjectException, MetaException, InvalidObjectException { + return false; + } + + public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj,List partVals) + throws NoSuchObjectException, MetaException, InvalidObjectException { + return false; + } } + + diff --git metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java index 925938d..e857002 100644 --- metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java +++ metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java @@ -37,8 +37,13 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; +import org.apache.hadoop.hive.metastore.api.ColumnStatistics; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsData; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsDesc; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; import org.apache.hadoop.hive.metastore.api.ConfigValSecurityException; import org.apache.hadoop.hive.metastore.api.Database; +import org.apache.hadoop.hive.metastore.api.DoubleColumnStatsData; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; @@ -49,6 +54,7 @@ import org.apache.hadoop.hive.metastore.api.Partition; import org.apache.hadoop.hive.metastore.api.SerDeInfo; import org.apache.hadoop.hive.metastore.api.SkewedInfo; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; +import org.apache.hadoop.hive.metastore.api.StringColumnStatsData; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.Type; import org.apache.hadoop.hive.metastore.api.UnknownDBException; @@ -1228,6 +1234,187 @@ public abstract class TestHiveMetaStore extends TestCase { } } + public void testColumnStatistics() throws Throwable { + + String dbName = "columnstatstestdb"; + String tblName = "tbl"; + String typeName = "Person"; + String tblOwner = "testowner"; + int lastAccessed = 6796; + + try { + cleanUp(dbName, tblName, typeName); + Database db = new Database(); + db.setName(dbName); + client.createDatabase(db); + createTableForTestFilter(dbName,tblName, tblOwner, lastAccessed, true); + + // Create a ColumnStatistics Obj + String[] colName = new String[]{"income", "name"}; + double lowValue = 50000.21; + double highValue = 1200000.4525; + long numNulls = 3; + long numDVs = 22; + double avgColLen = 50.30; + long maxColLen = 102; + String[] colType = new String[] {"double", "string"}; + boolean isTblLevel = true; + String partName = null; + List statsObjs = new ArrayList(); + + ColumnStatisticsDesc statsDesc = new ColumnStatisticsDesc(); + statsDesc.setDbName(dbName); + statsDesc.setTableName(tblName); + statsDesc.setIsTblLevel(isTblLevel); + statsDesc.setPartName(partName); + + ColumnStatisticsObj statsObj = new ColumnStatisticsObj(); + statsObj.setColName(colName[0]); + statsObj.setColType(colType[0]); + + ColumnStatisticsData statsData = new ColumnStatisticsData(); + DoubleColumnStatsData numericStats = new DoubleColumnStatsData(); + statsData.setDoubleStats(numericStats); + + statsData.getDoubleStats().setHighValue(highValue); + statsData.getDoubleStats().setLowValue(lowValue); + statsData.getDoubleStats().setNumDVs(numDVs); + statsData.getDoubleStats().setNumNulls(numNulls); + + statsObj.setStatsData(statsData); + statsObjs.add(statsObj); + + statsObj = new ColumnStatisticsObj(); + statsObj.setColName(colName[1]); + statsObj.setColType(colType[1]); + + statsData = new ColumnStatisticsData(); + StringColumnStatsData stringStats = new StringColumnStatsData(); + statsData.setStringStats(stringStats); + statsData.getStringStats().setAvgColLen(avgColLen); + statsData.getStringStats().setMaxColLen(maxColLen); + statsData.getStringStats().setNumDVs(numDVs); + statsData.getStringStats().setNumNulls(numNulls); + + statsObj.setStatsData(statsData); + statsObjs.add(statsObj); + + ColumnStatistics colStats = new ColumnStatistics(); + colStats.setStatsDesc(statsDesc); + colStats.setStatsObj(statsObjs); + + // write stats objs persistently + client.updateTableColumnStatistics(colStats); + + // retrieve the stats obj that was just written + ColumnStatistics colStats2 = client.getTableColumnStatistics(dbName, tblName, colName[0]); + + // compare stats obj to ensure what we get is what we wrote + assertNotNull(colStats2); + assertEquals(colStats2.getStatsDesc().getDbName(), dbName); + assertEquals(colStats2.getStatsDesc().getTableName(), tblName); + assertEquals(colStats2.getStatsObj().get(0).getColName(), colName[0]); + assertEquals(colStats2.getStatsObj().get(0).getStatsData().getDoubleStats().getLowValue(), + lowValue); + assertEquals(colStats2.getStatsObj().get(0).getStatsData().getDoubleStats().getHighValue(), + highValue); + assertEquals(colStats2.getStatsObj().get(0).getStatsData().getDoubleStats().getNumNulls(), + numNulls); + assertEquals(colStats2.getStatsObj().get(0).getStatsData().getDoubleStats().getNumDVs(), + numDVs); + assertEquals(colStats2.getStatsDesc().isIsTblLevel(), isTblLevel); + + // test delete column stats; if no col name is passed all column stats associated with the + // table is deleted + boolean status = client.deleteTableColumnStatistics(dbName, tblName, null); + assertTrue(status); + // try to query stats for a column for which stats doesn't exist + try { + colStats2 = client.getTableColumnStatistics(dbName, tblName, colName[1]); + assertTrue(true); + } catch (NoSuchObjectException e) { + System.out.println("Statistics for column=" + colName[1] + " not found"); + } + + colStats.setStatsDesc(statsDesc); + colStats.setStatsObj(statsObjs); + + // update table level column stats + client.updateTableColumnStatistics(colStats); + + // query column stats for column whose stats were updated in the previous call + colStats2 = client.getTableColumnStatistics(dbName, tblName, colName[0]); + + // partition level column statistics test + // create a table with multiple partitions + cleanUp(dbName, tblName, typeName); + + List> values = new ArrayList>(); + values.add(makeVals("2008-07-01 14:13:12", "14")); + values.add(makeVals("2008-07-01 14:13:12", "15")); + values.add(makeVals("2008-07-02 14:13:12", "15")); + values.add(makeVals("2008-07-03 14:13:12", "151")); + + createMultiPartitionTableSchema(dbName, tblName, typeName, values); + + List partitions = client.listPartitionNames(dbName, tblName, (short)-1); + + partName = partitions.get(0); + isTblLevel = false; + + // create a new columnstatistics desc to represent partition level column stats + statsDesc = new ColumnStatisticsDesc(); + statsDesc.setDbName(dbName); + statsDesc.setTableName(tblName); + statsDesc.setPartName(partName); + statsDesc.setIsTblLevel(isTblLevel); + + colStats = new ColumnStatistics(); + colStats.setStatsDesc(statsDesc); + colStats.setStatsObj(statsObjs); + + client.updatePartitionColumnStatistics(colStats); + + colStats2 = client.getPartitionColumnStatistics(dbName, tblName, partName, colName[1]); + + // compare stats obj to ensure what we get is what we wrote + assertNotNull(colStats2); + assertEquals(colStats2.getStatsDesc().getDbName(), dbName); + assertEquals(colStats2.getStatsDesc().getTableName(), tblName); + assertEquals(colStats.getStatsDesc().getPartName(), partName); + assertEquals(colStats2.getStatsObj().get(0).getColName(), colName[1]); + assertEquals(colStats2.getStatsObj().get(0).getStatsData().getStringStats().getMaxColLen(), + maxColLen); + assertEquals(colStats2.getStatsObj().get(0).getStatsData().getStringStats().getAvgColLen(), + avgColLen); + assertEquals(colStats2.getStatsObj().get(0).getStatsData().getStringStats().getNumNulls(), + numNulls); + assertEquals(colStats2.getStatsObj().get(0).getStatsData().getStringStats().getNumDVs(), + numDVs); + assertEquals(colStats2.getStatsDesc().isIsTblLevel(), isTblLevel); + + // test stats deletion at partition level + client.deletePartitionColumnStatistics(dbName, tblName, partName, colName[1]); + + colStats2 = client.getPartitionColumnStatistics(dbName, tblName, partName, colName[0]); + + // test get stats on a column for which stats doesn't exist + try { + colStats2 = client.getPartitionColumnStatistics(dbName, tblName, partName, colName[1]); + assertTrue(true); + } catch (NoSuchObjectException e) { + System.out.println("Statistics for column=" + colName[1] + " not found"); + } + + } catch (Exception e) { + System.err.println(StringUtils.stringifyException(e)); + System.err.println("testColumnStatistics() failed."); + throw e; + } finally { + cleanUp(dbName, tblName, typeName); + } + } + public void testAlterTable() throws Exception { String dbName = "alterdb"; String invTblName = "alter-tbl"; diff --git ql/build.xml ql/build.xml index 5de3f78..58fcf1b 100644 --- ql/build.xml +++ ql/build.xml @@ -207,6 +207,13 @@ + + + + + + + @@ -219,6 +226,7 @@ + diff --git ql/if/queryplan.thrift ql/if/queryplan.thrift index 05fbf58..4427929 100644 --- ql/if/queryplan.thrift +++ ql/if/queryplan.thrift @@ -91,6 +91,7 @@ enum StageType { MOVE, STATS, DEPENDENCY_COLLECTION, + COLUMNSTATS, } struct Stage { diff --git ql/ivy.xml ql/ivy.xml index aa3b8ce..d5a318b 100644 --- ql/ivy.xml +++ ql/ivy.xml @@ -73,6 +73,7 @@ transitive="false"/> + _StageType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(11, _kStageTypeValues, _kStageTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +const std::map _StageType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(12, _kStageTypeValues, _kStageTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); const char* Adjacency::ascii_fingerprint = "BC4F8C394677A1003AA9F56ED26D8204"; const uint8_t Adjacency::binary_fingerprint[16] = {0xBC,0x4F,0x8C,0x39,0x46,0x77,0xA1,0x00,0x3A,0xA9,0xF5,0x6E,0xD2,0x6D,0x82,0x04}; diff --git ql/src/gen/thrift/gen-cpp/queryplan_types.h ql/src/gen/thrift/gen-cpp/queryplan_types.h index 5ebce20..d52f94d 100644 --- ql/src/gen/thrift/gen-cpp/queryplan_types.h +++ ql/src/gen/thrift/gen-cpp/queryplan_types.h @@ -80,7 +80,8 @@ struct StageType { MAPREDLOCAL = 7, MOVE = 8, STATS = 9, - DEPENDENCY_COLLECTION = 10 + DEPENDENCY_COLLECTION = 10, + COLUMNSTATS = 11 }; }; diff --git ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java index 42af31e..aa8c706 100644 --- ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java +++ ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java @@ -21,7 +21,8 @@ public enum StageType implements org.apache.thrift.TEnum { MAPREDLOCAL(7), MOVE(8), STATS(9), - DEPENDENCY_COLLECTION(10); + DEPENDENCY_COLLECTION(10), + COLUMNSTATS(11); private final int value; @@ -64,6 +65,8 @@ public enum StageType implements org.apache.thrift.TEnum { return STATS; case 10: return DEPENDENCY_COLLECTION; + case 11: + return COLUMNSTATS; default: return null; } diff --git ql/src/gen/thrift/gen-php/queryplan/queryplan_types.php ql/src/gen/thrift/gen-php/queryplan/queryplan_types.php index 4d8113a..49024dc 100644 --- ql/src/gen/thrift/gen-php/queryplan/queryplan_types.php +++ ql/src/gen/thrift/gen-php/queryplan/queryplan_types.php @@ -126,6 +126,7 @@ $GLOBALS['E_StageType'] = array( 'MOVE' => 8, 'STATS' => 9, 'DEPENDENCY_COLLECTION' => 10, + 'COLUMNSTATS' => 11, ); final class StageType { @@ -140,6 +141,7 @@ final class StageType { const MOVE = 8; const STATS = 9; const DEPENDENCY_COLLECTION = 10; + const COLUMNSTATS = 11; static public $__names = array( 0 => 'CONDITIONAL', 1 => 'COPY', @@ -152,6 +154,7 @@ final class StageType { 8 => 'MOVE', 9 => 'STATS', 10 => 'DEPENDENCY_COLLECTION', + 11 => 'COLUMNSTATS', ); } diff --git ql/src/gen/thrift/gen-py/__init__.py ql/src/gen/thrift/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git ql/src/gen/thrift/gen-py/queryplan/ttypes.py ql/src/gen/thrift/gen-py/queryplan/ttypes.py index 641546b..3b40a60 100644 --- ql/src/gen/thrift/gen-py/queryplan/ttypes.py +++ ql/src/gen/thrift/gen-py/queryplan/ttypes.py @@ -133,6 +133,7 @@ class StageType: MOVE = 8 STATS = 9 DEPENDENCY_COLLECTION = 10 + COLUMNSTATS = 11 _VALUES_TO_NAMES = { 0: "CONDITIONAL", @@ -146,6 +147,7 @@ class StageType: 8: "MOVE", 9: "STATS", 10: "DEPENDENCY_COLLECTION", + 11: "COLUMNSTATS", } _NAMES_TO_VALUES = { @@ -160,6 +162,7 @@ class StageType: "MOVE": 8, "STATS": 9, "DEPENDENCY_COLLECTION": 10, + "COLUMNSTATS": 11, } diff --git ql/src/gen/thrift/gen-rb/queryplan_types.rb ql/src/gen/thrift/gen-rb/queryplan_types.rb index 2a228e0..53f6cd5 100644 --- ql/src/gen/thrift/gen-rb/queryplan_types.rb +++ ql/src/gen/thrift/gen-rb/queryplan_types.rb @@ -62,8 +62,9 @@ module StageType MOVE = 8 STATS = 9 DEPENDENCY_COLLECTION = 10 - VALUE_MAP = {0 => "CONDITIONAL", 1 => "COPY", 2 => "DDL", 3 => "MAPRED", 4 => "EXPLAIN", 5 => "FETCH", 6 => "FUNC", 7 => "MAPREDLOCAL", 8 => "MOVE", 9 => "STATS", 10 => "DEPENDENCY_COLLECTION"} - VALID_VALUES = Set.new([CONDITIONAL, COPY, DDL, MAPRED, EXPLAIN, FETCH, FUNC, MAPREDLOCAL, MOVE, STATS, DEPENDENCY_COLLECTION]).freeze + COLUMNSTATS = 11 + VALUE_MAP = {0 => "CONDITIONAL", 1 => "COPY", 2 => "DDL", 3 => "MAPRED", 4 => "EXPLAIN", 5 => "FETCH", 6 => "FUNC", 7 => "MAPREDLOCAL", 8 => "MOVE", 9 => "STATS", 10 => "DEPENDENCY_COLLECTION", 11 => "COLUMNSTATS"} + VALID_VALUES = Set.new([CONDITIONAL, COPY, DDL, MAPRED, EXPLAIN, FETCH, FUNC, MAPREDLOCAL, MOVE, STATS, DEPENDENCY_COLLECTION, COLUMNSTATS]).freeze end class Adjacency diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java new file mode 100644 index 0000000..f7ede33 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java @@ -0,0 +1,404 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.exec; + +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.BinaryColumnStatsData; +import org.apache.hadoop.hive.metastore.api.BooleanColumnStatsData; +import org.apache.hadoop.hive.metastore.api.ColumnStatistics; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsData; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsDesc; +import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; +import org.apache.hadoop.hive.metastore.api.DoubleColumnStatsData; +import org.apache.hadoop.hive.metastore.api.LongColumnStatsData; +import org.apache.hadoop.hive.metastore.api.StringColumnStatsData; +import org.apache.hadoop.hive.ql.CommandNeedRetryException; +import org.apache.hadoop.hive.ql.Context; +import org.apache.hadoop.hive.ql.DriverContext; +import org.apache.hadoop.hive.ql.QueryPlan; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.plan.ColumnStatsWork; +import org.apache.hadoop.hive.ql.plan.FetchWork; +import org.apache.hadoop.hive.ql.plan.api.StageType; +import org.apache.hadoop.hive.serde2.objectinspector.InspectableObject; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.StructField; +import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.primitive.StringObjectInspector; +import org.apache.hadoop.mapred.JobConf; +import org.apache.hadoop.util.StringUtils; + +/** + * ColumnStatsTask implementation. + **/ + +public class ColumnStatsTask extends Task implements Serializable { + private static final long serialVersionUID = 1L; + + private FetchOperator ftOp; + private static transient final Log LOG = LogFactory.getLog(ColumnStatsTask.class); + + public ColumnStatsTask() { + super(); + } + + @Override + public void initialize(HiveConf conf, QueryPlan queryPlan, DriverContext ctx) { + super.initialize(conf, queryPlan, ctx); + try { + JobConf job = new JobConf(conf, ExecDriver.class); + ftOp = new FetchOperator(work.getfWork(), job); + + } catch (Exception e) { + LOG.error(StringUtils.stringifyException(e)); + throw new RuntimeException(e); + } + } + + private void unpackBooleanStats(ObjectInspector oi, Object o, String fName, + ColumnStatisticsObj statsObj) { + long v = ((LongObjectInspector) oi).get(o); + if (fName.equals("counttrues")) { + statsObj.getStatsData().getBooleanStats().setNumTrues(v); + } else if (fName.equals("countfalses")) { + statsObj.getStatsData().getBooleanStats().setNumFalses(v); + } else if (fName.equals("countnulls")) { + statsObj.getStatsData().getBooleanStats().setNumNulls(v); + } + } + + private void unpackDoubleStats(ObjectInspector oi, Object o, String fName, + ColumnStatisticsObj statsObj) { + if (fName.equals("countnulls")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getDoubleStats().setNumNulls(v); + } else if (fName.equals("numdistinctvalues")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getDoubleStats().setNumDVs(v); + } else if (fName.equals("max")) { + double d = ((DoubleObjectInspector) oi).get(o); + statsObj.getStatsData().getDoubleStats().setHighValue(d); + } else if (fName.equals("min")) { + double d = ((DoubleObjectInspector) oi).get(o); + statsObj.getStatsData().getDoubleStats().setLowValue(d); + } + } + + private void unpackLongStats(ObjectInspector oi, Object o, String fName, + ColumnStatisticsObj statsObj) { + if (fName.equals("countnulls")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getLongStats().setNumNulls(v); + } else if (fName.equals("numdistinctvalues")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getLongStats().setNumDVs(v); + } else if (fName.equals("max")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getLongStats().setHighValue(v); + } else if (fName.equals("min")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getLongStats().setLowValue(v); + } + } + + private void unpackStringStats(ObjectInspector oi, Object o, String fName, + ColumnStatisticsObj statsObj) { + if (fName.equals("countnulls")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getStringStats().setNumNulls(v); + } else if (fName.equals("numdistinctvalues")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getStringStats().setNumDVs(v); + } else if (fName.equals("avglength")) { + double d = ((DoubleObjectInspector) oi).get(o); + statsObj.getStatsData().getStringStats().setAvgColLen(d); + } else if (fName.equals("maxlength")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getStringStats().setMaxColLen(v); + } + } + + private void unpackBinaryStats(ObjectInspector oi, Object o, String fName, + ColumnStatisticsObj statsObj) { + if (fName.equals("countnulls")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getBinaryStats().setNumNulls(v); + } else if (fName.equals("avglength")) { + double d = ((DoubleObjectInspector) oi).get(o); + statsObj.getStatsData().getBinaryStats().setAvgColLen(d); + } else if (fName.equals("maxlength")) { + long v = ((LongObjectInspector) oi).get(o); + statsObj.getStatsData().getBinaryStats().setMaxColLen(v); + } + } + + private void unpackPrimitiveObject (ObjectInspector oi, Object o, String fieldName, + ColumnStatisticsObj statsObj) { + // First infer the type of object + if (fieldName.equals("columntype")) { + PrimitiveObjectInspector poi = (PrimitiveObjectInspector) oi; + String s = ((StringObjectInspector) poi).getPrimitiveJavaObject(o); + statsObj.setColType(s.toLowerCase()); + + ColumnStatisticsData statsData = new ColumnStatisticsData(); + if (s.equalsIgnoreCase("long")) { + LongColumnStatsData longStats = new LongColumnStatsData(); + statsData.setLongStats(longStats); + statsObj.setStatsData(statsData); + } else if (s.equalsIgnoreCase("double")) { + DoubleColumnStatsData doubleStats = new DoubleColumnStatsData(); + statsData.setDoubleStats(doubleStats); + statsObj.setStatsData(statsData); + } else if (s.equalsIgnoreCase("string")) { + StringColumnStatsData stringStats = new StringColumnStatsData(); + statsData.setStringStats(stringStats); + statsObj.setStatsData(statsData); + } else if (s.equalsIgnoreCase("boolean")) { + BooleanColumnStatsData booleanStats = new BooleanColumnStatsData(); + statsData.setBooleanStats(booleanStats); + statsObj.setStatsData(statsData); + } else if (s.equalsIgnoreCase("binary")) { + BinaryColumnStatsData binaryStats = new BinaryColumnStatsData(); + statsData.setBinaryStats(binaryStats); + statsObj.setStatsData(statsData); + } + } else { + // invoke the right unpack method depending on data type of the column + if (statsObj.getColType().equals("boolean")) { + unpackBooleanStats(oi, o, fieldName, statsObj); + } else if (statsObj.getColType().equals("long")) { + unpackLongStats(oi, o, fieldName, statsObj); + } else if (statsObj.getColType().equals("double")) { + unpackDoubleStats(oi,o,fieldName, statsObj); + } else if (statsObj.getColType().equals("string")) { + unpackStringStats(oi, o, fieldName, statsObj); + } else if (statsObj.getColType().equals("binary")) { + unpackBinaryStats(oi, o, fieldName, statsObj); + } + } + } + + private void unpackStructObject(ObjectInspector oi, Object o, String fName, + ColumnStatisticsObj cStatsObj) { + if (oi.getCategory() != ObjectInspector.Category.STRUCT) { + throw new RuntimeException("Invalid object datatype : " + oi.getCategory().toString()); + } + + StructObjectInspector soi = (StructObjectInspector) oi; + List fields = soi.getAllStructFieldRefs(); + List list = soi.getStructFieldsDataAsList(o); + + for (int i = 0; i < fields.size(); i++) { + // Get the field objectInspector, fieldName and the field object. + ObjectInspector foi = fields.get(i).getFieldObjectInspector(); + Object f = (list == null ? null : list.get(i)); + String fieldName = fields.get(i).getFieldName(); + + if (foi.getCategory() == ObjectInspector.Category.PRIMITIVE) { + unpackPrimitiveObject(foi, f, fieldName, cStatsObj); + } else { + unpackStructObject(foi, f, fieldName, cStatsObj); + } + } + } + + private ColumnStatistics constructColumnStatsFromPackedRow(ObjectInspector oi, + Object o) throws HiveException { + if (oi.getCategory() != ObjectInspector.Category.STRUCT) { + throw new HiveException("Unexpected object type encountered while unpacking row"); + } + + String dbName = db.getCurrentDatabase(); + String tableName = work.getColStats().getTableName(); + String partName = null; + String[] colName = work.getColStats().getColName(); + boolean isTblLevel = work.getColStats().isTblLevel(); + + if (!isTblLevel) { + partName = constructPartName(); + } + + ColumnStatisticsDesc statsDesc = getColumnStatsDesc(dbName, tableName, partName, isTblLevel); + + List statsObjs = new ArrayList(); + StructObjectInspector soi = (StructObjectInspector) oi; + List fields = soi.getAllStructFieldRefs(); + List list = soi.getStructFieldsDataAsList(o); + + for (int i = 0; i < fields.size(); i++) { + + // Get the field objectInspector, fieldName and the field object. + ObjectInspector foi = fields.get(i).getFieldObjectInspector(); + Object f = (list == null ? null : list.get(i)); + String fieldName = fields.get(i).getFieldName(); + ColumnStatisticsObj statsObj = new ColumnStatisticsObj(); + statsObj.setColName(colName[i]); + unpackStructObject(foi, f, fieldName, statsObj); + statsObjs.add(statsObj); + } + + ColumnStatistics colStats = new ColumnStatistics(); + colStats.setStatsDesc(statsDesc); + colStats.setStatsObj(statsObjs); + return colStats; + } + + private String constructPartName() { + String[] partKeys = work.getColStats().getPartKeys(); + String partitionName = new String(); + int length = partKeys.length; + + for (int i = 0; i < partKeys.length; i++) { + partitionName += partKeys[i]; + + if (i != length - 1) { + partitionName = partitionName + "/"; + } + } + return partitionName; + } + + private ColumnStatisticsDesc getColumnStatsDesc(String dbName, String tableName, + String partName, boolean isTblLevel) + { + ColumnStatisticsDesc statsDesc = new ColumnStatisticsDesc(); + statsDesc.setDbName(dbName); + statsDesc.setTableName(tableName); + statsDesc.setIsTblLevel(isTblLevel); + + if (!isTblLevel) { + partName = constructPartName(); + statsDesc.setPartName(partName); + } else { + statsDesc.setPartName(null); + } + return statsDesc; + } + + private int persistPartitionStats() throws HiveException { + InspectableObject io = null; + + try { + io = fetchColumnStats(); + } catch (IOException e) { + e.printStackTrace(); + } catch (CommandNeedRetryException e) { + e.printStackTrace(); + } + + // Manufacture a column stats object + ColumnStatistics colStats = constructColumnStatsFromPackedRow(io.oi, io.o); + + // Persist stats to metastore + try { + db.updatePartitionColumnStatistics(colStats); + } catch (Exception e) { + e.printStackTrace(); + } + return 0; + } + + private int persistTableStats() throws HiveException { + InspectableObject io = null; + + // fetch() + try { + io = fetchColumnStats(); + } catch (IOException e) { + e.printStackTrace(); + } catch (CommandNeedRetryException e) { + e.printStackTrace(); + } + + ColumnStatistics colStats = constructColumnStatsFromPackedRow(io.oi, io.o); + + // Persist stats to metastore + try { + db.updateTableColumnStatistics(colStats); + } catch (Exception e) { + e.printStackTrace(); + } + return 0; + } + + @Override + public int execute(DriverContext driverContext) { + try { + if (work.getColStats().isTblLevel()) { + return persistTableStats(); + } else { + return persistPartitionStats(); + } + } catch (Exception e) { + e.printStackTrace(); + } + return 1; + } + + private InspectableObject fetchColumnStats() throws IOException, CommandNeedRetryException { + try { + InspectableObject io = ftOp.getNextRow(); + if (io == null) { + throw new CommandNeedRetryException(); + } + return io; + } catch (CommandNeedRetryException e) { + throw e; + } catch (IOException e) { + throw e; + } catch (Exception e) { + throw new IOException(e); + } + } + + @Override + public StageType getType() { + return StageType.COLUMNSTATS; + } + + @Override + public String getName() { + return "COLUMNSTATS TASK"; + } + + @Override + protected void localizeMRTmpFilesImpl(Context ctx) { + FetchWork fWork = work.getfWork(); + String s = fWork.getTblDir(); + + if ((s != null) && ctx.isMRTmpFileURI(s)) { + fWork.setTblDir(ctx.localizeMRTmpFileURI(s)); + } + + ArrayList ls = fWork.getPartDir(); + if (ls != null) { + ctx.localizePaths(ls); + } + } +} \ No newline at end of file diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java index 425900d..3c628eb 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java @@ -129,6 +129,7 @@ import org.apache.hadoop.hive.ql.udf.UDFYear; import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage; import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFBridge; import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCollectSet; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFComputeStats; import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFContextNGrams; import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCorrelation; import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCount; @@ -158,7 +159,6 @@ import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCase; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCoalesce; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFConcatWS; -import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSortArray; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEWAHBitmapAnd; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEWAHBitmapEmpty; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEWAHBitmapOr; @@ -169,8 +169,8 @@ import org.apache.hadoop.hive.ql.udf.generic.GenericUDFFromUtcTimestamp; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFHash; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFIf; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFIn; -import org.apache.hadoop.hive.ql.udf.generic.GenericUDFIndex; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFInFile; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDFIndex; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFInstr; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLocate; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFMap; @@ -193,6 +193,7 @@ import org.apache.hadoop.hive.ql.udf.generic.GenericUDFPrintf; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFReflect; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSentences; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSize; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSortArray; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSplit; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFStringToMap; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFStruct; @@ -227,10 +228,8 @@ import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils; import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.util.ReflectionUtils; - import org.w3c.dom.Document; import org.w3c.dom.Element; -import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** @@ -410,7 +409,6 @@ public final class FunctionRegistry { registerGenericUDAF("sum", new GenericUDAFSum()); registerGenericUDAF("count", new GenericUDAFCount()); registerGenericUDAF("avg", new GenericUDAFAverage()); - registerGenericUDAF("std", new GenericUDAFStd()); registerGenericUDAF("stddev", new GenericUDAFStd()); registerGenericUDAF("stddev_pop", new GenericUDAFStd()); @@ -430,6 +428,8 @@ public final class FunctionRegistry { registerGenericUDAF("ewah_bitmap", new GenericUDAFEWAHBitmap()); + registerGenericUDAF("compute_stats" , new GenericUDAFComputeStats()); + registerUDAF("percentile", UDAFPercentile.class); diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java index 4c8831f..c32ba95 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java @@ -130,6 +130,7 @@ public class MapRedTask extends ExecDriver implements Serializable { runningViaChild = ShimLoader.getHadoopShims().isLocalMode(conf) || conf.getBoolVar(HiveConf.ConfVars.SUBMITVIACHILD); + runningViaChild = false; if(!runningViaChild) { // we are not running this mapred task via child jvm // so directly invoke ExecDriver diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java index 4446952..b380a69 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java @@ -81,6 +81,9 @@ public abstract class Task implements Serializable, Node // Descendants tasks who subscribe feeds from this task protected transient List> feedSubscribers; + protected String id; + protected T work; + public static enum FeedType { DYNAMIC_PARTITIONS, // list of dynamic partitions }; @@ -324,8 +327,7 @@ public abstract class Task implements Serializable, Node return isrunnable; } - protected String id; - protected T work; + public void setWork(T work) { this.work = work; diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/TaskFactory.java ql/src/java/org/apache/hadoop/hive/ql/exec/TaskFactory.java index 79b87f1..a47a180 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/TaskFactory.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/TaskFactory.java @@ -25,6 +25,7 @@ import java.util.List; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.io.rcfile.merge.BlockMergeTask; import org.apache.hadoop.hive.ql.io.rcfile.merge.MergeWork; +import org.apache.hadoop.hive.ql.plan.ColumnStatsWork; import org.apache.hadoop.hive.ql.plan.ConditionalWork; import org.apache.hadoop.hive.ql.plan.CopyWork; import org.apache.hadoop.hive.ql.plan.DDLWork; @@ -77,6 +78,7 @@ public final class TaskFactory { MapredLocalTask.class)); taskvec.add(new taskTuple(StatsWork.class, StatsTask.class)); + taskvec.add(new taskTuple(ColumnStatsWork.class, ColumnStatsTask.class)); taskvec.add(new taskTuple(MergeWork.class, BlockMergeTask.class)); taskvec.add(new taskTuple(DependencyCollectionWork.class, diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java index 7440889..b87968d 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -31,13 +31,13 @@ import static org.apache.hadoop.hive.serde.Constants.STRING_TYPE_NAME; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import java.util.HashSet; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -56,6 +56,7 @@ import org.apache.hadoop.hive.metastore.MetaStoreUtils; import org.apache.hadoop.hive.metastore.TableType; import org.apache.hadoop.hive.metastore.Warehouse; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; +import org.apache.hadoop.hive.metastore.api.ColumnStatistics; import org.apache.hadoop.hive.metastore.api.Constants; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; @@ -63,7 +64,6 @@ import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.HiveObjectRef; import org.apache.hadoop.hive.metastore.api.HiveObjectType; import org.apache.hadoop.hive.metastore.api.Index; -import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; @@ -2176,6 +2176,24 @@ public class Hive { return indexes; } + public boolean updateTableColumnStatistics(ColumnStatistics statsObj) throws HiveException { + try { + return getMSC().updateTableColumnStatistics(statsObj); + } catch (Exception e) { + LOG.error(StringUtils.stringifyException(e)); + throw new HiveException(e); + } + } + + public boolean updatePartitionColumnStatistics(ColumnStatistics statsObj) throws HiveException { + try { + return getMSC().updatePartitionColumnStatistics(statsObj); + } catch (Exception e) { + LOG.error(StringUtils.stringifyException(e)); + throw new HiveException(e); + } + } + public Table newTable(String tableName) throws HiveException { String[] names = getQualifiedNames(tableName); switch (names.length) { diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/index/RewriteParseContextGenerator.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/index/RewriteParseContextGenerator.java index 0b55ac4..dee7d7e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/index/RewriteParseContextGenerator.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/index/RewriteParseContextGenerator.java @@ -35,6 +35,7 @@ import org.apache.hadoop.hive.ql.parse.SemanticAnalyzer; import org.apache.hadoop.hive.ql.parse.SemanticAnalyzerFactory; import org.apache.hadoop.hive.ql.parse.SemanticException; + /** * RewriteParseContextGenerator is a class that offers methods to generate operator tree * for input queries. It is implemented on lines of the analyzeInternal(..) method @@ -108,7 +109,7 @@ public final class RewriteParseContextGenerator { ASTNode child = ast; ParseContext subPCtx = ((SemanticAnalyzer) sem).getParseContext(); subPCtx.setContext(ctx); - ((SemanticAnalyzer) sem).init(subPCtx); + ((SemanticAnalyzer) sem).initParseCtx(subPCtx); LOG.info("Starting Sub-query Semantic Analysis"); sem.doPhase1(child, qb, sem.initPhase1Ctx()); diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java index c9e356a..6e77c68 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java @@ -241,9 +241,17 @@ public abstract class BaseSemanticAnalyzer { } public abstract void analyzeInternal(ASTNode ast) throws SemanticException; + public void init() { + //no-op + } - public void analyze(ASTNode ast, Context ctx) throws SemanticException { + public void initCtx(Context ctx) { this.ctx = ctx; + } + + public void analyze(ASTNode ast, Context ctx) throws SemanticException { + initCtx(ctx); + init(); analyzeInternal(ast); } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java index 5fc6a4f..f9d059b 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java @@ -20,6 +20,8 @@ package org.apache.hadoop.hive.ql.parse; import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_CASCADE; import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_DATABASECOMMENT; +import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_DATABASELOCATION; +import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_DATABASEPROPERTIES; import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_IFEXISTS; import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_IFNOTEXISTS; import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_SHOWDATABASES; @@ -658,10 +660,10 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer { case TOK_DATABASECOMMENT: dbComment = unescapeSQLString(childNode.getChild(0).getText()); break; - case HiveParser.TOK_DATABASEPROPERTIES: + case TOK_DATABASEPROPERTIES: dbProps = DDLSemanticAnalyzer.getProps((ASTNode) childNode.getChild(0)); break; - case HiveParser.TOK_DATABASELOCATION: + case TOK_DATABASELOCATION: dbLocation = unescapeSQLString(childNode.getChild(0).getText()); break; default: diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSemanticAnalyzer.java index e75a075..ed7005a 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/ExplainSemanticAnalyzer.java @@ -55,7 +55,7 @@ public class ExplainSemanticAnalyzer extends BaseSemanticAnalyzer { if (ast.getChildCount() == 2) { int explainOptions = ast.getChild(1).getType(); formatted = (explainOptions == HiveParser.KW_FORMATTED); - extended = (explainOptions == HiveParser.KW_EXTENDED); + extended = (explainOptions == HiveParser.KW_EXTENDED); } ctx.setResFile(new Path(ctx.getLocalTmpFileURI())); diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/ExportSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/ExportSemanticAnalyzer.java index 61bc7fd..21e8ad5 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/ExportSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/ExportSemanticAnalyzer.java @@ -20,14 +20,10 @@ package org.apache.hadoop.hive.ql.parse; import java.io.FileNotFoundException; import java.io.IOException; -import java.io.OutputStream; import java.io.Serializable; import java.net.URI; import java.util.List; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.TransformerException; - import org.antlr.runtime.tree.Tree; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; @@ -38,15 +34,8 @@ import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.exec.TaskFactory; import org.apache.hadoop.hive.ql.hooks.ReadEntity; import org.apache.hadoop.hive.ql.hooks.WriteEntity; -import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.metadata.Partition; -import org.apache.hadoop.hive.ql.metadata.Table; import org.apache.hadoop.hive.ql.plan.CopyWork; -import org.apache.thrift.TException; -import org.apache.thrift.TSerializer; -import org.apache.thrift.protocol.TJSONProtocol; -import org.w3c.dom.Document; -import org.w3c.dom.Element; /** * ExportSemanticAnalyzer. @@ -133,5 +122,4 @@ public class ExportSemanticAnalyzer extends BaseSemanticAnalyzer { outputs.add(new WriteEntity(toURI.toString(), toURI.getScheme().equals("hdfs") ? true : false)); } - } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java index 6024dd4..da917f7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/FunctionSemanticAnalyzer.java @@ -17,9 +17,6 @@ */ package org.apache.hadoop.hive.ql.parse; - -import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_IFEXISTS; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; @@ -64,7 +61,7 @@ public class FunctionSemanticAnalyzer extends BaseSemanticAnalyzer { private void analyzeDropFunction(ASTNode ast) throws SemanticException { String functionName = ast.getChild(0).getText(); - boolean ifExists = (ast.getFirstChildWithType(TOK_IFEXISTS) != null); + boolean ifExists = (ast.getFirstChildWithType(HiveParser.TOK_IFEXISTS) != null); // we want to signal an error if the function doesn't exist and we're // configured not to ignore this boolean throwException = diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g index 5884328..2889f7e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g +++ ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g @@ -844,7 +844,7 @@ descStatement analyzeStatement @init { msgs.push("analyze statement"); } @after { msgs.pop(); } - : KW_ANALYZE KW_TABLE (parttype=tableOrPartition) KW_COMPUTE KW_STATISTICS -> ^(TOK_ANALYZE $parttype) + : KW_ANALYZE KW_TABLE (parttype=tableOrPartition) KW_COMPUTE KW_STATISTICS (KW_FOR KW_COLUMNS statsColumnName=columnNameList)? -> ^(TOK_ANALYZE $parttype $statsColumnName?) ; showStatement @@ -2433,6 +2433,7 @@ KW_UPDATE: 'UPDATE'; KW_RESTRICT: 'RESTRICT'; KW_CASCADE: 'CASCADE'; KW_SKEWED: 'SKEWED'; +KW_FOR: 'FOR'; // Operators diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java index 09ef969..42851e2 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java @@ -539,5 +539,4 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer { } return null; } - } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java index a0ccbe6..f737c4e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java @@ -49,6 +49,7 @@ public class QB { private QBJoinTree qbjoin; private String id; private boolean isQuery; + private boolean isAnalyzeRewrite; private CreateTableDesc tblDesc = null; // table descriptor of the final // results @@ -222,5 +223,14 @@ public class QB { skewedColNames = tbl.getSkewedColNames(); } return skewedColNames; + + } + + public boolean isAnalyzeRewrite() { + return isAnalyzeRewrite; + } + + public void setAnalyzeRewrite(boolean isAnalyzeRewrite) { + this.isAnalyzeRewrite = isAnalyzeRewrite; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/QBParseInfo.java ql/src/java/org/apache/hadoop/hive/ql/parse/QBParseInfo.java index a8aef4c..603cf84 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/QBParseInfo.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/QBParseInfo.java @@ -57,6 +57,12 @@ public class QBParseInfo { private final HashMap tableSpecs; // used for statistics + private String tableName; // used for column statistics + private String[] colName; // used for column statistics + private String[] partName; // used for column statistics + private String[] partNameWoValue; // used for column statistics + private boolean isTblLvl; // used for column statistics + /** * ClusterBy is a short name for both DistributeBy and SortBy. */ @@ -116,6 +122,7 @@ public class QBParseInfo { aliasToLateralViews = new HashMap>(); tableSpecs = new HashMap(); + } public void setAggregationExprsForClause(String clause, @@ -491,3 +498,51 @@ public class QBParseInfo { return nameToSample; } } + + protected static enum ClauseType { + CLUSTER_BY_CLAUSE, + DISTRIBUTE_BY_CLAUSE, + ORDER_BY_CLAUSE, + SORT_BY_CLAUSE + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String[] getColName() { + return colName; + } + + public void setColName(String[] colName) { + this.colName = colName; + } + + public String[] getPartName() { + return partName; + } + + public void setPartName(String[] partName) { + this.partName = partName; + } + + public String[] getPartNameWoValue() { + return partNameWoValue; + } + + public void setPartNameWoValue(String[] partNameWoValue) { + this.partNameWoValue = partNameWoValue; + } + + public boolean isTblLvl() { + return isTblLvl; + } + + public void setTblLvl(boolean isTblLvl) { + this.isTblLvl = isTblLvl; + } +} diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java index bdae9d5..96df114 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java @@ -54,6 +54,7 @@ import org.apache.hadoop.hive.ql.QueryProperties; import org.apache.hadoop.hive.ql.exec.AbstractMapJoinOperator; import org.apache.hadoop.hive.ql.exec.ArchiveUtils; import org.apache.hadoop.hive.ql.exec.ColumnInfo; +import org.apache.hadoop.hive.ql.exec.ColumnStatsTask; import org.apache.hadoop.hive.ql.exec.ConditionalTask; import org.apache.hadoop.hive.ql.exec.ExecDriver; import org.apache.hadoop.hive.ql.exec.FetchTask; @@ -115,6 +116,8 @@ import org.apache.hadoop.hive.ql.optimizer.physical.PhysicalOptimizer; import org.apache.hadoop.hive.ql.optimizer.unionproc.UnionProcContext; import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.tableSpec.SpecType; import org.apache.hadoop.hive.ql.plan.AggregationDesc; +import org.apache.hadoop.hive.ql.plan.ColumnStatsDesc; +import org.apache.hadoop.hive.ql.plan.ColumnStatsWork; import org.apache.hadoop.hive.ql.plan.CreateTableDesc; import org.apache.hadoop.hive.ql.plan.CreateTableLikeDesc; import org.apache.hadoop.hive.ql.plan.CreateViewDesc; @@ -268,7 +271,7 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { prunedPartitions.clear(); } - public void init(ParseContext pctx) { + public void initParseCtx(ParseContext pctx) { opToPartPruner = pctx.getOpToPartPruner(); opToPartList = pctx.getOpToPartList(); opToSamplePruner = pctx.getOpToSamplePruner(); @@ -815,7 +818,10 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { case HiveParser.TOK_ANALYZE: // Case of analyze command + String table_name = getUnescapedName((ASTNode)ast.getChild(0).getChild(0)); + + qb.setTabAlias(table_name, table_name); qb.addAlias(table_name); qb.getParseInfo().setIsAnalyzeCommand(true); @@ -837,11 +843,13 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { case HiveParser.TOK_INSERT: ASTNode destination = (ASTNode) ast.getChild(0); Tree tab = destination.getChild(0); + // Proceed if AST contains partition & If Not Exists if (destination.getChildCount() == 2 && tab.getChildCount() == 2 && destination.getChild(1).getType() == HiveParser.TOK_IFNOTEXISTS) { String tableName = tab.getChild(0).getChild(0).getText(); + Tree partitions = tab.getChild(1); int childCount = partitions.getChildCount(); HashMap partition = new HashMap(); @@ -7067,19 +7075,62 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { } } + /** + * A helper function to generate a column stats task on top of map-red task. The column stats + * task fetches from the output of the map-red task, constructs the column stats object and + * persists it to the metastore. + * + * This method generates a column stats task and sets up the appropriate metadata to be used + * during execution. + * + * @param qb + */ + + private void genColStatsTask(QB qb) { + QBParseInfo qbParseInfo = qb.getParseInfo(); + ColumnStatsTask cStatsTask = null; + ColumnStatsWork cStatsWork = null; + FetchWork fetch = null; + String tableName = qbParseInfo.getTableName(); + String[] partName = qbParseInfo.getPartName(); + String[] partNameWoValue = qbParseInfo.getPartNameWoValue(); + String[] colName = qbParseInfo.getColName(); + boolean isTblLevel = qbParseInfo.isTblLvl(); + + String cols = loadFileWork.get(0).getColumns(); + String colTypes = loadFileWork.get(0).getColumnTypes(); + + String resFileFormat = HiveConf.getVar(conf, HiveConf.ConfVars.HIVEQUERYRESULTFILEFORMAT); + TableDesc resultTab = PlanUtils.getDefaultQueryOutputTableDesc(cols, colTypes, resFileFormat); + + fetch = new FetchWork(new Path(loadFileWork.get(0).getSourceDir()).toString(), + resultTab, qb.getParseInfo().getOuterQueryLimit()); + + ColumnStatsDesc cStatsDesc = new ColumnStatsDesc(tableName, partName, + partNameWoValue, colName, isTblLevel); + cStatsWork = new ColumnStatsWork(fetch, cStatsDesc); + cStatsTask = (ColumnStatsTask) TaskFactory.get(cStatsWork, conf); + rootTasks.add(cStatsTask); + } + @SuppressWarnings("nls") private void genMapRedTasks(ParseContext pCtx) throws SemanticException { + boolean isCStats = qb.isAnalyzeRewrite(); + if (pCtx.getFetchTask() != null) { // replaced by single fetch task - init(pCtx); + initParseCtx(pCtx); return; } - init(pCtx); + initParseCtx(pCtx); List> mvTask = new ArrayList>(); - // In case of a select, use a fetch task instead of a move task - if (qb.getIsQuery()) { + /* In case of a select, use a fetch task instead of a move task. + * If the select is from analyze table column rewrite, don't create a fetch task. Instead create + * a column stats task later. + */ + if (qb.getIsQuery() && !isCStats) { if ((!loadTableWork.isEmpty()) || (loadFileWork.size() != 1)) { throw new SemanticException(ErrorMsg.GENERIC_ERROR.getMsg()); } @@ -7104,8 +7155,7 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { + ". Doesn't qualify limit optimiztion."); globalLimitCtx.disableOpt(); } - - } else { + } else if (!isCStats) { for (LoadTableDesc ltd : loadTableWork) { Task tsk = TaskFactory.get(new MoveWork(null, null, ltd, null, false), conf); @@ -7124,7 +7174,6 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { } } - boolean oneLoadFile = true; for (LoadFileDesc lfd : loadFileWork) { if (qb.isCTAS()) { @@ -7223,6 +7272,13 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { topNodes.addAll(topOps.values()); ogw.startWalking(topNodes, null); + /* If the query was the result of analyze table column compute statistics rewrite, create + * a column stats task instead of a fetch task to persist stats to the metastore. + */ + if (isCStats) { + genColStatsTask(qb); + } + // reduce sink does not have any kids - since the plan by now has been // broken up into multiple // tasks, iterate over all tasks. @@ -7499,15 +7555,36 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { return ctx_1; } + public QB optimize(ASTNode child) throws SemanticException { + ParseContext pCtx = new ParseContext(conf, qb, child, opToPartPruner, + opToPartList, topOps, topSelOps, opParseCtx, joinContext, topToTable, + loadTableWork, loadFileWork, ctx, idToTableNameMap, destTableId, uCtx, + listMapJoinOpsNoReducer, groupOpToInputTables, prunedPartitions, + opToSamplePruner, globalLimitCtx, nameToSplitSample, inputs, rootTasks, opToSkewedPruner); + + Optimizer optm = new Optimizer(); + optm.setPctx(pCtx); + optm.initialize(conf); + pCtx = optm.optimize(); + initParseCtx(pCtx); + return pCtx.getQB(); + } + @Override - @SuppressWarnings("nls") - public void analyzeInternal(ASTNode ast) throws SemanticException { + public void init() { + // clear most members reset(); + // init QB qb = new QB(null, null, false); this.qb = qb; - this.ast = ast; + } + + @Override + @SuppressWarnings("nls") + public void analyzeInternal(ASTNode ast) throws SemanticException { ASTNode child = ast; + this.ast = ast; viewsExpanded = new ArrayList(); LOG.info("Starting Semantic Analysis"); @@ -7550,6 +7627,7 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { // such as JDBC would prefer instead of the c0, c1 we'll end // up with later. Operator sinkOp = genPlan(qb); + resultSchema = convertRowSchemaToViewSchema(opParseCtx.get(sinkOp).getRowResolver()); @@ -8458,4 +8536,12 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { return conf.getIntVar(HiveConf.ConfVars.HADOOPNUMREDUCERS); } + + public QB getQB() { + return qb; + } + + public void setQB(QB qb) { + this.qb = qb; + } } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java index e77d59e..3a4740f 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java @@ -91,6 +91,7 @@ public final class SemanticAnalyzerFactory { commandType.put(HiveParser.TOK_SHOW_ROLE_GRANT, HiveOperation.SHOW_ROLE_GRANT); commandType.put(HiveParser.TOK_ALTERDATABASE_PROPERTIES, HiveOperation.ALTERDATABASE); commandType.put(HiveParser.TOK_DESCDATABASE, HiveOperation.DESCDATABASE); + commandType.put(HiveParser.TOK_ANALYZE, HiveOperation.ANALYZE_TABLE); } static { @@ -195,9 +196,14 @@ public final class SemanticAnalyzerFactory { } setSessionCommandType(commandType); return new DDLSemanticAnalyzer(conf); + case HiveParser.TOK_CREATEFUNCTION: case HiveParser.TOK_DROPFUNCTION: return new FunctionSemanticAnalyzer(conf); + + case HiveParser.TOK_ANALYZE: + return new StatsSemanticAnalyzer(conf, tree); + default: return new SemanticAnalyzer(conf); } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/StatsSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/StatsSemanticAnalyzer.java new file mode 100644 index 0000000..95a09c8 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/parse/StatsSemanticAnalyzer.java @@ -0,0 +1,423 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.parse; + +import java.io.IOException; +import java.io.Serializable; +import java.util.HashSet; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.ql.Context; +import org.apache.hadoop.hive.ql.QueryProperties; +import org.apache.hadoop.hive.ql.exec.FetchTask; +import org.apache.hadoop.hive.ql.exec.Task; +import org.apache.hadoop.hive.ql.hooks.LineageInfo; +import org.apache.hadoop.hive.ql.hooks.ReadEntity; +import org.apache.hadoop.hive.ql.hooks.WriteEntity; + +/** + * StatsSemanticAnalyzer. + * Handles semantic analysis and rewrite for gathering column statistics both at the level of a + * partition and a table. Note that table statistics are implemented elsewhere. + * + */ +public class StatsSemanticAnalyzer extends BaseSemanticAnalyzer { + + private static final Log LOG = LogFactory + .getLog(StatsSemanticAnalyzer.class); + + private ASTNode originalTree; + private ASTNode rewrittenTree; + private String rewrittenQuery; + private SemanticAnalyzer newSem; + + private Context ctx; + private boolean isRewritten; + + private boolean isTblLvl; + private String tableName; + private String[] colNames; + private String[] partName; + private String[] partNameWoValue; + + private class PartitionList { + private final String[] partKeys; + private final String[] partValues; + private int numPartitions; + private int numPartitionValues; + + PartitionList(int numPartitions) { + this.numPartitions = numPartitions; + partKeys = new String[numPartitions]; + partValues = new String[numPartitions]; + } + + public int getNumPartitions() { + return numPartitions; + } + + public void setNumPartitions(int numPartitions) { + this.numPartitions = numPartitions; + } + + public String[] getPartValues() { + return partValues; + } + + public String[] getPartKeys() { + return partKeys; + } + + public void addPartValue(String partValue, int index) { + partValues[index] = new String(partValue); + } + + public void addPartKey(String partKey, int index) { + partKeys[index] = new String(partKey); + } + + public int getNumPartValues() { + return numPartitionValues; + } + + public void setNumPartValues(int numPartValues) { + numPartitionValues = numPartValues; + } + } + + public StatsSemanticAnalyzer(HiveConf conf) throws SemanticException { + super(conf); + } + + private boolean shouldRewrite(ASTNode tree) { + boolean rwt = false; + + if (tree.getChildCount() > 1) { + ASTNode child0 = (ASTNode) tree.getChild(0); + ASTNode child1; + + if (child0.getToken().getType() == HiveParser.TOK_TAB) { + child0 = (ASTNode) child0.getChild(0); + if (child0.getToken().getType() == HiveParser.TOK_TABNAME) { + child1 = (ASTNode) tree.getChild(1); + if (child1.getToken().getType() == HiveParser.TOK_TABCOLNAME) { + rwt = true; + } + } + } + } + return rwt; + } + + private boolean isPartitionLevelStats(ASTNode tree) { + boolean isPartitioned = false; + ASTNode child = (ASTNode) tree.getChild(0); + + if (child.getChildCount() > 1) { + child = (ASTNode) child.getChild(1); + if (child.getToken().getType() == HiveParser.TOK_PARTSPEC) { + isPartitioned = true; + } + } + return isPartitioned; + } + + private String getTableName(ASTNode tree) { + return getUnescapedName((ASTNode) tree.getChild(0).getChild(0)); + } + + private PartitionList getPartKeyValue(ASTNode tree) { + ASTNode child = ((ASTNode) tree.getChild(0).getChild(1)); + int numParts = child.getChildCount(); + PartitionList partList = new PartitionList(numParts); + String partKey; + String partValue; + int numPartValue = 0; + + for (int i = 0; i < numParts; i++) { + partKey = new String(getUnescapedName((ASTNode) child.getChild(i).getChild(0))); + if (child.getChild(i).getChildCount() > 1) { + partValue = new String(getUnescapedName((ASTNode) child.getChild(i).getChild(1))); + numPartValue += 1; + } else { + partValue = null; + } + partList.addPartKey(partKey, i); + partList.addPartValue(partValue, i); + } + partList.setNumPartValues(numPartValue); + return partList; + } + + private String[] getColumnName(ASTNode tree) { + int numCols = tree.getChild(1).getChildCount(); + String[] colName = new String[numCols]; + + for (int i = 0; i < numCols; i++) { + colName[i] = new String(getUnescapedName((ASTNode) tree.getChild(1).getChild(i))); + } + return colName; + } + + private StringBuilder genPartitionClause(ASTNode tree) { + PartitionList partList = null; + StringBuilder whereClause = new StringBuilder(" where "); + boolean predPresent = false; + StringBuilder groupByClause = new StringBuilder(" group by "); + boolean aggPresent = false; + StringBuilder retClause = null; + + partList = getPartKeyValue(tree); + String[] partKeys = partList.getPartKeys(); + String[] partValues = partList.getPartValues(); + int numPartKeys = partList.getNumPartitions(); + int numPartValues = partList.getNumPartValues(); + + partNameWoValue = new String[numPartKeys - numPartValues]; + partName = new String[numPartValues]; + + for (int i = 0, j = 0, k = 0; i < partList.getNumPartitions(); i++) { + if (partValues[i] != null) { + if (!predPresent) { + whereClause.append(partKeys[i]); + whereClause.append(" = "); + whereClause.append(partValues[i]); + predPresent = true; + } else { + whereClause.append(" and "); + whereClause.append(partKeys[i]); + whereClause.append(" = "); + whereClause.append(partValues[i]); + } + partName[j] = new String(partKeys[i] + "=" + + partValues[i].substring(1, partValues[i].length() - 1)); + j += 1; + } else { + if (!aggPresent) { + groupByClause.append(partKeys[i]); + aggPresent = true; + } else { + groupByClause.append(","); + groupByClause.append(partKeys[i]); + } + partNameWoValue[k] = new String(partKeys[i]); + k += 1; + } + } + + // attach the predicate and group by to the return clause + if (predPresent) { + retClause = new StringBuilder(whereClause); + } + if (aggPresent) { + retClause.append(groupByClause); + } + return retClause; + } + + private int getNumBitVectorsForNDV(HiveConf conf) { + int numBitVectors; + float percentageError = HiveConf.getFloatVar(conf, HiveConf.ConfVars.HIVE_STATS_NDV_ERROR); + + if (percentageError <= 2.4) { + numBitVectors = 1024; + } else if (percentageError <= 3.4 ) { + numBitVectors = 1024; + } else if (percentageError <= 4.8) { + numBitVectors = 512; + } else if (percentageError <= 6.8) { + numBitVectors = 256; + } else if (percentageError <= 9.7) { + numBitVectors = 128; + } else if (percentageError <= 13.8) { + numBitVectors = 64; + } else if (percentageError <= 19.6) { + numBitVectors = 32; + } else if (percentageError <= 28.2) { + numBitVectors = 16; + } else if (percentageError <= 40.9) { + numBitVectors = 8; + } else if (percentageError <= 61.0) { + numBitVectors = 4; + } else { + numBitVectors = 2; + } + return numBitVectors; + } + + public StatsSemanticAnalyzer(HiveConf conf, ASTNode tree) throws SemanticException { + super(conf); + StringBuilder rewrittenQueryBuilder; + + /* Rewrite only analyze table <> column <> compute statistics; Don't rewrite analyze table + * command - table stats are collected by the table scan operator and is not rewritten to + * an aggregation. + */ + if (shouldRewrite(tree)) { + tableName = new String(getTableName(tree)); + colNames = getColumnName(tree); + int numBitVectors = getNumBitVectorsForNDV(conf); + // Save away the original AST + originalTree = tree; + + // Rewrite the query to select compute_stats(...) group by + rewrittenQueryBuilder = new StringBuilder("select "); + for (int i = 0; i < colNames.length; i++) { + if (i > 0) { + rewrittenQueryBuilder.append(" , "); + } + rewrittenQueryBuilder.append("compute_stats("); + rewrittenQueryBuilder.append(colNames[i]); + rewrittenQueryBuilder.append(" , "); + rewrittenQueryBuilder.append(numBitVectors); + rewrittenQueryBuilder.append(" )"); + } + rewrittenQueryBuilder.append(" from "); + rewrittenQueryBuilder.append(tableName); + isRewritten = true; + + /* + * If partition level stats is requested, add predicate and group by as needed to rewritten + * query + */ + if (isPartitionLevelStats(tree)) { + isTblLvl = false; + rewrittenQueryBuilder.append(genPartitionClause(tree)); + } else { + isTblLvl = true; + } + rewrittenQuery = rewrittenQueryBuilder.toString(); + rewrittenQuery = new VariableSubstitution().substitute(conf, rewrittenQuery); + + // Parse the rewritten query string + try { + ctx = new Context(conf); + } catch (IOException e) { + throw new SemanticException("Encountered IOException while creating ParseCtx to parse " + + "rewritten query"); + } + ctx.setCmd(rewrittenQuery); + + ParseDriver pd = new ParseDriver(); + try { + rewrittenTree = pd.parse(rewrittenQuery, ctx); + } catch (ParseException e) { + throw new SemanticException("Encountered ParseException while parsing the rewritten query"); + } + rewrittenTree = ParseUtils.findRootNonNullToken(rewrittenTree); + + // Get a semantic analyzer object for the rewritten query + newSem = (SemanticAnalyzer) SemanticAnalyzerFactory.get(conf, rewrittenTree); + } else { + // Not an analyze table column compute statistics stmt - don't do any rewrites + originalTree = rewrittenTree = tree; + rewrittenQuery = null; + isRewritten = false; + newSem = (SemanticAnalyzer) new SemanticAnalyzer(conf); + } + } + + @Override + public void analyzeInternal(ASTNode ast) throws SemanticException { + LOG.info("Invoking analyzeInternal on rewritten query"); + newSem.analyzeInternal(rewrittenTree); + } + + @Override + public void analyze(ASTNode ast, Context origCtx) throws SemanticException { + LOG.info("Invoking analyze on rewritten query"); + + QB qb; + QBParseInfo qbp; + + // initialize QB + newSem.init(); + + // Setup the necessary metadata if originating from analyze rewrite + if (isRewritten) { + qb = newSem.getQB(); + qb.setAnalyzeRewrite(true); + qbp = qb.getParseInfo(); + qbp.setTableName(tableName); + qbp.setTblLvl(isTblLvl); + + if (!isTblLvl) { + qbp.setPartName(partName); + qbp.setPartNameWoValue(partNameWoValue); + } + qbp.setColName(colNames); + newSem.initCtx(ctx); + } else { + newSem.initCtx(origCtx); + } + + // Invoke analyze on the rewriten query + newSem.analyzeInternal(rewrittenTree); + } + + @Override + public void validate() throws SemanticException { + LOG.info("Invoking validate on rewritten query"); + newSem.validate(); + } + + @Override + public List> getRootTasks() { + LOG.info("Invoking getRootTasks on a rewritten query"); + return newSem.getRootTasks(); + } + + /* Ideally, we should not use a raw type on the LHS, but since this a method inherited from + * BaseSemanticAnalyzer, requires changes to the base class and all of the inherited class signatures. + * We should clean this up as part of a larger semantic analyzer cleanup effort. + */ + @Override + public HashSet getInputs() { + return newSem.getInputs(); + } + + @Override + public HashSet getOutputs() { + return newSem.getOutputs(); + } + + @Override + public LineageInfo getLineageInfo() { + return newSem.getLineageInfo(); + } + + @Override + public QueryProperties getQueryProperties() { + return newSem.getQueryProperties(); + } + + @Override + public FetchTask getFetchTask() { + return newSem.getFetchTask(); + } + + @Override + public List getResultSchema() { + return newSem.getResultSchema(); + } +} \ No newline at end of file diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsDesc.java ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsDesc.java new file mode 100644 index 0000000..c33d90c --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsDesc.java @@ -0,0 +1,86 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; + +/** + * Contains the information needed to persist column level statistics + */ +public class ColumnStatsDesc extends DDLDesc implements Serializable, Cloneable { + + private static final long serialVersionUID = 1L; + private boolean isTblLevel; + private String tableName; + private String[] partKeys; + private String[] partKeysWoValue; + private String[] colName; + + public ColumnStatsDesc() { + } + + public ColumnStatsDesc(String tableName, + String[] partKeys, String[] partKeysWoValue, + String[] colName, boolean isTblLevel) { + this.tableName = tableName; + this.colName = colName; + this.partKeys = partKeys; + this.partKeysWoValue = partKeysWoValue; + this.isTblLevel = isTblLevel; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public boolean isTblLevel() { + return isTblLevel; + } + + public void setTblLevel(boolean isTblLevel) { + this.isTblLevel = isTblLevel; + } + + public String[] getPartKeys() { + return partKeys; + } + + public void setPartKeys(String[] partKeys) { + this.partKeys = partKeys; + } + + public String[] getColName() { + return colName; + } + + public void setColName(String[] colName) { + this.colName = colName; + } + + public String[] getPartKeysWoValue() { + return partKeysWoValue; + } + + public void setPartKeysWoValue(String[] partKeysWoValue) { + this.partKeysWoValue = partKeysWoValue; + } +} \ No newline at end of file diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java new file mode 100644 index 0000000..0a2c2a8 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java @@ -0,0 +1,63 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; + +/** + * ColumnStats Work. + * + */ +@Explain(displayName = "Column Stats Work") +public class ColumnStatsWork implements Serializable { + private static final long serialVersionUID = 1L; + private FetchWork fWork; + private ColumnStatsDesc colStats; + + public ColumnStatsWork() { + } + + public ColumnStatsWork(FetchWork work, ColumnStatsDesc colStats) { + this.fWork = work; + this.setColStats(colStats); + } + + @Override + public String toString() { + String ret; + ret = fWork.toString(); + return ret; + } + + public FetchWork getfWork() { + return fWork; + } + + public void setfWork(FetchWork fWork) { + this.fWork = fWork; + } + + public ColumnStatsDesc getColStats() { + return colStats; + } + + public void setColStats(ColumnStatsDesc colStats) { + this.colStats = colStats; + } +} \ No newline at end of file diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java index 11db6b7..249d4d3 100644 --- ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java +++ ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java @@ -49,6 +49,7 @@ public enum HiveOperation { ALTERTABLE_SERDEPROPERTIES("ALTERTABLE_SERDEPROPERTIES", new Privilege[]{Privilege.ALTER_METADATA}, null), ALTERPARTITION_SERDEPROPERTIES("ALTERPARTITION_SERDEPROPERTIES", new Privilege[]{Privilege.ALTER_METADATA}, null), ALTERTABLE_CLUSTER_SORT("ALTERTABLE_CLUSTER_SORT", new Privilege[]{Privilege.ALTER_METADATA}, null), + ANALYZE_TABLE("ANALYZE_TABLE", null, null), SHOWDATABASES("SHOWDATABASES", new Privilege[]{Privilege.SHOW_DATABASE}, null), SHOWTABLES("SHOWTABLES", null, null), SHOWCOLUMNS("SHOWCOLUMNS", null, null), diff --git ql/src/java/org/apache/hadoop/hive/ql/udf/generic/DoubleNumDistinctValueEstimator.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/DoubleNumDistinctValueEstimator.java new file mode 100644 index 0000000..70c5cca --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/DoubleNumDistinctValueEstimator.java @@ -0,0 +1,39 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.udf.generic; + +public class DoubleNumDistinctValueEstimator extends NumDistinctValueEstimator { + + public DoubleNumDistinctValueEstimator(int numBitVectors) { + super(numBitVectors); + } + + public DoubleNumDistinctValueEstimator(String s, int numVectors) { + super(s, numVectors); + } + + public void addToEstimator(double d) { + int v = new Double(d).hashCode(); + super.addToEstimator(v); + } + + public void addToEstimatorPCSA(double d) { + int v = new Double(d).hashCode(); + super.addToEstimatorPCSA(v); + } +} \ No newline at end of file diff --git ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java new file mode 100644 index 0000000..f8b847c --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java @@ -0,0 +1,1475 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.udf.generic; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hive.ql.exec.Description; +import org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.parse.SemanticException; +import org.apache.hadoop.hive.serde2.io.DoubleWritable; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory; +import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.StructField; +import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory; +import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils; +import org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableDoubleObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableIntObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableLongObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector; +import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; +import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; +import org.apache.hadoop.io.BytesWritable; +import org.apache.hadoop.io.IntWritable; +import org.apache.hadoop.io.LongWritable; +import org.apache.hadoop.io.Text; +import org.apache.hadoop.util.StringUtils; + +/** + * GenericUDAFComputeStats + * + */ +@Description(name = "compute_stats", + value = "_FUNC_(x) - Returns the statistical summary of a set of primitive type values.") +public class GenericUDAFComputeStats extends AbstractGenericUDAFResolver { + + static final Log LOG = LogFactory.getLog(GenericUDAFComputeStats.class.getName()); + + @Override + public GenericUDAFEvaluator getEvaluator(TypeInfo[] parameters) + throws SemanticException { + if (parameters.length != 2 ) { + throw new UDFArgumentTypeException(parameters.length - 1, + "Exactly two arguments are expected."); + } + + if (parameters[0].getCategory() != ObjectInspector.Category.PRIMITIVE) { + throw new UDFArgumentTypeException(0, + "Only primitive type arguments are accepted but " + + parameters[0].getTypeName() + " is passed."); + } + switch (((PrimitiveTypeInfo) parameters[0]).getPrimitiveCategory()) { + case BOOLEAN: + return new GenericUDAFBooleanStatsEvaluator(); + case BYTE: + case SHORT: + case INT: + case LONG: + case TIMESTAMP: + return new GenericUDAFLongStatsEvaluator(); + case FLOAT: + case DOUBLE: + return new GenericUDAFDoubleStatsEvaluator(); + case STRING: + return new GenericUDAFStringStatsEvaluator(); + case BINARY: + return new GenericUDAFBinaryStatsEvaluator(); + default: + throw new UDFArgumentTypeException(0, + "Only integer/long/timestamp/float/double/string/binary/boolean type argument " + + "is accepted but " + + parameters[0].getTypeName() + " is passed."); + } + } + + /** + * GenericUDAFBooleanStatsEvaluator. + * + */ + public static class GenericUDAFBooleanStatsEvaluator extends GenericUDAFEvaluator { + + /* Object Inspector corresponding to the input parameter. + */ + PrimitiveObjectInspector inputOI; + + /* Partial aggregation result returned by TerminatePartial. Partial result is a struct + * containing a long field named "count". + */ + Object[] partialResult; + + /* Object Inspectors corresponding to the struct returned by TerminatePartial and the long + * field within the struct - "count" + */ + StructObjectInspector soi; + + StructField columnTypeField; + WritableStringObjectInspector columnTypeFieldOI; + + StructField countTruesField; + WritableLongObjectInspector countTruesFieldOI; + + StructField countFalsesField; + WritableLongObjectInspector countFalsesFieldOI; + + StructField countNullsField; + WritableLongObjectInspector countNullsFieldOI; + + /* Output of final result of the aggregation + */ + Object[] result; + + @Override + public ObjectInspector init(Mode m, ObjectInspector[] parameters) + throws HiveException { + assert (parameters.length == 1); + super.init(m, parameters); + + // initialize input + if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) { + inputOI = (PrimitiveObjectInspector) parameters[0]; + } else { + soi = (StructObjectInspector) parameters[0]; + + columnTypeField = soi.getStructFieldRef("ColumnType"); + columnTypeFieldOI = (WritableStringObjectInspector) + columnTypeField.getFieldObjectInspector(); + + countTruesField = soi.getStructFieldRef("CountTrues"); + countTruesFieldOI = (WritableLongObjectInspector) + countTruesField.getFieldObjectInspector(); + + countFalsesField = soi.getStructFieldRef("CountFalses"); + countFalsesFieldOI = (WritableLongObjectInspector) + countFalsesField.getFieldObjectInspector(); + + countNullsField = soi.getStructFieldRef("CountNulls"); + countNullsFieldOI = (WritableLongObjectInspector) countNullsField.getFieldObjectInspector(); + } + + // initialize output + List foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + List fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("CountTrues"); + fname.add("CountFalses"); + fname.add("CountNulls"); + + partialResult = new Object[4]; + partialResult[0] = new Text(); + partialResult[1] = new LongWritable(0); + partialResult[2] = new LongWritable(0); + partialResult[3] = new LongWritable(0); + + result = new Object[4]; + result[0] = new Text(); + result[1] = new LongWritable(0); + result[2] = new LongWritable(0); + result[3] = new LongWritable(0); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + } + + static class BooleanStatsAgg implements AggregationBuffer { + String columnType; /* Datatype of column */ + long countTrues; /* Count of number of true values seen so far */ + long countFalses; /* Count of number of false values seen so far */ + long countNulls; /* Count of number of null values seen so far */ + }; + + @Override + public AggregationBuffer getNewAggregationBuffer() throws HiveException { + BooleanStatsAgg result = new BooleanStatsAgg(); + reset(result); + return result; + } + + @Override + public void reset(AggregationBuffer agg) throws HiveException { + BooleanStatsAgg myagg = (BooleanStatsAgg) agg; + myagg.columnType = new String("Boolean"); + myagg.countTrues = 0; + myagg.countFalses = 0; + myagg.countNulls = 0; + } + + private void printDebugOutput(String functionName, AggregationBuffer agg) { + BooleanStatsAgg myagg = (BooleanStatsAgg) agg; + + LOG.debug(functionName); + + LOG.debug("Count of True Values:"); + LOG.debug(myagg.countTrues); + + LOG.debug("Count of False Values:"); + LOG.debug(myagg.countFalses); + + LOG.debug("Count of Null Values:"); + LOG.debug(myagg.countNulls); + } + + boolean warned = false; + + @Override + public void iterate(AggregationBuffer agg, Object[] parameters) + throws HiveException { + assert (parameters.length == 1); + Object p = parameters[0]; + BooleanStatsAgg myagg = (BooleanStatsAgg) agg; + if (p == null) { + myagg.countNulls++; + } + else { + try { + boolean v = PrimitiveObjectInspectorUtils.getBoolean(p, inputOI); + if (v == false) { + myagg.countFalses++; + } else if (v == true){ + myagg.countTrues++; + } + } catch (NumberFormatException e) { + if (!warned) { + warned = true; + LOG.warn(getClass().getSimpleName() + " " + + StringUtils.stringifyException(e)); + LOG.warn(getClass().getSimpleName() + + " ignoring similar exceptions."); + } + } + } + } + + @Override + public Object terminatePartial(AggregationBuffer agg) throws HiveException { + BooleanStatsAgg myagg = (BooleanStatsAgg) agg; + ((Text) partialResult[0]).set(myagg.columnType); + ((LongWritable) partialResult[1]).set(myagg.countTrues); + ((LongWritable) partialResult[2]).set(myagg.countFalses); + ((LongWritable) partialResult[3]).set(myagg.countNulls); + return partialResult; + } + + @Override + public void merge(AggregationBuffer agg, Object partial) + throws HiveException { + if (partial != null) { + BooleanStatsAgg myagg = (BooleanStatsAgg) agg; + + Object partialCount = soi.getStructFieldData(partial, countTruesField); + myagg.countTrues += countTruesFieldOI.get(partialCount); + + partialCount = soi.getStructFieldData(partial, countFalsesField); + myagg.countFalses += countFalsesFieldOI.get(partialCount); + + partialCount = soi.getStructFieldData(partial, countNullsField); + myagg.countNulls += countNullsFieldOI.get(partialCount); + } + } + + @Override + public Object terminate(AggregationBuffer agg) throws HiveException { + BooleanStatsAgg myagg = (BooleanStatsAgg) agg; + ((Text)result[0]).set(myagg.columnType); + ((LongWritable)result[1]).set(myagg.countTrues); + ((LongWritable)result[2]).set(myagg.countFalses); + ((LongWritable)result[3]).set(myagg.countNulls); + return result; + } + } + + /** + * GenericUDAFLongStatsEvaluator. + * + */ + public static class GenericUDAFLongStatsEvaluator extends GenericUDAFEvaluator { + + /* Object Inspector corresponding to the input parameter. + */ + PrimitiveObjectInspector inputOI; + PrimitiveObjectInspector numVectorsOI; + + /* Partial aggregation result returned by TerminatePartial. Partial result is a struct + * containing a long field named "count". + */ + Object[] partialResult; + + /* Object Inspectors corresponding to the struct returned by TerminatePartial and the long + * field within the struct - "count" + */ + StructObjectInspector soi; + + StructField columnType; + WritableStringObjectInspector columnTypeFieldOI; + + StructField minField; + WritableLongObjectInspector minFieldOI; + + StructField maxField; + WritableLongObjectInspector maxFieldOI; + + StructField countNullsField; + WritableLongObjectInspector countNullsFieldOI; + + StructField ndvField; + WritableStringObjectInspector ndvFieldOI; + + StructField numBitVectorsField; + WritableIntObjectInspector numBitVectorsFieldOI; + + /* Output of final result of the aggregation + */ + Object[] result; + + @Override + public ObjectInspector init(Mode m, ObjectInspector[] parameters) + throws HiveException { + assert (parameters.length == 1); + super.init(m, parameters); + + // initialize input + if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) { + inputOI = (PrimitiveObjectInspector) parameters[0]; + numVectorsOI = (PrimitiveObjectInspector) parameters[1]; + } else { + soi = (StructObjectInspector) parameters[0]; + + columnType = soi.getStructFieldRef("ColumnType"); + columnTypeFieldOI = (WritableStringObjectInspector) columnType.getFieldObjectInspector(); + + minField = soi.getStructFieldRef("Min"); + minFieldOI = (WritableLongObjectInspector) minField.getFieldObjectInspector(); + + maxField = soi.getStructFieldRef("Max"); + maxFieldOI = (WritableLongObjectInspector) maxField.getFieldObjectInspector(); + + countNullsField = soi.getStructFieldRef("CountNulls"); + countNullsFieldOI = (WritableLongObjectInspector) countNullsField.getFieldObjectInspector(); + + ndvField = soi.getStructFieldRef("BitVector"); + ndvFieldOI = (WritableStringObjectInspector) ndvField.getFieldObjectInspector(); + + numBitVectorsField = soi.getStructFieldRef("NumBitVectors"); + numBitVectorsFieldOI = (WritableIntObjectInspector) numBitVectorsField.getFieldObjectInspector(); + } + + // initialize output + if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) { + List foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableIntObjectInspector); + + List fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("Min"); + fname.add("Max"); + fname.add("CountNulls"); + fname.add("BitVector"); + fname.add("NumBitVectors"); + + partialResult = new Object[6]; + partialResult[0] = new Text(); + partialResult[1] = new LongWritable(0); + partialResult[2] = new LongWritable(0); + partialResult[3] = new LongWritable(0); + partialResult[4] = new Text(); + partialResult[5] = new IntWritable(0); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + } else { + List foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + List fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("Min"); + fname.add("Max"); + fname.add("CountNulls"); + fname.add("NumDistinctValues"); + + result = new Object[5]; + result[0] = new Text(); + result[1] = new LongWritable(0); + result[2] = new LongWritable(0); + result[3] = new LongWritable(0); + result[4] = new LongWritable(0); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + } + } + + static class LongStatsAgg implements AggregationBuffer { + String columnType; + long min; /* Minimum value seen so far */ + long max; /* Maximum value seen so far */ + long countNulls; /* Count of number of null values seen so far */ + LongNumDistinctValueEstimator numDV; /* Distinct value estimator */ + boolean firstItem; /* First item in the aggBuf? */ + int numBitVectors; + }; + + @Override + public AggregationBuffer getNewAggregationBuffer() throws HiveException { + LongStatsAgg result = new LongStatsAgg(); + reset(result); + return result; + } + public void initNDVEstimator(LongStatsAgg aggBuffer, int numBitVectors) { + aggBuffer.numDV = new LongNumDistinctValueEstimator(numBitVectors); + aggBuffer.numDV.reset(); + } + + @Override + public void reset(AggregationBuffer agg) throws HiveException { + LongStatsAgg myagg = (LongStatsAgg) agg; + myagg.columnType = new String("Long"); + myagg.min = 0; + myagg.max = 0; + myagg.countNulls = 0; + myagg.firstItem = true; + } + + boolean warned = false; + + private void printDebugOutput(String functionName, AggregationBuffer agg) { + LongStatsAgg myagg = (LongStatsAgg) agg; + + LOG.debug(functionName); + + LOG.debug("Max Value:"); + LOG.debug(myagg.max); + + LOG.debug("Min Value:"); + LOG.debug(myagg.min); + + LOG.debug("Count of Null Values:"); + LOG.debug(myagg.countNulls); + + myagg.numDV.printNumDistinctValueEstimator(); + } + + @Override + public void iterate(AggregationBuffer agg, Object[] parameters) + throws HiveException { + Object p = parameters[0]; + LongStatsAgg myagg = (LongStatsAgg) agg; + + if (myagg.firstItem) { + int numVectors = PrimitiveObjectInspectorUtils.getInt(parameters[1], numVectorsOI); + initNDVEstimator(myagg, numVectors); + myagg.firstItem = false; + myagg.numBitVectors = numVectors; + } + + //Update null counter if a null value is seen + if (p == null) { + myagg.countNulls++; + } + else { + try { + long v = PrimitiveObjectInspectorUtils.getLong(p, inputOI); + + //Update min counter if new value is less than min seen so far + if (v < myagg.min) { + myagg.min = v; + } + + //Update max counter if new value is greater than max seen so far + if (v > myagg.max) { + myagg.max = v; + } + + // Add value to NumDistinctValue Estimator + myagg.numDV.addToEstimator(v); + + } catch (NumberFormatException e) { + if (!warned) { + warned = true; + LOG.warn(getClass().getSimpleName() + " " + + StringUtils.stringifyException(e)); + LOG.warn(getClass().getSimpleName() + + " ignoring similar exceptions."); + } + } + } + } + + @Override + public Object terminatePartial(AggregationBuffer agg) throws HiveException { + LongStatsAgg myagg = (LongStatsAgg) agg; + + // Serialize numDistinctValue Estimator + Text t = myagg.numDV.serialize(); + + // Serialize rest of the field in the AggBuffer + ((Text) partialResult[0]).set(myagg.columnType); + ((LongWritable) partialResult[1]).set(myagg.min); + ((LongWritable) partialResult[2]).set(myagg.max); + ((LongWritable) partialResult[3]).set(myagg.countNulls); + ((Text) partialResult[4]).set(t); + ((IntWritable) partialResult[5]).set(myagg.numDV.getnumBitVectors()); + + return partialResult; + } + + @Override + public void merge(AggregationBuffer agg, Object partial) + throws HiveException { + if (partial != null) { + LongStatsAgg myagg = (LongStatsAgg) agg; + + if (myagg.firstItem) { + Object partialValue = soi.getStructFieldData(partial, numBitVectorsField); + int numVectors = numBitVectorsFieldOI.get(partialValue); + initNDVEstimator(myagg, numVectors); + myagg.firstItem = false; + myagg.numBitVectors = numVectors; + + } + + // Update min if min is lesser than the smallest value seen so far + Object partialValue = soi.getStructFieldData(partial, minField); + if (myagg.min > minFieldOI.get(partialValue)) { + myagg.min = minFieldOI.get(partialValue); + } + + // Update max if max is greater than the largest value seen so far + partialValue = soi.getStructFieldData(partial, maxField); + if (myagg.max < maxFieldOI.get(partialValue)) { + myagg.max = maxFieldOI.get(partialValue); + } + + // Update the null counter + partialValue = soi.getStructFieldData(partial, countNullsField); + myagg.countNulls += countNullsFieldOI.get(partialValue); + + // Merge numDistinctValue Estimators + partialValue = soi.getStructFieldData(partial, ndvField); + String v = ndvFieldOI.getPrimitiveJavaObject(partialValue); + NumDistinctValueEstimator o = new NumDistinctValueEstimator(v, myagg.numBitVectors); + myagg.numDV.mergeEstimators(o); + } + } + + @Override + public Object terminate(AggregationBuffer agg) throws HiveException { + LongStatsAgg myagg = (LongStatsAgg) agg; + long numDV = myagg.numDV.estimateNumDistinctValues(); + + // Serialize the result struct + ((Text) result[0]).set(myagg.columnType); + ((LongWritable) result[1]).set(myagg.min); + ((LongWritable) result[2]).set(myagg.max); + ((LongWritable) result[3]).set(myagg.countNulls); + ((LongWritable) result[4]).set(numDV); + + return result; + } + } + + /** + * GenericUDAFDoubleStatsEvaluator. + * + */ + public static class GenericUDAFDoubleStatsEvaluator extends GenericUDAFEvaluator { + + /* Object Inspector corresponding to the input parameter. + */ + PrimitiveObjectInspector inputOI; + PrimitiveObjectInspector numVectorsOI; + + /* Partial aggregation result returned by TerminatePartial. Partial result is a struct + * containing a long field named "count". + */ + Object[] partialResult; + + /* Object Inspectors corresponding to the struct returned by TerminatePartial and the long + * field within the struct - "count" + */ + StructObjectInspector soi; + + StructField columnTypeField; + WritableStringObjectInspector columnTypeFieldOI; + + StructField minField; + WritableDoubleObjectInspector minFieldOI; + + StructField maxField; + WritableDoubleObjectInspector maxFieldOI; + + StructField countNullsField; + WritableLongObjectInspector countNullsFieldOI; + + StructField ndvField; + WritableStringObjectInspector ndvFieldOI; + + StructField numBitVectorsField; + WritableIntObjectInspector numBitVectorsFieldOI; + + /* Output of final result of the aggregation + */ + Object[] result; + + @Override + public ObjectInspector init(Mode m, ObjectInspector[] parameters) + throws HiveException { + assert (parameters.length == 1); + super.init(m, parameters); + + // initialize input + if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) { + inputOI = (PrimitiveObjectInspector) parameters[0]; + numVectorsOI = (PrimitiveObjectInspector) parameters[1]; + } else { + soi = (StructObjectInspector) parameters[0]; + + columnTypeField = soi.getStructFieldRef("ColumnType"); + columnTypeFieldOI = (WritableStringObjectInspector) columnTypeField.getFieldObjectInspector(); + + minField = soi.getStructFieldRef("Min"); + minFieldOI = (WritableDoubleObjectInspector) minField.getFieldObjectInspector(); + + maxField = soi.getStructFieldRef("Max"); + maxFieldOI = (WritableDoubleObjectInspector) maxField.getFieldObjectInspector(); + + countNullsField = soi.getStructFieldRef("CountNulls"); + countNullsFieldOI = (WritableLongObjectInspector) countNullsField.getFieldObjectInspector(); + + ndvField = soi.getStructFieldRef("BitVector"); + ndvFieldOI = (WritableStringObjectInspector) ndvField.getFieldObjectInspector(); + + numBitVectorsField = soi.getStructFieldRef("NumBitVectors"); + numBitVectorsFieldOI = (WritableIntObjectInspector) numBitVectorsField.getFieldObjectInspector(); + } + + // initialize output + if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) { + List foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableIntObjectInspector); + + List fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("Min"); + fname.add("Max"); + fname.add("CountNulls"); + fname.add("BitVector"); + fname.add("NumBitVectors"); + + partialResult = new Object[6]; + partialResult[0] = new Text(); + partialResult[1] = new DoubleWritable(0); + partialResult[2] = new DoubleWritable(0); + partialResult[3] = new LongWritable(0); + partialResult[4] = new Text(); + partialResult[5] = new IntWritable(0); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + } else { + List foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + List fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("Min"); + fname.add("Max"); + fname.add("CountNulls"); + fname.add("NumDistinctValues"); + + result = new Object[5]; + result[0] = new Text(); + result[1] = new DoubleWritable(0); + result[2] = new DoubleWritable(0); + result[3] = new LongWritable(0); + result[4] = new LongWritable(0); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + } + } + + static class DoubleStatsAgg implements AggregationBuffer { + String columnType; + double min; /* Minimum value seen so far */ + double max; /* Maximum value seen so far */ + long countNulls; /* Count of number of null values seen so far */ + DoubleNumDistinctValueEstimator numDV; /* Distinct value estimator */ + boolean firstItem; /* First item in the aggBuf? */ + int numBitVectors; + }; + + @Override + public AggregationBuffer getNewAggregationBuffer() throws HiveException { + DoubleStatsAgg result = new DoubleStatsAgg(); + reset(result); + return result; + } + + public void initNDVEstimator(DoubleStatsAgg aggBuffer, int numBitVectors) { + aggBuffer.numDV = new DoubleNumDistinctValueEstimator(numBitVectors); + aggBuffer.numDV.reset(); + } + + @Override + public void reset(AggregationBuffer agg) throws HiveException { + DoubleStatsAgg myagg = (DoubleStatsAgg) agg; + myagg.columnType = new String("Double"); + myagg.min = 0.0; + myagg.max = 0.0; + myagg.countNulls = 0; + myagg.firstItem = true; + } + + boolean warned = false; + + private void printDebugOutput(String functionName, AggregationBuffer agg) { + DoubleStatsAgg myagg = (DoubleStatsAgg) agg; + + LOG.debug(functionName); + + LOG.debug("Max Value:"); + LOG.debug(myagg.max); + + LOG.debug("Min Value:"); + LOG.debug(myagg.min); + + LOG.debug("Count of Null Values:"); + LOG.debug(myagg.countNulls); + + myagg.numDV.printNumDistinctValueEstimator(); + } + + @Override + public void iterate(AggregationBuffer agg, Object[] parameters) + throws HiveException { + assert (parameters.length == 1); + + Object p = parameters[0]; + DoubleStatsAgg myagg = (DoubleStatsAgg) agg; + + if (myagg.firstItem) { + int numVectors = PrimitiveObjectInspectorUtils.getInt(parameters[1], numVectorsOI); + initNDVEstimator(myagg, numVectors); + myagg.firstItem = false; + myagg.numBitVectors = numVectors; + } + + // Update null counter if a null value is seen + if (p == null) { + myagg.countNulls++; + } + else { + try { + double v = PrimitiveObjectInspectorUtils.getDouble(p, inputOI); + + // Update min counter if new value is less than min seen so far + if (v < myagg.min) { + myagg.min = v; + } + + //ÊUpdate max counter if new value is greater than max seen so far + if (v > myagg.max) { + myagg.max = v; + } + + // Add value to NumDistinctValue Estimator + myagg.numDV.addToEstimator(v); + + } catch (NumberFormatException e) { + if (!warned) { + warned = true; + LOG.warn(getClass().getSimpleName() + " " + + StringUtils.stringifyException(e)); + LOG.warn(getClass().getSimpleName() + + " ignoring similar exceptions."); + } + } + } + } + + @Override + public Object terminatePartial(AggregationBuffer agg) throws HiveException { + DoubleStatsAgg myagg = (DoubleStatsAgg) agg; + + // Serialize numDistinctValue Estimator + Text t = myagg.numDV.serialize(); + + // Serialize the rest of the values in the AggBuffer + ((Text) partialResult[0]).set(myagg.columnType); + ((DoubleWritable) partialResult[1]).set(myagg.min); + ((DoubleWritable) partialResult[2]).set(myagg.max); + ((LongWritable) partialResult[3]).set(myagg.countNulls); + ((Text) partialResult[4]).set(t); + ((IntWritable) partialResult[5]).set(myagg.numBitVectors); + + return partialResult; + } + + @Override + public void merge(AggregationBuffer agg, Object partial) + throws HiveException { + if (partial != null) { + DoubleStatsAgg myagg = (DoubleStatsAgg) agg; + + if (myagg.firstItem) { + Object partialValue = soi.getStructFieldData(partial, numBitVectorsField); + int numVectors = numBitVectorsFieldOI.get(partialValue); + initNDVEstimator(myagg, numVectors); + myagg.firstItem = false; + myagg.numBitVectors = numVectors; + } + + // Update min if min is lesser than the smallest value seen so far + Object partialValue = soi.getStructFieldData(partial, minField); + if (myagg.min > minFieldOI.get(partialValue)) { + myagg.min = minFieldOI.get(partialValue); + } + + // Update max if max is greater than the largest value seen so far + partialValue = soi.getStructFieldData(partial, maxField); + if (myagg.max < maxFieldOI.get(partialValue)) { + myagg.max = maxFieldOI.get(partialValue); + } + + // Update the null counter + partialValue = soi.getStructFieldData(partial, countNullsField); + myagg.countNulls += countNullsFieldOI.get(partialValue); + + // Merge numDistinctValue Estimators + partialValue = soi.getStructFieldData(partial, ndvField); + String v = ndvFieldOI.getPrimitiveJavaObject(partialValue); + + NumDistinctValueEstimator o = new NumDistinctValueEstimator(v, myagg.numBitVectors); + myagg.numDV.mergeEstimators(o); + } + } + + @Override + public Object terminate(AggregationBuffer agg) throws HiveException { + DoubleStatsAgg myagg = (DoubleStatsAgg) agg; + long numDV = myagg.numDV.estimateNumDistinctValues(); + + // Serialize the result struct + ((Text) result[0]).set(myagg.columnType); + ((DoubleWritable) result[1]).set(myagg.min); + ((DoubleWritable) result[2]).set(myagg.max); + ((LongWritable) result[3]).set(myagg.countNulls); + ((LongWritable) result[4]).set(numDV); + + return result; + } + } + + /** + * GenericUDAFStringStatsEvaluator. + * + */ + public static class GenericUDAFStringStatsEvaluator extends GenericUDAFEvaluator { + + /* Object Inspector corresponding to the input parameter. + */ + PrimitiveObjectInspector inputOI; + PrimitiveObjectInspector numVectorsOI; + + /* Partial aggregation result returned by TerminatePartial. Partial result is a struct + * containing a long field named "count". + */ + Object[] partialResult; + + /* Object Inspectors corresponding to the struct returned by TerminatePartial and the + * fields within the struct - "maxLength", "sumLength", "count", "countNulls", "ndv" + */ + StructObjectInspector soi; + + StructField columnTypeField; + WritableStringObjectInspector columnTypeFieldOI; + + StructField maxLengthField; + WritableLongObjectInspector maxLengthFieldOI; + + StructField sumLengthField; + WritableLongObjectInspector sumLengthFieldOI; + + StructField countField; + WritableLongObjectInspector countFieldOI; + + StructField countNullsField; + WritableLongObjectInspector countNullsFieldOI; + + StructField ndvField; + WritableStringObjectInspector ndvFieldOI; + + StructField numBitVectorsField; + WritableIntObjectInspector numBitVectorsFieldOI; + + /* Output of final result of the aggregation + */ + Object[] result; + + @Override + public ObjectInspector init(Mode m, ObjectInspector[] parameters) + throws HiveException { + assert (parameters.length == 1); + super.init(m, parameters); + + // initialize input + if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) { + inputOI = (PrimitiveObjectInspector) parameters[0]; + numVectorsOI = (PrimitiveObjectInspector) parameters[1]; + } else { + soi = (StructObjectInspector) parameters[0]; + + columnTypeField = soi.getStructFieldRef("ColumnType"); + columnTypeFieldOI = (WritableStringObjectInspector) columnTypeField.getFieldObjectInspector(); + + maxLengthField = soi.getStructFieldRef("MaxLength"); + maxLengthFieldOI = (WritableLongObjectInspector) maxLengthField.getFieldObjectInspector(); + + sumLengthField = soi.getStructFieldRef("SumLength"); + sumLengthFieldOI = (WritableLongObjectInspector) sumLengthField.getFieldObjectInspector(); + + countField = soi.getStructFieldRef("Count"); + countFieldOI = (WritableLongObjectInspector) countField.getFieldObjectInspector(); + + countNullsField = soi.getStructFieldRef("CountNulls"); + countNullsFieldOI = (WritableLongObjectInspector) countNullsField.getFieldObjectInspector(); + + ndvField = soi.getStructFieldRef("BitVector"); + ndvFieldOI = (WritableStringObjectInspector) ndvField.getFieldObjectInspector(); + + numBitVectorsField = soi.getStructFieldRef("NumBitVectors"); + numBitVectorsFieldOI = (WritableIntObjectInspector) numBitVectorsField.getFieldObjectInspector(); + + } + + // initialize output + if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) { + List foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableIntObjectInspector); + + List fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("MaxLength"); + fname.add("SumLength"); + fname.add("Count"); + fname.add("CountNulls"); + fname.add("BitVector"); + fname.add("NumBitVectors"); + + partialResult = new Object[7]; + partialResult[0] = new Text(); + partialResult[1] = new LongWritable(0); + partialResult[2] = new LongWritable(0); + partialResult[3] = new LongWritable(0); + partialResult[4] = new LongWritable(0); + partialResult[5] = new Text(); + partialResult[6] = new IntWritable(0); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + } else { + List foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + List fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("MaxLength"); + fname.add("AvgLength"); + fname.add("CountNulls"); + fname.add("NumDistinctValues"); + + result = new Object[5]; + result[0] = new Text(); + result[1] = new LongWritable(0); + result[2] = new DoubleWritable(0); + result[3] = new LongWritable(0); + result[4] = new LongWritable(0); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + } + } + + static class StringStatsAgg implements AggregationBuffer { + String columnType; + long maxLength; /* Maximum length seen so far */ + long sumLength; /* Sum of lengths of all values seen so far */ + long count; /* Count of all values seen so far */ + long countNulls; /* Count of number of null values seen so far */ + StringNumDistinctValueEstimator numDV; /* Distinct value estimator */ + int numBitVectors; + boolean firstItem; + }; + + @Override + public AggregationBuffer getNewAggregationBuffer() throws HiveException { + StringStatsAgg result = new StringStatsAgg(); + reset(result); + return result; + } + + public void initNDVEstimator(StringStatsAgg aggBuffer, int numBitVectors) { + aggBuffer.numDV = new StringNumDistinctValueEstimator(numBitVectors); + aggBuffer.numDV.reset(); + } + + @Override + public void reset(AggregationBuffer agg) throws HiveException { + StringStatsAgg myagg = (StringStatsAgg) agg; + myagg.columnType = new String("String"); + myagg.maxLength = 0; + myagg.sumLength = 0; + myagg.count = 0; + myagg.countNulls = 0; + myagg.firstItem = true; + } + + boolean warned = false; + + private void printDebugOutput(String functionName, AggregationBuffer agg) { + StringStatsAgg myagg = (StringStatsAgg) agg; + + LOG.debug(functionName); + + LOG.debug("Max Length:"); + LOG.debug(myagg.maxLength); + + LOG.debug("Sum of Length:"); + LOG.debug(myagg.sumLength); + + LOG.debug("Count of non-Null Values:"); + LOG.debug(myagg.count); + + LOG.debug("Count of Null Values:"); + LOG.debug(myagg.countNulls); + + myagg.numDV.printNumDistinctValueEstimator(); + } + + @Override + public void iterate(AggregationBuffer agg, Object[] parameters) + throws HiveException { + assert (parameters.length == 1); + + Object p = parameters[0]; + StringStatsAgg myagg = (StringStatsAgg) agg; + + if (myagg.firstItem) { + int numVectors = PrimitiveObjectInspectorUtils.getInt(parameters[1], numVectorsOI); + initNDVEstimator(myagg, numVectors); + myagg.firstItem = false; + myagg.numBitVectors = numVectors; + } + + // Update null counter if a null value is seen + if (p == null) { + myagg.countNulls++; + } + else { + try { + String v = PrimitiveObjectInspectorUtils.getString(p, inputOI); + + // Update max length if new length is greater than the ones seen so far + int len = v.length(); + if (len > myagg.maxLength) { + myagg.maxLength = len; + } + + // Update sum length with the new length + myagg.sumLength += len; + + // Increment count of values seen so far + myagg.count++; + + // Add string value to NumDistinctValue Estimator + myagg.numDV.addToEstimator(v); + + } catch (NumberFormatException e) { + if (!warned) { + warned = true; + LOG.warn(getClass().getSimpleName() + " " + + StringUtils.stringifyException(e)); + LOG.warn(getClass().getSimpleName() + + " ignoring similar exceptions."); + } + } + } + } + + @Override + public Object terminatePartial(AggregationBuffer agg) throws HiveException { + StringStatsAgg myagg = (StringStatsAgg) agg; + + // Serialize numDistinctValue Estimator + Text t = myagg.numDV.serialize(); + + // Serialize the rest of the values in the AggBuffer + ((Text) partialResult[0]).set(myagg.columnType); + ((LongWritable) partialResult[1]).set(myagg.maxLength); + ((LongWritable) partialResult[2]).set(myagg.sumLength); + ((LongWritable) partialResult[3]).set(myagg.count); + ((LongWritable) partialResult[4]).set(myagg.countNulls); + ((Text) partialResult[5]).set(t); + ((IntWritable) partialResult[6]).set(myagg.numBitVectors); + + return partialResult; + } + + @Override + public void merge(AggregationBuffer agg, Object partial) + throws HiveException { + if (partial != null) { + StringStatsAgg myagg = (StringStatsAgg) agg; + + if (myagg.firstItem) { + Object partialValue = soi.getStructFieldData(partial, numBitVectorsField); + int numVectors = numBitVectorsFieldOI.get(partialValue); + initNDVEstimator(myagg, numVectors); + myagg.firstItem = false; + myagg.numBitVectors = numVectors; + } + + // Update maxLength if length is greater than the largest value seen so far + Object partialValue = soi.getStructFieldData(partial, maxLengthField); + if (myagg.maxLength < maxLengthFieldOI.get(partialValue)) { + myagg.maxLength = maxLengthFieldOI.get(partialValue); + } + + // Update sum of the length of the values seen so far + partialValue = soi.getStructFieldData(partial, sumLengthField); + myagg.sumLength += sumLengthFieldOI.get(partialValue); + + // Update the count of the number of values seen so far + partialValue = soi.getStructFieldData(partial, countField); + myagg.count += countFieldOI.get(partialValue); + + // Update the null counter + partialValue = soi.getStructFieldData(partial, countNullsField); + myagg.countNulls += countNullsFieldOI.get(partialValue); + + // Merge numDistinctValue Estimators + partialValue = soi.getStructFieldData(partial, ndvField); + String v = ndvFieldOI.getPrimitiveJavaObject(partialValue); + NumDistinctValueEstimator o = new NumDistinctValueEstimator(v, myagg.numBitVectors); + myagg.numDV.mergeEstimators(o); + } + } + + @Override + public Object terminate(AggregationBuffer agg) throws HiveException { + StringStatsAgg myagg = (StringStatsAgg) agg; + long numDV = myagg.numDV.estimateNumDistinctValues(); + double avgLength = (double)(myagg.sumLength/(1.0 * (myagg.count + myagg.countNulls))); + + // Serialize the result struct + ((Text) result[0]).set(myagg.columnType); + ((LongWritable) result[1]).set(myagg.maxLength); + ((DoubleWritable) result[2]).set(avgLength); + ((LongWritable) result[3]).set(myagg.countNulls); + ((LongWritable) result[4]).set(numDV); + + return result; + } + } + + /** + * GenericUDAFBinaryStatsEvaluator. + * + */ + public static class GenericUDAFBinaryStatsEvaluator extends GenericUDAFEvaluator { + + /* Object Inspector corresponding to the input parameter. + */ + PrimitiveObjectInspector inputOI; + + /* Partial aggregation result returned by TerminatePartial. Partial result is a struct + * containing a long field named "count". + */ + Object[] partialResult; + + /* Object Inspectors corresponding to the struct returned by TerminatePartial and the + * fields within the struct - "maxLength", "sumLength", "count", "countNulls" + */ + StructObjectInspector soi; + + StructField columnTypeField; + WritableStringObjectInspector columnTypeFieldOI; + + StructField maxLengthField; + WritableLongObjectInspector maxLengthFieldOI; + + StructField sumLengthField; + WritableLongObjectInspector sumLengthFieldOI; + + StructField countField; + WritableLongObjectInspector countFieldOI; + + StructField countNullsField; + WritableLongObjectInspector countNullsFieldOI; + + /* Output of final result of the aggregation + */ + Object[] result; + + @Override + public ObjectInspector init(Mode m, ObjectInspector[] parameters) + throws HiveException { + assert (parameters.length == 1); + super.init(m, parameters); + + // initialize input + if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) { + inputOI = (PrimitiveObjectInspector) parameters[0]; + } else { + soi = (StructObjectInspector) parameters[0]; + + columnTypeField = soi.getStructFieldRef("ColumnType"); + columnTypeFieldOI = (WritableStringObjectInspector) columnTypeField.getFieldObjectInspector(); + + maxLengthField = soi.getStructFieldRef("MaxLength"); + maxLengthFieldOI = (WritableLongObjectInspector) maxLengthField.getFieldObjectInspector(); + + sumLengthField = soi.getStructFieldRef("SumLength"); + sumLengthFieldOI = (WritableLongObjectInspector) sumLengthField.getFieldObjectInspector(); + + countField = soi.getStructFieldRef("Count"); + countFieldOI = (WritableLongObjectInspector) countField.getFieldObjectInspector(); + + countNullsField = soi.getStructFieldRef("CountNulls"); + countNullsFieldOI = (WritableLongObjectInspector) countNullsField.getFieldObjectInspector(); + + } + + // initialize output + if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) { + List foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + List fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("MaxLength"); + fname.add("SumLength"); + fname.add("Count"); + fname.add("CountNulls"); + + partialResult = new Object[5]; + partialResult[0] = new Text(); + partialResult[1] = new LongWritable(0); + partialResult[2] = new LongWritable(0); + partialResult[3] = new LongWritable(0); + partialResult[4] = new LongWritable(0); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + } else { + List foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + List fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("MaxLength"); + fname.add("AvgLength"); + fname.add("CountNulls"); + + result = new Object[4]; + result[0] = new Text(); + result[1] = new LongWritable(0); + result[2] = new DoubleWritable(0); + result[3] = new LongWritable(0); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + } + } + + static class BinaryStatsAgg implements AggregationBuffer { + String columnType; + long maxLength; /* Maximum length seen so far */ + long sumLength; /* Sum of lengths of all values seen so far */ + long count; /* Count of all values seen so far */ + long countNulls; /* Count of number of null values seen so far */ + }; + + @Override + public AggregationBuffer getNewAggregationBuffer() throws HiveException { + BinaryStatsAgg result = new BinaryStatsAgg(); + reset(result); + return result; + } + + @Override + public void reset(AggregationBuffer agg) throws HiveException { + BinaryStatsAgg myagg = (BinaryStatsAgg) agg; + myagg.columnType = new String("Binary"); + myagg.maxLength = 0; + myagg.sumLength = 0; + myagg.count = 0; + myagg.countNulls = 0; + } + + boolean warned = false; + + @Override + public void iterate(AggregationBuffer agg, Object[] parameters) + throws HiveException { + assert (parameters.length == 1); + + Object p = parameters[0]; + BinaryStatsAgg myagg = (BinaryStatsAgg) agg; + + // Update null counter if a null value is seen + if (p == null) { + myagg.countNulls++; + } + else { + try { + BytesWritable v = PrimitiveObjectInspectorUtils.getBinary(p, inputOI); + + // Update max length if new length is greater than the ones seen so far + int len = v.getLength(); + if (len > myagg.maxLength) { + myagg.maxLength = len; + } + + // Update sum length with the new length + myagg.sumLength += len; + + // Increment count of values seen so far + myagg.count++; + + } catch (NumberFormatException e) { + if (!warned) { + warned = true; + LOG.warn(getClass().getSimpleName() + " " + + StringUtils.stringifyException(e)); + LOG.warn(getClass().getSimpleName() + + " ignoring similar exceptions."); + } + } + } + } + + private void printDebugOutput(String functionName, AggregationBuffer agg) { + BinaryStatsAgg myagg = (BinaryStatsAgg) agg; + + LOG.debug(functionName); + + LOG.debug("Max Length:"); + LOG.debug(myagg.maxLength); + + LOG.debug("Sum of Length:"); + LOG.debug(myagg.sumLength); + + LOG.debug("Count of non-Null Values:"); + LOG.debug(myagg.count); + + LOG.debug("Count of Null Values:"); + LOG.debug(myagg.countNulls); + } + + @Override + public Object terminatePartial(AggregationBuffer agg) throws HiveException { + BinaryStatsAgg myagg = (BinaryStatsAgg) agg; + + // Serialize AggBuffer + ((Text) partialResult[0]).set(myagg.columnType); + ((LongWritable) partialResult[1]).set(myagg.maxLength); + ((LongWritable) partialResult[2]).set(myagg.sumLength); + ((LongWritable) partialResult[3]).set(myagg.count); + ((LongWritable) partialResult[4]).set(myagg.countNulls); + + return partialResult; + } + + @Override + public void merge(AggregationBuffer agg, Object partial) + throws HiveException { + if (partial != null) { + BinaryStatsAgg myagg = (BinaryStatsAgg) agg; + + // Update maxLength if length is greater than the largest value seen so far + Object partialValue = soi.getStructFieldData(partial, maxLengthField); + if (myagg.maxLength < maxLengthFieldOI.get(partialValue)) { + myagg.maxLength = maxLengthFieldOI.get(partialValue); + } + + // Update sum of the length of the values seen so far + partialValue = soi.getStructFieldData(partial, sumLengthField); + myagg.sumLength += sumLengthFieldOI.get(partialValue); + + // Update the count of the number of values seen so far + partialValue = soi.getStructFieldData(partial, countField); + myagg.count += countFieldOI.get(partialValue); + + // Update the null counter + partialValue = soi.getStructFieldData(partial, countNullsField); + myagg.countNulls += countNullsFieldOI.get(partialValue); + } + } + + @Override + public Object terminate(AggregationBuffer agg) throws HiveException { + BinaryStatsAgg myagg = (BinaryStatsAgg) agg; + double avgLength = (double)(myagg.sumLength/(1.0 * (myagg.count + myagg.countNulls))); + + // Serialize the result struct + ((Text) result[0]).set(myagg.columnType); + ((LongWritable) result[1]).set(myagg.maxLength); + ((DoubleWritable) result[2]).set(avgLength); + ((LongWritable) result[3]).set(myagg.countNulls); + + return result; + } + } +} \ No newline at end of file diff --git ql/src/java/org/apache/hadoop/hive/ql/udf/generic/LongNumDistinctValueEstimator.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/LongNumDistinctValueEstimator.java new file mode 100644 index 0000000..53bca1f --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/LongNumDistinctValueEstimator.java @@ -0,0 +1,43 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.udf.generic; + +public class LongNumDistinctValueEstimator extends NumDistinctValueEstimator { + + public LongNumDistinctValueEstimator(int numBitVectors) { + super(numBitVectors); + } + + public LongNumDistinctValueEstimator(String s, int numVectors) { + super(s, numVectors); + } + + @Override + public void addToEstimator(long v) { + /* Update summary bitVector : + * Generate hash value of the long value and mod it by 2^bitVectorSize-1. + * In this implementation bitVectorSize is 31. + */ + super.addToEstimator(v); + } + + @Override + public void addToEstimatorPCSA(long v) { + super.addToEstimatorPCSA(v); + } +} \ No newline at end of file diff --git ql/src/java/org/apache/hadoop/hive/ql/udf/generic/NumDistinctValueEstimator.java ql/src/java/org/apache/hadoop/hive/ql/udf/generic/NumDistinctValueEstimator.java new file mode 100644 index 0000000..4f5f506 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/NumDistinctValueEstimator.java @@ -0,0 +1,324 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.udf.generic; +import java.util.Random; + +import javolution.util.FastBitSet; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.io.Text; + +public class NumDistinctValueEstimator { + + static final Log LOG = LogFactory.getLog(NumDistinctValueEstimator.class.getName()); + + private final int bitVectorSize = 32; + private int numBitVectors; + + // Refer to Flajolet-Martin'86 for the value of phi + private final double phi = 0.77351; + + private int[] a; + private int[] b; + private FastBitSet[] bitVector = new FastBitSet[numBitVectors]; + + private Random aValue; + private Random bValue; + + /* Create a new distinctValueEstimator + */ + public NumDistinctValueEstimator(int numBitVectors) { + this.numBitVectors = numBitVectors; + bitVector = new FastBitSet[numBitVectors]; + for (int i=0; i< numBitVectors; i++) { + bitVector[i] = new FastBitSet(bitVectorSize); + } + + a = new int[numBitVectors]; + b = new int[numBitVectors]; + + aValue = new Random(79798); + bValue = new Random(34115); + + for (int i = 0; i < numBitVectors; i++) { + int randVal; + /* a and b shouldn't be even; If a and b are even, then none of the values + * will set bit 0 thus introducing errors in the estimate. Both a and b can be even + * 25% of the times and as a result 25% of the bit vectors could be inaccurate. To avoid this + * always pick odd values for a and b. + */ + do { + randVal = aValue.nextInt(); + } while (randVal % 2 == 0); + + a[i] = randVal; + + do { + randVal = bValue.nextInt(); + } while (randVal % 2 == 0); + + b[i] = randVal; + + if (a[i] < 0) { + a[i] = a[i] + (1 << (bitVectorSize -1)); + } + + if (b[i] < 0) { + b[i] = b[i] + (1 << (bitVectorSize -1)); + } + } + } + + public NumDistinctValueEstimator(String s, int numBitVectors) { + FastBitSet b[] = deserialize(s, numBitVectors); + bitVector = new FastBitSet[numBitVectors]; + for(int i=0; i = '0' && c <= '9') { + String t = new String(); + t = t + c; + c = s.charAt(i); + i = i + 1; + + while (c != ',' && c!= '}') { + t = t + c; + c = s.charAt(i); + i = i + 1; + } + + int bitIndex = Integer.parseInt(t); + assert(bitIndex >= 0); + assert(vectorIndex < numBitVectors); + b[vectorIndex].set(bitIndex); + if (c == '}') { + vectorIndex = vectorIndex + 1; + } + } + } + return b; + } + + private int generateHash(long v, int hashNum) { + int mod = 1 << (bitVectorSize - 1) - 1; + long tempHash = a[hashNum] * v + b[hashNum]; + tempHash %= mod; + int hash = (int) tempHash; + + /* Hash function should map the long value to 0...2^L-1. + * Hence hash value has to be non-negative. + */ + if (hash < 0) { + hash = hash + mod + 1; + } + return hash; + } + + private int generateHashForPCSA(long v) { + int mod = 1 << (bitVectorSize - 1) - 1; + long tempHash = a[0] * v + b[0]; + tempHash %= mod; + int hash = (int) tempHash; + + /* Hash function should map the long value to 0...2^L-1. + * Hence hash value has to be non-negative. + */ + if (hash < 0) { + hash = hash + mod + 1; + } + return hash; + } + + public void addToEstimator(long v) { + /* Update summary bitVector : + * Generate hash value of the long value and mod it by 2^bitVectorSize-1. + * In this implementation bitVectorSize is 31. + */ + + for (int i = 0; i> 1; + } + + // Set bitvector[index] := 1 + bitVector[i].set(index); + } + } + + public void addToEstimatorPCSA(long v) { + int hash = generateHashForPCSA(v); + int rho = hash/numBitVectors; + int index; + + // Find the index of the least significant bit that is 1 + for (index=0; index> 1; + } + + // Set bitvector[index] := 1 + bitVector[hash%numBitVectors].set(index); + } + + public void mergeEstimators(NumDistinctValueEstimator o) { + // Bitwise OR the bitvector with the bitvector in the agg buffer + for (int i=0; i Map Operator Tree: + employee_part + TableScan + alias: employee_part + Select Operator + expressions: + expr: employeeid + type: int + outputColumnNames: employeeid + Group By Operator + aggregations: + expr: compute_stats(employeeid) + bucketGroup: false + mode: hash + outputColumnNames: _col0 + Reduce Output Operator + sort order: + tag: -1 + value expressions: + expr: _col0 + type: struct + Reduce Operator Tree: + Group By Operator + aggregations: + expr: compute_stats(VALUE._col0) + bucketGroup: false + mode: mergepartial + outputColumnNames: _col0 + Select Operator + expressions: + expr: _col0 + type: struct + outputColumnNames: _col0 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + + Stage: Stage-1 + Column Stats Work + + +PREHOOK: query: analyze table Employee_Part partition (employeeSalary='2000') compute statistics for columns employeeID +PREHOOK: type: QUERY +PREHOOK: Input: default@employee_part@employeesalary=2000 +#### A masked pattern was here #### +POSTHOOK: query: analyze table Employee_Part partition (employeeSalary='2000') compute statistics for columns employeeID +POSTHOOK: type: QUERY +POSTHOOK: Input: default@employee_part@employeesalary=2000 +#### A masked pattern was here #### +PREHOOK: query: explain +analyze table Employee_Part partition (employeeSalary='4000') compute statistics for columns employeeName, employeeID +PREHOOK: type: QUERY +POSTHOOK: query: explain +analyze table Employee_Part partition (employeeSalary='4000') compute statistics for columns employeeName, employeeID +POSTHOOK: type: QUERY +ABSTRACT SYNTAX TREE: + (TOK_ANALYZE (TOK_TAB (TOK_TABNAME Employee_Part) (TOK_PARTSPEC (TOK_PARTVAL employeeSalary '4000'))) (TOK_TABCOLNAME employeeName employeeID)) + +STAGE DEPENDENCIES: + Stage-0 is a root stage + Stage-1 is a root stage + +STAGE PLANS: + Stage: Stage-0 + Map Reduce + Alias -> Map Operator Tree: + employee_part + TableScan + alias: employee_part + Select Operator + expressions: + expr: employeename + type: string + expr: employeeid + type: int + outputColumnNames: employeename, employeeid + Group By Operator + aggregations: + expr: compute_stats(employeename) + expr: compute_stats(employeeid) + bucketGroup: false + mode: hash + outputColumnNames: _col0, _col1 + Reduce Output Operator + sort order: + tag: -1 + value expressions: + expr: _col0 + type: struct + expr: _col1 + type: struct + Reduce Operator Tree: + Group By Operator + aggregations: + expr: compute_stats(VALUE._col0) + expr: compute_stats(VALUE._col1) + bucketGroup: false + mode: mergepartial + outputColumnNames: _col0, _col1 + Select Operator + expressions: + expr: _col0 + type: struct + expr: _col1 + type: struct + outputColumnNames: _col0, _col1 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + + Stage: Stage-1 + Column Stats Work + + +PREHOOK: query: analyze table Employee_Part partition (employeeSalary='4000') compute statistics for columns employeeName, employeeID +PREHOOK: type: QUERY +PREHOOK: Input: default@employee_part@employeesalary=4000 +#### A masked pattern was here #### +POSTHOOK: query: analyze table Employee_Part partition (employeeSalary='4000') compute statistics for columns employeeName, employeeID +POSTHOOK: type: QUERY +POSTHOOK: Input: default@employee_part@employeesalary=4000 +#### A masked pattern was here #### diff --git ql/src/test/results/clientpositive/columnstats_tbllvl.q.out ql/src/test/results/clientpositive/columnstats_tbllvl.q.out new file mode 100644 index 0000000..e2afe6b --- /dev/null +++ ql/src/test/results/clientpositive/columnstats_tbllvl.q.out @@ -0,0 +1,119 @@ +PREHOOK: query: DROP TABLE IF EXISTS UserVisits_web_text_none +PREHOOK: type: DROPTABLE +POSTHOOK: query: DROP TABLE IF EXISTS UserVisits_web_text_none +POSTHOOK: type: DROPTABLE +PREHOOK: query: CREATE TABLE UserVisits_web_text_none ( + sourceIP string, + destURL string, + visitDate string, + adRevenue float, + userAgent string, + cCode string, + lCode string, + sKeyword string, + avgTimeOnSite int) +row format delimited fields terminated by '|' stored as textfile +PREHOOK: type: CREATETABLE +POSTHOOK: query: CREATE TABLE UserVisits_web_text_none ( + sourceIP string, + destURL string, + visitDate string, + adRevenue float, + userAgent string, + cCode string, + lCode string, + sKeyword string, + avgTimeOnSite int) +row format delimited fields terminated by '|' stored as textfile +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@UserVisits_web_text_none +PREHOOK: query: LOAD DATA LOCAL INPATH "../data/files/UserVisits.dat" INTO TABLE UserVisits_web_text_none +PREHOOK: type: LOAD +PREHOOK: Output: default@uservisits_web_text_none +POSTHOOK: query: LOAD DATA LOCAL INPATH "../data/files/UserVisits.dat" INTO TABLE UserVisits_web_text_none +POSTHOOK: type: LOAD +POSTHOOK: Output: default@uservisits_web_text_none +PREHOOK: query: explain +analyze table UserVisits_web_text_none compute statistics for columns sourceIP, avgTimeOnSite, adRevenue +PREHOOK: type: QUERY +POSTHOOK: query: explain +analyze table UserVisits_web_text_none compute statistics for columns sourceIP, avgTimeOnSite, adRevenue +POSTHOOK: type: QUERY +ABSTRACT SYNTAX TREE: + (TOK_ANALYZE (TOK_TAB (TOK_TABNAME UserVisits_web_text_none)) (TOK_TABCOLNAME sourceIP avgTimeOnSite adRevenue)) + +STAGE DEPENDENCIES: + Stage-0 is a root stage + Stage-1 is a root stage + +STAGE PLANS: + Stage: Stage-0 + Map Reduce + Alias -> Map Operator Tree: + uservisits_web_text_none + TableScan + alias: uservisits_web_text_none + Select Operator + expressions: + expr: sourceip + type: string + expr: avgtimeonsite + type: int + expr: adrevenue + type: float + outputColumnNames: sourceip, avgtimeonsite, adrevenue + Group By Operator + aggregations: + expr: compute_stats(sourceip) + expr: compute_stats(avgtimeonsite) + expr: compute_stats(adrevenue) + bucketGroup: false + mode: hash + outputColumnNames: _col0, _col1, _col2 + Reduce Output Operator + sort order: + tag: -1 + value expressions: + expr: _col0 + type: struct + expr: _col1 + type: struct + expr: _col2 + type: struct + Reduce Operator Tree: + Group By Operator + aggregations: + expr: compute_stats(VALUE._col0) + expr: compute_stats(VALUE._col1) + expr: compute_stats(VALUE._col2) + bucketGroup: false + mode: mergepartial + outputColumnNames: _col0, _col1, _col2 + Select Operator + expressions: + expr: _col0 + type: struct + expr: _col1 + type: struct + expr: _col2 + type: struct + outputColumnNames: _col0, _col1, _col2 + File Output Operator + compressed: false + GlobalTableId: 0 + table: + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + + Stage: Stage-1 + Column Stats Work + + +PREHOOK: query: analyze table UserVisits_web_text_none compute statistics for columns sourceIP, avgTimeOnSite, adRevenue +PREHOOK: type: QUERY +PREHOOK: Input: default@uservisits_web_text_none +#### A masked pattern was here #### +POSTHOOK: query: analyze table UserVisits_web_text_none compute statistics for columns sourceIP, avgTimeOnSite, adRevenue +POSTHOOK: type: QUERY +POSTHOOK: Input: default@uservisits_web_text_none +#### A masked pattern was here #### diff --git ql/src/test/results/clientpositive/compute_stats_binary.q.out ql/src/test/results/clientpositive/compute_stats_binary.q.out new file mode 100644 index 0000000..4eec218 --- /dev/null +++ ql/src/test/results/clientpositive/compute_stats_binary.q.out @@ -0,0 +1,33 @@ +PREHOOK: query: create table tab_binary(a binary) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table tab_binary(a binary) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@tab_binary +PREHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/binary.txt" INTO TABLE tab_binary +PREHOOK: type: LOAD +PREHOOK: Output: default@tab_binary +POSTHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/binary.txt" INTO TABLE tab_binary +POSTHOOK: type: LOAD +POSTHOOK: Output: default@tab_binary +PREHOOK: query: select count(*) from tab_binary +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_binary +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from tab_binary +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_binary +#### A masked pattern was here #### +10 +PREHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_binary +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_binary +#### A masked pattern was here #### +POSTHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_binary +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_binary +#### A masked pattern was here #### +{"columntype":"Binary","maxlength":36,"avglength":20.0,"countnulls":0} diff --git ql/src/test/results/clientpositive/compute_stats_boolean.q.out ql/src/test/results/clientpositive/compute_stats_boolean.q.out new file mode 100644 index 0000000..0a7f111 --- /dev/null +++ ql/src/test/results/clientpositive/compute_stats_boolean.q.out @@ -0,0 +1,33 @@ +PREHOOK: query: create table tab_bool(a boolean) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table tab_bool(a boolean) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@tab_bool +PREHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/bool.txt" INTO TABLE tab_bool +PREHOOK: type: LOAD +PREHOOK: Output: default@tab_bool +POSTHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/bool.txt" INTO TABLE tab_bool +POSTHOOK: type: LOAD +POSTHOOK: Output: default@tab_bool +PREHOOK: query: select count(*) from tab_bool +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_bool +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from tab_bool +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_bool +#### A masked pattern was here #### +33 +PREHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_bool +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_bool +#### A masked pattern was here #### +POSTHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_bool +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_bool +#### A masked pattern was here #### +{"columntype":"Boolean","counttrues":13,"countfalses":19,"countnulls":1} diff --git ql/src/test/results/clientpositive/compute_stats_double.q.out ql/src/test/results/clientpositive/compute_stats_double.q.out new file mode 100644 index 0000000..6d9837a --- /dev/null +++ ql/src/test/results/clientpositive/compute_stats_double.q.out @@ -0,0 +1,33 @@ +PREHOOK: query: create table tab_double(a double) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table tab_double(a double) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@tab_double +PREHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/double.txt" INTO TABLE tab_double +PREHOOK: type: LOAD +PREHOOK: Output: default@tab_double +POSTHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/double.txt" INTO TABLE tab_double +POSTHOOK: type: LOAD +POSTHOOK: Output: default@tab_double +PREHOOK: query: select count(*) from tab_double +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_double +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from tab_double +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_double +#### A masked pattern was here #### +16 +PREHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_double +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_double +#### A masked pattern was here #### +POSTHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_double +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_double +#### A masked pattern was here #### +{"columntype":"Double","min":-87.2,"max":435.33,"countnulls":2,"numdistinctvalues":9} diff --git ql/src/test/results/clientpositive/compute_stats_long.q.out ql/src/test/results/clientpositive/compute_stats_long.q.out new file mode 100644 index 0000000..0668115 --- /dev/null +++ ql/src/test/results/clientpositive/compute_stats_long.q.out @@ -0,0 +1,33 @@ +PREHOOK: query: create table tab_int(a int) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table tab_int(a int) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@tab_int +PREHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/int.txt" INTO TABLE tab_int +PREHOOK: type: LOAD +PREHOOK: Output: default@tab_int +POSTHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/int.txt" INTO TABLE tab_int +POSTHOOK: type: LOAD +POSTHOOK: Output: default@tab_int +PREHOOK: query: select count(*) from tab_int +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_int +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from tab_int +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_int +#### A masked pattern was here #### +12 +PREHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_int +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_int +#### A masked pattern was here #### +POSTHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_int +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_int +#### A masked pattern was here #### +{"columntype":"Long","min":0,"max":344,"countnulls":1,"numdistinctvalues":14} diff --git ql/src/test/results/clientpositive/compute_stats_string.q.out ql/src/test/results/clientpositive/compute_stats_string.q.out new file mode 100644 index 0000000..e6cf3cb --- /dev/null +++ ql/src/test/results/clientpositive/compute_stats_string.q.out @@ -0,0 +1,33 @@ +PREHOOK: query: create table tab_string(a string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table tab_string(a string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@tab_string +PREHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/string.txt" INTO TABLE tab_string +PREHOOK: type: LOAD +PREHOOK: Output: default@tab_string +POSTHOOK: query: -- insert some data +LOAD DATA LOCAL INPATH "../data/files/string.txt" INTO TABLE tab_string +POSTHOOK: type: LOAD +POSTHOOK: Output: default@tab_string +PREHOOK: query: select count(*) from tab_string +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_string +#### A masked pattern was here #### +POSTHOOK: query: select count(*) from tab_string +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_string +#### A masked pattern was here #### +10 +PREHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_string +PREHOOK: type: QUERY +PREHOOK: Input: default@tab_string +#### A masked pattern was here #### +POSTHOOK: query: -- compute statistical summary of data +select compute_stats(a) from tab_string +POSTHOOK: type: QUERY +POSTHOOK: Input: default@tab_string +#### A masked pattern was here #### +{"columntype":"String","maxlength":11,"avglength":3.9,"countnulls":0,"numdistinctvalues":5} diff --git ql/src/test/results/clientpositive/show_functions.q.out ql/src/test/results/clientpositive/show_functions.q.out index 02f6a94..7f45981 100644 --- ql/src/test/results/clientpositive/show_functions.q.out +++ ql/src/test/results/clientpositive/show_functions.q.out @@ -36,6 +36,7 @@ ceil ceiling coalesce collect_set +compute_stats concat concat_ws context_ngrams @@ -182,6 +183,7 @@ ceil ceiling coalesce collect_set +compute_stats concat concat_ws context_ngrams diff --git ql/src/test/results/clientpositive/udaf_histogram.q.out ql/src/test/results/clientpositive/udaf_histogram.q.out new file mode 100644 index 0000000..8b13789 --- /dev/null +++ ql/src/test/results/clientpositive/udaf_histogram.q.out @@ -0,0 +1 @@ + diff --git serde/src/gen/thrift/gen-py/__init__.py serde/src/gen/thrift/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java index 5430814..b049294 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java +++ serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java @@ -665,7 +665,7 @@ public final class PrimitiveObjectInspectorUtils { /** * Get the String value out of a primitive object. Note that * NullPointerException will be thrown if o is null. Note that - * NumberFormatException will be thrown if o is not a valid number. + * RuntimeException will be thrown if o is not a valid string. */ public static String getString(Object o, PrimitiveObjectInspector oi) { diff --git service/src/gen/thrift/gen-py/__init__.py service/src/gen/thrift/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote service/src/gen/thrift/gen-py/hive_service/ThriftHive-remote old mode 100644 new mode 100755