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 c4c6640..3894382 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -194,6 +194,25 @@ struct Index { 10: bool deferredRebuild } +struct ColumnStatistics { + 1: string tableName, + 2: string colName, + 3: string colType, + 4: string dbName, + 5: string partName, + 6: double lowValue, + 7: double highValue, + 8: i64 numNulls, + 9: i64 numDVs, + 10: double avgColLen, + 11: i64 maxColLen, + 12: i64 numTrues, + 13: i64 numFalses, + 14: i64 lastAnalyzed, + 15: string histogram, + 16: bool isTblLevel + } + // schema of the table/query results etc. struct Schema { // column names, types, comments @@ -253,6 +272,10 @@ exception ConfigValSecurityException { 1: string message } +exception InvalidInputException { + 1: string message +} + /** * This interface is live. */ @@ -466,6 +489,26 @@ service ThriftHiveMetastore extends fb303.FacebookService throws(1:NoSuchObjectException o1, 2:MetaException o2) list get_index_names(1:string db_name, 2:string tbl_name, 3:i16 max_indexes=-1) throws(1:MetaException o2) + + // column statistics interfaces + + bool write_column_statistics(1:list stats_obj) throws (1:NoSuchObjectException o1, + 2:InvalidObjectException o2, 3:MetaException o3, 4:InvalidInputException o4) + + ColumnStatistics get_column_statistics_by_table(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_column_statistics_by_partition(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) + + bool delete_column_statistics_by_partition(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_column_statistics_by_table(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 diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp index 901af81..e123e53 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp @@ -13119,7 +13119,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_write_column_statistics_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13140,9 +13140,21 @@ uint32_t ThriftHiveMetastore_create_role_args::read(::apache::thrift::protocol:: switch (fid) { case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->role.read(iprot); - this->__isset.role = true; + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->stats_obj.clear(); + uint32_t _size552; + ::apache::thrift::protocol::TType _etype555; + iprot->readListBegin(_etype555, _size552); + this->stats_obj.resize(_size552); + uint32_t _i556; + for (_i556 = 0; _i556 < _size552; ++_i556) + { + xfer += this->stats_obj[_i556].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.stats_obj = true; } else { xfer += iprot->skip(ftype); } @@ -13159,29 +13171,45 @@ 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_write_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_write_column_statistics_args"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->stats_obj.size())); + std::vector ::const_iterator _iter557; + for (_iter557 = this->stats_obj.begin(); _iter557 != this->stats_obj.end(); ++_iter557) + { + xfer += (*_iter557).write(oprot); + } + xfer += oprot->writeListEnd(); + } 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_write_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_write_column_statistics_pargs"); + xfer += oprot->writeFieldBegin("stats_obj", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->stats_obj)).size())); + std::vector ::const_iterator _iter558; + for (_iter558 = (*(this->stats_obj)).begin(); _iter558 != (*(this->stats_obj)).end(); ++_iter558) + { + xfer += (*_iter558).write(oprot); + } + xfer += oprot->writeListEnd(); + } 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_write_column_statistics_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13217,6 +13245,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; @@ -13229,11 +13281,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_write_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_write_column_statistics_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -13243,13 +13295,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_write_column_statistics_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13285,6 +13349,30 @@ uint32_t ThriftHiveMetastore_create_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; @@ -13297,7 +13385,7 @@ uint32_t ThriftHiveMetastore_create_role_presult::read(::apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_column_statistics_by_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13319,8 +13407,24 @@ uint32_t ThriftHiveMetastore_drop_role_args::read(::apache::thrift::protocol::TP { 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->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); } @@ -13337,29 +13441,41 @@ 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_get_column_statistics_by_table_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_get_column_statistics_by_table_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_drop_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_column_statistics_by_table_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_get_column_statistics_by_table_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_drop_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_column_statistics_by_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13380,8 +13496,8 @@ uint32_t ThriftHiveMetastore_drop_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); @@ -13395,6 +13511,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; @@ -13407,27 +13547,39 @@ 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_get_column_statistics_by_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_column_statistics_by_table_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_drop_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_column_statistics_by_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13448,8 +13600,8 @@ uint32_t ThriftHiveMetastore_drop_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); @@ -13463,6 +13615,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; @@ -13475,7 +13651,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_column_statistics_by_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13495,6 +13671,38 @@ 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->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); + } + break; default: xfer += iprot->skip(ftype); break; @@ -13507,23 +13715,47 @@ 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_column_statistics_by_partition_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_column_statistics_by_partition_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("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_get_role_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_column_statistics_by_partition_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_column_statistics_by_partition_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("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_get_role_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_column_statistics_by_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13544,20 +13776,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 _size552; - ::apache::thrift::protocol::TType _etype555; - iprot->readListBegin(_etype555, _size552); - this->success.resize(_size552); - uint32_t _i556; - for (_i556 = 0; _i556 < _size552; ++_i556) - { - xfer += iprot->readString(this->success[_i556]); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -13571,6 +13791,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; @@ -13583,35 +13827,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_column_statistics_by_partition_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_column_statistics_by_partition_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 _iter557; - for (_iter557 = this->success.begin(); _iter557 != this->success.end(); ++_iter557) - { - xfer += oprot->writeString((*_iter557)); - } - 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_column_statistics_by_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13632,20 +13880,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 _size558; - ::apache::thrift::protocol::TType _etype561; - iprot->readListBegin(_etype561, _size558); - (*(this->success)).resize(_size558); - uint32_t _i562; - for (_i562 = 0; _i562 < _size558; ++_i562) - { - xfer += iprot->readString((*(this->success))[_i562]); - } - iprot->readListEnd(); - } + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -13659,6 +13895,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; @@ -13671,7 +13931,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_delete_column_statistics_by_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13693,52 +13953,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 ecast563; - xfer += iprot->readI32(ecast563); - this->principal_type = (PrincipalType::type)ecast563; - 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 ecast564; - xfer += iprot->readI32(ecast564); - this->grantorType = (PrincipalType::type)ecast564; - 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); } @@ -13755,59 +13995,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_delete_column_statistics_by_partition_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_delete_column_statistics_by_partition_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_delete_column_statistics_by_partition_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_delete_column_statistics_by_partition_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_delete_column_statistics_by_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13843,6 +14071,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; @@ -13855,11 +14107,11 @@ 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_delete_column_statistics_by_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_column_statistics_by_partition_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -13869,13 +14121,25 @@ uint32_t ThriftHiveMetastore_grant_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_grant_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_delete_column_statistics_by_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13911,6 +14175,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; @@ -13923,7 +14211,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_column_statistics_by_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -13945,26 +14233,24 @@ 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 ecast565; - xfer += iprot->readI32(ecast565); - this->principal_type = (PrincipalType::type)ecast565; - this->__isset.principal_type = true; + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->col_name); + this->__isset.col_name = true; } else { xfer += iprot->skip(ftype); } @@ -13981,41 +14267,41 @@ 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_column_statistics_by_table_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_column_statistics_by_table_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("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_revoke_role_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_delete_column_statistics_by_table_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_column_statistics_by_table_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("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_revoke_role_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_delete_column_statistics_by_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14051,6 +14337,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; @@ -14063,11 +14373,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_column_statistics_by_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_delete_column_statistics_by_table_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -14077,13 +14387,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_column_statistics_by_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14119,6 +14441,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; @@ -14131,7 +14477,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_create_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14152,19 +14498,9 @@ uint32_t ThriftHiveMetastore_list_roles_args::read(::apache::thrift::protocol::T switch (fid) { 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 ecast566; - xfer += iprot->readI32(ecast566); - this->principal_type = (PrincipalType::type)ecast566; - this->__isset.principal_type = true; + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->role.read(iprot); + this->__isset.role = true; } else { xfer += iprot->skip(ftype); } @@ -14181,35 +14517,29 @@ 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_create_role_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->writeFieldEnd(); - xfer += oprot->writeFieldBegin("principal_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)this->principal_type); + 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_list_roles_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_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("principal_type", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32((int32_t)(*(this->principal_type))); + 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_list_roles_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; @@ -14230,20 +14560,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 _size567; - ::apache::thrift::protocol::TType _etype570; - iprot->readListBegin(_etype570, _size567); - this->success.resize(_size567); - uint32_t _i571; - for (_i571 = 0; _i571 < _size567; ++_i571) - { - xfer += this->success[_i571].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); @@ -14269,23 +14587,15 @@ 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_create_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_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 _iter572; - for (_iter572 = this->success.begin(); _iter572 != this->success.end(); ++_iter572) - { - xfer += (*_iter572).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); @@ -14297,7 +14607,7 @@ uint32_t ThriftHiveMetastore_list_roles_result::write(::apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_list_roles_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; @@ -14318,20 +14628,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 _size573; - ::apache::thrift::protocol::TType _etype576; - iprot->readListBegin(_etype576, _size573); - (*(this->success)).resize(_size573); - uint32_t _i577; - for (_i577 = 0; _i577 < _size573; ++_i577) - { - xfer += (*(this->success))[_i577].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); @@ -14357,7 +14655,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_drop_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14378,37 +14676,9 @@ uint32_t ThriftHiveMetastore_get_privilege_set_args::read(::apache::thrift::prot 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->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 _size578; - ::apache::thrift::protocol::TType _etype581; - iprot->readListBegin(_etype581, _size578); - this->group_names.resize(_size578); - uint32_t _i582; - for (_i582 = 0; _i582 < _size578; ++_i582) - { - xfer += iprot->readString(this->group_names[_i582]); - } - iprot->readListEnd(); - } - this->__isset.group_names = true; + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; } else { xfer += iprot->skip(ftype); } @@ -14425,57 +14695,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_drop_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 _iter583; - for (_iter583 = this->group_names.begin(); _iter583 != this->group_names.end(); ++_iter583) - { - xfer += oprot->writeString((*_iter583)); - } - xfer += oprot->writeListEnd(); - } + 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_get_privilege_set_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_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 _iter584; - for (_iter584 = (*(this->group_names)).begin(); _iter584 != (*(this->group_names)).end(); ++_iter584) - { - xfer += oprot->writeString((*_iter584)); - } - xfer += oprot->writeListEnd(); - } + 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_get_privilege_set_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; @@ -14496,8 +14738,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); @@ -14523,15 +14765,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_drop_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_drop_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); @@ -14543,7 +14785,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_drop_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14564,8 +14806,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); @@ -14591,7 +14833,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_get_role_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14611,32 +14853,6 @@ uint32_t ThriftHiveMetastore_list_privileges_args::read(::apache::thrift::protoc } switch (fid) { - 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 ecast585; - xfer += iprot->readI32(ecast585); - this->principal_type = (PrincipalType::type)ecast585; - 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); - } - break; default: xfer += iprot->skip(ftype); break; @@ -14649,41 +14865,23 @@ 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_get_role_names_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->writeFieldEnd(); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_args"); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_list_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_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->writeStructBegin("ThriftHiveMetastore_get_role_names_pargs"); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_list_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; @@ -14707,14 +14905,14 @@ uint32_t ThriftHiveMetastore_list_privileges_result::read(::apache::thrift::prot 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) + 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 += this->success[_i590].read(iprot); + xfer += iprot->readString(this->success[_i563]); } iprot->readListEnd(); } @@ -14743,20 +14941,20 @@ 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_get_role_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_role_names_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 _iter591; - for (_iter591 = this->success.begin(); _iter591 != this->success.end(); ++_iter591) + 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 += (*_iter591).write(oprot); + xfer += oprot->writeString((*_iter564)); } xfer += oprot->writeListEnd(); } @@ -14771,7 +14969,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_get_role_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14795,14 +14993,14 @@ uint32_t ThriftHiveMetastore_list_privileges_presult::read(::apache::thrift::pro if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size592; - ::apache::thrift::protocol::TType _etype595; - iprot->readListBegin(_etype595, _size592); - (*(this->success)).resize(_size592); - uint32_t _i596; - for (_i596 = 0; _i596 < _size592; ++_i596) + 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 += (*(this->success))[_i596].read(iprot); + xfer += iprot->readString((*(this->success))[_i569]); } iprot->readListEnd(); } @@ -14831,7 +15029,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_grant_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -14852,9 +15050,53 @@ 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; + 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 ecast570; + xfer += iprot->readI32(ecast570); + this->principal_type = (PrincipalType::type)ecast570; + 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 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; } else { xfer += iprot->skip(ftype); } @@ -14871,29 +15113,59 @@ 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_grant_role_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->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_grant_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_grant_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_grant_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; @@ -14941,11 +15213,11 @@ 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_grant_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_role_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -14961,7 +15233,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_grant_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15009,7 +15281,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_revoke_role_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15030,9 +15302,27 @@ 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 ecast572; + xfer += iprot->readI32(ecast572); + this->principal_type = (PrincipalType::type)ecast572; + this->__isset.principal_type = true; } else { xfer += iprot->skip(ftype); } @@ -15049,29 +15339,41 @@ 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_revoke_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_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("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_revoke_privileges_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_revoke_privileges_pargs"); - xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->privileges)).write(oprot); + 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("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_revoke_privileges_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; @@ -15119,11 +15421,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_revoke_role_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_role_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); @@ -15139,7 +15441,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_revoke_role_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15187,7 +15489,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_list_roles_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15209,28 +15511,18 @@ 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->principal_name); + this->__isset.principal_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->group_names.clear(); - uint32_t _size597; - ::apache::thrift::protocol::TType _etype600; - iprot->readListBegin(_etype600, _size597); - this->group_names.resize(_size597); - uint32_t _i601; - for (_i601 = 0; _i601 < _size597; ++_i601) - { - xfer += iprot->readString(this->group_names[_i601]); - } - iprot->readListEnd(); - } - this->__isset.group_names = true; + 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; } else { xfer += iprot->skip(ftype); } @@ -15247,51 +15539,35 @@ 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_list_roles_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_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("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 _iter602; - for (_iter602 = this->group_names.begin(); _iter602 != this->group_names.end(); ++_iter602) - { - xfer += oprot->writeString((*_iter602)); - } - xfer += oprot->writeListEnd(); - } + 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_set_ugi_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_set_ugi_pargs"); - xfer += oprot->writeFieldBegin("user_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->user_name))); + 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("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 _iter603; - for (_iter603 = (*(this->group_names)).begin(); _iter603 != (*(this->group_names)).end(); ++_iter603) - { - xfer += oprot->writeString((*_iter603)); - } - xfer += oprot->writeListEnd(); - } + 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_set_ugi_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; @@ -15315,14 +15591,14 @@ uint32_t ThriftHiveMetastore_set_ugi_result::read(::apache::thrift::protocol::TP if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size604; - ::apache::thrift::protocol::TType _etype607; - iprot->readListBegin(_etype607, _size604); - this->success.resize(_size604); - uint32_t _i608; - for (_i608 = 0; _i608 < _size604; ++_i608) + 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 += iprot->readString(this->success[_i608]); + xfer += this->success[_i578].read(iprot); } iprot->readListEnd(); } @@ -15351,20 +15627,20 @@ 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_list_roles_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_set_ugi_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_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 _iter609; - for (_iter609 = this->success.begin(); _iter609 != this->success.end(); ++_iter609) + 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 += oprot->writeString((*_iter609)); + xfer += (*_iter579).write(oprot); } xfer += oprot->writeListEnd(); } @@ -15379,7 +15655,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_list_roles_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15403,14 +15679,14 @@ uint32_t ThriftHiveMetastore_set_ugi_presult::read(::apache::thrift::protocol::T if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size610; - ::apache::thrift::protocol::TType _etype613; - iprot->readListBegin(_etype613, _size610); - (*(this->success)).resize(_size610); - uint32_t _i614; - for (_i614 = 0; _i614 < _size610; ++_i614) + 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 += iprot->readString((*(this->success))[_i614]); + xfer += (*(this->success))[_i584].read(iprot); } iprot->readListEnd(); } @@ -15439,7 +15715,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_get_privilege_set_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15460,17 +15736,37 @@ uint32_t ThriftHiveMetastore_get_delegation_token_args::read(::apache::thrift::p switch (fid) { case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_owner); - this->__isset.token_owner = true; + 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->renewer_kerberos_principal_name); - this->__isset.renewer_kerberos_principal_name = 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 _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; } else { xfer += iprot->skip(ftype); } @@ -15487,35 +15783,57 @@ 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_get_privilege_set_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_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("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->renewer_kerberos_principal_name); + 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->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_get_privilege_set_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_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("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->renewer_kerberos_principal_name))); + 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->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_get_privilege_set_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15536,8 +15854,8 @@ 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_STRUCT) { + xfer += this->success.read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15563,15 +15881,15 @@ 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_get_privilege_set_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_privilege_set_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_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); @@ -15583,7 +15901,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_get_privilege_set_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15604,8 +15922,8 @@ 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_STRUCT) { + xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15631,7 +15949,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_list_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15653,8 +15971,26 @@ uint32_t ThriftHiveMetastore_renew_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 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; } else { xfer += iprot->skip(ftype); } @@ -15671,29 +16007,41 @@ 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_list_privileges_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_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->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_list_privileges_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_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_renew_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; @@ -15714,8 +16062,20 @@ 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_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(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -15741,15 +16101,23 @@ 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_list_privileges_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_privileges_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_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->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); @@ -15761,7 +16129,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_list_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15782,8 +16150,20 @@ 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_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); @@ -15809,7 +16189,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_grant_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15830,9 +16210,9 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_args::read(::apache::thrift switch (fid) { case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->token_str_form); - this->__isset.token_str_form = true; + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; } else { xfer += iprot->skip(ftype); } @@ -15849,29 +16229,29 @@ 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_grant_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_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; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_grant_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_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; } -uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_grant_privileges_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15891,6 +16271,14 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_result::read(::apache::thri } 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); @@ -15911,13 +16299,17 @@ 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_grant_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_grant_privileges_result"); - if (this->__isset.o1) { + 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(); @@ -15927,7 +16319,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_grant_privileges_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -15947,6 +16339,14 @@ uint32_t ThriftHiveMetastore_cancel_delegation_token_presult::read(::apache::thr } 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); @@ -15967,19 +16367,1289 @@ 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_revoke_privileges_args::read(::apache::thrift::protocol::TProtocol* iprot) { - ThriftHiveMetastore_create_database_pargs args; - args.database = &database; + 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 _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; + } 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 _iter609; + for (_iter609 = this->group_names.begin(); _iter609 != this->group_names.end(); ++_iter609) + { + xfer += oprot->writeString((*_iter609)); + } + 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 _iter610; + for (_iter610 = (*(this->group_names)).begin(); _iter610 != (*(this->group_names)).end(); ++_iter610) + { + xfer += oprot->writeString((*_iter610)); + } + 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 _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(); + } + 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 _iter616; + for (_iter616 = this->success.begin(); _iter616 != this->success.end(); ++_iter616) + { + xfer += oprot->writeString((*_iter616)); + } + 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 _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_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(); @@ -15987,7 +17657,7 @@ void ThriftHiveMetastoreClient::send_create_database(const Database& database) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_create_database() +void ThriftHiveMetastoreClient::recv_alter_database() { int32_t rseqid = 0; @@ -16007,12 +17677,12 @@ void ThriftHiveMetastoreClient::recv_create_database() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_database") != 0) { + if (fname.compare("alter_database") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_create_database_presult result; + ThriftHiveMetastore_alter_database_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); @@ -16023,24 +17693,21 @@ void ThriftHiveMetastoreClient::recv_create_database() 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) +void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) { - send_get_database(name); - recv_get_database(_return); + send_get_type(name); + recv_get_type(_return); } -void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +void ThriftHiveMetastoreClient::send_get_type(const std::string& name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_database_pargs args; + ThriftHiveMetastore_get_type_pargs args; args.name = &name; args.write(oprot_); @@ -16049,7 +17716,7 @@ void ThriftHiveMetastoreClient::send_get_database(const std::string& name) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +void ThriftHiveMetastoreClient::recv_get_type(Type& _return) { int32_t rseqid = 0; @@ -16069,12 +17736,12 @@ void ThriftHiveMetastoreClient::recv_get_database(Database& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_database") != 0) { + if (fname.compare("get_type") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_database_presult result; + ThriftHiveMetastore_get_type_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16090,24 +17757,22 @@ void ThriftHiveMetastoreClient::recv_get_database(Database& _return) if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); } -void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData, const bool cascade) +bool ThriftHiveMetastoreClient::create_type(const Type& type) { - send_drop_database(name, deleteData, cascade); - recv_drop_database(); + send_create_type(type); + return recv_create_type(); } -void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData, const bool cascade) +void ThriftHiveMetastoreClient::send_create_type(const Type& type) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; - args.cascade = &cascade; + ThriftHiveMetastore_create_type_pargs args; + args.type = &type; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16115,7 +17780,7 @@ void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_drop_database() +bool ThriftHiveMetastoreClient::recv_create_type() { int32_t rseqid = 0; @@ -16135,16 +17800,21 @@ void ThriftHiveMetastoreClient::recv_drop_database() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_database") != 0) { + if (fname.compare("create_type") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_drop_database_presult result; + bool _return; + ThriftHiveMetastore_create_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; } @@ -16154,22 +17824,22 @@ void ThriftHiveMetastoreClient::recv_drop_database() if (result.__isset.o3) { throw result.o3; } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); } -void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +bool ThriftHiveMetastoreClient::drop_type(const std::string& type) { - send_get_databases(pattern); - recv_get_databases(_return); + send_drop_type(type); + return recv_drop_type(); } -void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; + ThriftHiveMetastore_drop_type_pargs args; + args.type = &type; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16177,7 +17847,7 @@ void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_drop_type() { int32_t rseqid = 0; @@ -16197,39 +17867,43 @@ void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _r iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_databases") != 0) { + if (fname.compare("drop_type") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_databases_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 pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); } -void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) { - send_get_all_databases(); - recv_get_all_databases(_return); + send_get_type_all(name); + recv_get_type_all(_return); } -void ThriftHiveMetastoreClient::send_get_all_databases() +void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_databases_pargs args; + ThriftHiveMetastore_get_type_all_pargs args; + args.name = &name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16237,7 +17911,7 @@ void ThriftHiveMetastoreClient::send_get_all_databases() oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) { int32_t rseqid = 0; @@ -16257,12 +17931,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_type_all") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_all_databases_presult result; + ThriftHiveMetastore_get_type_all_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16272,26 +17946,26 @@ void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector // _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_all_databases failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db) +void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) { - send_alter_database(dbname, db); - recv_alter_database(); + send_get_fields(db_name, table_name); + recv_get_fields(_return); } -void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db) +void ThriftHiveMetastoreClient::send_get_fields(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_fields", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_database_pargs args; - args.dbname = &dbname; - args.db = &db; + ThriftHiveMetastore_get_fields_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16299,7 +17973,7 @@ void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, c oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_database() +void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) { int32_t rseqid = 0; @@ -16319,38 +17993,47 @@ void ThriftHiveMetastoreClient::recv_alter_database() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_database") != 0) { + if (fname.compare("get_fields") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_database_presult result; + ThriftHiveMetastore_get_fields_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_fields failed: unknown result"); } -void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) { - send_get_type(name); - recv_get_type(_return); + send_get_schema(db_name, table_name); + recv_get_schema(_return); } -void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_pargs args; - args.name = &name; + ThriftHiveMetastore_get_schema_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16358,7 +18041,7 @@ void ThriftHiveMetastoreClient::send_get_type(const std::string& name) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) { int32_t rseqid = 0; @@ -16378,12 +18061,12 @@ void ThriftHiveMetastoreClient::recv_get_type(Type& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_type") != 0) { + if (fname.compare("get_schema") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_type_presult result; + ThriftHiveMetastore_get_schema_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16399,22 +18082,25 @@ void ThriftHiveMetastoreClient::recv_get_type(Type& _return) 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; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); } -bool ThriftHiveMetastoreClient::create_type(const Type& type) +void ThriftHiveMetastoreClient::create_table(const Table& tbl) { - send_create_type(type); - return recv_create_type(); + send_create_table(tbl); + recv_create_table(); } -void ThriftHiveMetastoreClient::send_create_type(const Type& type) +void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_type_pargs args; - args.type = &type; + ThriftHiveMetastore_create_table_pargs args; + args.tbl = &tbl; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16422,7 +18108,7 @@ void ThriftHiveMetastoreClient::send_create_type(const Type& type) oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_create_type() +void ThriftHiveMetastoreClient::recv_create_table() { int32_t rseqid = 0; @@ -16442,21 +18128,16 @@ bool ThriftHiveMetastoreClient::recv_create_type() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_type") != 0) { + if (fname.compare("create_table") != 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_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } if (result.__isset.o1) { throw result.o1; } @@ -16466,22 +18147,26 @@ 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::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { - send_drop_type(type); - return recv_drop_type(); + send_create_table_with_environment_context(tbl, environment_context); + recv_create_table_with_environment_context(); } -void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_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(); @@ -16489,7 +18174,7 @@ void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_type() +void ThriftHiveMetastoreClient::recv_create_table_with_environment_context() { int32_t rseqid = 0; @@ -16509,43 +18194,46 @@ bool ThriftHiveMetastoreClient::recv_drop_type() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_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_drop_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; } if (result.__isset.o2) { throw result.o2; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; } -void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { - send_get_type_all(name); - recv_get_type_all(_return); + send_drop_table(dbname, name, deleteData); + recv_drop_table(); } -void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_all_pargs args; + ThriftHiveMetastore_drop_table_pargs args; + args.dbname = &dbname; args.name = &name; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16553,7 +18241,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_drop_table() { int32_t rseqid = 0; @@ -16573,41 +18261,39 @@ void ThriftHiveMetastoreClient::recv_get_type_all(std::map & iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_type_all") != 0) { + if (fname.compare("drop_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_type_all_presult result; - result.success = &_return; + ThriftHiveMetastore_drop_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; + if (result.__isset.o3) { + throw result.o3; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); + return; } -void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) { - send_get_fields(db_name, table_name); - recv_get_fields(_return); + send_get_tables(db_name, pattern); + recv_get_tables(_return); } -void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_fields_pargs args; + ThriftHiveMetastore_get_tables_pargs args; args.db_name = &db_name; - args.table_name = &table_name; + args.pattern = &pattern; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16615,7 +18301,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_tables(std::vector & _return) { int32_t rseqid = 0; @@ -16635,12 +18321,12 @@ void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _retu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_fields") != 0) { + if (fname.compare("get_tables") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_fields_presult result; + ThriftHiveMetastore_get_tables_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16653,29 +18339,22 @@ 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_tables failed: unknown result"); } -void ThriftHiveMetastoreClient::get_schema(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_schema(db_name, table_name); - recv_get_schema(_return); + send_get_all_tables(db_name); + recv_get_all_tables(_return); } -void ThriftHiveMetastoreClient::send_get_schema(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_schema", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_schema_pargs args; + ThriftHiveMetastore_get_all_tables_pargs args; args.db_name = &db_name; - args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16683,7 +18362,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_all_tables(std::vector & _return) { int32_t rseqid = 0; @@ -16703,12 +18382,12 @@ void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _retu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_schema") != 0) { + if (fname.compare("get_all_tables") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_schema_presult result; + ThriftHiveMetastore_get_all_tables_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -16721,28 +18400,23 @@ void ThriftHiveMetastoreClient::recv_get_schema(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_schema failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table(const Table& tbl) +void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) { - send_create_table(tbl); - recv_create_table(); + send_get_table(dbname, tbl_name); + recv_get_table(_return); } -void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; + ThriftHiveMetastore_get_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16750,7 +18424,7 @@ void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_create_table() +void ThriftHiveMetastoreClient::recv_get_table(Table& _return) { int32_t rseqid = 0; @@ -16770,45 +18444,44 @@ void ThriftHiveMetastoreClient::recv_create_table() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("create_table") != 0) { + if (fname.compare("get_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_create_table_presult result; + ThriftHiveMetastore_get_table_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; - } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::get_table_objects_by_name(std::vector & _return, const std::string& dbname, const std::vector & tbl_names) { - send_create_table_with_environment_context(tbl, environment_context); - recv_create_table_with_environment_context(); + send_get_table_objects_by_name(dbname, tbl_names); + recv_get_table_objects_by_name(_return); } -void ThriftHiveMetastoreClient::send_create_table_with_environment_context(const Table& tbl, const EnvironmentContext& environment_context) +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_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_objects_by_name", ::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_objects_by_name_pargs args; + args.dbname = &dbname; + args.tbl_names = &tbl_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16816,7 +18489,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_objects_by_name(std::vector
& _return) { int32_t rseqid = 0; @@ -16836,16 +18509,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_objects_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_create_table_with_environment_context_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; } @@ -16855,27 +18533,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_objects_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::get_table_names_by_filter(std::vector & _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) { - send_drop_table(dbname, name, deleteData); - recv_drop_table(); + send_get_table_names_by_filter(dbname, filter, max_tables); + recv_get_table_names_by_filter(_return); } -void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +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("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_table_pargs args; + ThriftHiveMetastore_get_table_names_by_filter_pargs args; args.dbname = &dbname; - args.name = &name; - args.deleteData = &deleteData; + args.filter = &filter; + args.max_tables = &max_tables; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16883,7 +18558,7 @@ void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_drop_table() +void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vector & _return) { int32_t rseqid = 0; @@ -16903,39 +18578,48 @@ void ThriftHiveMetastoreClient::recv_drop_table() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_table") != 0) { + if (fname.compare("get_table_names_by_filter") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_drop_table_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; } + if (result.__isset.o2) { + throw result.o2; + } if (result.__isset.o3) { throw result.o3; } - return; + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table_names_by_filter failed: unknown result"); } -void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { - send_get_tables(db_name, pattern); - recv_get_tables(_return); + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); } -void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_tables_pargs args; - args.db_name = &db_name; - args.pattern = &pattern; + ThriftHiveMetastore_alter_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; args.write(oprot_); oprot_->writeMessageEnd(); @@ -16943,7 +18627,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() { int32_t rseqid = 0; @@ -16963,40 +18647,41 @@ void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _retu iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_tables") != 0) { + if (fname.compare("alter_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_tables_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_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; } - 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::alter_table_with_environment_context(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl, const EnvironmentContext& environment_context) { - send_get_all_tables(db_name); - recv_get_all_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_all_tables(const std::string& db_name) +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_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_tables_pargs args; - args.db_name = &db_name; + 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(); @@ -17004,7 +18689,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_alter_table_with_environment_context() { int32_t rseqid = 0; @@ -17024,41 +18709,38 @@ void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _ iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_all_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_all_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_all_tables failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + return; } -void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) { - send_get_table(dbname, tbl_name); - recv_get_table(_return); + send_add_partition(new_part); + recv_add_partition(_return); } -void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; + ThriftHiveMetastore_add_partition_pargs args; + args.new_part = &new_part; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17066,7 +18748,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(Partition& _return) { int32_t rseqid = 0; @@ -17086,12 +18768,12 @@ void ThriftHiveMetastoreClient::recv_get_table(Table& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_table") != 0) { + if (fname.compare("add_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_presult result; + ThriftHiveMetastore_add_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17107,23 +18789,26 @@ 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 failed: unknown result"); } -void ThriftHiveMetastoreClient::get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::vector & tbl_names) +void ThriftHiveMetastoreClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) { - send_get_table_objects_by_name(dbname, tbl_names); - recv_get_table_objects_by_name(_return); + send_add_partition_with_environment_context(new_part, environment_context); + recv_add_partition_with_environment_context(_return); } -void ThriftHiveMetastoreClient::send_get_table_objects_by_name(const std::string& dbname, const std::vector & tbl_names) +void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_objects_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_objects_by_name_pargs args; - args.dbname = &dbname; - args.tbl_names = &tbl_names; + ThriftHiveMetastore_add_partition_with_environment_context_pargs args; + args.new_part = &new_part; + args.environment_context = &environment_context; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17131,7 +18816,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) +void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Partition& _return) { int32_t rseqid = 0; @@ -17151,12 +18836,12 @@ 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_partition_with_environment_context") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_objects_by_name_presult result; + ThriftHiveMetastore_add_partition_with_environment_context_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17175,24 +18860,22 @@ void ThriftHiveMetastoreClient::recv_get_table_objects_by_name(std::vector
& _return, const std::string& dbname, const std::string& filter, const int16_t max_tables) +int32_t ThriftHiveMetastoreClient::add_partitions(const std::vector & new_parts) { - send_get_table_names_by_filter(dbname, filter, max_tables); - recv_get_table_names_by_filter(_return); + send_add_partitions(new_parts); + return recv_add_partitions(); } -void ThriftHiveMetastoreClient::send_get_table_names_by_filter(const std::string& dbname, const std::string& filter, const int16_t max_tables) +void ThriftHiveMetastoreClient::send_add_partitions(const std::vector & new_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table_names_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partitions", ::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_add_partitions_pargs args; + args.new_parts = &new_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17200,7 +18883,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) +int32_t ThriftHiveMetastoreClient::recv_add_partitions() { int32_t rseqid = 0; @@ -17220,20 +18903,20 @@ 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("add_partitions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_table_names_by_filter_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; @@ -17244,24 +18927,24 @@ void ThriftHiveMetastoreClient::recv_get_table_names_by_filter(std::vector & part_vals) { - send_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(); + send_append_partition(db_name, tbl_name, part_vals); + recv_append_partition(_return); } -void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +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("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_table_pargs args; - args.dbname = &dbname; + ThriftHiveMetastore_append_partition_pargs args; + args.db_name = &db_name; args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; + args.part_vals = &part_vals; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17269,7 +18952,7 @@ void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_table() +void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) { int32_t rseqid = 0; @@ -17289,41 +18972,48 @@ void ThriftHiveMetastoreClient::recv_alter_table() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_table") != 0) { + if (fname.compare("append_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_table_presult result; + ThriftHiveMetastore_append_partition_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 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) +void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - send_alter_table_with_environment_context(dbname, tbl_name, new_tbl, environment_context); - recv_alter_table_with_environment_context(); + send_append_partition_by_name(db_name, tbl_name, part_name); + recv_append_partition_by_name(_return); } -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_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_table_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_table_with_environment_context_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.environment_context = &environment_context; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17331,7 +19021,7 @@ void ThriftHiveMetastoreClient::send_alter_table_with_environment_context(const oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_table_with_environment_context() +void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) { int32_t rseqid = 0; @@ -17351,38 +19041,49 @@ 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("append_partition_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_table_with_environment_context_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::add_partition(Partition& _return, const Partition& new_part) +bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) { - send_add_partition(new_part); - recv_add_partition(_return); + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); } -void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +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("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partition_pargs args; - args.new_part = &new_part; + ThriftHiveMetastore_drop_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17390,7 +19091,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() { int32_t rseqid = 0; @@ -17410,20 +19111,20 @@ void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_partition") != 0) { + if (fname.compare("drop_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_partition_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 pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; @@ -17431,26 +19132,25 @@ 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 failed: unknown result"); } -void ThriftHiveMetastoreClient::add_partition_with_environment_context(Partition& _return, const Partition& new_part, const EnvironmentContext& environment_context) +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_with_environment_context(new_part, environment_context); - recv_add_partition_with_environment_context(_return); + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); } -void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(const Partition& new_part, const EnvironmentContext& environment_context) +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_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition_by_name", ::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_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(); @@ -17458,7 +19158,7 @@ void ThriftHiveMetastoreClient::send_add_partition_with_environment_context(cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_add_partition_with_environment_context(Partition& _return) +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() { int32_t rseqid = 0; @@ -17478,20 +19178,20 @@ 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("drop_partition_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_partition_with_environment_context_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; @@ -17499,25 +19199,24 @@ 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, "drop_partition_by_name failed: unknown result"); } -int32_t ThriftHiveMetastoreClient::add_partitions(const std::vector & new_parts) +void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) { - send_add_partitions(new_parts); - return recv_add_partitions(); + send_get_partition(db_name, tbl_name, part_vals); + recv_get_partition(_return); } -void ThriftHiveMetastoreClient::send_add_partitions(const std::vector & new_parts) +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_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partitions_pargs args; - args.new_parts = &new_parts; + 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(); @@ -17525,7 +19224,7 @@ void ThriftHiveMetastoreClient::send_add_partitions(const std::vector oprot_->getTransport()->flush(); } -int32_t ThriftHiveMetastoreClient::recv_add_partitions() +void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) { int32_t rseqid = 0; @@ -17545,20 +19244,20 @@ int32_t ThriftHiveMetastoreClient::recv_add_partitions() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_partitions") != 0) { + if (fname.compare("get_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - int32_t _return; - ThriftHiveMetastore_add_partitions_presult result; + ThriftHiveMetastore_get_partition_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; @@ -17566,27 +19265,26 @@ 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 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_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_append_partition(db_name, tbl_name, part_vals); - recv_append_partition(_return); + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); + recv_get_partition_with_auth(_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_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("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_pargs args; + 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(); @@ -17594,7 +19292,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_with_auth(Partition& _return) { int32_t rseqid = 0; @@ -17614,12 +19312,12 @@ void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("append_partition") != 0) { + if (fname.compare("get_partition_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_append_partition_presult result; + ThriftHiveMetastore_get_partition_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17635,24 +19333,21 @@ 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_with_auth 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_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { - send_append_partition_by_name(db_name, tbl_name, part_name); - recv_append_partition_by_name(_return); + send_get_partition_by_name(db_name, tbl_name, part_name); + recv_get_partition_by_name(_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_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_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_by_name_pargs args; + ThriftHiveMetastore_get_partition_by_name_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; args.part_name = &part_name; @@ -17663,7 +19358,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_partition_by_name(Partition& _return) { int32_t rseqid = 0; @@ -17683,12 +19378,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_partition_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_append_partition_by_name_presult result; + ThriftHiveMetastore_get_partition_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17704,28 +19399,24 @@ 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_partition_by_name 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(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); + send_get_partitions(db_name, tbl_name, max_parts); + recv_get_partitions(_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(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_pargs args; + ThriftHiveMetastore_get_partitions_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.write(oprot_); oprot_->writeMessageEnd(); @@ -17733,7 +19424,7 @@ void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_drop_partition() +void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) { int32_t rseqid = 0; @@ -17753,20 +19444,20 @@ bool ThriftHiveMetastoreClient::recv_drop_partition() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_partition") != 0) { + if (fname.compare("get_partitions") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_partition_presult result; + ThriftHiveMetastore_get_partitions_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; @@ -17774,25 +19465,26 @@ 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 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_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_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); + 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_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, 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_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_by_name_pargs args; + ThriftHiveMetastore_get_partitions_with_auth_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.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17800,7 +19492,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_partitions_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -17820,20 +19512,20 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("drop_partition_by_name") != 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_by_name_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; @@ -17841,24 +19533,24 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() 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_partitions_with_auth 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_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return); + send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_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_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_pargs args; + ThriftHiveMetastore_get_partition_names_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(); @@ -17866,7 +19558,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_partition_names(std::vector & _return) { int32_t rseqid = 0; @@ -17886,12 +19578,12 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition") != 0) { + if (fname.compare("get_partition_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_presult result; + ThriftHiveMetastore_get_partition_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17901,32 +19593,28 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) // _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 failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names 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(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_with_auth(db_name, tbl_name, part_vals, user_name, group_names); - recv_get_partition_with_auth(_return); + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_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(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_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_with_auth_pargs args; + ThriftHiveMetastore_get_partitions_ps_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.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -17934,7 +19622,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(std::vector & _return) { int32_t rseqid = 0; @@ -17954,12 +19642,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") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_with_auth_presult result; + ThriftHiveMetastore_get_partitions_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -17975,24 +19663,27 @@ 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 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_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_by_name(db_name, tbl_name, part_name); - recv_get_partition_by_name(_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_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +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_by_name", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_by_name_pargs args; + ThriftHiveMetastore_get_partitions_ps_with_auth_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.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18000,7 +19691,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_partitions_ps_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -18020,12 +19711,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_partitions_ps_with_auth") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_by_name_presult result; + ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18041,23 +19732,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_partitions_ps_with_auth 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_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_partitions(db_name, tbl_name, max_parts); - recv_get_partitions(_return); + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partition_names_ps(_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_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_partitions", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_pargs args; + ThriftHiveMetastore_get_partition_names_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_); @@ -18066,7 +19758,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_partition_names_ps(std::vector & _return) { int32_t rseqid = 0; @@ -18086,12 +19778,12 @@ void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _re iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partitions") != 0) { + if (fname.compare("get_partition_names_ps") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_presult result; + ThriftHiveMetastore_get_partition_names_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18107,26 +19799,25 @@ 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_partition_names_ps 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_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_with_auth(db_name, tbl_name, max_parts, user_name, group_names); - recv_get_partitions_with_auth(_return); + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_partitions_by_filter(_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_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_with_auth", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_with_auth_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.user_name = &user_name; - args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18134,7 +19825,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_filter(std::vector & _return) { int32_t rseqid = 0; @@ -18154,12 +19845,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_filter") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_with_auth_presult result; + ThriftHiveMetastore_get_partitions_by_filter_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18175,24 +19866,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::get_partitions_by_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & names) { - send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return); + send_get_partitions_by_names(db_name, tbl_name, names); + recv_get_partitions_by_names(_return); } -void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +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_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_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.names = &names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18200,7 +19891,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_get_partitions_by_names(std::vector & _return) { int32_t rseqid = 0; @@ -18220,12 +19911,12 @@ void ThriftHiveMetastoreClient::recv_get_partition_names(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_partition_names") != 0) { + if (fname.compare("get_partitions_by_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partition_names_presult result; + ThriftHiveMetastore_get_partitions_by_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18235,28 +19926,30 @@ void ThriftHiveMetastoreClient::recv_get_partition_names(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_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_ps(_return); + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); } -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_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_ps_pargs args; + ThriftHiveMetastore_alter_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(); @@ -18264,7 +19957,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_partition() { int32_t rseqid = 0; @@ -18284,48 +19977,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_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_partitions_ps_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_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(); @@ -18333,7 +20019,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; @@ -18353,46 +20039,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(); @@ -18400,7 +20081,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; @@ -18420,46 +20101,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(); @@ -18467,7 +20141,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; @@ -18487,12 +20161,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(); @@ -18505,27 +20179,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(); @@ -18533,7 +20202,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; @@ -18553,12 +20222,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(); @@ -18571,27 +20240,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(); @@ -18599,7 +20263,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; @@ -18619,41 +20283,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_partition_with_environment_context(const std::string& db_name, const std::string& tbl_name, const Partition& new_part, const EnvironmentContext& environment_context) +void ThriftHiveMetastoreClient::markPartitionForEvent(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_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); + recv_markPartitionForEvent(); } -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_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_partition_with_environment_context", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partition_with_environment_context_pargs args; + ThriftHiveMetastore_markPartitionForEvent_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(); @@ -18661,7 +20327,7 @@ void ThriftHiveMetastoreClient::send_alter_partition_with_environment_context(co oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() +void ThriftHiveMetastoreClient::recv_markPartitionForEvent() { int32_t rseqid = 0; @@ -18681,12 +20347,12 @@ 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("markPartitionForEvent") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_partition_with_environment_context_presult result; + ThriftHiveMetastore_markPartitionForEvent_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); @@ -18697,25 +20363,37 @@ void ThriftHiveMetastoreClient::recv_alter_partition_with_environment_context() 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::rename_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const Partition& new_part) +bool ThriftHiveMetastoreClient::isPartitionMarkedForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) { - send_rename_partition(db_name, tbl_name, part_vals, new_part); - recv_rename_partition(); + send_isPartitionMarkedForEvent(db_name, tbl_name, part_vals, eventType); + return recv_isPartitionMarkedForEvent(); } -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_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("rename_partition", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("isPartitionMarkedForEvent", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_rename_partition_pargs args; + ThriftHiveMetastore_isPartitionMarkedForEvent_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; args.part_vals = &part_vals; - args.new_part = &new_part; + args.eventType = &eventType; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18723,7 +20401,7 @@ void ThriftHiveMetastoreClient::send_rename_partition(const std::string& db_name oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_rename_partition() +bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() { int32_t rseqid = 0; @@ -18743,39 +20421,56 @@ void ThriftHiveMetastoreClient::recv_rename_partition() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("rename_partition") != 0) { + if (fname.compare("isPartitionMarkedForEvent") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_rename_partition_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::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) { - send_get_config_value(name, defaultValue); - recv_get_config_value(_return); + send_add_index(new_index, index_table); + recv_add_index(_return); } -void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18783,7 +20478,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_add_index(Index& _return) { int32_t rseqid = 0; @@ -18803,12 +20498,12 @@ void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_config_value") != 0) { + if (fname.compare("add_index") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_config_value_presult result; + ThriftHiveMetastore_add_index_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -18821,22 +20516,31 @@ void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _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; + } + if (result.__isset.o3) { + throw result.o3; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) +void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { - send_partition_name_to_vals(part_name); - recv_partition_name_to_vals(_return); + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); } -void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) +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("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_vals_pargs args; - args.part_name = &part_name; + 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(); @@ -18844,7 +20548,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) +void ThriftHiveMetastoreClient::recv_alter_index() { int32_t rseqid = 0; @@ -18864,40 +20568,41 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vectorreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("partition_name_to_vals") != 0) { + if (fname.compare("alter_index") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_partition_name_to_vals_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, "partition_name_to_vals failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + return; } -void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _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_spec(part_name); - recv_partition_name_to_spec(_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_spec(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_spec", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_spec_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(); @@ -18905,7 +20610,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) +bool ThriftHiveMetastoreClient::recv_drop_index_by_name() { int32_t rseqid = 0; @@ -18925,43 +20630,45 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::mapreadMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("partition_name_to_spec") != 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_spec_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_spec 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::markPartitionForEvent(const std::string& db_name, const std::string& tbl_name, const std::map & part_vals, const PartitionEventType::type eventType) +void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { - send_markPartitionForEvent(db_name, tbl_name, part_vals, eventType); - recv_markPartitionForEvent(); + send_get_index_by_name(db_name, tbl_name, index_name); + recv_get_index_by_name(_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_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("markPartitionForEvent", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_markPartitionForEvent_pargs args; + ThriftHiveMetastore_get_index_by_name_pargs args; args.db_name = &db_name; args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.eventType = &eventType; + args.index_name = &index_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -18969,7 +20676,7 @@ void ThriftHiveMetastoreClient::send_markPartitionForEvent(const std::string& db oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_markPartitionForEvent() +void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) { int32_t rseqid = 0; @@ -18989,53 +20696,45 @@ void ThriftHiveMetastoreClient::recv_markPartitionForEvent() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("markPartitionForEvent") != 0) { + if (fname.compare("get_index_by_name") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_markPartitionForEvent_presult result; + ThriftHiveMetastore_get_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; + } 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_index_by_name 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_indexes(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_indexes(db_name, tbl_name, max_indexes); + recv_get_indexes(_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_indexes(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_indexes", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_isPartitionMarkedForEvent_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(); @@ -19043,7 +20742,7 @@ void ThriftHiveMetastoreClient::send_isPartitionMarkedForEvent(const std::string oprot_->getTransport()->flush(); } -bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() +void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) { int32_t rseqid = 0; @@ -19063,20 +20762,20 @@ bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("isPartitionMarkedForEvent") != 0) { + if (fname.compare("get_indexes") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_isPartitionMarkedForEvent_presult result; + ThriftHiveMetastore_get_indexes_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; @@ -19084,35 +20783,24 @@ bool ThriftHiveMetastoreClient::recv_isPartitionMarkedForEvent() 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_indexes failed: unknown result"); } -void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) +void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_add_index(new_index, index_table); - recv_add_index(_return); + send_get_index_names(db_name, tbl_name, max_indexes); + recv_get_index_names(_return); } -void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) +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("add_index", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; + ThriftHiveMetastore_get_index_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19120,7 +20808,7 @@ void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Tab oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_add_index(Index& _return) +void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) { int32_t rseqid = 0; @@ -19140,12 +20828,12 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("add_index") != 0) { + if (fname.compare("get_index_names") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_add_index_presult result; + ThriftHiveMetastore_get_index_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -19155,34 +20843,25 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return) // _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; - } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names 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::write_column_statistics(const std::vector & stats_obj) { - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); + send_write_column_statistics(stats_obj); + return recv_write_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_write_column_statistics(const std::vector & stats_obj) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("write_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_write_column_statistics_pargs args; + args.stats_obj = &stats_obj; args.write(oprot_); oprot_->writeMessageEnd(); @@ -19190,7 +20869,7 @@ void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, cons oprot_->getTransport()->flush(); } -void ThriftHiveMetastoreClient::recv_alter_index() +bool ThriftHiveMetastoreClient::recv_write_column_statistics() { int32_t rseqid = 0; @@ -19210,41 +20889,51 @@ void ThriftHiveMetastoreClient::recv_alter_index() iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("alter_index") != 0) { + if (fname.compare("write_column_statistics") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_alter_index_presult result; + bool _return; + ThriftHiveMetastore_write_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, "write_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_column_statistics_by_table(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_column_statistics_by_table(db_name, tbl_name, col_name); + recv_get_column_statistics_by_table(_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_column_statistics_by_table(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_column_statistics_by_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_index_by_name_pargs args; + ThriftHiveMetastore_get_column_statistics_by_table_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(); @@ -19252,7 +20941,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_column_statistics_by_table(ColumnStatistics& _return) { int32_t rseqid = 0; @@ -19272,20 +20961,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_column_statistics_by_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - bool _return; - ThriftHiveMetastore_drop_index_by_name_presult result; + ThriftHiveMetastore_get_column_statistics_by_table_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; @@ -19293,24 +20982,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_column_statistics_by_table 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_column_statistics_by_partition(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_column_statistics_by_partition(db_name, tbl_name, part_name, col_name); + recv_get_column_statistics_by_partition(_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_column_statistics_by_partition(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_column_statistics_by_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_index_by_name_pargs args; + ThriftHiveMetastore_get_column_statistics_by_partition_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(); @@ -19318,7 +21014,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_column_statistics_by_partition(ColumnStatistics& _return) { int32_t rseqid = 0; @@ -19338,12 +21034,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_column_statistics_by_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_index_by_name_presult result; + ThriftHiveMetastore_get_column_statistics_by_partition_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -19359,24 +21055,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_column_statistics_by_partition 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_column_statistics_by_partition(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_column_statistics_by_partition(db_name, tbl_name, part_name, col_name); + return recv_delete_column_statistics_by_partition(); } -void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +void ThriftHiveMetastoreClient::send_delete_column_statistics_by_partition(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_column_statistics_by_partition", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_indexes_pargs args; + ThriftHiveMetastore_delete_column_statistics_by_partition_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(); @@ -19384,7 +21087,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_column_statistics_by_partition() { int32_t rseqid = 0; @@ -19404,20 +21107,20 @@ void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - if (fname.compare("get_indexes") != 0) { + if (fname.compare("delete_column_statistics_by_partition") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_indexes_presult result; + bool _return; + ThriftHiveMetastore_delete_column_statistics_by_partition_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; @@ -19425,24 +21128,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_column_statistics_by_partition 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_column_statistics_by_table(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_column_statistics_by_table(db_name, tbl_name, col_name); + return recv_delete_column_statistics_by_table(); } -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_column_statistics_by_table(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_column_statistics_by_table", ::apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_index_names_pargs args; + ThriftHiveMetastore_delete_column_statistics_by_table_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(); @@ -19450,7 +21159,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_column_statistics_by_table() { int32_t rseqid = 0; @@ -19470,25 +21179,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_column_statistics_by_table") != 0) { iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); } - ThriftHiveMetastore_get_index_names_presult result; + bool _return; + ThriftHiveMetastore_delete_column_statistics_by_table_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; } - throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names 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_column_statistics_by_table failed: unknown result"); } bool ThriftHiveMetastoreClient::create_role(const Role& role) @@ -23661,6 +25379,336 @@ void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apac } } +void ThriftHiveMetastoreProcessor::process_write_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.write_column_statistics", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.write_column_statistics"); + + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.write_column_statistics"); + } + + ThriftHiveMetastore_write_column_statistics_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.write_column_statistics", bytes); + } + + ThriftHiveMetastore_write_column_statistics_result result; + try { + result.success = iface_->write_column_statistics(args.stats_obj); + result.__isset.success = true; + } catch (NoSuchObjectException &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 (InvalidInputException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + if (eventHandler_.get() != NULL) { + eventHandler_->handlerError(ctx, "ThriftHiveMetastore.write_column_statistics"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("write_column_statistics", ::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.write_column_statistics"); + } + + oprot->writeMessageBegin("write_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.write_column_statistics", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_column_statistics_by_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_column_statistics_by_table", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_column_statistics_by_table"); + + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_column_statistics_by_table"); + } + + ThriftHiveMetastore_get_column_statistics_by_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_column_statistics_by_table", bytes); + } + + ThriftHiveMetastore_get_column_statistics_by_table_result result; + try { + iface_->get_column_statistics_by_table(result.success, 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 (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_column_statistics_by_table"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_column_statistics_by_table", ::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_column_statistics_by_table"); + } + + oprot->writeMessageBegin("get_column_statistics_by_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_column_statistics_by_table", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_get_column_statistics_by_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_column_statistics_by_partition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.get_column_statistics_by_partition"); + + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.get_column_statistics_by_partition"); + } + + ThriftHiveMetastore_get_column_statistics_by_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.get_column_statistics_by_partition", bytes); + } + + ThriftHiveMetastore_get_column_statistics_by_partition_result result; + try { + iface_->get_column_statistics_by_partition(result.success, args.db_name, args.tbl_name, args.part_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 (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_column_statistics_by_partition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_column_statistics_by_partition", ::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_column_statistics_by_partition"); + } + + oprot->writeMessageBegin("get_column_statistics_by_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_column_statistics_by_partition", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_delete_column_statistics_by_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.delete_column_statistics_by_partition", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_column_statistics_by_partition"); + + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_column_statistics_by_partition"); + } + + ThriftHiveMetastore_delete_column_statistics_by_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_column_statistics_by_partition", bytes); + } + + ThriftHiveMetastore_delete_column_statistics_by_partition_result result; + try { + result.success = iface_->delete_column_statistics_by_partition(args.db_name, args.tbl_name, args.part_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.delete_column_statistics_by_partition"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("delete_column_statistics_by_partition", ::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.delete_column_statistics_by_partition"); + } + + oprot->writeMessageBegin("delete_column_statistics_by_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.delete_column_statistics_by_partition", bytes); + } +} + +void ThriftHiveMetastoreProcessor::process_delete_column_statistics_by_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.delete_column_statistics_by_table", callContext); + } + ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "ThriftHiveMetastore.delete_column_statistics_by_table"); + + if (eventHandler_.get() != NULL) { + eventHandler_->preRead(ctx, "ThriftHiveMetastore.delete_column_statistics_by_table"); + } + + ThriftHiveMetastore_delete_column_statistics_by_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (eventHandler_.get() != NULL) { + eventHandler_->postRead(ctx, "ThriftHiveMetastore.delete_column_statistics_by_table", bytes); + } + + ThriftHiveMetastore_delete_column_statistics_by_table_result result; + try { + result.success = iface_->delete_column_statistics_by_table(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.delete_column_statistics_by_table"); + } + + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("delete_column_statistics_by_table", ::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.delete_column_statistics_by_table"); + } + + oprot->writeMessageBegin("delete_column_statistics_by_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.delete_column_statistics_by_table", bytes); + } +} + void ThriftHiveMetastoreProcessor::process_create_role(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { void* ctx = NULL; diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h index 7b77451..b25563b 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -69,6 +69,11 @@ 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 write_column_statistics(const std::vector & stats_obj) = 0; + virtual void get_column_statistics_by_table(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) = 0; + virtual void get_column_statistics_by_partition(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_column_statistics_by_partition(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name) = 0; + virtual bool delete_column_statistics_by_table(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; @@ -257,6 +262,24 @@ 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 write_column_statistics(const std::vector & /* stats_obj */) { + bool _return = false; + return _return; + } + void get_column_statistics_by_table(ColumnStatistics& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* col_name */) { + return; + } + void get_column_statistics_by_partition(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_column_statistics_by_partition(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_column_statistics_by_table(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; @@ -8027,38 +8050,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_write_column_statistics_args__isset { + _ThriftHiveMetastore_write_column_statistics_args__isset() : stats_obj(false) {} + bool stats_obj; +} _ThriftHiveMetastore_write_column_statistics_args__isset; -class ThriftHiveMetastore_create_role_args { +class ThriftHiveMetastore_write_column_statistics_args { public: - ThriftHiveMetastore_create_role_args() { + ThriftHiveMetastore_write_column_statistics_args() { } - virtual ~ThriftHiveMetastore_create_role_args() throw() {} + virtual ~ThriftHiveMetastore_write_column_statistics_args() throw() {} - Role role; + std::vector stats_obj; - _ThriftHiveMetastore_create_role_args__isset __isset; + _ThriftHiveMetastore_write_column_statistics_args__isset __isset; - void __set_role(const Role& val) { - role = val; + void __set_stats_obj(const std::vector & val) { + stats_obj = val; } - bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const + bool operator == (const ThriftHiveMetastore_write_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_write_column_statistics_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_create_role_args & ) const; + bool operator < (const ThriftHiveMetastore_write_column_statistics_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -8066,117 +8089,163 @@ class ThriftHiveMetastore_create_role_args { }; -class ThriftHiveMetastore_create_role_pargs { +class ThriftHiveMetastore_write_column_statistics_pargs { public: - virtual ~ThriftHiveMetastore_create_role_pargs() throw() {} + virtual ~ThriftHiveMetastore_write_column_statistics_pargs() throw() {} - const Role* role; + const std::vector * 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_write_column_statistics_result__isset { + _ThriftHiveMetastore_write_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_write_column_statistics_result__isset; -class ThriftHiveMetastore_create_role_result { +class ThriftHiveMetastore_write_column_statistics_result { public: - ThriftHiveMetastore_create_role_result() : success(0) { + ThriftHiveMetastore_write_column_statistics_result() : success(0) { } - virtual ~ThriftHiveMetastore_create_role_result() throw() {} + virtual ~ThriftHiveMetastore_write_column_statistics_result() throw() {} bool success; - MetaException o1; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; - _ThriftHiveMetastore_create_role_result__isset __isset; + _ThriftHiveMetastore_write_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_write_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_write_column_statistics_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_create_role_result & ) const; + bool operator < (const ThriftHiveMetastore_write_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_write_column_statistics_presult__isset { + _ThriftHiveMetastore_write_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_write_column_statistics_presult__isset; -class ThriftHiveMetastore_create_role_presult { +class ThriftHiveMetastore_write_column_statistics_presult { public: - virtual ~ThriftHiveMetastore_create_role_presult() throw() {} + virtual ~ThriftHiveMetastore_write_column_statistics_presult() throw() {} bool* success; - MetaException o1; + NoSuchObjectException o1; + InvalidObjectException o2; + MetaException o3; + InvalidInputException o4; - _ThriftHiveMetastore_create_role_presult__isset __isset; + _ThriftHiveMetastore_write_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_get_column_statistics_by_table_args__isset { + _ThriftHiveMetastore_get_column_statistics_by_table_args__isset() : db_name(false), tbl_name(false), col_name(false) {} + bool db_name; + bool tbl_name; + bool col_name; +} _ThriftHiveMetastore_get_column_statistics_by_table_args__isset; -class ThriftHiveMetastore_drop_role_args { +class ThriftHiveMetastore_get_column_statistics_by_table_args { public: - ThriftHiveMetastore_drop_role_args() : role_name("") { + ThriftHiveMetastore_get_column_statistics_by_table_args() : db_name(""), tbl_name(""), col_name("") { } - virtual ~ThriftHiveMetastore_drop_role_args() throw() {} + virtual ~ThriftHiveMetastore_get_column_statistics_by_table_args() throw() {} - std::string role_name; + std::string db_name; + std::string tbl_name; + std::string col_name; - _ThriftHiveMetastore_drop_role_args__isset __isset; + _ThriftHiveMetastore_get_column_statistics_by_table_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; } - bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + 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_column_statistics_by_table_args & rhs) const { - if (!(role_name == rhs.role_name)) + 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_drop_role_args &rhs) const { + bool operator != (const ThriftHiveMetastore_get_column_statistics_by_table_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; + bool operator < (const ThriftHiveMetastore_get_column_statistics_by_table_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -8184,104 +8253,173 @@ class ThriftHiveMetastore_drop_role_args { }; -class ThriftHiveMetastore_drop_role_pargs { +class ThriftHiveMetastore_get_column_statistics_by_table_pargs { public: - virtual ~ThriftHiveMetastore_drop_role_pargs() throw() {} + virtual ~ThriftHiveMetastore_get_column_statistics_by_table_pargs() throw() {} - const std::string* role_name; + 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_drop_role_result__isset { - _ThriftHiveMetastore_drop_role_result__isset() : success(false), o1(false) {} +typedef struct _ThriftHiveMetastore_get_column_statistics_by_table_result__isset { + _ThriftHiveMetastore_get_column_statistics_by_table_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_get_column_statistics_by_table_result__isset; -class ThriftHiveMetastore_drop_role_result { +class ThriftHiveMetastore_get_column_statistics_by_table_result { public: - ThriftHiveMetastore_drop_role_result() : success(0) { + ThriftHiveMetastore_get_column_statistics_by_table_result() { } - virtual ~ThriftHiveMetastore_drop_role_result() throw() {} + virtual ~ThriftHiveMetastore_get_column_statistics_by_table_result() throw() {} - bool success; - MetaException o1; + ColumnStatistics success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; - _ThriftHiveMetastore_drop_role_result__isset __isset; + _ThriftHiveMetastore_get_column_statistics_by_table_result__isset __isset; - void __set_success(const bool 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_drop_role_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_column_statistics_by_table_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_get_column_statistics_by_table_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_drop_role_result & ) const; + bool operator < (const ThriftHiveMetastore_get_column_statistics_by_table_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_get_column_statistics_by_table_presult__isset { + _ThriftHiveMetastore_get_column_statistics_by_table_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_get_column_statistics_by_table_presult__isset; -class ThriftHiveMetastore_drop_role_presult { +class ThriftHiveMetastore_get_column_statistics_by_table_presult { public: - virtual ~ThriftHiveMetastore_drop_role_presult() throw() {} + virtual ~ThriftHiveMetastore_get_column_statistics_by_table_presult() throw() {} - bool* success; - MetaException o1; + ColumnStatistics* success; + NoSuchObjectException o1; + MetaException o2; + InvalidInputException o3; + InvalidObjectException o4; - _ThriftHiveMetastore_drop_role_presult__isset __isset; + _ThriftHiveMetastore_get_column_statistics_by_table_presult__isset __isset; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_column_statistics_by_partition_args__isset { + _ThriftHiveMetastore_get_column_statistics_by_partition_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_column_statistics_by_partition_args__isset; -class ThriftHiveMetastore_get_role_names_args { +class ThriftHiveMetastore_get_column_statistics_by_partition_args { public: - ThriftHiveMetastore_get_role_names_args() { + ThriftHiveMetastore_get_column_statistics_by_partition_args() : db_name(""), tbl_name(""), part_name(""), col_name("") { } - virtual ~ThriftHiveMetastore_get_role_names_args() throw() {} + virtual ~ThriftHiveMetastore_get_column_statistics_by_partition_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string part_name; + std::string col_name; + _ThriftHiveMetastore_get_column_statistics_by_partition_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_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_column_statistics_by_partition_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_role_names_args &rhs) const { + bool operator != (const ThriftHiveMetastore_get_column_statistics_by_partition_args &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_get_role_names_args & ) const; + bool operator < (const ThriftHiveMetastore_get_column_statistics_by_partition_args & ) const; uint32_t read(::apache::thrift::protocol::TProtocol* iprot); uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -8289,87 +8427,802 @@ class ThriftHiveMetastore_get_role_names_args { }; -class ThriftHiveMetastore_get_role_names_pargs { +class ThriftHiveMetastore_get_column_statistics_by_partition_pargs { public: - virtual ~ThriftHiveMetastore_get_role_names_pargs() throw() {} + virtual ~ThriftHiveMetastore_get_column_statistics_by_partition_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_role_names_result__isset { - _ThriftHiveMetastore_get_role_names_result__isset() : success(false), o1(false) {} +typedef struct _ThriftHiveMetastore_get_column_statistics_by_partition_result__isset { + _ThriftHiveMetastore_get_column_statistics_by_partition_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_column_statistics_by_partition_result__isset; -class ThriftHiveMetastore_get_role_names_result { +class ThriftHiveMetastore_get_column_statistics_by_partition_result { public: - ThriftHiveMetastore_get_role_names_result() { + ThriftHiveMetastore_get_column_statistics_by_partition_result() { } - virtual ~ThriftHiveMetastore_get_role_names_result() throw() {} + virtual ~ThriftHiveMetastore_get_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_result &rhs) const { return !(*this == rhs); } - bool operator < (const ThriftHiveMetastore_get_role_names_result & ) const; + bool operator < (const ThriftHiveMetastore_get_column_statistics_by_partition_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_column_statistics_by_partition_presult__isset { + _ThriftHiveMetastore_get_column_statistics_by_partition_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_column_statistics_by_partition_presult__isset; -class ThriftHiveMetastore_get_role_names_presult { +class ThriftHiveMetastore_get_column_statistics_by_partition_presult { public: - virtual ~ThriftHiveMetastore_get_role_names_presult() throw() {} + virtual ~ThriftHiveMetastore_get_column_statistics_by_partition_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_column_statistics_by_partition_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; +typedef struct _ThriftHiveMetastore_delete_column_statistics_by_partition_args__isset { + _ThriftHiveMetastore_delete_column_statistics_by_partition_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_column_statistics_by_partition_args__isset; + +class ThriftHiveMetastore_delete_column_statistics_by_partition_args { + public: + + ThriftHiveMetastore_delete_column_statistics_by_partition_args() : db_name(""), tbl_name(""), part_name(""), col_name("") { + } + + virtual ~ThriftHiveMetastore_delete_column_statistics_by_partition_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string part_name; + std::string col_name; + + _ThriftHiveMetastore_delete_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_column_statistics_by_partition_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_delete_column_statistics_by_partition_pargs { + public: + + + virtual ~ThriftHiveMetastore_delete_column_statistics_by_partition_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_column_statistics_by_partition_result__isset { + _ThriftHiveMetastore_delete_column_statistics_by_partition_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_delete_column_statistics_by_partition_result__isset; + +class ThriftHiveMetastore_delete_column_statistics_by_partition_result { + public: + + ThriftHiveMetastore_delete_column_statistics_by_partition_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_delete_column_statistics_by_partition_result() throw() {} + + bool success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_column_statistics_by_partition_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_column_statistics_by_partition_presult__isset { + _ThriftHiveMetastore_delete_column_statistics_by_partition_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_delete_column_statistics_by_partition_presult__isset; + +class ThriftHiveMetastore_delete_column_statistics_by_partition_presult { + public: + + + virtual ~ThriftHiveMetastore_delete_column_statistics_by_partition_presult() throw() {} + + bool* success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_column_statistics_by_partition_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _ThriftHiveMetastore_delete_column_statistics_by_table_args__isset { + _ThriftHiveMetastore_delete_column_statistics_by_table_args__isset() : db_name(false), tbl_name(false), col_name(false) {} + bool db_name; + bool tbl_name; + bool col_name; +} _ThriftHiveMetastore_delete_column_statistics_by_table_args__isset; + +class ThriftHiveMetastore_delete_column_statistics_by_table_args { + public: + + ThriftHiveMetastore_delete_column_statistics_by_table_args() : db_name(""), tbl_name(""), col_name("") { + } + + virtual ~ThriftHiveMetastore_delete_column_statistics_by_table_args() throw() {} + + std::string db_name; + std::string tbl_name; + std::string col_name; + + _ThriftHiveMetastore_delete_column_statistics_by_table_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_column_statistics_by_table_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_column_statistics_by_table_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_column_statistics_by_table_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_delete_column_statistics_by_table_pargs { + public: + + + virtual ~ThriftHiveMetastore_delete_column_statistics_by_table_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_column_statistics_by_table_result__isset { + _ThriftHiveMetastore_delete_column_statistics_by_table_result__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_delete_column_statistics_by_table_result__isset; + +class ThriftHiveMetastore_delete_column_statistics_by_table_result { + public: + + ThriftHiveMetastore_delete_column_statistics_by_table_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_delete_column_statistics_by_table_result() throw() {} + + bool success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_column_statistics_by_table_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_column_statistics_by_table_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_column_statistics_by_table_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_delete_column_statistics_by_table_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_delete_column_statistics_by_table_presult__isset { + _ThriftHiveMetastore_delete_column_statistics_by_table_presult__isset() : success(false), o1(false), o2(false), o3(false), o4(false) {} + bool success; + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_delete_column_statistics_by_table_presult__isset; + +class ThriftHiveMetastore_delete_column_statistics_by_table_presult { + public: + + + virtual ~ThriftHiveMetastore_delete_column_statistics_by_table_presult() throw() {} + + bool* success; + NoSuchObjectException o1; + MetaException o2; + InvalidObjectException o3; + InvalidInputException o4; + + _ThriftHiveMetastore_delete_column_statistics_by_table_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; @@ -9955,6 +10808,21 @@ 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 write_column_statistics(const std::vector & stats_obj); + void send_write_column_statistics(const std::vector & stats_obj); + bool recv_write_column_statistics(); + void get_column_statistics_by_table(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void send_get_column_statistics_by_table(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void recv_get_column_statistics_by_table(ColumnStatistics& _return); + void get_column_statistics_by_partition(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_column_statistics_by_partition(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + void recv_get_column_statistics_by_partition(ColumnStatistics& _return); + bool delete_column_statistics_by_partition(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + void send_delete_column_statistics_by_partition(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const std::string& col_name); + bool recv_delete_column_statistics_by_partition(); + bool delete_column_statistics_by_table(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + void send_delete_column_statistics_by_table(const std::string& db_name, const std::string& tbl_name, const std::string& col_name); + bool recv_delete_column_statistics_by_table(); bool create_role(const Role& role); void send_create_role(const Role& role); bool recv_create_role(); @@ -10059,6 +10927,11 @@ 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_write_column_statistics(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_column_statistics_by_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get_column_statistics_by_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_delete_column_statistics_by_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_delete_column_statistics_by_table(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); @@ -10131,6 +11004,11 @@ 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_["write_column_statistics"] = &ThriftHiveMetastoreProcessor::process_write_column_statistics; + processMap_["get_column_statistics_by_table"] = &ThriftHiveMetastoreProcessor::process_get_column_statistics_by_table; + processMap_["get_column_statistics_by_partition"] = &ThriftHiveMetastoreProcessor::process_get_column_statistics_by_partition; + processMap_["delete_column_statistics_by_partition"] = &ThriftHiveMetastoreProcessor::process_delete_column_statistics_by_partition; + processMap_["delete_column_statistics_by_table"] = &ThriftHiveMetastoreProcessor::process_delete_column_statistics_by_table; processMap_["create_role"] = &ThriftHiveMetastoreProcessor::process_create_role; processMap_["drop_role"] = &ThriftHiveMetastoreProcessor::process_drop_role; processMap_["get_role_names"] = &ThriftHiveMetastoreProcessor::process_get_role_names; @@ -10744,6 +11622,63 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi } } + bool write_column_statistics(const std::vector & stats_obj) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->write_column_statistics(stats_obj); + } else { + ifaces_[i]->write_column_statistics(stats_obj); + } + } + } + + void get_column_statistics_by_table(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_column_statistics_by_table(_return, db_name, tbl_name, col_name); + return; + } else { + ifaces_[i]->get_column_statistics_by_table(_return, db_name, tbl_name, col_name); + } + } + } + + void get_column_statistics_by_partition(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_column_statistics_by_partition(_return, db_name, tbl_name, part_name, col_name); + return; + } else { + ifaces_[i]->get_column_statistics_by_partition(_return, db_name, tbl_name, part_name, col_name); + } + } + } + + bool delete_column_statistics_by_partition(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_column_statistics_by_partition(db_name, tbl_name, part_name, col_name); + } else { + ifaces_[i]->delete_column_statistics_by_partition(db_name, tbl_name, part_name, col_name); + } + } + } + + bool delete_column_statistics_by_table(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_column_statistics_by_table(db_name, tbl_name, col_name); + } else { + ifaces_[i]->delete_column_statistics_by_table(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 e848af6..9369db2 100644 --- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -292,6 +292,31 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { printf("get_index_names\n"); } + bool write_column_statistics(const std::vector & stats_obj) { + // Your implementation goes here + printf("write_column_statistics\n"); + } + + void get_column_statistics_by_table(ColumnStatistics& _return, const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + // Your implementation goes here + printf("get_column_statistics_by_table\n"); + } + + void get_column_statistics_by_partition(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_column_statistics_by_partition\n"); + } + + bool delete_column_statistics_by_partition(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_column_statistics_by_partition\n"); + } + + bool delete_column_statistics_by_table(const std::string& db_name, const std::string& tbl_name, const std::string& col_name) { + // Your implementation goes here + printf("delete_column_statistics_by_table\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..5fcf5bd 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -2269,6 +2269,225 @@ uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const { return xfer; } +const char* ColumnStatistics::ascii_fingerprint = "47DD4163EFF80A33C91890084DD7F6F1"; +const uint8_t ColumnStatistics::binary_fingerprint[16] = {0x47,0xDD,0x41,0x63,0xEF,0xF8,0x0A,0x33,0xC9,0x18,0x90,0x08,0x4D,0xD7,0xF6,0xF1}; + +uint32_t ColumnStatistics::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->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->colName); + this->__isset.colName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->colType); + this->__isset.colType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partName); + this->__isset.partName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->lowValue); + this->__isset.lowValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->highValue); + this->__isset.highValue = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numNulls); + this->__isset.numNulls = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numDVs); + this->__isset.numDVs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_DOUBLE) { + xfer += iprot->readDouble(this->avgColLen); + this->__isset.avgColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->maxColLen); + this->__isset.maxColLen = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numTrues); + this->__isset.numTrues = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->numFalses); + this->__isset.numFalses = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->lastAnalyzed); + this->__isset.lastAnalyzed = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 15: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->histogram); + this->__isset.histogram = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 16: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isTblLevel); + this->__isset.isTblLevel = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ColumnStatistics::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ColumnStatistics"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("colName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->colName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("colType", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->colType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->partName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("lowValue", ::apache::thrift::protocol::T_DOUBLE, 6); + xfer += oprot->writeDouble(this->lowValue); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("highValue", ::apache::thrift::protocol::T_DOUBLE, 7); + xfer += oprot->writeDouble(this->highValue); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numNulls", ::apache::thrift::protocol::T_I64, 8); + xfer += oprot->writeI64(this->numNulls); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numDVs", ::apache::thrift::protocol::T_I64, 9); + xfer += oprot->writeI64(this->numDVs); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("avgColLen", ::apache::thrift::protocol::T_DOUBLE, 10); + xfer += oprot->writeDouble(this->avgColLen); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("maxColLen", ::apache::thrift::protocol::T_I64, 11); + xfer += oprot->writeI64(this->maxColLen); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numTrues", ::apache::thrift::protocol::T_I64, 12); + xfer += oprot->writeI64(this->numTrues); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numFalses", ::apache::thrift::protocol::T_I64, 13); + xfer += oprot->writeI64(this->numFalses); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("lastAnalyzed", ::apache::thrift::protocol::T_I64, 14); + xfer += oprot->writeI64(this->lastAnalyzed); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("histogram", ::apache::thrift::protocol::T_STRING, 15); + xfer += oprot->writeString(this->histogram); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isTblLevel", ::apache::thrift::protocol::T_BOOL, 16); + xfer += oprot->writeBool(this->isTblLevel); + 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}; @@ -3050,4 +3269,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..b76aa7f 100644 --- metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -1308,6 +1308,167 @@ class Index { }; +typedef struct _ColumnStatistics__isset { + _ColumnStatistics__isset() : tableName(false), colName(false), colType(false), dbName(false), partName(false), lowValue(false), highValue(false), numNulls(false), numDVs(false), avgColLen(false), maxColLen(false), numTrues(false), numFalses(false), lastAnalyzed(false), histogram(false), isTblLevel(false) {} + bool tableName; + bool colName; + bool colType; + bool dbName; + bool partName; + bool lowValue; + bool highValue; + bool numNulls; + bool numDVs; + bool avgColLen; + bool maxColLen; + bool numTrues; + bool numFalses; + bool lastAnalyzed; + bool histogram; + bool isTblLevel; +} _ColumnStatistics__isset; + +class ColumnStatistics { + public: + + static const char* ascii_fingerprint; // = "47DD4163EFF80A33C91890084DD7F6F1"; + static const uint8_t binary_fingerprint[16]; // = {0x47,0xDD,0x41,0x63,0xEF,0xF8,0x0A,0x33,0xC9,0x18,0x90,0x08,0x4D,0xD7,0xF6,0xF1}; + + ColumnStatistics() : tableName(""), colName(""), colType(""), dbName(""), partName(""), lowValue(0), highValue(0), numNulls(0), numDVs(0), avgColLen(0), maxColLen(0), numTrues(0), numFalses(0), lastAnalyzed(0), histogram(""), isTblLevel(0) { + } + + virtual ~ColumnStatistics() throw() {} + + std::string tableName; + std::string colName; + std::string colType; + std::string dbName; + std::string partName; + double lowValue; + double highValue; + int64_t numNulls; + int64_t numDVs; + double avgColLen; + int64_t maxColLen; + int64_t numTrues; + int64_t numFalses; + int64_t lastAnalyzed; + std::string histogram; + bool isTblLevel; + + _ColumnStatistics__isset __isset; + + void __set_tableName(const std::string& val) { + tableName = val; + } + + void __set_colName(const std::string& val) { + colName = val; + } + + void __set_colType(const std::string& val) { + colType = val; + } + + void __set_dbName(const std::string& val) { + dbName = val; + } + + void __set_partName(const std::string& val) { + partName = val; + } + + 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; + } + + void __set_avgColLen(const double val) { + avgColLen = val; + } + + void __set_maxColLen(const int64_t val) { + maxColLen = val; + } + + void __set_numTrues(const int64_t val) { + numTrues = val; + } + + void __set_numFalses(const int64_t val) { + numFalses = val; + } + + void __set_lastAnalyzed(const int64_t val) { + lastAnalyzed = val; + } + + void __set_histogram(const std::string& val) { + histogram = val; + } + + void __set_isTblLevel(const bool val) { + isTblLevel = val; + } + + bool operator == (const ColumnStatistics & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(colName == rhs.colName)) + return false; + if (!(colType == rhs.colType)) + return false; + if (!(dbName == rhs.dbName)) + return false; + if (!(partName == rhs.partName)) + return false; + if (!(lowValue == rhs.lowValue)) + return false; + if (!(highValue == rhs.highValue)) + return false; + if (!(numNulls == rhs.numNulls)) + return false; + if (!(numDVs == rhs.numDVs)) + return false; + if (!(avgColLen == rhs.avgColLen)) + return false; + if (!(maxColLen == rhs.maxColLen)) + return false; + if (!(numTrues == rhs.numTrues)) + return false; + if (!(numFalses == rhs.numFalses)) + return false; + if (!(lastAnalyzed == rhs.lastAnalyzed)) + return false; + if (!(histogram == rhs.histogram)) + return false; + if (!(isTblLevel == rhs.isTblLevel)) + 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 +2010,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/ColumnStatistics.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java new file mode 100644 index 0000000..ab61d73 --- /dev/null +++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java @@ -0,0 +1,1674 @@ +/** + * 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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + 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)2); + 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)3); + 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)4); + 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)5); + 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)6); + 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)7); + 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)8); + 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)9); + 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)10); + 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)11); + 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)12); + 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)13); + 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)14); + private static final org.apache.thrift.protocol.TField HISTOGRAM_FIELD_DESC = new org.apache.thrift.protocol.TField("histogram", org.apache.thrift.protocol.TType.STRING, (short)15); + 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)16); + + private String tableName; // required + private String colName; // required + private String colType; // required + private String dbName; // required + private String partName; // required + private double lowValue; // required + private double highValue; // required + private long numNulls; // required + private long numDVs; // required + private double avgColLen; // required + private long maxColLen; // required + private long numTrues; // required + private long numFalses; // required + private long lastAnalyzed; // required + private String histogram; // required + private boolean isTblLevel; // 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 { + TABLE_NAME((short)1, "tableName"), + COL_NAME((short)2, "colName"), + COL_TYPE((short)3, "colType"), + DB_NAME((short)4, "dbName"), + PART_NAME((short)5, "partName"), + LOW_VALUE((short)6, "lowValue"), + HIGH_VALUE((short)7, "highValue"), + NUM_NULLS((short)8, "numNulls"), + NUM_DVS((short)9, "numDVs"), + AVG_COL_LEN((short)10, "avgColLen"), + MAX_COL_LEN((short)11, "maxColLen"), + NUM_TRUES((short)12, "numTrues"), + NUM_FALSES((short)13, "numFalses"), + LAST_ANALYZED((short)14, "lastAnalyzed"), + HISTOGRAM((short)15, "histogram"), + IS_TBL_LEVEL((short)16, "isTblLevel"); + + 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: // TABLE_NAME + return TABLE_NAME; + case 2: // COL_NAME + return COL_NAME; + case 3: // COL_TYPE + return COL_TYPE; + case 4: // DB_NAME + return DB_NAME; + case 5: // PART_NAME + return PART_NAME; + case 6: // LOW_VALUE + return LOW_VALUE; + case 7: // HIGH_VALUE + return HIGH_VALUE; + case 8: // NUM_NULLS + return NUM_NULLS; + case 9: // NUM_DVS + return NUM_DVS; + case 10: // AVG_COL_LEN + return AVG_COL_LEN; + case 11: // MAX_COL_LEN + return MAX_COL_LEN; + case 12: // NUM_TRUES + return NUM_TRUES; + case 13: // NUM_FALSES + return NUM_FALSES; + case 14: // LAST_ANALYZED + return LAST_ANALYZED; + case 15: // HISTOGRAM + return HISTOGRAM; + case 16: // IS_TBL_LEVEL + return IS_TBL_LEVEL; + 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 static final int __AVGCOLLEN_ISSET_ID = 4; + private static final int __MAXCOLLEN_ISSET_ID = 5; + private static final int __NUMTRUES_ISSET_ID = 6; + private static final int __NUMFALSES_ISSET_ID = 7; + private static final int __LASTANALYZED_ISSET_ID = 8; + private static final int __ISTBLLEVEL_ISSET_ID = 9; + private BitSet __isset_bit_vector = new BitSet(10); + + 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.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", 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("colName", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LOW_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lowValue", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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.DEFAULT, + 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.DEFAULT, + 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.DEFAULT, + 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); + tmpMap.put(_Fields.MAX_COL_LEN, new org.apache.thrift.meta_data.FieldMetaData("maxColLen", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_TRUES, new org.apache.thrift.meta_data.FieldMetaData("numTrues", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.LAST_ANALYZED, new org.apache.thrift.meta_data.FieldMetaData("lastAnalyzed", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.HISTOGRAM, new org.apache.thrift.meta_data.FieldMetaData("histogram", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_TBL_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("isTblLevel", 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(ColumnStatistics.class, metaDataMap); + } + + public ColumnStatistics() { + } + + public ColumnStatistics( + String tableName, + String colName, + String colType, + String dbName, + String partName, + double lowValue, + double highValue, + long numNulls, + long numDVs, + double avgColLen, + long maxColLen, + long numTrues, + long numFalses, + long lastAnalyzed, + String histogram, + boolean isTblLevel) + { + this(); + this.tableName = tableName; + this.colName = colName; + this.colType = colType; + this.dbName = dbName; + this.partName = partName; + this.lowValue = lowValue; + setLowValueIsSet(true); + this.highValue = highValue; + setHighValueIsSet(true); + this.numNulls = numNulls; + setNumNullsIsSet(true); + this.numDVs = numDVs; + setNumDVsIsSet(true); + this.avgColLen = avgColLen; + setAvgColLenIsSet(true); + this.maxColLen = maxColLen; + setMaxColLenIsSet(true); + this.numTrues = numTrues; + setNumTruesIsSet(true); + this.numFalses = numFalses; + setNumFalsesIsSet(true); + this.lastAnalyzed = lastAnalyzed; + setLastAnalyzedIsSet(true); + this.histogram = histogram; + this.isTblLevel = isTblLevel; + setIsTblLevelIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public ColumnStatistics(ColumnStatistics other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetColName()) { + this.colName = other.colName; + } + if (other.isSetColType()) { + this.colType = other.colType; + } + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetPartName()) { + this.partName = other.partName; + } + this.lowValue = other.lowValue; + this.highValue = other.highValue; + this.numNulls = other.numNulls; + this.numDVs = other.numDVs; + this.avgColLen = other.avgColLen; + this.maxColLen = other.maxColLen; + this.numTrues = other.numTrues; + this.numFalses = other.numFalses; + this.lastAnalyzed = other.lastAnalyzed; + if (other.isSetHistogram()) { + this.histogram = other.histogram; + } + this.isTblLevel = other.isTblLevel; + } + + public ColumnStatistics deepCopy() { + return new ColumnStatistics(this); + } + + @Override + public void clear() { + this.tableName = null; + this.colName = null; + this.colType = null; + this.dbName = null; + this.partName = null; + setLowValueIsSet(false); + this.lowValue = 0.0; + setHighValueIsSet(false); + this.highValue = 0.0; + setNumNullsIsSet(false); + this.numNulls = 0; + setNumDVsIsSet(false); + this.numDVs = 0; + setAvgColLenIsSet(false); + this.avgColLen = 0.0; + setMaxColLenIsSet(false); + this.maxColLen = 0; + setNumTruesIsSet(false); + this.numTrues = 0; + setNumFalsesIsSet(false); + this.numFalses = 0; + setLastAnalyzedIsSet(false); + this.lastAnalyzed = 0; + this.histogram = null; + setIsTblLevelIsSet(false); + this.isTblLevel = false; + } + + 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 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 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 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 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 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 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 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 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 String getHistogram() { + return this.histogram; + } + + public void setHistogram(String histogram) { + this.histogram = histogram; + } + + public void unsetHistogram() { + this.histogram = null; + } + + /** Returns true if field histogram is set (has been assigned a value) and false otherwise */ + public boolean isSetHistogram() { + return this.histogram != null; + } + + public void setHistogramIsSet(boolean value) { + if (!value) { + this.histogram = null; + } + } + + 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + 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 DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPartName(); + } else { + setPartName((String)value); + } + break; + + 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; + + case AVG_COL_LEN: + if (value == null) { + unsetAvgColLen(); + } else { + setAvgColLen((Double)value); + } + break; + + case MAX_COL_LEN: + if (value == null) { + unsetMaxColLen(); + } else { + setMaxColLen((Long)value); + } + break; + + 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 LAST_ANALYZED: + if (value == null) { + unsetLastAnalyzed(); + } else { + setLastAnalyzed((Long)value); + } + break; + + case HISTOGRAM: + if (value == null) { + unsetHistogram(); + } else { + setHistogram((String)value); + } + break; + + case IS_TBL_LEVEL: + if (value == null) { + unsetIsTblLevel(); + } else { + setIsTblLevel((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case COL_NAME: + return getColName(); + + case COL_TYPE: + return getColType(); + + case DB_NAME: + return getDbName(); + + case PART_NAME: + return getPartName(); + + 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()); + + case AVG_COL_LEN: + return Double.valueOf(getAvgColLen()); + + case MAX_COL_LEN: + return Long.valueOf(getMaxColLen()); + + case NUM_TRUES: + return Long.valueOf(getNumTrues()); + + case NUM_FALSES: + return Long.valueOf(getNumFalses()); + + case LAST_ANALYZED: + return Long.valueOf(getLastAnalyzed()); + + case HISTOGRAM: + return getHistogram(); + + case IS_TBL_LEVEL: + return Boolean.valueOf(isIsTblLevel()); + + } + 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 TABLE_NAME: + return isSetTableName(); + case COL_NAME: + return isSetColName(); + case COL_TYPE: + return isSetColType(); + case DB_NAME: + return isSetDbName(); + case PART_NAME: + return isSetPartName(); + case LOW_VALUE: + return isSetLowValue(); + case HIGH_VALUE: + return isSetHighValue(); + case NUM_NULLS: + return isSetNumNulls(); + case NUM_DVS: + return isSetNumDVs(); + case AVG_COL_LEN: + return isSetAvgColLen(); + case MAX_COL_LEN: + return isSetMaxColLen(); + case NUM_TRUES: + return isSetNumTrues(); + case NUM_FALSES: + return isSetNumFalses(); + case LAST_ANALYZED: + return isSetLastAnalyzed(); + case HISTOGRAM: + return isSetHistogram(); + case IS_TBL_LEVEL: + return isSetIsTblLevel(); + } + 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_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_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_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_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_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; + } + + 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_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_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_lastAnalyzed = true; + boolean that_present_lastAnalyzed = true; + if (this_present_lastAnalyzed || that_present_lastAnalyzed) { + if (!(this_present_lastAnalyzed && that_present_lastAnalyzed)) + return false; + if (this.lastAnalyzed != that.lastAnalyzed) + return false; + } + + boolean this_present_histogram = true && this.isSetHistogram(); + boolean that_present_histogram = true && that.isSetHistogram(); + if (this_present_histogram || that_present_histogram) { + if (!(this_present_histogram && that_present_histogram)) + return false; + if (!this.histogram.equals(that.histogram)) + 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; + } + + return true; + } + + @Override + public int hashCode() { + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_tableName = true && (isSetTableName()); + builder.append(present_tableName); + if (present_tableName) + builder.append(tableName); + + 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_dbName = true && (isSetDbName()); + builder.append(present_dbName); + if (present_dbName) + builder.append(dbName); + + boolean present_partName = true && (isSetPartName()); + builder.append(present_partName); + if (present_partName) + builder.append(partName); + + 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); + + boolean present_avgColLen = true; + builder.append(present_avgColLen); + if (present_avgColLen) + builder.append(avgColLen); + + boolean present_maxColLen = true; + builder.append(present_maxColLen); + if (present_maxColLen) + builder.append(maxColLen); + + 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_lastAnalyzed = true; + builder.append(present_lastAnalyzed); + if (present_lastAnalyzed) + builder.append(lastAnalyzed); + + boolean present_histogram = true && (isSetHistogram()); + builder.append(present_histogram); + if (present_histogram) + builder.append(histogram); + + boolean present_isTblLevel = true; + builder.append(present_isTblLevel); + if (present_isTblLevel) + builder.append(isTblLevel); + + 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(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(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(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(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(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; + } + } + 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(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(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(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; + } + } + lastComparison = Boolean.valueOf(isSetHistogram()).compareTo(typedOther.isSetHistogram()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHistogram()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.histogram, typedOther.histogram); + if (lastComparison != 0) { + return lastComparison; + } + } + 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; + } + } + 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: // 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 2: // 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 3: // 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 4: // 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 5: // 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 6: // 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 7: // 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 8: // 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 9: // 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; + case 10: // 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 11: // 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 12: // 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 13: // 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 14: // 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; + case 15: // HISTOGRAM + if (field.type == org.apache.thrift.protocol.TType.STRING) { + this.histogram = iprot.readString(); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); + } + break; + case 16: // 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; + 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.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.tableName); + oprot.writeFieldEnd(); + } + 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.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.dbName); + oprot.writeFieldEnd(); + } + if (this.partName != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.partName); + oprot.writeFieldEnd(); + } + 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.writeFieldBegin(AVG_COL_LEN_FIELD_DESC); + oprot.writeDouble(this.avgColLen); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(MAX_COL_LEN_FIELD_DESC); + oprot.writeI64(this.maxColLen); + oprot.writeFieldEnd(); + 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(LAST_ANALYZED_FIELD_DESC); + oprot.writeI64(this.lastAnalyzed); + oprot.writeFieldEnd(); + if (this.histogram != null) { + oprot.writeFieldBegin(HISTOGRAM_FIELD_DESC); + oprot.writeString(this.histogram); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_TBL_LEVEL_FIELD_DESC); + oprot.writeBool(this.isTblLevel); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ColumnStatistics("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + 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("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("partName:"); + if (this.partName == null) { + sb.append("null"); + } else { + sb.append(this.partName); + } + first = false; + if (!first) sb.append(", "); + 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; + if (!first) sb.append(", "); + sb.append("avgColLen:"); + sb.append(this.avgColLen); + first = false; + if (!first) sb.append(", "); + sb.append("maxColLen:"); + sb.append(this.maxColLen); + first = false; + if (!first) sb.append(", "); + 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("lastAnalyzed:"); + sb.append(this.lastAnalyzed); + first = false; + if (!first) sb.append(", "); + sb.append("histogram:"); + if (this.histogram == null) { + sb.append("null"); + } else { + sb.append(this.histogram); + } + first = false; + if (!first) sb.append(", "); + sb.append("isTblLevel:"); + sb.append(this.isTblLevel); + 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); + } + } + +} + 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/ThriftHiveMetastore.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java index 508e74e..373f6b2 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 @@ -136,6 +136,16 @@ 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 write_column_statistics(List stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException; + + public ColumnStatistics get_column_statistics_by_table(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException; + + public ColumnStatistics get_column_statistics_by_partition(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException; + + public boolean delete_column_statistics_by_partition(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException; + + public boolean delete_column_statistics_by_table(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; @@ -276,6 +286,16 @@ 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 write_column_statistics(List stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_column_statistics_by_table(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get_column_statistics_by_partition(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_column_statistics_by_partition(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_column_statistics_by_table(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; @@ -1986,6 +2006,191 @@ public class ThriftHiveMetastore { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); } + public boolean write_column_statistics(List stats_obj) throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + send_write_column_statistics(stats_obj); + return recv_write_column_statistics(); + } + + public void send_write_column_statistics(List stats_obj) throws org.apache.thrift.TException + { + write_column_statistics_args args = new write_column_statistics_args(); + args.setStats_obj(stats_obj); + sendBase("write_column_statistics", args); + } + + public boolean recv_write_column_statistics() throws NoSuchObjectException, InvalidObjectException, MetaException, InvalidInputException, org.apache.thrift.TException + { + write_column_statistics_result result = new write_column_statistics_result(); + receiveBase(result, "write_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, "write_column_statistics failed: unknown result"); + } + + public ColumnStatistics get_column_statistics_by_table(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + send_get_column_statistics_by_table(db_name, tbl_name, col_name); + return recv_get_column_statistics_by_table(); + } + + public void send_get_column_statistics_by_table(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException + { + get_column_statistics_by_table_args args = new get_column_statistics_by_table_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + sendBase("get_column_statistics_by_table", args); + } + + public ColumnStatistics recv_get_column_statistics_by_table() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + get_column_statistics_by_table_result result = new get_column_statistics_by_table_result(); + receiveBase(result, "get_column_statistics_by_table"); + 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_column_statistics_by_table failed: unknown result"); + } + + public ColumnStatistics get_column_statistics_by_partition(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + send_get_column_statistics_by_partition(db_name, tbl_name, part_name, col_name); + return recv_get_column_statistics_by_partition(); + } + + public void send_get_column_statistics_by_partition(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException + { + get_column_statistics_by_partition_args args = new get_column_statistics_by_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + sendBase("get_column_statistics_by_partition", args); + } + + public ColumnStatistics recv_get_column_statistics_by_partition() throws NoSuchObjectException, MetaException, InvalidInputException, InvalidObjectException, org.apache.thrift.TException + { + get_column_statistics_by_partition_result result = new get_column_statistics_by_partition_result(); + receiveBase(result, "get_column_statistics_by_partition"); + 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_column_statistics_by_partition failed: unknown result"); + } + + public boolean delete_column_statistics_by_partition(String db_name, String tbl_name, String part_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + send_delete_column_statistics_by_partition(db_name, tbl_name, part_name, col_name); + return recv_delete_column_statistics_by_partition(); + } + + public void send_delete_column_statistics_by_partition(String db_name, String tbl_name, String part_name, String col_name) throws org.apache.thrift.TException + { + delete_column_statistics_by_partition_args args = new delete_column_statistics_by_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setCol_name(col_name); + sendBase("delete_column_statistics_by_partition", args); + } + + public boolean recv_delete_column_statistics_by_partition() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + delete_column_statistics_by_partition_result result = new delete_column_statistics_by_partition_result(); + receiveBase(result, "delete_column_statistics_by_partition"); + 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_column_statistics_by_partition failed: unknown result"); + } + + public boolean delete_column_statistics_by_table(String db_name, String tbl_name, String col_name) throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + send_delete_column_statistics_by_table(db_name, tbl_name, col_name); + return recv_delete_column_statistics_by_table(); + } + + public void send_delete_column_statistics_by_table(String db_name, String tbl_name, String col_name) throws org.apache.thrift.TException + { + delete_column_statistics_by_table_args args = new delete_column_statistics_by_table_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setCol_name(col_name); + sendBase("delete_column_statistics_by_table", args); + } + + public boolean recv_delete_column_statistics_by_table() throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, org.apache.thrift.TException + { + delete_column_statistics_by_table_result result = new delete_column_statistics_by_table_result(); + receiveBase(result, "delete_column_statistics_by_table"); + 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_column_statistics_by_table failed: unknown result"); + } + public boolean create_role(Role role) throws MetaException, org.apache.thrift.TException { send_create_role(role); @@ -4370,6 +4575,196 @@ public class ThriftHiveMetastore { } } + public void write_column_statistics(List stats_obj, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + write_column_statistics_call method_call = new write_column_statistics_call(stats_obj, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class write_column_statistics_call extends org.apache.thrift.async.TAsyncMethodCall { + private List stats_obj; + public write_column_statistics_call(List 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("write_column_statistics", org.apache.thrift.protocol.TMessageType.CALL, 0)); + write_column_statistics_args args = new write_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_write_column_statistics(); + } + } + + public void get_column_statistics_by_table(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_column_statistics_by_table_call method_call = new get_column_statistics_by_table_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_column_statistics_by_table_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String col_name; + public get_column_statistics_by_table_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_column_statistics_by_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_column_statistics_by_table_args args = new get_column_statistics_by_table_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_column_statistics_by_table(); + } + } + + public void get_column_statistics_by_partition(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_column_statistics_by_partition_call method_call = new get_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_column_statistics_by_partition_args args = new get_column_statistics_by_partition_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_column_statistics_by_partition(); + } + } + + public void delete_column_statistics_by_partition(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_column_statistics_by_partition_call method_call = new delete_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition", org.apache.thrift.protocol.TMessageType.CALL, 0)); + delete_column_statistics_by_partition_args args = new delete_column_statistics_by_partition_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_column_statistics_by_partition(); + } + } + + public void delete_column_statistics_by_table(String db_name, String tbl_name, String col_name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + delete_column_statistics_by_table_call method_call = new delete_column_statistics_by_table_call(db_name, tbl_name, col_name, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class delete_column_statistics_by_table_call extends org.apache.thrift.async.TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String col_name; + public delete_column_statistics_by_table_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_column_statistics_by_table", org.apache.thrift.protocol.TMessageType.CALL, 0)); + delete_column_statistics_by_table_args args = new delete_column_statistics_by_table_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_column_statistics_by_table(); + } + } + 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); @@ -4924,6 +5319,11 @@ 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("write_column_statistics", new write_column_statistics()); + processMap.put("get_column_statistics_by_table", new get_column_statistics_by_table()); + processMap.put("get_column_statistics_by_partition", new get_column_statistics_by_partition()); + processMap.put("delete_column_statistics_by_partition", new delete_column_statistics_by_partition()); + processMap.put("delete_column_statistics_by_table", new delete_column_statistics_by_table()); processMap.put("create_role", new create_role()); processMap.put("drop_role", new drop_role()); processMap.put("get_role_names", new get_role_names()); @@ -6166,6 +6566,139 @@ public class ThriftHiveMetastore { } } + private static class write_column_statistics extends org.apache.thrift.ProcessFunction { + public write_column_statistics() { + super("write_column_statistics"); + } + + protected write_column_statistics_args getEmptyArgsInstance() { + return new write_column_statistics_args(); + } + + protected write_column_statistics_result getResult(I iface, write_column_statistics_args args) throws org.apache.thrift.TException { + write_column_statistics_result result = new write_column_statistics_result(); + try { + result.success = iface.write_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_column_statistics_by_table extends org.apache.thrift.ProcessFunction { + public get_column_statistics_by_table() { + super("get_column_statistics_by_table"); + } + + protected get_column_statistics_by_table_args getEmptyArgsInstance() { + return new get_column_statistics_by_table_args(); + } + + protected get_column_statistics_by_table_result getResult(I iface, get_column_statistics_by_table_args args) throws org.apache.thrift.TException { + get_column_statistics_by_table_result result = new get_column_statistics_by_table_result(); + try { + result.success = iface.get_column_statistics_by_table(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_column_statistics_by_partition extends org.apache.thrift.ProcessFunction { + public get_column_statistics_by_partition() { + super("get_column_statistics_by_partition"); + } + + protected get_column_statistics_by_partition_args getEmptyArgsInstance() { + return new get_column_statistics_by_partition_args(); + } + + protected get_column_statistics_by_partition_result getResult(I iface, get_column_statistics_by_partition_args args) throws org.apache.thrift.TException { + get_column_statistics_by_partition_result result = new get_column_statistics_by_partition_result(); + try { + result.success = iface.get_column_statistics_by_partition(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_column_statistics_by_partition extends org.apache.thrift.ProcessFunction { + public delete_column_statistics_by_partition() { + super("delete_column_statistics_by_partition"); + } + + protected delete_column_statistics_by_partition_args getEmptyArgsInstance() { + return new delete_column_statistics_by_partition_args(); + } + + protected delete_column_statistics_by_partition_result getResult(I iface, delete_column_statistics_by_partition_args args) throws org.apache.thrift.TException { + delete_column_statistics_by_partition_result result = new delete_column_statistics_by_partition_result(); + try { + result.success = iface.delete_column_statistics_by_partition(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_column_statistics_by_table extends org.apache.thrift.ProcessFunction { + public delete_column_statistics_by_table() { + super("delete_column_statistics_by_table"); + } + + protected delete_column_statistics_by_table_args getEmptyArgsInstance() { + return new delete_column_statistics_by_table_args(); + } + + protected delete_column_statistics_by_table_result getResult(I iface, delete_column_statistics_by_table_args args) throws org.apache.thrift.TException { + delete_column_statistics_by_table_result result = new delete_column_statistics_by_table_result(); + try { + result.success = iface.delete_column_statistics_by_table(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"); @@ -54768,7 +55301,4944 @@ 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 _list268 = iprot.readListBegin(); + this.success = new ArrayList(_list268.size); + for (int _i269 = 0; _i269 < _list268.size; ++_i269) + { + Index _elem270; // required + _elem270 = new Index(); + _elem270.read(iprot); + this.success.add(_elem270); + } + 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 _iter271 : this.success) + { + _iter271.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 _list272 = iprot.readListBegin(); + this.success = new ArrayList(_list272.size); + for (int _i273 = 0; _i273 < _list272.size; ++_i273) + { + String _elem274; // required + _elem274 = iprot.readString(); + this.success.add(_elem274); + } + 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 _iter275 : this.success) + { + oprot.writeString(_iter275); + } + 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 write_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("write_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.LIST, (short)1); + + private List 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.ListMetaData(org.apache.thrift.protocol.TType.LIST, + 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(write_column_statistics_args.class, metaDataMap); + } + + public write_column_statistics_args() { + } + + public write_column_statistics_args( + List stats_obj) + { + this(); + this.stats_obj = stats_obj; + } + + /** + * Performs a deep copy on other. + */ + public write_column_statistics_args(write_column_statistics_args other) { + if (other.isSetStats_obj()) { + List __this__stats_obj = new ArrayList(); + for (ColumnStatistics other_element : other.stats_obj) { + __this__stats_obj.add(new ColumnStatistics(other_element)); + } + this.stats_obj = __this__stats_obj; + } + } + + public write_column_statistics_args deepCopy() { + return new write_column_statistics_args(this); + } + + @Override + public void clear() { + this.stats_obj = null; + } + + public int getStats_objSize() { + return (this.stats_obj == null) ? 0 : this.stats_obj.size(); + } + + public java.util.Iterator getStats_objIterator() { + return (this.stats_obj == null) ? null : this.stats_obj.iterator(); + } + + public void addToStats_obj(ColumnStatistics elem) { + if (this.stats_obj == null) { + this.stats_obj = new ArrayList(); + } + this.stats_obj.add(elem); + } + + public List getStats_obj() { + return this.stats_obj; + } + + public void setStats_obj(List 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((List)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 write_column_statistics_args) + return this.equals((write_column_statistics_args)that); + return false; + } + + public boolean equals(write_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(write_column_statistics_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + write_column_statistics_args typedOther = (write_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.LIST) { + { + org.apache.thrift.protocol.TList _list276 = iprot.readListBegin(); + this.stats_obj = new ArrayList(_list276.size); + for (int _i277 = 0; _i277 < _list276.size; ++_i277) + { + ColumnStatistics _elem278; // required + _elem278 = new ColumnStatistics(); + _elem278.read(iprot); + this.stats_obj.add(_elem278); + } + 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.stats_obj != null) { + oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.stats_obj.size())); + for (ColumnStatistics _iter279 : this.stats_obj) + { + _iter279.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("write_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 write_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("write_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(write_column_statistics_result.class, metaDataMap); + } + + public write_column_statistics_result() { + } + + public write_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 write_column_statistics_result(write_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 write_column_statistics_result deepCopy() { + return new write_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 write_column_statistics_result) + return this.equals((write_column_statistics_result)that); + return false; + } + + public boolean equals(write_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(write_column_statistics_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + write_column_statistics_result typedOther = (write_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); @@ -54776,12 +60246,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); } @@ -54794,7 +60280,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(); @@ -54802,6 +60292,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(); @@ -54809,9 +60307,13 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_index_result("); + StringBuilder sb = new StringBuilder("write_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"); @@ -54827,6 +60329,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(); } @@ -54845,6 +60363,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); @@ -54853,25 +60373,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_column_statistics_by_table_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_column_statistics_by_table_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(); @@ -54890,10 +60407,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; } @@ -54934,8 +60449,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 { @@ -54944,60 +60457,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_column_statistics_by_table_args.class, metaDataMap); } - public drop_index_by_name_args() { + public get_column_statistics_by_table_args() { } - public drop_index_by_name_args( + public get_column_statistics_by_table_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_column_statistics_by_table_args(get_column_statistics_by_table_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_column_statistics_by_table_args deepCopy() { + return new get_column_statistics_by_table_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() { @@ -55046,51 +60549,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: @@ -55109,19 +60590,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; @@ -55136,11 +60609,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(); @@ -55157,10 +60627,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(); } @@ -55169,12 +60637,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_column_statistics_by_table_args) + return this.equals((get_column_statistics_by_table_args)that); return false; } - public boolean equals(drop_index_by_name_args that) { + public boolean equals(get_column_statistics_by_table_args that) { if (that == null) return false; @@ -55196,21 +60664,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; } @@ -55231,26 +60690,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_column_statistics_by_table_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_column_statistics_by_table_args typedOther = (get_column_statistics_by_table_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -55272,22 +60726,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; } @@ -55323,17 +60767,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); } @@ -55361,21 +60797,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_column_statistics_by_table_args("); boolean first = true; sb.append("db_name:"); @@ -55394,17 +60827,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(); } @@ -55423,8 +60852,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); @@ -55433,22 +60860,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_column_statistics_by_table_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_column_statistics_by_table_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(); @@ -55469,6 +60902,10 @@ public class ThriftHiveMetastore { return O1; case 2: // O2 return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; default: return null; } @@ -55509,84 +60946,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_column_statistics_by_table_result.class, metaDataMap); } - public drop_index_by_name_result() { + public get_column_statistics_by_table_result() { } - public drop_index_by_name_result( - boolean success, + public get_column_statistics_by_table_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_column_statistics_by_table_result(get_column_statistics_by_table_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_column_statistics_by_table_result deepCopy() { + return new get_column_statistics_by_table_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() { @@ -55635,13 +61085,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; @@ -55661,13 +61157,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(); @@ -55675,6 +61187,12 @@ public class ThriftHiveMetastore { case O2: return getO2(); + case O3: + return getO3(); + + case O4: + return getO4(); + } throw new IllegalStateException(); } @@ -55692,6 +61210,10 @@ public class ThriftHiveMetastore { return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); } throw new IllegalStateException(); } @@ -55700,21 +61222,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_column_statistics_by_table_result) + return this.equals((get_column_statistics_by_table_result)that); return false; } - public boolean equals(drop_index_by_name_result that) { + public boolean equals(get_column_statistics_by_table_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; } @@ -55736,6 +61258,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; } @@ -55743,7 +61283,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); @@ -55758,16 +61298,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_column_statistics_by_table_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_column_statistics_by_table_result typedOther = (get_column_statistics_by_table_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -55799,6 +61349,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; } @@ -55817,9 +61387,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); } @@ -55840,6 +61410,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); } @@ -55854,7 +61440,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); @@ -55864,6 +61450,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(); @@ -55871,11 +61465,15 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_result("); + StringBuilder sb = new StringBuilder("get_column_statistics_by_table_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:"); @@ -55893,6 +61491,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(); } @@ -55911,8 +61525,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); @@ -55921,22 +61533,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_column_statistics_by_partition_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_column_statistics_by_partition_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(); @@ -55955,8 +61570,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; } @@ -56005,50 +61622,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_column_statistics_by_partition_args.class, metaDataMap); } - public get_index_by_name_args() { + public get_column_statistics_by_partition_args() { } - public get_index_by_name_args( + public get_column_statistics_by_partition_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_column_statistics_by_partition_args(get_column_statistics_by_partition_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_column_statistics_by_partition_args deepCopy() { + return new get_column_statistics_by_partition_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() { @@ -56097,26 +61722,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; } } @@ -56138,11 +61786,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; @@ -56157,8 +61813,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(); @@ -56175,8 +61834,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(); } @@ -56185,12 +61846,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_column_statistics_by_partition_args) + return this.equals((get_column_statistics_by_partition_args)that); return false; } - public boolean equals(get_index_by_name_args that) { + public boolean equals(get_column_statistics_by_partition_args that) { if (that == null) return false; @@ -56212,12 +61873,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; } @@ -56238,21 +61908,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_column_statistics_by_partition_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_column_statistics_by_partition_args typedOther = (get_column_statistics_by_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -56274,12 +61949,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; } @@ -56315,9 +62000,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); } @@ -56345,9 +62037,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(); @@ -56356,7 +62053,7 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_args("); + StringBuilder sb = new StringBuilder("get_column_statistics_by_partition_args("); boolean first = true; sb.append("db_name:"); @@ -56375,11 +62072,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(")"); @@ -56408,22 +62113,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_column_statistics_by_partition_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_column_statistics_by_partition_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(); @@ -56444,6 +62155,10 @@ public class ThriftHiveMetastore { return O1; case 2: // O2 return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; default: return null; } @@ -56489,46 +62204,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_column_statistics_by_partition_result.class, metaDataMap); } - public get_index_by_name_result() { + public get_column_statistics_by_partition_result() { } - public get_index_by_name_result( - Index success, - MetaException o1, - NoSuchObjectException o2) + public get_column_statistics_by_partition_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_column_statistics_by_partition_result(get_column_statistics_by_partition_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_column_statistics_by_partition_result deepCopy() { + return new get_column_statistics_by_partition_result(this); } @Override @@ -56536,13 +62265,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; } @@ -56561,11 +62292,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; } @@ -56584,11 +62315,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; } @@ -56607,13 +62338,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; @@ -56621,7 +62398,7 @@ public class ThriftHiveMetastore { if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); } break; @@ -56629,7 +62406,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; @@ -56647,6 +62440,12 @@ public class ThriftHiveMetastore { case O2: return getO2(); + case O3: + return getO3(); + + case O4: + return getO4(); + } throw new IllegalStateException(); } @@ -56664,6 +62463,10 @@ public class ThriftHiveMetastore { return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); } throw new IllegalStateException(); } @@ -56672,12 +62475,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_column_statistics_by_partition_result) + return this.equals((get_column_statistics_by_partition_result)that); return false; } - public boolean equals(get_index_by_name_result that) { + public boolean equals(get_column_statistics_by_partition_result that) { if (that == null) return false; @@ -56708,6 +62511,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; } @@ -56730,16 +62551,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_column_statistics_by_partition_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_column_statistics_by_partition_result typedOther = (get_column_statistics_by_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -56771,6 +62602,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; } @@ -56790,7 +62641,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); @@ -56798,7 +62649,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); @@ -56806,12 +62657,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); } @@ -56836,6 +62703,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(); @@ -56843,7 +62718,7 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_result("); + StringBuilder sb = new StringBuilder("get_column_statistics_by_partition_result("); boolean first = true; sb.append("success:"); @@ -56869,6 +62744,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(); } @@ -56895,22 +62786,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_column_statistics_by_partition_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_column_statistics_by_partition_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(); @@ -56929,8 +62823,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; } @@ -56971,8 +62867,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 { @@ -56981,54 +62875,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_column_statistics_by_partition_args.class, metaDataMap); } - public get_indexes_args() { - this.max_indexes = (short)-1; - + public delete_column_statistics_by_partition_args() { } - public get_indexes_args( + public delete_column_statistics_by_partition_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_column_statistics_by_partition_args(delete_column_statistics_by_partition_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_column_statistics_by_partition_args deepCopy() { + return new delete_column_statistics_by_partition_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() { @@ -57077,26 +62975,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) { @@ -57117,11 +63039,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; @@ -57136,8 +63066,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(); @@ -57154,8 +63087,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(); } @@ -57164,12 +63099,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_column_statistics_by_partition_args) + return this.equals((delete_column_statistics_by_partition_args)that); return false; } - public boolean equals(get_indexes_args that) { + public boolean equals(delete_column_statistics_by_partition_args that) { if (that == null) return false; @@ -57191,12 +63126,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; } @@ -57217,21 +63161,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_column_statistics_by_partition_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_column_statistics_by_partition_args typedOther = (delete_column_statistics_by_partition_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -57253,12 +63202,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; } @@ -57294,10 +63253,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); } @@ -57325,16 +63290,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_column_statistics_by_partition_args("); boolean first = true; sb.append("db_name:"); @@ -57353,8 +63325,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(); @@ -57374,8 +63358,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); @@ -57384,22 +63366,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_column_statistics_by_partition_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_column_statistics_by_partition_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(); @@ -57420,6 +63408,10 @@ public class ThriftHiveMetastore { return O1; case 2: // O2 return O2; + case 3: // O3 + return O3; + case 4: // O4 + return O4; default: return null; } @@ -57460,101 +63452,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_column_statistics_by_partition_result.class, metaDataMap); } - public get_indexes_result() { + public delete_column_statistics_by_partition_result() { } - public get_indexes_result( - List success, + public delete_column_statistics_by_partition_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_column_statistics_by_partition_result(delete_column_statistics_by_partition_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_column_statistics_by_partition_result deepCopy() { + return new delete_column_statistics_by_partition_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() { @@ -57603,13 +63594,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; @@ -57629,13 +63666,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(); @@ -57643,6 +63696,12 @@ public class ThriftHiveMetastore { case O2: return getO2(); + case O3: + return getO3(); + + case O4: + return getO4(); + } throw new IllegalStateException(); } @@ -57660,6 +63719,10 @@ public class ThriftHiveMetastore { return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); } throw new IllegalStateException(); } @@ -57668,21 +63731,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_column_statistics_by_partition_result) + return this.equals((delete_column_statistics_by_partition_result)that); return false; } - public boolean equals(get_indexes_result that) { + public boolean equals(delete_column_statistics_by_partition_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; } @@ -57704,6 +63767,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; } @@ -57711,7 +63792,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); @@ -57726,16 +63807,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_column_statistics_by_partition_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_column_statistics_by_partition_result typedOther = (delete_column_statistics_by_partition_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -57767,6 +63858,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; } @@ -57785,19 +63896,9 @@ public class ThriftHiveMetastore { } switch (field.id) { case 0: // SUCCESS - if (field.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list268 = iprot.readListBegin(); - this.success = new ArrayList(_list268.size); - for (int _i269 = 0; _i269 < _list268.size; ++_i269) - { - Index _elem270; // required - _elem270 = new Index(); - _elem270.read(iprot); - this.success.add(_elem270); - } - 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); } @@ -57818,6 +63919,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); } @@ -57832,14 +63949,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 _iter271 : this.success) - { - _iter271.write(oprot); - } - oprot.writeListEnd(); - } + oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -57849,6 +63959,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(); @@ -57856,15 +63974,11 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_result("); + StringBuilder sb = new StringBuilder("delete_column_statistics_by_partition_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:"); @@ -57882,6 +63996,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(); } @@ -57900,6 +64030,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); @@ -57908,22 +64040,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_column_statistics_by_table_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_column_statistics_by_table_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(); @@ -57942,8 +64074,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; } @@ -57984,8 +64116,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 { @@ -57994,54 +64124,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_column_statistics_by_table_args.class, metaDataMap); } - public get_index_names_args() { - this.max_indexes = (short)-1; - + public delete_column_statistics_by_table_args() { } - public get_index_names_args( + public delete_column_statistics_by_table_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_column_statistics_by_table_args(delete_column_statistics_by_table_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_column_statistics_by_table_args deepCopy() { + return new delete_column_statistics_by_table_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() { @@ -58090,26 +64216,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) { @@ -58130,11 +64257,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; @@ -58149,8 +64276,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(); @@ -58167,8 +64294,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(); } @@ -58177,12 +64304,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_column_statistics_by_table_args) + return this.equals((delete_column_statistics_by_table_args)that); return false; } - public boolean equals(get_index_names_args that) { + public boolean equals(delete_column_statistics_by_table_args that) { if (that == null) return false; @@ -58204,12 +64331,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; } @@ -58230,21 +64357,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_column_statistics_by_table_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_column_statistics_by_table_args typedOther = (delete_column_statistics_by_table_args)other; lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); if (lastComparison != 0) { @@ -58266,12 +64393,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; } @@ -58307,10 +64434,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); } @@ -58338,16 +64464,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_column_statistics_by_table_args("); boolean first = true; sb.append("db_name:"); @@ -58366,8 +64494,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(); @@ -58387,8 +64519,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); @@ -58397,19 +64527,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_column_statistics_by_table_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_column_statistics_by_table_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(); @@ -58426,8 +64565,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; } @@ -58468,92 +64613,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_column_statistics_by_table_result.class, metaDataMap); } - public get_index_names_result() { + public delete_column_statistics_by_table_result() { } - public get_index_names_result( - List success, - MetaException o2) + public delete_column_statistics_by_table_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_column_statistics_by_table_result(delete_column_statistics_by_table_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_column_statistics_by_table_result deepCopy() { + return new delete_column_statistics_by_table_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; } } @@ -58580,13 +64755,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; @@ -58598,17 +64827,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(); } @@ -58622,8 +64876,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(); } @@ -58632,21 +64892,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_column_statistics_by_table_result) + return this.equals((delete_column_statistics_by_table_result)that); return false; } - public boolean equals(get_index_names_result that) { + public boolean equals(delete_column_statistics_by_table_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; } @@ -58659,6 +64928,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; } @@ -58666,26 +64953,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_column_statistics_by_table_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_column_statistics_by_table_result typedOther = (delete_column_statistics_by_table_result)other; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { @@ -58697,6 +64999,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; @@ -58707,6 +65019,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; } @@ -58725,23 +65057,22 @@ 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) - { - String _elem274; // required - _elem274 = iprot.readString(); - 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); } 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); @@ -58749,6 +65080,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); } @@ -58763,19 +65110,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 _iter275 : this.success) - { - oprot.writeString(_iter275); - } - 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(); @@ -58783,14 +65135,18 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_result("); + StringBuilder sb = new StringBuilder("delete_column_statistics_by_table_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(", "); @@ -58801,6 +65157,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(); } @@ -58819,6 +65191,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); @@ -60752,13 +67126,13 @@ public class ThriftHiveMetastore { 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) + org.apache.thrift.protocol.TList _list280 = iprot.readListBegin(); + this.success = new ArrayList(_list280.size); + for (int _i281 = 0; _i281 < _list280.size; ++_i281) { - String _elem278; // required - _elem278 = iprot.readString(); - this.success.add(_elem278); + String _elem282; // required + _elem282 = iprot.readString(); + this.success.add(_elem282); } iprot.readListEnd(); } @@ -60790,9 +67164,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 _iter279 : this.success) + for (String _iter283 : this.success) { - oprot.writeString(_iter279); + oprot.writeString(_iter283); } oprot.writeListEnd(); } @@ -63667,14 +70041,14 @@ 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) { - Role _elem282; // required - _elem282 = new Role(); - _elem282.read(iprot); - this.success.add(_elem282); + Role _elem286; // required + _elem286 = new Role(); + _elem286.read(iprot); + this.success.add(_elem286); } iprot.readListEnd(); } @@ -63706,9 +70080,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 _iter283 : this.success) + for (Role _iter287 : this.success) { - _iter283.write(oprot); + _iter287.write(oprot); } oprot.writeListEnd(); } @@ -64186,13 +70560,13 @@ public class ThriftHiveMetastore { case 3: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list284 = iprot.readListBegin(); - this.group_names = new ArrayList(_list284.size); - for (int _i285 = 0; _i285 < _list284.size; ++_i285) + org.apache.thrift.protocol.TList _list288 = iprot.readListBegin(); + this.group_names = new ArrayList(_list288.size); + for (int _i289 = 0; _i289 < _list288.size; ++_i289) { - String _elem286; // required - _elem286 = iprot.readString(); - this.group_names.add(_elem286); + String _elem290; // required + _elem290 = iprot.readString(); + this.group_names.add(_elem290); } iprot.readListEnd(); } @@ -64227,9 +70601,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 _iter287 : this.group_names) + for (String _iter291 : this.group_names) { - oprot.writeString(_iter287); + oprot.writeString(_iter291); } oprot.writeListEnd(); } @@ -65517,14 +71891,14 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list288 = iprot.readListBegin(); - this.success = new ArrayList(_list288.size); - for (int _i289 = 0; _i289 < _list288.size; ++_i289) + org.apache.thrift.protocol.TList _list292 = iprot.readListBegin(); + this.success = new ArrayList(_list292.size); + for (int _i293 = 0; _i293 < _list292.size; ++_i293) { - HiveObjectPrivilege _elem290; // required - _elem290 = new HiveObjectPrivilege(); - _elem290.read(iprot); - this.success.add(_elem290); + HiveObjectPrivilege _elem294; // required + _elem294 = new HiveObjectPrivilege(); + _elem294.read(iprot); + this.success.add(_elem294); } iprot.readListEnd(); } @@ -65556,9 +71930,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 _iter291 : this.success) + for (HiveObjectPrivilege _iter295 : this.success) { - _iter291.write(oprot); + _iter295.write(oprot); } oprot.writeListEnd(); } @@ -67349,13 +73723,13 @@ public class ThriftHiveMetastore { case 2: // GROUP_NAMES if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list292 = iprot.readListBegin(); - this.group_names = new ArrayList(_list292.size); - for (int _i293 = 0; _i293 < _list292.size; ++_i293) + org.apache.thrift.protocol.TList _list296 = iprot.readListBegin(); + this.group_names = new ArrayList(_list296.size); + for (int _i297 = 0; _i297 < _list296.size; ++_i297) { - String _elem294; // required - _elem294 = iprot.readString(); - this.group_names.add(_elem294); + String _elem298; // required + _elem298 = iprot.readString(); + this.group_names.add(_elem298); } iprot.readListEnd(); } @@ -67385,9 +73759,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 _iter295 : this.group_names) + for (String _iter299 : this.group_names) { - oprot.writeString(_iter295); + oprot.writeString(_iter299); } oprot.writeListEnd(); } @@ -67773,13 +74147,13 @@ public class ThriftHiveMetastore { case 0: // SUCCESS if (field.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list296 = iprot.readListBegin(); - this.success = new ArrayList(_list296.size); - for (int _i297 = 0; _i297 < _list296.size; ++_i297) + org.apache.thrift.protocol.TList _list300 = iprot.readListBegin(); + this.success = new ArrayList(_list300.size); + for (int _i301 = 0; _i301 < _list300.size; ++_i301) { - String _elem298; // required - _elem298 = iprot.readString(); - this.success.add(_elem298); + String _elem302; // required + _elem302 = iprot.readString(); + this.success.add(_elem302); } iprot.readListEnd(); } @@ -67811,9 +74185,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 _iter299 : this.success) + for (String _iter303 : this.success) { - oprot.writeString(_iter299); + oprot.writeString(_iter303); } oprot.writeListEnd(); } diff --git metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php index 9427630..5c14008 100644 --- metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php +++ metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php @@ -64,6 +64,11 @@ 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 write_column_statistics($stats_obj); + public function get_column_statistics_by_table($db_name, $tbl_name, $col_name); + public function get_column_statistics_by_partition($db_name, $tbl_name, $part_name, $col_name); + public function delete_column_statistics_by_partition($db_name, $tbl_name, $part_name, $col_name); + public function delete_column_statistics_by_table($db_name, $tbl_name, $col_name); public function create_role($role); public function drop_role($role_name); public function get_role_names(); @@ -3257,34 +3262,34 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH throw new Exception("get_index_names failed: unknown result"); } - public function create_role($role) + public function write_column_statistics($stats_obj) { - $this->send_create_role($role); - return $this->recv_create_role(); + $this->send_write_column_statistics($stats_obj); + return $this->recv_write_column_statistics(); } - public function send_create_role($role) + public function send_write_column_statistics($stats_obj) { - $args = new ThriftHiveMetastore_create_role_args(); - $args->role = $role; + $args = new ThriftHiveMetastore_write_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_, 'write_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('write_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_write_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_write_column_statistics_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3298,7 +3303,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_create_role_result(); + $result = new ThriftHiveMetastore_write_column_statistics_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3308,37 +3313,48 @@ 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("write_column_statistics failed: unknown result"); } - public function drop_role($role_name) + public function get_column_statistics_by_table($db_name, $tbl_name, $col_name) { - $this->send_drop_role($role_name); - return $this->recv_drop_role(); + $this->send_get_column_statistics_by_table($db_name, $tbl_name, $col_name); + return $this->recv_get_column_statistics_by_table(); } - public function send_drop_role($role_name) + public function send_get_column_statistics_by_table($db_name, $tbl_name, $col_name) { - $args = new ThriftHiveMetastore_drop_role_args(); - $args->role_name = $role_name; + $args = new ThriftHiveMetastore_get_column_statistics_by_table_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_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_column_statistics_by_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_column_statistics_by_table', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_drop_role() + public function recv_get_column_statistics_by_table() { $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_get_column_statistics_by_table_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3352,7 +3368,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_drop_role_result(); + $result = new ThriftHiveMetastore_get_column_statistics_by_table_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3362,36 +3378,49 @@ 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("get_column_statistics_by_table failed: unknown result"); } - public function get_role_names() + public function get_column_statistics_by_partition($db_name, $tbl_name, $part_name, $col_name) { - $this->send_get_role_names(); - return $this->recv_get_role_names(); + $this->send_get_column_statistics_by_partition($db_name, $tbl_name, $part_name, $col_name); + return $this->recv_get_column_statistics_by_partition(); } - public function send_get_role_names() + public function send_get_column_statistics_by_partition($db_name, $tbl_name, $part_name, $col_name) { - $args = new ThriftHiveMetastore_get_role_names_args(); + $args = new ThriftHiveMetastore_get_column_statistics_by_partition_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_, 'get_role_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'get_column_statistics_by_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('get_role_names', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('get_column_statistics_by_partition', 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_column_statistics_by_partition() { $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_column_statistics_by_partition_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3405,7 +3434,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_get_role_names_result(); + $result = new ThriftHiveMetastore_get_column_statistics_by_partition_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3415,42 +3444,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_column_statistics_by_partition failed: unknown result"); } - public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + public function delete_column_statistics_by_partition($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_delete_column_statistics_by_partition($db_name, $tbl_name, $part_name, $col_name); + return $this->recv_delete_column_statistics_by_partition(); } - public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) + public function send_delete_column_statistics_by_partition($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_delete_column_statistics_by_partition_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_, 'delete_column_statistics_by_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('delete_column_statistics_by_partition', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_grant_role() + public function recv_delete_column_statistics_by_partition() { $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_delete_column_statistics_by_partition_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3464,7 +3500,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_grant_role_result(); + $result = new ThriftHiveMetastore_delete_column_statistics_by_partition_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3474,39 +3510,48 @@ 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("delete_column_statistics_by_partition failed: unknown result"); } - public function revoke_role($role_name, $principal_name, $principal_type) + public function delete_column_statistics_by_table($db_name, $tbl_name, $col_name) { - $this->send_revoke_role($role_name, $principal_name, $principal_type); - return $this->recv_revoke_role(); + $this->send_delete_column_statistics_by_table($db_name, $tbl_name, $col_name); + return $this->recv_delete_column_statistics_by_table(); } - public function send_revoke_role($role_name, $principal_name, $principal_type) + public function send_delete_column_statistics_by_table($db_name, $tbl_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_column_statistics_by_table_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_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'delete_column_statistics_by_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('delete_column_statistics_by_table', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_revoke_role() + public function recv_delete_column_statistics_by_table() { $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_column_statistics_by_table_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3520,7 +3565,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_revoke_role_result(); + $result = new ThriftHiveMetastore_delete_column_statistics_by_table_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3530,38 +3575,46 @@ 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_column_statistics_by_table failed: unknown result"); } - public function list_roles($principal_name, $principal_type) + public function create_role($role) { - $this->send_list_roles($principal_name, $principal_type); - return $this->recv_list_roles(); + $this->send_create_role($role); + return $this->recv_create_role(); } - public function send_list_roles($principal_name, $principal_type) + public function send_create_role($role) { - $args = new ThriftHiveMetastore_list_roles_args(); - $args->principal_name = $principal_name; - $args->principal_type = $principal_type; + $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_, 'list_roles', 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('list_roles', 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_list_roles() + 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_list_roles_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_create_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3575,7 +3628,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_list_roles_result(); + $result = new ThriftHiveMetastore_create_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3585,39 +3638,37 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("list_roles failed: unknown result"); + throw new Exception("create_role failed: unknown result"); } - public function get_privilege_set($hiveObject, $user_name, $group_names) + public function drop_role($role_name) { - $this->send_get_privilege_set($hiveObject, $user_name, $group_names); - return $this->recv_get_privilege_set(); + $this->send_drop_role($role_name); + return $this->recv_drop_role(); } - public function send_get_privilege_set($hiveObject, $user_name, $group_names) + public function send_drop_role($role_name) { - $args = new ThriftHiveMetastore_get_privilege_set_args(); - $args->hiveObject = $hiveObject; - $args->user_name = $user_name; - $args->group_names = $group_names; + $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_, 'get_privilege_set', 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('get_privilege_set', 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_get_privilege_set() + 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_get_privilege_set_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_drop_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3631,7 +3682,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_get_privilege_set_result(); + $result = new ThriftHiveMetastore_drop_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3641,39 +3692,36 @@ 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("drop_role failed: unknown result"); } - public function list_privileges($principal_name, $principal_type, $hiveObject) + public function get_role_names() { - $this->send_list_privileges($principal_name, $principal_type, $hiveObject); - return $this->recv_list_privileges(); + $this->send_get_role_names(); + return $this->recv_get_role_names(); } - public function send_list_privileges($principal_name, $principal_type, $hiveObject) + public function send_get_role_names() { - $args = new ThriftHiveMetastore_list_privileges_args(); - $args->principal_name = $principal_name; - $args->principal_type = $principal_type; - $args->hiveObject = $hiveObject; + $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_, 'list_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('list_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_list_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_list_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; @@ -3687,7 +3735,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_list_privileges_result(); + $result = new ThriftHiveMetastore_get_role_names_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3697,37 +3745,42 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("list_privileges failed: unknown result"); + throw new Exception("get_role_names failed: unknown result"); } - public function grant_privileges($privileges) + public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) { - $this->send_grant_privileges($privileges); - return $this->recv_grant_privileges(); + $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option); + return $this->recv_grant_role(); } - public function send_grant_privileges($privileges) + public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option) { - $args = new ThriftHiveMetastore_grant_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_, 'grant_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('grant_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_grant_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_grant_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; @@ -3741,7 +3794,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_grant_privileges_result(); + $result = new ThriftHiveMetastore_grant_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3751,37 +3804,39 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("grant_privileges failed: unknown result"); + throw new Exception("grant_role failed: unknown result"); } - public function revoke_privileges($privileges) + public function revoke_role($role_name, $principal_name, $principal_type) { - $this->send_revoke_privileges($privileges); - return $this->recv_revoke_privileges(); + $this->send_revoke_role($role_name, $principal_name, $principal_type); + return $this->recv_revoke_role(); } - public function send_revoke_privileges($privileges) + public function send_revoke_role($role_name, $principal_name, $principal_type) { - $args = new ThriftHiveMetastore_revoke_privileges_args(); - $args->privileges = $privileges; + $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_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_revoke_privileges() + 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_privileges_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_revoke_role_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3795,7 +3850,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_revoke_privileges_result(); + $result = new ThriftHiveMetastore_revoke_role_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3805,38 +3860,38 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH if ($result->o1 !== null) { throw $result->o1; } - throw new Exception("revoke_privileges failed: unknown result"); + throw new Exception("revoke_role failed: unknown result"); } - public function set_ugi($user_name, $group_names) + public function list_roles($principal_name, $principal_type) { - $this->send_set_ugi($user_name, $group_names); - return $this->recv_set_ugi(); + $this->send_list_roles($principal_name, $principal_type); + return $this->recv_list_roles(); } - public function send_set_ugi($user_name, $group_names) + public function send_list_roles($principal_name, $principal_type) { - $args = new ThriftHiveMetastore_set_ugi_args(); - $args->user_name = $user_name; - $args->group_names = $group_names; + $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_, 'set_ugi', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { - $this->output_->writeMessageBegin('set_ugi', TMessageType::CALL, $this->seqid_); + $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } - public function recv_set_ugi() + 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_set_ugi_result', $this->input_->isStrictRead()); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_list_roles_result', $this->input_->isStrictRead()); else { $rseqid = 0; @@ -3850,7 +3905,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_set_ugi_result(); + $result = new ThriftHiveMetastore_list_roles_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3860,38 +3915,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("list_roles failed: unknown result"); } - public function get_delegation_token($token_owner, $renewer_kerberos_principal_name) + public function get_privilege_set($hiveObject, $user_name, $group_names) { - $this->send_get_delegation_token($token_owner, $renewer_kerberos_principal_name); - return $this->recv_get_delegation_token(); + $this->send_get_privilege_set($hiveObject, $user_name, $group_names); + return $this->recv_get_privilege_set(); } - public function send_get_delegation_token($token_owner, $renewer_kerberos_principal_name) + public function send_get_privilege_set($hiveObject, $user_name, $group_names) { - $args = new ThriftHiveMetastore_get_delegation_token_args(); - $args->token_owner = $token_owner; - $args->renewer_kerberos_principal_name = $renewer_kerberos_principal_name; + $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_, 'get_delegation_token', 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('get_delegation_token', 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_get_delegation_token() + 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_get_delegation_token_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; @@ -3905,7 +3961,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_get_delegation_token_result(); + $result = new ThriftHiveMetastore_get_privilege_set_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3915,37 +3971,39 @@ 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("get_privilege_set failed: unknown result"); } - public function renew_delegation_token($token_str_form) + public function list_privileges($principal_name, $principal_type, $hiveObject) { - $this->send_renew_delegation_token($token_str_form); - return $this->recv_renew_delegation_token(); + $this->send_list_privileges($principal_name, $principal_type, $hiveObject); + return $this->recv_list_privileges(); } - public function send_renew_delegation_token($token_str_form) + public function send_list_privileges($principal_name, $principal_type, $hiveObject) { - $args = new ThriftHiveMetastore_renew_delegation_token_args(); - $args->token_str_form = $token_str_form; + $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_, 'renew_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('renew_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_renew_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_renew_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; @@ -3959,7 +4017,7 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_renew_delegation_token_result(); + $result = new ThriftHiveMetastore_list_privileges_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } @@ -3969,37 +4027,37 @@ 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("list_privileges failed: unknown result"); } - public function cancel_delegation_token($token_str_form) + public function grant_privileges($privileges) { - $this->send_cancel_delegation_token($token_str_form); - $this->recv_cancel_delegation_token(); + $this->send_grant_privileges($privileges); + return $this->recv_grant_privileges(); } - public function send_cancel_delegation_token($token_str_form) + public function send_grant_privileges($privileges) { - $args = new ThriftHiveMetastore_cancel_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_, 'cancel_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('cancel_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_cancel_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_cancel_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; @@ -4013,88 +4071,1360 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH $this->input_->readMessageEnd(); throw $x; } - $result = new ThriftHiveMetastore_cancel_delegation_token_result(); + $result = new ThriftHiveMetastore_grant_privileges_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } + if ($result->success !== null) { + return $result->success; + } if ($result->o1 !== null) { throw $result->o1; } - return; + throw new Exception("grant_privileges failed: unknown result"); } -} - -// HELPER FUNCTIONS AND STRUCTURES + public function revoke_privileges($privileges) + { + $this->send_revoke_privileges($privileges); + return $this->recv_revoke_privileges(); + } -class ThriftHiveMetastore_create_database_args { - static $_TSPEC; + public function send_revoke_privileges($privileges) + { + $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_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } - public $database = null; + 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_revoke_privileges_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; - 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']; + $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 getName() { - return 'ThriftHiveMetastore_create_database_args'; + public function set_ugi($user_name, $group_names) + { + $this->send_set_ugi($user_name, $group_names); + return $this->recv_set_ugi(); } - public function read($input) + public function send_set_ugi($user_name, $group_names) { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) + $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) { - $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(); + 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(); } - $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); + 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; + $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; } - $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); - $xfer += $this->database->write($output); + $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(); + $_size220 = 0; + $_etype223 = 0; + $xfer += $input->readListBegin($_etype223, $_size220); + for ($_i224 = 0; $_i224 < $_size220; ++$_i224) + { + $elem225 = null; + $xfer += $input->readString($elem225); + $this->success []= $elem225; + } + $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 $iter226) + { + $xfer += $output->writeString($iter226); + } + } + $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(); + $_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_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 $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_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(); @@ -4104,12 +5434,11 @@ class ThriftHiveMetastore_create_database_args { } -class ThriftHiveMetastore_create_database_result { +class ThriftHiveMetastore_alter_database_result { static $_TSPEC; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4117,17 +5446,12 @@ class ThriftHiveMetastore_create_database_result { 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', ), ); } @@ -4138,14 +5462,11 @@ class ThriftHiveMetastore_create_database_result { 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_alter_database_result'; } public function read($input) @@ -4165,7 +5486,7 @@ class ThriftHiveMetastore_create_database_result { { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new AlreadyExistsException(); + $this->o1 = new MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -4173,20 +5494,12 @@ class ThriftHiveMetastore_create_database_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new InvalidObjectException(); + $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; @@ -4199,7 +5512,7 @@ class ThriftHiveMetastore_create_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -4210,11 +5523,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; @@ -4222,7 +5530,7 @@ class ThriftHiveMetastore_create_database_result { } -class ThriftHiveMetastore_get_database_args { +class ThriftHiveMetastore_get_type_args { static $_TSPEC; public $name = null; @@ -4244,7 +5552,7 @@ class ThriftHiveMetastore_get_database_args { } public function getName() { - return 'ThriftHiveMetastore_get_database_args'; + return 'ThriftHiveMetastore_get_type_args'; } public function read($input) @@ -4281,7 +5589,7 @@ class ThriftHiveMetastore_get_database_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_args'); if ($this->name !== null) { $xfer += $output->writeFieldBegin('name', TType::STRING, 1); $xfer += $output->writeString($this->name); @@ -4294,7 +5602,7 @@ class ThriftHiveMetastore_get_database_args { } -class ThriftHiveMetastore_get_database_result { +class ThriftHiveMetastore_get_type_result { static $_TSPEC; public $success = null; @@ -4307,17 +5615,17 @@ class ThriftHiveMetastore_get_database_result { 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'Database', + 'class' => 'Type', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), ); } @@ -4335,7 +5643,7 @@ class ThriftHiveMetastore_get_database_result { } public function getName() { - return 'ThriftHiveMetastore_get_database_result'; + return 'ThriftHiveMetastore_get_type_result'; } public function read($input) @@ -4355,7 +5663,7 @@ class ThriftHiveMetastore_get_database_result { { case 0: if ($ftype == TType::STRUCT) { - $this->success = new Database(); + $this->success = new Type(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -4363,7 +5671,7 @@ class ThriftHiveMetastore_get_database_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); @@ -4371,7 +5679,7 @@ class ThriftHiveMetastore_get_database_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); @@ -4389,7 +5697,7 @@ class ThriftHiveMetastore_get_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_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); @@ -4415,45 +5723,30 @@ class ThriftHiveMetastore_get_database_result { } -class ThriftHiveMetastore_drop_database_args { +class ThriftHiveMetastore_create_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', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), - 3 => array( - 'var' => 'cascade', - 'type' => TType::BOOL, + 'var' => 'type', + 'type' => TType::STRUCT, + 'class' => 'Type', ), ); } 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_create_type_args'; } public function read($input) @@ -4472,22 +5765,9 @@ class ThriftHiveMetastore_drop_database_args { 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::STRUCT) { + $this->type = new Type(); + $xfer += $this->type->read($input); } else { $xfer += $input->skip($ftype); } @@ -4504,20 +5784,13 @@ 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_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(); @@ -4527,9 +5800,10 @@ class ThriftHiveMetastore_drop_database_args { } -class ThriftHiveMetastore_drop_database_result { +class ThriftHiveMetastore_create_type_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; public $o3 = null; @@ -4537,15 +5811,19 @@ class ThriftHiveMetastore_drop_database_result { 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' => 'AlreadyExistsException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'InvalidOperationException', + 'class' => 'InvalidObjectException', ), 3 => array( 'var' => 'o3', @@ -4555,6 +5833,9 @@ class ThriftHiveMetastore_drop_database_result { ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -4568,7 +5849,7 @@ class ThriftHiveMetastore_drop_database_result { } public function getName() { - return 'ThriftHiveMetastore_drop_database_result'; + return 'ThriftHiveMetastore_create_type_result'; } public function read($input) @@ -4586,9 +5867,16 @@ class ThriftHiveMetastore_drop_database_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 NoSuchObjectException(); + $this->o1 = new AlreadyExistsException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -4596,7 +5884,7 @@ class ThriftHiveMetastore_drop_database_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new InvalidOperationException(); + $this->o2 = new InvalidObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -4622,7 +5910,12 @@ class ThriftHiveMetastore_drop_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + $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(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -4645,29 +5938,29 @@ class ThriftHiveMetastore_drop_database_result { } -class ThriftHiveMetastore_get_databases_args { +class ThriftHiveMetastore_drop_type_args { static $_TSPEC; - public $pattern = null; + public $type = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'pattern', + 'var' => 'type', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + if (isset($vals['type'])) { + $this->type = $vals['type']; } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_args'; + return 'ThriftHiveMetastore_drop_type_args'; } public function read($input) @@ -4687,7 +5980,7 @@ class ThriftHiveMetastore_get_databases_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->type); } else { $xfer += $input->skip($ftype); } @@ -4704,10 +5997,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_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(); @@ -4717,28 +6010,30 @@ class ThriftHiveMetastore_get_databases_args { } -class ThriftHiveMetastore_get_databases_result { +class ThriftHiveMetastore_drop_type_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' => 'MetaException', ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'NoSuchObjectException', + ), ); } if (is_array($vals)) { @@ -4748,11 +6043,14 @@ class ThriftHiveMetastore_get_databases_result { 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_drop_type_result'; } public function read($input) @@ -4771,18 +6069,8 @@ class ThriftHiveMetastore_get_databases_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size220 = 0; - $_etype223 = 0; - $xfer += $input->readListBegin($_etype223, $_size220); - for ($_i224 = 0; $_i224 < $_size220; ++$_i224) - { - $elem225 = null; - $xfer += $input->readString($elem225); - $this->success []= $elem225; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -4795,6 +6083,14 @@ class ThriftHiveMetastore_get_databases_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; @@ -4807,22 +6103,10 @@ class ThriftHiveMetastore_get_databases_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_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 $iter226) - { - $xfer += $output->writeString($iter226); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -4830,6 +6114,11 @@ class ThriftHiveMetastore_get_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(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4837,19 +6126,29 @@ class ThriftHiveMetastore_get_databases_result { } -class ThriftHiveMetastore_get_all_databases_args { +class ThriftHiveMetastore_get_type_all_args { static $_TSPEC; + public $name = null; - public function __construct() { + 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_all_databases_args'; + return 'ThriftHiveMetastore_get_type_all_args'; } public function read($input) @@ -4867,6 +6166,13 @@ class ThriftHiveMetastore_get_all_databases_args { } 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; @@ -4879,7 +6185,12 @@ 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_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(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4887,25 +6198,30 @@ class ThriftHiveMetastore_get_all_databases_args { } -class ThriftHiveMetastore_get_all_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', ), @@ -4915,14 +6231,14 @@ class ThriftHiveMetastore_get_all_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_all_databases_result'; + return 'ThriftHiveMetastore_get_type_all_result'; } public function read($input) @@ -4941,26 +6257,30 @@ class ThriftHiveMetastore_get_all_databases_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { + if ($ftype == TType::MAP) { $this->success = array(); - $_size227 = 0; - $_etype230 = 0; - $xfer += $input->readListBegin($_etype230, $_size227); - for ($_i231 = 0; $_i231 < $_size227; ++$_i231) + $_size234 = 0; + $_ktype235 = 0; + $_vtype236 = 0; + $xfer += $input->readMapBegin($_ktype235, $_vtype236, $_size234); + for ($_i238 = 0; $_i238 < $_size234; ++$_i238) { - $elem232 = null; - $xfer += $input->readString($elem232); - $this->success []= $elem232; + $key239 = ''; + $val240 = new Type(); + $xfer += $input->readString($key239); + $val240 = new Type(); + $xfer += $val240->read($input); + $this->success[$key239] = $val240; } - $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); } @@ -4977,27 +6297,28 @@ 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_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 $iter233) + foreach ($this->success as $kiter241 => $viter242) { - $xfer += $output->writeString($iter233); + $xfer += $output->writeString($kiter241); + $xfer += $viter242->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(); @@ -5007,38 +6328,37 @@ class ThriftHiveMetastore_get_all_databases_result { } -class ThriftHiveMetastore_alter_database_args { +class ThriftHiveMetastore_get_fields_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_fields_args'; } public function read($input) @@ -5058,15 +6378,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); } @@ -5083,18 +6402,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_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->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(); @@ -5104,15 +6420,26 @@ class ThriftHiveMetastore_alter_database_args { } -class ThriftHiveMetastore_alter_database_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)) { 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, @@ -5121,22 +6448,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_fields_result'; } public function read($input) @@ -5154,6 +6492,24 @@ class ThriftHiveMetastore_alter_database_result { } switch ($fid) { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size243 = 0; + $_etype246 = 0; + $xfer += $input->readListBegin($_etype246, $_size243); + for ($_i247 = 0; $_i247 < $_size243; ++$_i247) + { + $elem248 = null; + $elem248 = new FieldSchema(); + $xfer += $elem248->read($input); + $this->success []= $elem248; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { $this->o1 = new MetaException(); @@ -5164,12 +6520,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; @@ -5182,7 +6546,24 @@ class ThriftHiveMetastore_alter_database_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_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::STRUCT, count($this->success)); + { + foreach ($this->success as $iter249) + { + $xfer += $iter249->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -5193,6 +6574,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; @@ -5200,29 +6586,37 @@ class ThriftHiveMetastore_alter_database_result { } -class ThriftHiveMetastore_get_type_args { +class ThriftHiveMetastore_get_schema_args { static $_TSPEC; - public $name = null; + public $db_name = null; + public $table_name = 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' => 'table_name', '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['table_name'])) { + $this->table_name = $vals['table_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_args'; + return 'ThriftHiveMetastore_get_schema_args'; } public function read($input) @@ -5242,7 +6636,14 @@ class ThriftHiveMetastore_get_type_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->table_name); } else { $xfer += $input->skip($ftype); } @@ -5258,11 +6659,16 @@ 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 = 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->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(); @@ -5272,20 +6678,25 @@ class ThriftHiveMetastore_get_type_args { } -class ThriftHiveMetastore_get_type_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::STRUCT, - 'class' => 'Type', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'FieldSchema', + ), ), 1 => array( 'var' => 'o1', @@ -5295,7 +6706,12 @@ class ThriftHiveMetastore_get_type_result { 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'UnknownDBException', ), ); } @@ -5309,11 +6725,14 @@ class ThriftHiveMetastore_get_type_result { if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_type_result'; + return 'ThriftHiveMetastore_get_schema_result'; } public function read($input) @@ -5332,9 +6751,19 @@ class ThriftHiveMetastore_get_type_result { switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new Type(); - $xfer += $this->success->read($input); + 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(); } else { $xfer += $input->skip($ftype); } @@ -5349,12 +6778,20 @@ class ThriftHiveMetastore_get_type_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; @@ -5367,13 +6804,22 @@ class ThriftHiveMetastore_get_type_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_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 $iter256) + { + $xfer += $iter256->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -5386,6 +6832,11 @@ class ThriftHiveMetastore_get_type_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; @@ -5393,30 +6844,30 @@ class ThriftHiveMetastore_get_type_result { } -class ThriftHiveMetastore_create_type_args { +class ThriftHiveMetastore_create_table_args { static $_TSPEC; - public $type = null; + public $tbl = 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', ), ); } if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; } } } public function getName() { - return 'ThriftHiveMetastore_create_type_args'; + return 'ThriftHiveMetastore_create_table_args'; } public function read($input) @@ -5436,8 +6887,8 @@ 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); } @@ -5454,13 +6905,13 @@ 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_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(); } $xfer += $output->writeFieldStop(); @@ -5470,21 +6921,17 @@ class ThriftHiveMetastore_create_type_args { } -class ThriftHiveMetastore_create_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::BOOL, - ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, @@ -5500,12 +6947,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']; } @@ -5515,11 +6964,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_result'; } public function read($input) @@ -5537,13 +6989,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(); @@ -5568,6 +7013,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; @@ -5580,12 +7033,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_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -5601,6 +7049,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; @@ -5608,29 +7061,39 @@ class ThriftHiveMetastore_create_type_result { } -class ThriftHiveMetastore_drop_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', - 'type' => TType::STRING, + 'var' => 'tbl', + 'type' => TType::STRUCT, + '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_drop_type_args'; + return 'ThriftHiveMetastore_create_table_with_environment_context_args'; } public function read($input) @@ -5649,8 +7112,17 @@ class ThriftHiveMetastore_drop_type_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); + if ($ftype == TType::STRUCT) { + $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); } @@ -5667,10 +7139,21 @@ 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_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->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(); @@ -5680,47 +7163,57 @@ class ThriftHiveMetastore_drop_type_args { } -class ThriftHiveMetastore_drop_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, - '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_drop_type_result'; + return 'ThriftHiveMetastore_create_table_with_environment_context_result'; } public function read($input) @@ -5738,25 +7231,34 @@ class ThriftHiveMetastore_drop_type_result { } switch ($fid) { - case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + 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 1: + case 3: if ($ftype == TType::STRUCT) { - $this->o1 = new MetaException(); - $xfer += $this->o1->read($input); + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 4: if ($ftype == TType::STRUCT) { - $this->o2 = new NoSuchObjectException(); - $xfer += $this->o2->read($input); + $this->o4 = new NoSuchObjectException(); + $xfer += $this->o4->read($input); } else { $xfer += $input->skip($ftype); } @@ -5773,12 +7275,7 @@ 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_create_table_with_environment_context_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -5789,6 +7286,16 @@ class ThriftHiveMetastore_drop_type_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; @@ -5796,29 +7303,45 @@ class ThriftHiveMetastore_drop_type_result { } -class ThriftHiveMetastore_get_type_all_args { +class ThriftHiveMetastore_drop_table_args { static $_TSPEC; + public $dbname = null; public $name = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( + '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['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_get_type_all_args'; + return 'ThriftHiveMetastore_drop_table_args'; } public function read($input) @@ -5838,11 +7361,25 @@ class ThriftHiveMetastore_get_type_all_args { { 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->name); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -5855,12 +7392,22 @@ class ThriftHiveMetastore_get_type_all_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_args'); + $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, 1); + $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(); $xfer += $output->writeStructEnd(); return $xfer; @@ -5868,47 +7415,39 @@ class ThriftHiveMetastore_get_type_all_args { } -class ThriftHiveMetastore_get_type_all_result { +class ThriftHiveMetastore_drop_table_result { static $_TSPEC; - public $success = null; - public $o2 = null; + public $o1 = null; + public $o3 = 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::STRING, - ), - 'val' => array( - 'type' => TType::STRUCT, - 'class' => 'Type', - ), - ), 1 => array( - 'var' => 'o2', + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'NoSuchObjectException', + ), + 2 => 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_get_type_all_result'; + return 'ThriftHiveMetastore_drop_table_result'; } public function read($input) @@ -5926,31 +7465,18 @@ class ThriftHiveMetastore_get_type_all_result { } switch ($fid) { - case 0: - if ($ftype == TType::MAP) { - $this->success = array(); - $_size234 = 0; - $_ktype235 = 0; - $_vtype236 = 0; - $xfer += $input->readMapBegin($_ktype235, $_vtype236, $_size234); - for ($_i238 = 0; $_i238 < $_size234; ++$_i238) - { - $key239 = ''; - $val240 = new Type(); - $xfer += $input->readString($key239); - $val240 = new Type(); - $xfer += $val240->read($input); - $this->success[$key239] = $val240; - } - $xfer += $input->readMapEnd(); + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new NoSuchObjectException(); + $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); + $this->o3 = new MetaException(); + $xfer += $this->o3->read($input); } else { $xfer += $input->skip($ftype); } @@ -5967,28 +7493,15 @@ class ThriftHiveMetastore_get_type_all_result { public function write($output) { $xfer = 0; - $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::MAP, 0); - { - $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); - { - foreach ($this->success as $kiter241 => $viter242) - { - $xfer += $output->writeString($kiter241); - $xfer += $viter242->write($output); - } - } - $output->writeMapEnd(); - } + $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, 1); - $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(); @@ -5998,11 +7511,11 @@ class ThriftHiveMetastore_get_type_all_result { } -class ThriftHiveMetastore_get_fields_args { +class ThriftHiveMetastore_get_tables_args { static $_TSPEC; public $db_name = null; - public $table_name = null; + public $pattern = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6012,7 +7525,7 @@ class ThriftHiveMetastore_get_fields_args { 'type' => TType::STRING, ), 2 => array( - 'var' => 'table_name', + 'var' => 'pattern', 'type' => TType::STRING, ), ); @@ -6021,14 +7534,14 @@ class ThriftHiveMetastore_get_fields_args { if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; } } } public function getName() { - return 'ThriftHiveMetastore_get_fields_args'; + return 'ThriftHiveMetastore_get_tables_args'; } public function read($input) @@ -6055,7 +7568,7 @@ class ThriftHiveMetastore_get_fields_args { break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); + $xfer += $input->readString($this->pattern); } else { $xfer += $input->skip($ftype); } @@ -6072,15 +7585,15 @@ class ThriftHiveMetastore_get_fields_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + $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->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6090,13 +7603,11 @@ class ThriftHiveMetastore_get_fields_args { } -class ThriftHiveMetastore_get_fields_result { +class ThriftHiveMetastore_get_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)) { @@ -6104,10 +7615,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( @@ -6115,16 +7625,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)) { @@ -6134,17 +7634,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_tables_result'; } public function read($input) @@ -6165,15 +7659,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) + $_size257 = 0; + $_etype260 = 0; + $xfer += $input->readListBegin($_etype260, $_size257); + for ($_i261 = 0; $_i261 < $_size257; ++$_i261) { - $elem248 = null; - $elem248 = new FieldSchema(); - $xfer += $elem248->read($input); - $this->success []= $elem248; + $elem262 = null; + $xfer += $input->readString($elem262); + $this->success []= $elem262; } $xfer += $input->readListEnd(); } else { @@ -6188,22 +7681,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; @@ -6216,18 +7693,18 @@ class ThriftHiveMetastore_get_fields_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_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::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 $iter263) { - $xfer += $iter249->write($output); + $xfer += $output->writeString($iter263); } } $output->writeListEnd(); @@ -6239,16 +7716,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; @@ -6256,11 +7723,10 @@ class ThriftHiveMetastore_get_fields_result { } -class ThriftHiveMetastore_get_schema_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)) { @@ -6269,24 +7735,17 @@ class ThriftHiveMetastore_get_schema_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_schema_args'; + return 'ThriftHiveMetastore_get_all_tables_args'; } public function read($input) @@ -6311,13 +7770,6 @@ class ThriftHiveMetastore_get_schema_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; @@ -6330,17 +7782,12 @@ class ThriftHiveMetastore_get_schema_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_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; @@ -6348,13 +7795,11 @@ class ThriftHiveMetastore_get_schema_args { } -class ThriftHiveMetastore_get_schema_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)) { @@ -6362,10 +7807,9 @@ class ThriftHiveMetastore_get_schema_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( @@ -6373,16 +7817,6 @@ class ThriftHiveMetastore_get_schema_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)) { @@ -6392,17 +7826,11 @@ class ThriftHiveMetastore_get_schema_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_schema_result'; + return 'ThriftHiveMetastore_get_all_tables_result'; } public function read($input) @@ -6423,15 +7851,14 @@ class ThriftHiveMetastore_get_schema_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size250 = 0; - $_etype253 = 0; - $xfer += $input->readListBegin($_etype253, $_size250); - for ($_i254 = 0; $_i254 < $_size250; ++$_i254) + $_size264 = 0; + $_etype267 = 0; + $xfer += $input->readListBegin($_etype267, $_size264); + for ($_i268 = 0; $_i268 < $_size264; ++$_i268) { - $elem255 = null; - $elem255 = new FieldSchema(); - $xfer += $elem255->read($input); - $this->success []= $elem255; + $elem269 = null; + $xfer += $input->readString($elem269); + $this->success []= $elem269; } $xfer += $input->readListEnd(); } else { @@ -6446,22 +7873,6 @@ class ThriftHiveMetastore_get_schema_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; @@ -6474,18 +7885,18 @@ class ThriftHiveMetastore_get_schema_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_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 $iter256) + foreach ($this->success as $iter270) { - $xfer += $iter256->write($output); + $xfer += $output->writeString($iter270); } } $output->writeListEnd(); @@ -6497,16 +7908,6 @@ class ThriftHiveMetastore_get_schema_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; @@ -6514,30 +7915,37 @@ class ThriftHiveMetastore_get_schema_result { } -class ThriftHiveMetastore_create_table_args { +class ThriftHiveMetastore_get_table_args { static $_TSPEC; - public $tbl = null; + public $dbname = null; + public $tbl_name = 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_name', + '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_name'])) { + $this->tbl_name = $vals['tbl_name']; } } } public function getName() { - return 'ThriftHiveMetastore_create_table_args'; + return 'ThriftHiveMetastore_get_table_args'; } public function read($input) @@ -6556,9 +7964,15 @@ 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::STRING) { + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } @@ -6575,13 +7989,15 @@ 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)) { - 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_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $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(); } $xfer += $output->writeFieldStop(); @@ -6591,57 +8007,48 @@ class ThriftHiveMetastore_create_table_args { } -class ThriftHiveMetastore_create_table_result { +class ThriftHiveMetastore_get_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' => 'Table', + ), 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', - ), - 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_create_table_result'; + return 'ThriftHiveMetastore_get_table_result'; } public function read($input) @@ -6659,34 +8066,26 @@ class ThriftHiveMetastore_create_table_result { } 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: + case 0: if ($ftype == TType::STRUCT) { - $this->o2 = new InvalidObjectException(); - $xfer += $this->o2->read($input); + $this->success = new Table(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 1: if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); - $xfer += $this->o3->read($input); + $this->o1 = new MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 4: + case 2: if ($ftype == TType::STRUCT) { - $this->o4 = new NoSuchObjectException(); - $xfer += $this->o4->read($input); + $this->o2 = new NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -6703,7 +8102,15 @@ class ThriftHiveMetastore_create_table_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); + $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) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -6714,16 +8121,6 @@ class ThriftHiveMetastore_create_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(); - } - 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; @@ -6731,39 +8128,41 @@ class ThriftHiveMetastore_create_table_result { } -class ThriftHiveMetastore_create_table_with_environment_context_args { +class ThriftHiveMetastore_get_table_objects_by_name_args { static $_TSPEC; - public $tbl = null; - public $environment_context = 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', + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => 'EnvironmentContext', + '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['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['tbl_names'])) { + $this->tbl_names = $vals['tbl_names']; } } } public function getName() { - return 'ThriftHiveMetastore_create_table_with_environment_context_args'; + return 'ThriftHiveMetastore_get_table_objects_by_name_args'; } public function read($input) @@ -6782,17 +8181,25 @@ 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::LST) { + $this->tbl_names = array(); + $_size271 = 0; + $_etype274 = 0; + $xfer += $input->readListBegin($_etype274, $_size271); + for ($_i275 = 0; $_i275 < $_size271; ++$_i275) + { + $elem276 = null; + $xfer += $input->readString($elem276); + $this->tbl_names []= $elem276; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -6809,21 +8216,27 @@ 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_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->environment_context !== null) { - if (!is_object($this->environment_context)) { + if ($this->tbl_names !== null) { + if (!is_array($this->tbl_names)) { 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('tbl_names', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->tbl_names)); + { + foreach ($this->tbl_names as $iter277) + { + $xfer += $output->writeString($iter277); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6833,40 +8246,47 @@ class ThriftHiveMetastore_create_table_with_environment_context_args { } -class ThriftHiveMetastore_create_table_with_environment_context_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']; } @@ -6876,14 +8296,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_objects_by_name_result'; } public function read($input) @@ -6901,9 +8318,27 @@ class ThriftHiveMetastore_create_table_with_environment_context_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(); + } 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); @@ -6911,7 +8346,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); @@ -6919,20 +8354,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; @@ -6945,7 +8372,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_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 $iter284) + { + $xfer += $iter284->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -6961,11 +8405,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; @@ -6973,12 +8412,12 @@ class ThriftHiveMetastore_create_table_with_environment_context_result { } -class ThriftHiveMetastore_drop_table_args { +class ThriftHiveMetastore_get_table_names_by_filter_args { static $_TSPEC; public $dbname = null; - public $name = null; - public $deleteData = null; + public $filter = null; + public $max_tables = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6988,12 +8427,12 @@ class ThriftHiveMetastore_drop_table_args { 'type' => TType::STRING, ), 2 => array( - 'var' => 'name', + 'var' => 'filter', 'type' => TType::STRING, ), 3 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'max_tables', + 'type' => TType::I16, ), ); } @@ -7001,17 +8440,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['filter'])) { + $this->filter = $vals['filter']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['max_tables'])) { + $this->max_tables = $vals['max_tables']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_args'; + return 'ThriftHiveMetastore_get_table_names_by_filter_args'; } public function read($input) @@ -7038,14 +8477,14 @@ class ThriftHiveMetastore_drop_table_args { break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->filter); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_tables); } else { $xfer += $input->skip($ftype); } @@ -7062,20 +8501,20 @@ class ThriftHiveMetastore_drop_table_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); + $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->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); - $xfer += $output->writeString($this->name); + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 2); + $xfer += $output->writeString($this->filter); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); - $xfer += $output->writeBool($this->deleteData); + 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(); @@ -7085,31 +8524,52 @@ class ThriftHiveMetastore_drop_table_args { } -class ThriftHiveMetastore_drop_table_result { +class ThriftHiveMetastore_get_table_names_by_filter_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, + ), + ), 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' => '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']; } @@ -7117,7 +8577,7 @@ class ThriftHiveMetastore_drop_table_result { } public function getName() { - return 'ThriftHiveMetastore_drop_table_result'; + return 'ThriftHiveMetastore_get_table_names_by_filter_result'; } public function read($input) @@ -7135,9 +8595,26 @@ class ThriftHiveMetastore_drop_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; + $xfer += $input->readString($elem290); + $this->success []= $elem290; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + 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); @@ -7145,7 +8622,15 @@ class ThriftHiveMetastore_drop_table_result { break; case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new MetaException(); + $this->o2 = new InvalidOperationException(); + $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); @@ -7163,14 +8648,36 @@ class ThriftHiveMetastore_drop_table_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_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 $iter291) + { + $xfer += $output->writeString($iter291); + } + } + $output->writeListEnd(); + } + $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(); + } if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); $xfer += $this->o3->write($output); $xfer += $output->writeFieldEnd(); } @@ -7181,37 +8688,46 @@ class ThriftHiveMetastore_drop_table_result { } -class ThriftHiveMetastore_get_tables_args { +class ThriftHiveMetastore_alter_table_args { static $_TSPEC; - public $db_name = null; - public $pattern = null; + public $dbname = null; + public $tbl_name = null; + public $new_tbl = 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', + ), ); } 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']; } } } public function getName() { - return 'ThriftHiveMetastore_get_tables_args'; + return 'ThriftHiveMetastore_alter_table_args'; } public function read($input) @@ -7231,14 +8747,22 @@ 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); } @@ -7255,15 +8779,23 @@ 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_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(); } $xfer += $output->writeFieldStop(); @@ -7273,42 +8805,39 @@ class ThriftHiveMetastore_get_tables_args { } -class ThriftHiveMetastore_get_tables_result { +class ThriftHiveMetastore_alter_table_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_result'; } public function read($input) @@ -7326,27 +8855,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); } @@ -7363,29 +8883,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_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; @@ -7393,29 +8901,55 @@ class ThriftHiveMetastore_get_tables_result { } -class ThriftHiveMetastore_get_all_tables_args { +class ThriftHiveMetastore_alter_table_with_environment_context_args { static $_TSPEC; - public $db_name = 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' => '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['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_all_tables_args'; + return 'ThriftHiveMetastore_alter_table_with_environment_context_args'; } public function read($input) @@ -7435,7 +8969,30 @@ class ThriftHiveMetastore_get_all_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->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); } @@ -7452,10 +9009,31 @@ 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_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->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(); @@ -7465,42 +9043,39 @@ class ThriftHiveMetastore_get_all_tables_args { } -class ThriftHiveMetastore_get_all_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_all_tables_result'; + return 'ThriftHiveMetastore_alter_table_with_environment_context_result'; } public function read($input) @@ -7518,27 +9093,18 @@ 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(); + 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); } @@ -7555,29 +9121,17 @@ class ThriftHiveMetastore_get_all_tables_result { public function write($output) { $xfer = 0; - $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::STRING, count($this->success)); - { - foreach ($this->success as $iter270) - { - $xfer += $output->writeString($iter270); - } - } - $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; @@ -7585,37 +9139,30 @@ class ThriftHiveMetastore_get_all_tables_result { } -class ThriftHiveMetastore_get_table_args { +class ThriftHiveMetastore_add_partition_args { static $_TSPEC; - public $dbname = null; - public $tbl_name = null; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'Partition', ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_args'; + return 'ThriftHiveMetastore_add_partition_args'; } public function read($input) @@ -7634,15 +9181,9 @@ class ThriftHiveMetastore_get_table_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->tbl_name); + if ($ftype == TType::STRUCT) { + $this->new_part = new Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -7659,15 +9200,13 @@ 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->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_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(); @@ -7677,12 +9216,13 @@ class ThriftHiveMetastore_get_table_args { } -class ThriftHiveMetastore_get_table_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)) { @@ -7690,17 +9230,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', ), ); } @@ -7714,11 +9259,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_result'; } public function read($input) @@ -7738,7 +9286,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); @@ -7746,7 +9294,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); @@ -7754,12 +9302,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; @@ -7772,7 +9328,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_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -7791,6 +9347,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; @@ -7798,41 +9359,39 @@ class ThriftHiveMetastore_get_table_result { } -class ThriftHiveMetastore_get_table_objects_by_name_args { +class ThriftHiveMetastore_add_partition_with_environment_context_args { static $_TSPEC; - public $dbname = null; - public $tbl_names = 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_names', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - '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_names'])) { - $this->tbl_names = $vals['tbl_names']; + if (isset($vals['environment_context'])) { + $this->environment_context = $vals['environment_context']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_objects_by_name_args'; + return 'ThriftHiveMetastore_add_partition_with_environment_context_args'; } public function read($input) @@ -7851,25 +9410,17 @@ class ThriftHiveMetastore_get_table_objects_by_name_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::LST) { - $this->tbl_names = array(); - $_size271 = 0; - $_etype274 = 0; - $xfer += $input->readListBegin($_etype274, $_size271); - for ($_i275 = 0; $_i275 < $_size271; ++$_i275) - { - $elem276 = null; - $xfer += $input->readString($elem276); - $this->tbl_names []= $elem276; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->environment_context = new EnvironmentContext(); + $xfer += $this->environment_context->read($input); } else { $xfer += $input->skip($ftype); } @@ -7886,27 +9437,21 @@ 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->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_names !== null) { - if (!is_array($this->tbl_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('tbl_names', TType::LST, 2); - { - $output->writeListBegin(TType::STRING, count($this->tbl_names)); - { - foreach ($this->tbl_names as $iter277) - { - $xfer += $output->writeString($iter277); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('environment_context', TType::STRUCT, 2); + $xfer += $this->environment_context->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7916,7 +9461,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_args { } -class ThriftHiveMetastore_get_table_objects_by_name_result { +class ThriftHiveMetastore_add_partition_with_environment_context_result { static $_TSPEC; public $success = null; @@ -7929,27 +9474,23 @@ 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::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', ), ); } @@ -7970,7 +9511,7 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { } public function getName() { - return 'ThriftHiveMetastore_get_table_objects_by_name_result'; + return 'ThriftHiveMetastore_add_partition_with_environment_context_result'; } public function read($input) @@ -7989,26 +9530,16 @@ 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::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); @@ -8016,7 +9547,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); @@ -8024,7 +9555,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); @@ -8042,22 +9573,13 @@ 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_partition_with_environment_context_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::STRUCT, count($this->success)); - { - foreach ($this->success as $iter284) - { - $xfer += $iter284->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8082,45 +9604,34 @@ class ThriftHiveMetastore_get_table_objects_by_name_result { } -class ThriftHiveMetastore_get_table_names_by_filter_args { +class ThriftHiveMetastore_add_partitions_args { static $_TSPEC; - public $dbname = null; - public $filter = null; - public $max_tables = -1; + 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' => 'filter', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'max_tables', - 'type' => TType::I16, + 'var' => 'new_parts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Partition', + ), ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['filter'])) { - $this->filter = $vals['filter']; - } - if (isset($vals['max_tables'])) { - $this->max_tables = $vals['max_tables']; + if (isset($vals['new_parts'])) { + $this->new_parts = $vals['new_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_names_by_filter_args'; + return 'ThriftHiveMetastore_add_partitions_args'; } public function read($input) @@ -8139,22 +9650,19 @@ class ThriftHiveMetastore_get_table_names_by_filter_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->filter); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_tables); + if ($ftype == TType::LST) { + $this->new_parts = array(); + $_size292 = 0; + $_etype295 = 0; + $xfer += $input->readListBegin($_etype295, $_size292); + for ($_i296 = 0; $_i296 < $_size292; ++$_i296) + { + $elem297 = null; + $elem297 = new Partition(); + $xfer += $elem297->read($input); + $this->new_parts []= $elem297; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -8171,20 +9679,22 @@ 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->writeFieldEnd(); - } - 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->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('new_parts', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->new_parts)); + { + foreach ($this->new_parts as $iter298) + { + $xfer += $iter298->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8194,7 +9704,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_args { } -class ThriftHiveMetastore_get_table_names_by_filter_result { +class ThriftHiveMetastore_add_partitions_result { static $_TSPEC; public $success = null; @@ -8207,26 +9717,22 @@ 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::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', ), ); } @@ -8247,7 +9753,7 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { } public function getName() { - return 'ThriftHiveMetastore_get_table_names_by_filter_result'; + return 'ThriftHiveMetastore_add_partitions_result'; } public function read($input) @@ -8266,25 +9772,15 @@ 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::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); @@ -8292,7 +9788,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); @@ -8300,7 +9796,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); @@ -8318,22 +9814,10 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_names_by_filter_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::STRING, count($this->success)); - { - foreach ($this->success as $iter291) - { - $xfer += $output->writeString($iter291); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8358,18 +9842,18 @@ class ThriftHiveMetastore_get_table_names_by_filter_result { } -class ThriftHiveMetastore_alter_table_args { +class ThriftHiveMetastore_append_partition_args { static $_TSPEC; - public $dbname = null; + public $db_name = null; public $tbl_name = null; - public $new_tbl = 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( @@ -8377,27 +9861,30 @@ class ThriftHiveMetastore_alter_table_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, + ), ), ); } 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']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_table_args'; + return 'ThriftHiveMetastore_append_partition_args'; } public function read($input) @@ -8417,7 +9904,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); } @@ -8430,9 +9917,18 @@ 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::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(); } else { $xfer += $input->skip($ftype); } @@ -8449,10 +9945,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_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) { @@ -8460,12 +9956,21 @@ 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)) { + 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 $iter305) + { + $xfer += $output->writeString($iter305); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8475,39 +9980,57 @@ class ThriftHiveMetastore_alter_table_args { } -class ThriftHiveMetastore_alter_table_result { +class ThriftHiveMetastore_append_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::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_result'; } public function read($input) @@ -8525,9 +10048,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); @@ -8535,12 +10066,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; @@ -8553,7 +10092,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_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); @@ -8564,6 +10111,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; @@ -8571,19 +10123,18 @@ class ThriftHiveMetastore_alter_table_result { } -class ThriftHiveMetastore_alter_table_with_environment_context_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 $environment_context = 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( @@ -8591,35 +10142,26 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_tbl', - 'type' => TType::STRUCT, - 'class' => 'Table', - ), - 4 => array( - 'var' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => 'EnvironmentContext', + '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['environment_context'])) { - $this->environment_context = $vals['environment_context']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_table_with_environment_context_args'; + return 'ThriftHiveMetastore_append_partition_by_name_args'; } public function read($input) @@ -8639,7 +10181,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); } @@ -8652,17 +10194,8 @@ 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); - } 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::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -8679,10 +10212,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_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) { @@ -8690,20 +10223,9 @@ 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)) { - 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); + 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(); @@ -8713,39 +10235,57 @@ class ThriftHiveMetastore_alter_table_with_environment_context_args { } -class ThriftHiveMetastore_alter_table_with_environment_context_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_with_environment_context_result'; + return 'ThriftHiveMetastore_append_partition_by_name_result'; } public function read($input) @@ -8763,9 +10303,17 @@ class ThriftHiveMetastore_alter_table_with_environment_context_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); @@ -8773,12 +10321,20 @@ class ThriftHiveMetastore_alter_table_with_environment_context_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; @@ -8791,7 +10347,15 @@ 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_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); @@ -8802,6 +10366,11 @@ class ThriftHiveMetastore_alter_table_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; @@ -8809,30 +10378,57 @@ class ThriftHiveMetastore_alter_table_with_environment_context_result { } -class ThriftHiveMetastore_add_partition_args { +class ThriftHiveMetastore_drop_partition_args { static $_TSPEC; - public $new_part = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = 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_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + '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_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_add_partition_args'; + return 'ThriftHiveMetastore_drop_partition_args'; } public function read($input) @@ -8851,9 +10447,39 @@ 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::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); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -8870,13 +10496,37 @@ 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)) { + $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) { + $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_part', TType::STRUCT, 1); - $xfer += $this->new_part->write($output); + $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(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8886,35 +10536,28 @@ class ThriftHiveMetastore_add_partition_args { } -class ThriftHiveMetastore_add_partition_result { +class ThriftHiveMetastore_drop_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::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', ), ); @@ -8929,14 +10572,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_result'; } public function read($input) @@ -8955,16 +10595,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); @@ -8972,20 +10611,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; @@ -8998,13 +10629,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_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) { @@ -9017,11 +10645,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; @@ -9029,39 +10652,53 @@ class ThriftHiveMetastore_add_partition_result { } -class ThriftHiveMetastore_add_partition_with_environment_context_args { +class ThriftHiveMetastore_drop_partition_by_name_args { static $_TSPEC; - public $new_part = null; - public $environment_context = 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' => 'environment_context', - 'type' => TType::STRUCT, - 'class' => 'EnvironmentContext', + '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['environment_context'])) { - $this->environment_context = $vals['environment_context']; + 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_with_environment_context_args'; + return 'ThriftHiveMetastore_drop_partition_by_name_args'; } public function read($input) @@ -9080,17 +10717,29 @@ 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::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); } @@ -9107,21 +10756,25 @@ 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_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->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->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(); @@ -9131,35 +10784,28 @@ class ThriftHiveMetastore_add_partition_with_environment_context_args { } -class ThriftHiveMetastore_add_partition_with_environment_context_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', ), ); @@ -9174,14 +10820,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_drop_partition_by_name_result'; } public function read($input) @@ -9200,16 +10843,15 @@ class ThriftHiveMetastore_add_partition_with_environment_context_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); @@ -9217,20 +10859,12 @@ class ThriftHiveMetastore_add_partition_with_environment_context_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; @@ -9243,13 +10877,10 @@ 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_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) { @@ -9262,11 +10893,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; @@ -9274,34 +10900,49 @@ class ThriftHiveMetastore_add_partition_with_environment_context_result { } -class ThriftHiveMetastore_add_partitions_args { +class ThriftHiveMetastore_get_partition_args { static $_TSPEC; - public $new_parts = 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_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, ), ), ); } 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']; } } } public function getName() { - return 'ThriftHiveMetastore_add_partitions_args'; + return 'ThriftHiveMetastore_get_partition_args'; } public function read($input) @@ -9320,17 +10961,30 @@ 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(); + $_size313 = 0; + $_etype316 = 0; + $xfer += $input->readListBegin($_etype316, $_size313); + for ($_i317 = 0; $_i317 < $_size313; ++$_i317) { - $elem297 = null; - $elem297 = new Partition(); - $xfer += $elem297->read($input); - $this->new_parts []= $elem297; + $elem318 = null; + $xfer += $input->readString($elem318); + $this->part_vals []= $elem318; } $xfer += $input->readListEnd(); } else { @@ -9349,18 +11003,28 @@ 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_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->new_parts as $iter298) + foreach ($this->part_vals as $iter319) { - $xfer += $iter298->write($output); + $xfer += $output->writeString($iter319); } } $output->writeListEnd(); @@ -9374,35 +11038,30 @@ class ThriftHiveMetastore_add_partitions_args { } -class ThriftHiveMetastore_add_partitions_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)) { 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', ), ); } @@ -9416,14 +11075,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_result'; } public function read($input) @@ -9442,15 +11098,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); @@ -9458,20 +11115,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; @@ -9484,10 +11133,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_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) { @@ -9500,11 +11152,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; @@ -9512,12 +11159,14 @@ class ThriftHiveMetastore_add_partitions_result { } -class ThriftHiveMetastore_append_partition_args { +class ThriftHiveMetastore_get_partition_with_auth_args { static $_TSPEC; 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)) { @@ -9538,6 +11187,18 @@ class ThriftHiveMetastore_append_partition_args { '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)) { @@ -9550,11 +11211,17 @@ class ThriftHiveMetastore_append_partition_args { 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_append_partition_args'; + return 'ThriftHiveMetastore_get_partition_with_auth_args'; } public function read($input) @@ -9589,14 +11256,38 @@ class ThriftHiveMetastore_append_partition_args { 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) + $_size320 = 0; + $_etype323 = 0; + $xfer += $input->readListBegin($_etype323, $_size320); + for ($_i324 = 0; $_i324 < $_size320; ++$_i324) { - $elem304 = null; - $xfer += $input->readString($elem304); - $this->part_vals []= $elem304; + $elem325 = null; + $xfer += $input->readString($elem325); + $this->part_vals []= $elem325; + } + $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(); + $_size326 = 0; + $_etype329 = 0; + $xfer += $input->readListBegin($_etype329, $_size326); + for ($_i330 = 0; $_i330 < $_size326; ++$_i330) + { + $elem331 = null; + $xfer += $input->readString($elem331); + $this->group_names []= $elem331; } $xfer += $input->readListEnd(); } else { @@ -9615,7 +11306,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_with_auth_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -9634,9 +11325,31 @@ class ThriftHiveMetastore_append_partition_args { { $output->writeListBegin(TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter305) + foreach ($this->part_vals as $iter332) { - $xfer += $output->writeString($iter305); + $xfer += $output->writeString($iter332); + } + } + $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->group_names as $iter333) + { + $xfer += $output->writeString($iter333); } } $output->writeListEnd(); @@ -9650,13 +11363,12 @@ class ThriftHiveMetastore_append_partition_args { } -class ThriftHiveMetastore_append_partition_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)) { @@ -9669,17 +11381,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', ), ); } @@ -9693,14 +11400,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_with_auth_result'; } public function read($input) @@ -9728,7 +11432,7 @@ class ThriftHiveMetastore_append_partition_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); @@ -9736,20 +11440,12 @@ class ThriftHiveMetastore_append_partition_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; @@ -9762,7 +11458,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_with_auth_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -9781,11 +11477,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; @@ -9793,7 +11484,7 @@ class ThriftHiveMetastore_append_partition_result { } -class ThriftHiveMetastore_append_partition_by_name_args { +class ThriftHiveMetastore_get_partition_by_name_args { static $_TSPEC; public $db_name = null; @@ -9831,7 +11522,7 @@ class ThriftHiveMetastore_append_partition_by_name_args { } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_args'; + return 'ThriftHiveMetastore_get_partition_by_name_args'; } public function read($input) @@ -9882,7 +11573,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_partition_by_name_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -9905,13 +11596,12 @@ class ThriftHiveMetastore_append_partition_by_name_args { } -class ThriftHiveMetastore_append_partition_by_name_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)) { @@ -9924,17 +11614,12 @@ class ThriftHiveMetastore_append_partition_by_name_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', ), ); } @@ -9948,14 +11633,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_partition_by_name_result'; } public function read($input) @@ -9983,7 +11665,7 @@ class ThriftHiveMetastore_append_partition_by_name_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); @@ -9991,20 +11673,12 @@ class ThriftHiveMetastore_append_partition_by_name_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; @@ -10017,7 +11691,7 @@ 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_partition_by_name_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -10036,11 +11710,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; @@ -10048,13 +11717,12 @@ class ThriftHiveMetastore_append_partition_by_name_result { } -class ThriftHiveMetastore_drop_partition_args { +class ThriftHiveMetastore_get_partitions_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $deleteData = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -10068,16 +11736,8 @@ class ThriftHiveMetastore_drop_partition_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -10088,17 +11748,14 @@ 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['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_args'; + return 'ThriftHiveMetastore_get_partitions_args'; } public function read($input) @@ -10131,25 +11788,8 @@ 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(); - } 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); } @@ -10166,7 +11806,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_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -10177,26 +11817,9 @@ 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)) { - 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(); - } - 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(); @@ -10206,7 +11829,7 @@ class ThriftHiveMetastore_drop_partition_args { } -class ThriftHiveMetastore_drop_partition_result { +class ThriftHiveMetastore_get_partitions_result { static $_TSPEC; public $success = null; @@ -10218,7 +11841,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', @@ -10246,7 +11874,7 @@ class ThriftHiveMetastore_drop_partition_result { } public function getName() { - return 'ThriftHiveMetastore_drop_partition_result'; + return 'ThriftHiveMetastore_get_partitions_result'; } public function read($input) @@ -10265,8 +11893,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(); + $_size334 = 0; + $_etype337 = 0; + $xfer += $input->readListBegin($_etype337, $_size334); + for ($_i338 = 0; $_i338 < $_size334; ++$_i338) + { + $elem339 = null; + $elem339 = new Partition(); + $xfer += $elem339->read($input); + $this->success []= $elem339; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -10299,10 +11938,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_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 $iter340) + { + $xfer += $iter340->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10322,13 +11973,14 @@ class ThriftHiveMetastore_drop_partition_result { } -class ThriftHiveMetastore_drop_partition_by_name_args { +class ThriftHiveMetastore_get_partitions_with_auth_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = 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)) { @@ -10342,12 +11994,20 @@ class ThriftHiveMetastore_drop_partition_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, + 'var' => 'max_parts', + 'type' => TType::I16, ), 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -10358,17 +12018,20 @@ 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['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_by_name_args'; + return 'ThriftHiveMetastore_get_partitions_with_auth_args'; } public function read($input) @@ -10401,15 +12064,32 @@ class ThriftHiveMetastore_drop_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); } 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(); + $_size341 = 0; + $_etype344 = 0; + $xfer += $input->readListBegin($_etype344, $_size341); + for ($_i345 = 0; $_i345 < $_size341; ++$_i345) + { + $elem346 = null; + $xfer += $input->readString($elem346); + $this->group_names []= $elem346; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -10426,7 +12106,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_partitions_with_auth_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -10437,14 +12117,31 @@ 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); + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + 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->group_names as $iter347) + { + $xfer += $output->writeString($iter347); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10454,7 +12151,7 @@ class ThriftHiveMetastore_drop_partition_by_name_args { } -class ThriftHiveMetastore_drop_partition_by_name_result { +class ThriftHiveMetastore_get_partitions_with_auth_result { static $_TSPEC; public $success = null; @@ -10466,7 +12163,12 @@ class ThriftHiveMetastore_drop_partition_by_name_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', @@ -10494,7 +12196,7 @@ class ThriftHiveMetastore_drop_partition_by_name_result { } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_result'; + return 'ThriftHiveMetastore_get_partitions_with_auth_result'; } public function read($input) @@ -10513,8 +12215,19 @@ 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(); + $_size348 = 0; + $_etype351 = 0; + $xfer += $input->readListBegin($_etype351, $_size348); + for ($_i352 = 0; $_i352 < $_size348; ++$_i352) + { + $elem353 = null; + $elem353 = new Partition(); + $xfer += $elem353->read($input); + $this->success []= $elem353; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -10547,10 +12260,22 @@ 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_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 $iter354) + { + $xfer += $iter354->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10570,12 +12295,12 @@ class ThriftHiveMetastore_drop_partition_by_name_result { } -class ThriftHiveMetastore_get_partition_args { +class ThriftHiveMetastore_get_partition_names_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)) { @@ -10589,12 +12314,8 @@ class ThriftHiveMetastore_get_partition_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -10605,14 +12326,14 @@ class ThriftHiveMetastore_get_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']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_args'; + return 'ThriftHiveMetastore_get_partition_names_args'; } public function read($input) @@ -10645,18 +12366,8 @@ class ThriftHiveMetastore_get_partition_args { } break; 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) - { - $elem318 = null; - $xfer += $input->readString($elem318); - $this->part_vals []= $elem318; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -10673,7 +12384,7 @@ class ThriftHiveMetastore_get_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_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); @@ -10684,21 +12395,9 @@ class ThriftHiveMetastore_get_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 $iter319) - { - $xfer += $output->writeString($iter319); - } - } - $output->writeListEnd(); - } + 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(); @@ -10708,11 +12407,10 @@ class ThriftHiveMetastore_get_partition_args { } -class ThriftHiveMetastore_get_partition_result { +class ThriftHiveMetastore_get_partition_names_result { static $_TSPEC; public $success = null; - public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -10720,18 +12418,16 @@ class ThriftHiveMetastore_get_partition_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', - 'type' => TType::STRUCT, - 'class' => 'MetaException', - ), - 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), ); } @@ -10739,9 +12435,6 @@ class ThriftHiveMetastore_get_partition_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']; } @@ -10749,7 +12442,7 @@ class ThriftHiveMetastore_get_partition_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_result'; + return 'ThriftHiveMetastore_get_partition_names_result'; } public function read($input) @@ -10768,24 +12461,25 @@ 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(); + $_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(); } 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(); + $this->o2 = new MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -10803,22 +12497,26 @@ class ThriftHiveMetastore_get_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_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->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + $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->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(); } @@ -10829,14 +12527,13 @@ class ThriftHiveMetastore_get_partition_result { } -class ThriftHiveMetastore_get_partition_with_auth_args { +class ThriftHiveMetastore_get_partitions_ps_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; public $part_vals = null; - public $user_name = null; - public $group_names = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -10858,16 +12555,8 @@ class ThriftHiveMetastore_get_partition_with_auth_args { ), ), 4 => array( - 'var' => 'user_name', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'group_names', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -10881,17 +12570,14 @@ class ThriftHiveMetastore_get_partition_with_auth_args { 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']; + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_with_auth_args'; + return 'ThriftHiveMetastore_get_partitions_ps_args'; } public function read($input) @@ -10926,14 +12612,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) + $_size362 = 0; + $_etype365 = 0; + $xfer += $input->readListBegin($_etype365, $_size362); + for ($_i366 = 0; $_i366 < $_size362; ++$_i366) { - $elem325 = null; - $xfer += $input->readString($elem325); - $this->part_vals []= $elem325; + $elem367 = null; + $xfer += $input->readString($elem367); + $this->part_vals []= $elem367; } $xfer += $input->readListEnd(); } else { @@ -10941,25 +12627,8 @@ class ThriftHiveMetastore_get_partition_with_auth_args { } 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(); - $_size326 = 0; - $_etype329 = 0; - $xfer += $input->readListBegin($_etype329, $_size326); - for ($_i330 = 0; $_i330 < $_size326; ++$_i330) - { - $elem331 = null; - $xfer += $input->readString($elem331); - $this->group_names []= $elem331; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -10976,7 +12645,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_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -10995,35 +12664,18 @@ 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 $iter368) { - $xfer += $output->writeString($iter332); + $xfer += $output->writeString($iter368); } } $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->group_names as $iter333) - { - $xfer += $output->writeString($iter333); - } - } - $output->writeListEnd(); - } + 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(); @@ -11033,7 +12685,7 @@ class ThriftHiveMetastore_get_partition_with_auth_args { } -class ThriftHiveMetastore_get_partition_with_auth_result { +class ThriftHiveMetastore_get_partitions_ps_result { static $_TSPEC; public $success = null; @@ -11045,8 +12697,12 @@ 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', @@ -11074,7 +12730,7 @@ class ThriftHiveMetastore_get_partition_with_auth_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_with_auth_result'; + return 'ThriftHiveMetastore_get_partitions_ps_result'; } public function read($input) @@ -11093,9 +12749,19 @@ 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(); + $_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); } @@ -11128,13 +12794,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_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 $iter375) + { + $xfer += $iter375->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -11154,12 +12829,15 @@ class ThriftHiveMetastore_get_partition_with_auth_result { } -class ThriftHiveMetastore_get_partition_by_name_args { +class ThriftHiveMetastore_get_partitions_ps_with_auth_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; + public $part_vals = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -11173,9 +12851,29 @@ class ThriftHiveMetastore_get_partition_by_name_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', + '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, + ), + ), ); } if (is_array($vals)) { @@ -11185,14 +12883,23 @@ 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']; + } + 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_get_partition_by_name_args'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_args'; } public function read($input) @@ -11225,8 +12932,49 @@ class ThriftHiveMetastore_get_partition_by_name_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(); + } 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->part_name); + $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(); } else { $xfer += $input->skip($ftype); } @@ -11243,7 +12991,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_partitions_ps_with_auth_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -11254,9 +13002,48 @@ 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 $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->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, 6); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter389) + { + $xfer += $output->writeString($iter389); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -11266,7 +13053,7 @@ class ThriftHiveMetastore_get_partition_by_name_args { } -class ThriftHiveMetastore_get_partition_by_name_result { +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { static $_TSPEC; public $success = null; @@ -11278,18 +13065,22 @@ class ThriftHiveMetastore_get_partition_by_name_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', ), ); } @@ -11307,7 +13098,7 @@ class ThriftHiveMetastore_get_partition_by_name_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_result'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_result'; } public function read($input) @@ -11326,16 +13117,26 @@ 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(); + $_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 MetaException(); + $this->o1 = new NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -11343,7 +13144,7 @@ class ThriftHiveMetastore_get_partition_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); @@ -11361,13 +13162,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_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 $iter396) + { + $xfer += $iter396->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -11387,11 +13197,12 @@ class ThriftHiveMetastore_get_partition_by_name_result { } -class ThriftHiveMetastore_get_partitions_args { +class ThriftHiveMetastore_get_partition_names_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) { @@ -11406,6 +13217,14 @@ class ThriftHiveMetastore_get_partitions_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, ), @@ -11418,6 +13237,9 @@ class ThriftHiveMetastore_get_partitions_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']; } @@ -11425,7 +13247,7 @@ class ThriftHiveMetastore_get_partitions_args { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_args'; + return 'ThriftHiveMetastore_get_partition_names_ps_args'; } public function read($input) @@ -11457,7 +13279,24 @@ class ThriftHiveMetastore_get_partitions_args { $xfer += $input->skip($ftype); } break; - case 3: + 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) + { + $elem402 = null; + $xfer += $input->readString($elem402); + $this->part_vals []= $elem402; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: if ($ftype == TType::I16) { $xfer += $input->readI16($this->max_parts); } else { @@ -11476,7 +13315,7 @@ class ThriftHiveMetastore_get_partitions_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_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); @@ -11487,8 +13326,25 @@ class ThriftHiveMetastore_get_partitions_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 $iter403) + { + $xfer += $output->writeString($iter403); + } + } + $output->writeListEnd(); + } + $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(); } @@ -11499,7 +13355,7 @@ class ThriftHiveMetastore_get_partitions_args { } -class ThriftHiveMetastore_get_partitions_result { +class ThriftHiveMetastore_get_partition_names_ps_result { static $_TSPEC; public $success = null; @@ -11512,21 +13368,20 @@ class ThriftHiveMetastore_get_partitions_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( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'NoSuchObjectException', + 'class' => 'MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'MetaException', + 'class' => 'NoSuchObjectException', ), ); } @@ -11544,7 +13399,7 @@ class ThriftHiveMetastore_get_partitions_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_result'; + return 'ThriftHiveMetastore_get_partition_names_ps_result'; } public function read($input) @@ -11565,15 +13420,14 @@ 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) + $_size404 = 0; + $_etype407 = 0; + $xfer += $input->readListBegin($_etype407, $_size404); + for ($_i408 = 0; $_i408 < $_size404; ++$_i408) { - $elem339 = null; - $elem339 = new Partition(); - $xfer += $elem339->read($input); - $this->success []= $elem339; + $elem409 = null; + $xfer += $input->readString($elem409); + $this->success []= $elem409; } $xfer += $input->readListEnd(); } else { @@ -11582,7 +13436,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); @@ -11590,7 +13444,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); @@ -11608,18 +13462,18 @@ class ThriftHiveMetastore_get_partitions_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); + $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::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter340) + foreach ($this->success as $iter410) { - $xfer += $iter340->write($output); + $xfer += $output->writeString($iter410); } } $output->writeListEnd(); @@ -11643,14 +13497,13 @@ class ThriftHiveMetastore_get_partitions_result { } -class ThriftHiveMetastore_get_partitions_with_auth_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 $user_name = null; - public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -11664,20 +13517,12 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, - ), - 4 => array( - 'var' => 'user_name', + 'var' => 'filter', 'type' => TType::STRING, ), - 5 => array( - 'var' => 'group_names', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } @@ -11688,20 +13533,17 @@ class ThriftHiveMetastore_get_partitions_with_auth_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']; } - 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_get_partitions_with_auth_args'; + return 'ThriftHiveMetastore_get_partitions_by_filter_args'; } public function read($input) @@ -11734,32 +13576,15 @@ 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); + $xfer += $input->readString($this->filter); } 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) - { - $elem346 = null; - $xfer += $input->readString($elem346); - $this->group_names []= $elem346; - } - $xfer += $input->readListEnd(); + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -11776,7 +13601,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_filter_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -11787,31 +13612,14 @@ 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); + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 3); + $xfer += $output->writeString($this->filter); $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->group_names as $iter347) - { - $xfer += $output->writeString($iter347); - } - } - $output->writeListEnd(); - } + 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(); @@ -11821,7 +13629,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_args { } -class ThriftHiveMetastore_get_partitions_with_auth_result { +class ThriftHiveMetastore_get_partitions_by_filter_result { static $_TSPEC; public $success = null; @@ -11843,12 +13651,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', ), ); } @@ -11866,7 +13674,7 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_with_auth_result'; + return 'ThriftHiveMetastore_get_partitions_by_filter_result'; } public function read($input) @@ -11887,15 +13695,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) + $_size411 = 0; + $_etype414 = 0; + $xfer += $input->readListBegin($_etype414, $_size411); + for ($_i415 = 0; $_i415 < $_size411; ++$_i415) { - $elem353 = null; - $elem353 = new Partition(); - $xfer += $elem353->read($input); - $this->success []= $elem353; + $elem416 = null; + $elem416 = new Partition(); + $xfer += $elem416->read($input); + $this->success []= $elem416; } $xfer += $input->readListEnd(); } else { @@ -11904,7 +13712,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); @@ -11912,7 +13720,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); @@ -11930,7 +13738,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_filter_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -11939,9 +13747,9 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter354) + foreach ($this->success as $iter417) { - $xfer += $iter354->write($output); + $xfer += $iter417->write($output); } } $output->writeListEnd(); @@ -11965,12 +13773,12 @@ class ThriftHiveMetastore_get_partitions_with_auth_result { } -class ThriftHiveMetastore_get_partition_names_args { +class ThriftHiveMetastore_get_partitions_by_names_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $max_parts = -1; + public $names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -11984,8 +13792,12 @@ class ThriftHiveMetastore_get_partition_names_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -11996,14 +13808,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['names'])) { + $this->names = $vals['names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_args'; + return 'ThriftHiveMetastore_get_partitions_by_names_args'; } public function read($input) @@ -12036,8 +13848,18 @@ class ThriftHiveMetastore_get_partition_names_args { } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + 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(); } else { $xfer += $input->skip($ftype); } @@ -12054,7 +13876,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_get_partitions_by_names_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -12065,9 +13887,21 @@ 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->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->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -12077,10 +13911,11 @@ class ThriftHiveMetastore_get_partition_names_args { } -class ThriftHiveMetastore_get_partition_names_result { +class ThriftHiveMetastore_get_partitions_by_names_result { static $_TSPEC; public $success = null; + public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -12089,22 +13924,31 @@ class ThriftHiveMetastore_get_partition_names_result { 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => 'Partition', ), ), 1 => array( - 'var' => 'o2', + 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'MetaException', ), + 2 => array( + 'var' => 'o2', + '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']; } @@ -12112,7 +13956,7 @@ class ThriftHiveMetastore_get_partition_names_result { } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_result'; + return 'ThriftHiveMetastore_get_partitions_by_names_result'; } public function read($input) @@ -12133,14 +13977,15 @@ class ThriftHiveMetastore_get_partition_names_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size355 = 0; - $_etype358 = 0; - $xfer += $input->readListBegin($_etype358, $_size355); - for ($_i359 = 0; $_i359 < $_size355; ++$_i359) + $_size425 = 0; + $_etype428 = 0; + $xfer += $input->readListBegin($_etype428, $_size425); + for ($_i429 = 0; $_i429 < $_size425; ++$_i429) { - $elem360 = null; - $xfer += $input->readString($elem360); - $this->success []= $elem360; + $elem430 = null; + $elem430 = new Partition(); + $xfer += $elem430->read($input); + $this->success []= $elem430; } $xfer += $input->readListEnd(); } else { @@ -12149,7 +13994,15 @@ class ThriftHiveMetastore_get_partition_names_result { break; case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new MetaException(); + $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); @@ -12167,26 +14020,31 @@ class ThriftHiveMetastore_get_partition_names_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_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); } $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 $iter361) + foreach ($this->success as $iter431) { - $xfer += $output->writeString($iter361); + $xfer += $iter431->write($output); } } $output->writeListEnd(); } $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(); } @@ -12197,13 +14055,12 @@ class ThriftHiveMetastore_get_partition_names_result { } -class ThriftHiveMetastore_get_partitions_ps_args { +class ThriftHiveMetastore_alter_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)) { @@ -12217,16 +14074,9 @@ class ThriftHiveMetastore_get_partitions_ps_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, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'Partition', ), ); } @@ -12237,17 +14087,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_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_args'; + return 'ThriftHiveMetastore_alter_partition_args'; } public function read($input) @@ -12280,25 +14127,9 @@ 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) - { - $elem367 = null; - $xfer += $input->readString($elem367); - $this->part_vals []= $elem367; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - 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); } @@ -12315,7 +14146,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_partition_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -12326,26 +14157,12 @@ 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_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 $iter368) - { - $xfer += $output->writeString($iter368); - } - } - $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->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -12355,41 +14172,28 @@ class ThriftHiveMetastore_get_partitions_ps_args { } -class ThriftHiveMetastore_get_partitions_ps_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::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']; } @@ -12400,7 +14204,7 @@ class ThriftHiveMetastore_get_partitions_ps_result { } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_result'; + return 'ThriftHiveMetastore_alter_partition_result'; } public function read($input) @@ -12418,27 +14222,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); @@ -12446,7 +14232,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); @@ -12464,24 +14250,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_partition_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -12499,15 +14268,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)) { @@ -12521,28 +14288,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, - ), + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'Partition', ), 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' => 'environment_context', + 'type' => TType::STRUCT, + 'class' => 'EnvironmentContext', ), ); } @@ -12553,23 +14306,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) @@ -12585,66 +14332,34 @@ class ThriftHiveMetastore_get_partitions_ps_with_auth_args { if ($ftype == TType::STOP) { break; } - 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->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(); + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->user_name); + case 3: + if ($ftype == TType::STRUCT) { + $this->new_part = new Partition(); + $xfer += $this->new_part->read($input); } 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(); + case 4: + if ($ftype == TType::STRUCT) { + $this->environment_context = new EnvironmentContext(); + $xfer += $this->environment_context->read($input); } else { $xfer += $input->skip($ftype); } @@ -12661,7 +14376,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); @@ -12672,48 +14387,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(); @@ -12723,29 +14410,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', @@ -12755,9 +14432,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']; } @@ -12768,7 +14442,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) @@ -12786,27 +14460,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); @@ -12832,24 +14488,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); @@ -12867,13 +14506,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)) { @@ -12895,8 +14534,9 @@ class ThriftHiveMetastore_get_partition_names_ps_args { ), ), 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'Partition', ), ); } @@ -12910,14 +14550,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) @@ -12952,14 +14592,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) + $_size432 = 0; + $_etype435 = 0; + $xfer += $input->readListBegin($_etype435, $_size432); + for ($_i436 = 0; $_i436 < $_size432; ++$_i436) { - $elem402 = null; - $xfer += $input->readString($elem402); - $this->part_vals []= $elem402; + $elem437 = null; + $xfer += $input->readString($elem437); + $this->part_vals []= $elem437; } $xfer += $input->readListEnd(); } else { @@ -12967,8 +14607,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); } @@ -12985,7 +14626,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); @@ -13004,18 +14645,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 $iter438) { - $xfer += $output->writeString($iter403); + $xfer += $output->writeString($iter438); } } $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(); @@ -13025,40 +14669,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']; } @@ -13069,7 +14701,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) @@ -13087,26 +14719,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); @@ -13114,42 +14729,25 @@ 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); - } - 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_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); + $xfer += $input->skip($ftype); } - } - $output->writeListEnd(); + break; + default: + $xfer += $input->skip($ftype); + break; } - $xfer += $output->writeFieldEnd(); + $xfer += $input->readFieldEnd(); } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -13167,53 +14765,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) @@ -13233,28 +14815,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); } @@ -13271,25 +14839,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(); @@ -13299,34 +14857,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', ), ); } @@ -13337,14 +14884,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) @@ -13363,39 +14907,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; @@ -13408,22 +14933,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) { @@ -13431,11 +14944,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; @@ -13443,49 +14951,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) @@ -13503,75 +14991,29 @@ class ThriftHiveMetastore_get_partitions_by_names_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->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(); - } 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_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); + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); } - } - $output->writeListEnd(); + 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_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(); @@ -13581,12 +15023,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)) { @@ -13594,10 +15035,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( @@ -13605,11 +15045,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)) { @@ -13619,14 +15054,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) @@ -13647,15 +15079,14 @@ 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) + $_size439 = 0; + $_etype442 = 0; + $xfer += $input->readListBegin($_etype442, $_size439); + for ($_i443 = 0; $_i443 < $_size439; ++$_i443) { - $elem430 = null; - $elem430 = new Partition(); - $xfer += $elem430->read($input); - $this->success []= $elem430; + $elem444 = null; + $xfer += $input->readString($elem444); + $this->success []= $elem444; } $xfer += $input->readListEnd(); } else { @@ -13670,14 +15101,6 @@ class ThriftHiveMetastore_get_partitions_by_names_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; @@ -13690,18 +15113,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 $iter445) { - $xfer += $iter431->write($output); + $xfer += $output->writeString($iter445); } } $output->writeListEnd(); @@ -13713,11 +15136,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; @@ -13725,46 +15143,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) @@ -13784,22 +15185,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); } @@ -13816,23 +15202,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(); @@ -13842,39 +15215,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) @@ -13892,18 +15272,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(); + $_size446 = 0; + $_ktype447 = 0; + $_vtype448 = 0; + $xfer += $input->readMapBegin($_ktype447, $_vtype448, $_size446); + for ($_i450 = 0; $_i450 < $_size446; ++$_i450) + { + $key451 = ''; + $val452 = ''; + $xfer += $input->readString($key451); + $xfer += $input->readString($val452); + $this->success[$key451] = $val452; + } + $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); } @@ -13920,17 +15312,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 $kiter453 => $viter454) + { + $xfer += $output->writeString($kiter453); + $xfer += $output->writeString($viter454); + } + } + $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; @@ -13938,13 +15343,13 @@ class ThriftHiveMetastore_alter_partition_result { } -class ThriftHiveMetastore_alter_partition_with_environment_context_args { +class ThriftHiveMetastore_markPartitionForEvent_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)) { @@ -13958,14 +15363,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, ), ); } @@ -13976,17 +15387,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['environment_context'])) { - $this->environment_context = $vals['environment_context']; + 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_partition_with_environment_context_args'; + return 'ThriftHiveMetastore_markPartitionForEvent_args'; } public function read($input) @@ -14019,17 +15430,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(); + $_size455 = 0; + $_ktype456 = 0; + $_vtype457 = 0; + $xfer += $input->readMapBegin($_ktype456, $_vtype457, $_size455); + for ($_i459 = 0; $_i459 < $_size455; ++$_i459) + { + $key460 = ''; + $val461 = ''; + $xfer += $input->readString($key460); + $xfer += $input->readString($val461); + $this->part_vals[$key460] = $val461; + } + $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); } @@ -14046,7 +15468,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_markPartitionForEvent_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -14057,20 +15479,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 $kiter462 => $viter463) + { + $xfer += $output->writeString($kiter462); + $xfer += $output->writeString($viter463); + } + } + $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(); @@ -14080,11 +15509,15 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_args { } -class ThriftHiveMetastore_alter_partition_with_environment_context_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)) { @@ -14092,12 +15525,32 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_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', ), ); } @@ -14108,11 +15561,23 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_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']; + } + 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_markPartitionForEvent_result'; } public function read($input) @@ -14132,7 +15597,7 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_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); @@ -14140,12 +15605,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; @@ -14158,7 +15655,7 @@ 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_markPartitionForEvent_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -14169,6 +15666,26 @@ class ThriftHiveMetastore_alter_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(); + } + 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; @@ -14176,13 +15693,13 @@ class ThriftHiveMetastore_alter_partition_with_environment_context_result { } -class ThriftHiveMetastore_rename_partition_args { +class ThriftHiveMetastore_isPartitionMarkedForEvent_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; public $part_vals = null; - public $new_part = null; + public $eventType = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -14197,16 +15714,19 @@ class ThriftHiveMetastore_rename_partition_args { ), 3 => array( 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( 'type' => TType::STRING, ), ), 4 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'Partition', + 'var' => 'eventType', + 'type' => TType::I32, ), ); } @@ -14220,14 +15740,14 @@ class ThriftHiveMetastore_rename_partition_args { if (isset($vals['part_vals'])) { $this->part_vals = $vals['part_vals']; } - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['eventType'])) { + $this->eventType = $vals['eventType']; } } } public function getName() { - return 'ThriftHiveMetastore_rename_partition_args'; + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_args'; } public function read($input) @@ -14260,26 +15780,28 @@ class ThriftHiveMetastore_rename_partition_args { } break; case 3: - if ($ftype == TType::LST) { + if ($ftype == TType::MAP) { $this->part_vals = array(); - $_size432 = 0; - $_etype435 = 0; - $xfer += $input->readListBegin($_etype435, $_size432); - for ($_i436 = 0; $_i436 < $_size432; ++$_i436) + $_size464 = 0; + $_ktype465 = 0; + $_vtype466 = 0; + $xfer += $input->readMapBegin($_ktype465, $_vtype466, $_size464); + for ($_i468 = 0; $_i468 < $_size464; ++$_i468) { - $elem437 = null; - $xfer += $input->readString($elem437); - $this->part_vals []= $elem437; + $key469 = ''; + $val470 = ''; + $xfer += $input->readString($key469); + $xfer += $input->readString($val470); + $this->part_vals[$key469] = $val470; } - $xfer += $input->readListEnd(); + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::STRUCT) { - $this->new_part = new Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->eventType); } else { $xfer += $input->skip($ftype); } @@ -14296,7 +15818,7 @@ class ThriftHiveMetastore_rename_partition_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_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); @@ -14311,25 +15833,23 @@ class ThriftHiveMetastore_rename_partition_args { if (!is_array($this->part_vals)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + $xfer += $output->writeFieldBegin('part_vals', TType::MAP, 3); { - $output->writeListBegin(TType::STRING, count($this->part_vals)); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->part_vals)); { - foreach ($this->part_vals as $iter438) + foreach ($this->part_vals as $kiter471 => $viter472) { - $xfer += $output->writeString($iter438); + $xfer += $output->writeString($kiter471); + $xfer += $output->writeString($viter472); } } - $output->writeListEnd(); + $output->writeMapEnd(); } $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, 4); - $xfer += $this->new_part->write($output); + if ($this->eventType !== null) { + $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); + $xfer += $output->writeI32($this->eventType); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -14339,39 +15859,83 @@ class ThriftHiveMetastore_rename_partition_args { } -class ThriftHiveMetastore_rename_partition_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' => 'NoSuchObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'UnknownDBException', ), - 2 => array( - 'var' => 'o2', + 4 => array( + 'var' => 'o4', 'type' => TType::STRUCT, - 'class' => 'MetaException', + '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_rename_partition_result'; + return 'ThriftHiveMetastore_isPartitionMarkedForEvent_result'; } public function read($input) @@ -14389,9 +15953,16 @@ class ThriftHiveMetastore_rename_partition_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); @@ -14399,12 +15970,44 @@ class ThriftHiveMetastore_rename_partition_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; @@ -14417,7 +16020,12 @@ class ThriftHiveMetastore_rename_partition_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_rename_partition_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); @@ -14428,6 +16036,26 @@ 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(); + } + 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; @@ -14435,37 +16063,39 @@ class ThriftHiveMetastore_rename_partition_result { } -class ThriftHiveMetastore_get_config_value_args { +class ThriftHiveMetastore_add_index_args { static $_TSPEC; - public $name = null; - public $defaultValue = null; + public $new_index = null; + public $index_table = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', - 'type' => TType::STRING, + 'var' => 'new_index', + 'type' => TType::STRUCT, + 'class' => 'Index', ), 2 => array( - 'var' => 'defaultValue', - 'type' => TType::STRING, + 'var' => 'index_table', + 'type' => TType::STRUCT, + 'class' => 'Table', ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['new_index'])) { + $this->new_index = $vals['new_index']; } - if (isset($vals['defaultValue'])) { - $this->defaultValue = $vals['defaultValue']; + if (isset($vals['index_table'])) { + $this->index_table = $vals['index_table']; } } } public function getName() { - return 'ThriftHiveMetastore_get_config_value_args'; + return 'ThriftHiveMetastore_add_index_args'; } public function read($input) @@ -14484,15 +16114,17 @@ class ThriftHiveMetastore_get_config_value_args { switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->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->defaultValue); + if ($ftype == TType::STRUCT) { + $this->index_table = new Table(); + $xfer += $this->index_table->read($input); } else { $xfer += $input->skip($ftype); } @@ -14509,15 +16141,21 @@ class ThriftHiveMetastore_get_config_value_args { 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 += $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->defaultValue !== null) { - $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); - $xfer += $output->writeString($this->defaultValue); + if ($this->index_table !== null) { + if (!is_object($this->index_table)) { + 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->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -14527,23 +16165,36 @@ class ThriftHiveMetastore_get_config_value_args { } -class ThriftHiveMetastore_get_config_value_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::STRING, + 'type' => TType::STRUCT, + 'class' => 'Index', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'ConfigValSecurityException', + 'class' => 'InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'MetaException', ), ); } @@ -14554,11 +16205,17 @@ class ThriftHiveMetastore_get_config_value_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_config_value_result'; + return 'ThriftHiveMetastore_add_index_result'; } public function read($input) @@ -14577,20 +16234,37 @@ class ThriftHiveMetastore_get_config_value_result { switch ($fid) { case 0: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->success); + 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 ConfigValSecurityException(); + $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; @@ -14603,10 +16277,13 @@ class ThriftHiveMetastore_get_config_value_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::STRING, 0); - $xfer += $output->writeString($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) { @@ -14614,6 +16291,16 @@ class ThriftHiveMetastore_get_config_value_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; @@ -14621,29 +16308,54 @@ class ThriftHiveMetastore_get_config_value_result { } -class ThriftHiveMetastore_partition_name_to_vals_args { +class ThriftHiveMetastore_alter_index_args { static $_TSPEC; - public $part_name = 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' => 'part_name', + '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', + 'type' => TType::STRUCT, + 'class' => 'Index', + ), ); } if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + 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']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_args'; + return 'ThriftHiveMetastore_alter_index_args'; } public function read($input) @@ -14663,7 +16375,29 @@ class ThriftHiveMetastore_partition_name_to_vals_args { { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $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); } else { $xfer += $input->skip($ftype); } @@ -14680,10 +16414,28 @@ 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_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)) { + 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(); @@ -14693,42 +16445,39 @@ class ThriftHiveMetastore_partition_name_to_vals_args { } -class ThriftHiveMetastore_partition_name_to_vals_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::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_partition_name_to_vals_result'; + return 'ThriftHiveMetastore_alter_index_result'; } public function read($input) @@ -14746,27 +16495,18 @@ class ThriftHiveMetastore_partition_name_to_vals_result { } switch ($fid) { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size439 = 0; - $_etype442 = 0; - $xfer += $input->readListBegin($_etype442, $_size439); - for ($_i443 = 0; $_i443 < $_size439; ++$_i443) - { - $elem444 = null; - $xfer += $input->readString($elem444); - $this->success []= $elem444; - } - $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); } @@ -14783,29 +16523,17 @@ class ThriftHiveMetastore_partition_name_to_vals_result { public function write($output) { $xfer = 0; - $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::STRING, count($this->success)); - { - foreach ($this->success as $iter445) - { - $xfer += $output->writeString($iter445); - } - } - $output->writeListEnd(); - } - $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; @@ -14813,29 +16541,53 @@ class ThriftHiveMetastore_partition_name_to_vals_result { } -class ThriftHiveMetastore_partition_name_to_spec_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_spec_args'; + return 'ThriftHiveMetastore_drop_index_by_name_args'; } public function read($input) @@ -14855,7 +16607,28 @@ 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); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -14872,10 +16645,25 @@ 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_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(); @@ -14885,30 +16673,28 @@ class ThriftHiveMetastore_partition_name_to_spec_args { } -class ThriftHiveMetastore_partition_name_to_spec_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::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => 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', ), ); @@ -14920,11 +16706,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_drop_index_by_name_result'; } public function read($input) @@ -14941,35 +16730,30 @@ class ThriftHiveMetastore_partition_name_to_spec_result { break; } switch ($fid) - { - case 0: - if ($ftype == TType::MAP) { - $this->success = array(); - $_size446 = 0; - $_ktype447 = 0; - $_vtype448 = 0; - $xfer += $input->readMapBegin($_ktype447, $_vtype448, $_size446); - for ($_i450 = 0; $_i450 < $_size446; ++$_i450) - { - $key451 = ''; - $val452 = ''; - $xfer += $input->readString($key451); - $xfer += $input->readString($val452); - $this->success[$key451] = $val452; - } - $xfer += $input->readMapEnd(); + { + 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); } 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; @@ -14982,23 +16766,10 @@ 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_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::MAP, 0); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); - { - foreach ($this->success as $kiter453 => $viter454) - { - $xfer += $output->writeString($kiter453); - $xfer += $output->writeString($viter454); - } - } - $output->writeMapEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -15006,6 +16777,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; @@ -15013,13 +16789,12 @@ class ThriftHiveMetastore_partition_name_to_spec_result { } -class ThriftHiveMetastore_markPartitionForEvent_args { +class ThriftHiveMetastore_get_index_by_name_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $eventType = null; + public $index_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -15033,20 +16808,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' => 'index_name', + 'type' => TType::STRING, ), ); } @@ -15057,17 +16820,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['index_name'])) { + $this->index_name = $vals['index_name']; } } } public function getName() { - return 'ThriftHiveMetastore_markPartitionForEvent_args'; + return 'ThriftHiveMetastore_get_index_by_name_args'; } public function read($input) @@ -15100,28 +16860,8 @@ class ThriftHiveMetastore_markPartitionForEvent_args { } break; case 3: - if ($ftype == TType::MAP) { - $this->part_vals = array(); - $_size455 = 0; - $_ktype456 = 0; - $_vtype457 = 0; - $xfer += $input->readMapBegin($_ktype456, $_vtype457, $_size455); - for ($_i459 = 0; $_i459 < $_size455; ++$_i459) - { - $key460 = ''; - $val461 = ''; - $xfer += $input->readString($key460); - $xfer += $input->readString($val461); - $this->part_vals[$key460] = $val461; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->eventType); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); } else { $xfer += $input->skip($ftype); } @@ -15138,7 +16878,7 @@ class ThriftHiveMetastore_markPartitionForEvent_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_args'); + $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); @@ -15149,27 +16889,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 $kiter462 => $viter463) - { - $xfer += $output->writeString($kiter462); - $xfer += $output->writeString($viter463); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->eventType !== null) { - $xfer += $output->writeFieldBegin('eventType', TType::I32, 4); - $xfer += $output->writeI32($this->eventType); + 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(); @@ -15179,19 +16901,21 @@ class ThriftHiveMetastore_markPartitionForEvent_args { } -class ThriftHiveMetastore_markPartitionForEvent_result { +class ThriftHiveMetastore_get_index_by_name_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::STRUCT, + 'class' => 'Index', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, @@ -15202,52 +16926,23 @@ class ThriftHiveMetastore_markPartitionForEvent_result { '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', - ), ); } 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'; + return 'ThriftHiveMetastore_get_index_by_name_result'; } public function read($input) @@ -15265,6 +16960,14 @@ class ThriftHiveMetastore_markPartitionForEvent_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 MetaException(); @@ -15281,38 +16984,6 @@ class ThriftHiveMetastore_markPartitionForEvent_result { $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; @@ -15325,7 +16996,15 @@ class ThriftHiveMetastore_markPartitionForEvent_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_markPartitionForEvent_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_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); @@ -15336,26 +17015,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; @@ -15363,40 +17022,27 @@ class ThriftHiveMetastore_markPartitionForEvent_result { } -class ThriftHiveMetastore_isPartitionMarkedForEvent_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)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'part_vals', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, + 'var' => 'db_name', + 'type' => TType::STRING, ), - 'val' => array( - 'type' => TType::STRING, - ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, ), - 4 => array( - 'var' => 'eventType', - 'type' => TType::I32, + 3 => array( + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -15407,17 +17053,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_indexes_args'; } public function read($input) @@ -15450,28 +17093,8 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { } break; case 3: - if ($ftype == TType::MAP) { - $this->part_vals = array(); - $_size464 = 0; - $_ktype465 = 0; - $_vtype466 = 0; - $xfer += $input->readMapBegin($_ktype465, $_vtype466, $_size464); - for ($_i468 = 0; $_i468 < $_size464; ++$_i468) - { - $key469 = ''; - $val470 = ''; - $xfer += $input->readString($key469); - $xfer += $input->readString($val470); - $this->part_vals[$key469] = $val470; - } - $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); } @@ -15488,7 +17111,7 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_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); @@ -15499,27 +17122,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 $kiter471 => $viter472) - { - $xfer += $output->writeString($kiter471); - $xfer += $output->writeString($viter472); - } - } - $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(); @@ -15529,53 +17134,34 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_args { } -class ThriftHiveMetastore_isPartitionMarkedForEvent_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::BOOL, + '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', ), ); } @@ -15589,23 +17175,11 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_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']; - } - 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_indexes_result'; } public function read($input) @@ -15624,15 +17198,26 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size473 = 0; + $_etype476 = 0; + $xfer += $input->readListBegin($_etype476, $_size473); + for ($_i477 = 0; $_i477 < $_size473; ++$_i477) + { + $elem478 = null; + $elem478 = new Index(); + $xfer += $elem478->read($input); + $this->success []= $elem478; + } + $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); @@ -15640,44 +17225,12 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_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 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; @@ -15690,10 +17243,22 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_isPartitionMarkedForEvent_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_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 $iter479) + { + $xfer += $iter479->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -15706,26 +17271,6 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_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; @@ -15733,39 +17278,45 @@ class ThriftHiveMetastore_isPartitionMarkedForEvent_result { } -class ThriftHiveMetastore_add_index_args { +class ThriftHiveMetastore_get_index_names_args { static $_TSPEC; - public $new_index = null; - public $index_table = null; + public $db_name = null; + public $tbl_name = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'new_index', - 'type' => TType::STRUCT, - 'class' => 'Index', + 'var' => 'db_name', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'index_table', - 'type' => TType::STRUCT, - 'class' => 'Table', + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } if (is_array($vals)) { - if (isset($vals['new_index'])) { - $this->new_index = $vals['new_index']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['index_table'])) { - $this->index_table = $vals['index_table']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_add_index_args'; + return 'ThriftHiveMetastore_get_index_names_args'; } public function read($input) @@ -15784,17 +17335,22 @@ class ThriftHiveMetastore_add_index_args { switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->new_index = new Index(); - $xfer += $this->new_index->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 2: - if ($ftype == TType::STRUCT) { - $this->index_table = new Table(); - $xfer += $this->index_table->read($input); + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -15811,21 +17367,20 @@ 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->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); $xfer += $output->writeFieldEnd(); } - if ($this->index_table !== null) { - if (!is_object($this->index_table)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('index_table', TType::STRUCT, 2); - $xfer += $this->index_table->write($output); + 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_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -15835,35 +17390,26 @@ class ThriftHiveMetastore_add_index_args { } -class ThriftHiveMetastore_add_index_result { +class ThriftHiveMetastore_get_index_names_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', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 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', ), ); @@ -15872,20 +17418,14 @@ class ThriftHiveMetastore_add_index_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']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_index_result'; + return 'ThriftHiveMetastore_get_index_names_result'; } public function read($input) @@ -15904,37 +17444,30 @@ 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::LST) { + $this->success = array(); + $_size480 = 0; + $_etype483 = 0; + $xfer += $input->readListBegin($_etype483, $_size480); + for ($_i484 = 0; $_i484 < $_size480; ++$_i484) + { + $elem485 = null; + $xfer += $input->readString($elem485); + $this->success []= $elem485; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } 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(); + $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; @@ -15947,30 +17480,29 @@ class ThriftHiveMetastore_add_index_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_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->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter486) + { + $xfer += $output->writeString($iter486); + } + } + $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(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -15978,54 +17510,34 @@ class ThriftHiveMetastore_add_index_result { } -class ThriftHiveMetastore_alter_index_args { +class ThriftHiveMetastore_write_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', - 'type' => TType::STRUCT, - 'class' => 'Index', + 'var' => 'stats_obj', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + '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_write_column_statistics_args'; } public function read($input) @@ -16044,30 +17556,19 @@ 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); + if ($ftype == TType::LST) { + $this->stats_obj = array(); + $_size487 = 0; + $_etype490 = 0; + $xfer += $input->readListBegin($_etype490, $_size487); + for ($_i491 = 0; $_i491 < $_size487; ++$_i491) + { + $elem492 = null; + $elem492 = new ColumnStatistics(); + $xfer += $elem492->read($input); + $this->stats_obj []= $elem492; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -16084,28 +17585,22 @@ 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_write_column_statistics_args'); + if ($this->stats_obj !== null) { + if (!is_array($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::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->stats_obj)); + { + foreach ($this->stats_obj as $iter493) + { + $xfer += $iter493->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -16115,39 +17610,65 @@ class ThriftHiveMetastore_alter_index_args { } -class ThriftHiveMetastore_alter_index_result { +class ThriftHiveMetastore_write_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['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } } } public function getName() { - return 'ThriftHiveMetastore_alter_index_result'; + return 'ThriftHiveMetastore_write_column_statistics_result'; } public function read($input) @@ -16165,9 +17686,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); @@ -16175,12 +17703,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; @@ -16193,7 +17737,12 @@ class ThriftHiveMetastore_alter_index_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_write_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); @@ -16204,6 +17753,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; @@ -16211,13 +17770,12 @@ class ThriftHiveMetastore_alter_index_result { } -class ThriftHiveMetastore_drop_index_by_name_args { +class ThriftHiveMetastore_get_column_statistics_by_table_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)) { @@ -16231,13 +17789,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)) { @@ -16247,17 +17801,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_column_statistics_by_table_args'; } public function read($input) @@ -16291,14 +17842,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); } @@ -16315,7 +17859,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_column_statistics_by_table_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -16326,14 +17870,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(); @@ -16343,19 +17882,22 @@ class ThriftHiveMetastore_drop_index_by_name_args { } -class ThriftHiveMetastore_drop_index_by_name_result { +class ThriftHiveMetastore_get_column_statistics_by_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::BOOL, + 'type' => TType::STRUCT, + 'class' => 'ColumnStatistics', ), 1 => array( 'var' => 'o1', @@ -16367,6 +17909,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)) { @@ -16379,11 +17931,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_column_statistics_by_table_result'; } public function read($input) @@ -16402,8 +17960,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); } @@ -16424,6 +17983,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; @@ -16436,10 +18011,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_column_statistics_by_table_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) { @@ -16452,6 +18030,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; @@ -16459,12 +18047,13 @@ class ThriftHiveMetastore_drop_index_by_name_result { } -class ThriftHiveMetastore_get_index_by_name_args { +class ThriftHiveMetastore_get_column_statistics_by_partition_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)) { @@ -16478,7 +18067,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, ), ); @@ -16490,14 +18083,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_column_statistics_by_partition_args'; } public function read($input) @@ -16531,7 +18127,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); } @@ -16548,7 +18151,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_column_statistics_by_partition_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -16559,9 +18162,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(); @@ -16571,12 +18179,14 @@ class ThriftHiveMetastore_get_index_by_name_args { } -class ThriftHiveMetastore_get_index_by_name_result { +class ThriftHiveMetastore_get_column_statistics_by_partition_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)) { @@ -16584,17 +18194,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', ), ); } @@ -16608,11 +18228,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_column_statistics_by_partition_result'; } public function read($input) @@ -16632,7 +18258,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); @@ -16640,7 +18266,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); @@ -16648,12 +18274,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; @@ -16666,7 +18308,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_column_statistics_by_partition_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -16685,6 +18327,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; @@ -16692,12 +18344,13 @@ class ThriftHiveMetastore_get_index_by_name_result { } -class ThriftHiveMetastore_get_indexes_args { +class ThriftHiveMetastore_delete_column_statistics_by_partition_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)) { @@ -16711,8 +18364,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, ), ); } @@ -16723,14 +18380,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_column_statistics_by_partition_args'; } public function read($input) @@ -16763,8 +18423,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); } @@ -16781,7 +18448,7 @@ class ThriftHiveMetastore_get_indexes_args { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_column_statistics_by_partition_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -16792,9 +18459,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(); @@ -16804,24 +18476,21 @@ class ThriftHiveMetastore_get_indexes_args { } -class ThriftHiveMetastore_get_indexes_result { +class ThriftHiveMetastore_delete_column_statistics_by_partition_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', - ), + 'var' => 'success', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', @@ -16833,6 +18502,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)) { @@ -16845,11 +18524,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_column_statistics_by_partition_result'; } public function read($input) @@ -16868,19 +18553,8 @@ class ThriftHiveMetastore_get_indexes_result { switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size473 = 0; - $_etype476 = 0; - $xfer += $input->readListBegin($_etype476, $_size473); - for ($_i477 = 0; $_i477 < $_size473; ++$_i477) - { - $elem478 = null; - $elem478 = new Index(); - $xfer += $elem478->read($input); - $this->success []= $elem478; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -16901,6 +18575,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; @@ -16913,22 +18603,10 @@ class ThriftHiveMetastore_get_indexes_result { public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_delete_column_statistics_by_partition_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 $iter479) - { - $xfer += $iter479->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -16941,6 +18619,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; @@ -16948,12 +18636,12 @@ class ThriftHiveMetastore_get_indexes_result { } -class ThriftHiveMetastore_get_index_names_args { +class ThriftHiveMetastore_delete_column_statistics_by_table_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)) { @@ -16967,8 +18655,8 @@ class ThriftHiveMetastore_get_index_names_args { 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_indexes', - 'type' => TType::I16, + 'var' => 'col_name', + 'type' => TType::STRING, ), ); } @@ -16979,14 +18667,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_column_statistics_by_table_args'; } public function read($input) @@ -17019,8 +18707,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); } @@ -17037,7 +18725,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_column_statistics_by_table_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -17048,9 +18736,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(); @@ -17060,42 +18748,65 @@ class ThriftHiveMetastore_get_index_names_args { } -class ThriftHiveMetastore_get_index_names_result { +class ThriftHiveMetastore_delete_column_statistics_by_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::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_column_statistics_by_table_result'; } public function read($input) @@ -17114,30 +18825,44 @@ class ThriftHiveMetastore_get_index_names_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; - $xfer += $input->readString($elem485); - $this->success []= $elem485; - } - $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; @@ -17150,29 +18875,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_column_statistics_by_table_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 $iter486) - { - $xfer += $output->writeString($iter486); - } - } - $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; @@ -17623,14 +19351,14 @@ class ThriftHiveMetastore_get_role_names_result { case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size487 = 0; - $_etype490 = 0; - $xfer += $input->readListBegin($_etype490, $_size487); - for ($_i491 = 0; $_i491 < $_size487; ++$_i491) + $_size494 = 0; + $_etype497 = 0; + $xfer += $input->readListBegin($_etype497, $_size494); + for ($_i498 = 0; $_i498 < $_size494; ++$_i498) { - $elem492 = null; - $xfer += $input->readString($elem492); - $this->success []= $elem492; + $elem499 = null; + $xfer += $input->readString($elem499); + $this->success []= $elem499; } $xfer += $input->readListEnd(); } else { @@ -17666,9 +19394,9 @@ class ThriftHiveMetastore_get_role_names_result { { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter493) + foreach ($this->success as $iter500) { - $xfer += $output->writeString($iter493); + $xfer += $output->writeString($iter500); } } $output->writeListEnd(); @@ -18308,15 +20036,15 @@ class ThriftHiveMetastore_list_roles_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; - $elem499 = new Role(); - $xfer += $elem499->read($input); - $this->success []= $elem499; + $elem506 = null; + $elem506 = new Role(); + $xfer += $elem506->read($input); + $this->success []= $elem506; } $xfer += $input->readListEnd(); } else { @@ -18352,9 +20080,9 @@ class ThriftHiveMetastore_list_roles_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter500) + foreach ($this->success as $iter507) { - $xfer += $iter500->write($output); + $xfer += $iter507->write($output); } } $output->writeListEnd(); @@ -18452,14 +20180,14 @@ class ThriftHiveMetastore_get_privilege_set_args { case 3: if ($ftype == TType::LST) { $this->group_names = 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; - $xfer += $input->readString($elem506); - $this->group_names []= $elem506; + $elem513 = null; + $xfer += $input->readString($elem513); + $this->group_names []= $elem513; } $xfer += $input->readListEnd(); } else { @@ -18500,9 +20228,9 @@ class ThriftHiveMetastore_get_privilege_set_args { { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter507) + foreach ($this->group_names as $iter514) { - $xfer += $output->writeString($iter507); + $xfer += $output->writeString($iter514); } } $output->writeListEnd(); @@ -18789,15 +20517,15 @@ class ThriftHiveMetastore_list_privileges_result { case 0: if ($ftype == TType::LST) { $this->success = 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; - $elem513 = new HiveObjectPrivilege(); - $xfer += $elem513->read($input); - $this->success []= $elem513; + $elem520 = null; + $elem520 = new HiveObjectPrivilege(); + $xfer += $elem520->read($input); + $this->success []= $elem520; } $xfer += $input->readListEnd(); } else { @@ -18833,9 +20561,9 @@ class ThriftHiveMetastore_list_privileges_result { { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter514) + foreach ($this->success as $iter521) { - $xfer += $iter514->write($output); + $xfer += $iter521->write($output); } } $output->writeListEnd(); @@ -19258,14 +20986,14 @@ class ThriftHiveMetastore_set_ugi_args { case 2: if ($ftype == TType::LST) { $this->group_names = 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; - $xfer += $input->readString($elem520); - $this->group_names []= $elem520; + $elem527 = null; + $xfer += $input->readString($elem527); + $this->group_names []= $elem527; } $xfer += $input->readListEnd(); } else { @@ -19298,9 +21026,9 @@ class ThriftHiveMetastore_set_ugi_args { { $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->group_names as $iter521) + foreach ($this->group_names as $iter528) { - $xfer += $output->writeString($iter521); + $xfer += $output->writeString($iter528); } } $output->writeListEnd(); @@ -19370,14 +21098,14 @@ class ThriftHiveMetastore_set_ugi_result { case 0: if ($ftype == TType::LST) { $this->success = 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->success []= $elem527; + $elem534 = null; + $xfer += $input->readString($elem534); + $this->success []= $elem534; } $xfer += $input->readListEnd(); } else { @@ -19413,9 +21141,9 @@ class ThriftHiveMetastore_set_ugi_result { { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter528) + foreach ($this->success as $iter535) { - $xfer += $output->writeString($iter528); + $xfer += $output->writeString($iter535); } } $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..3510168 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,378 @@ class Index { } +class ColumnStatistics { + static $_TSPEC; + + public $tableName = null; + public $colName = null; + public $colType = null; + public $dbName = null; + public $partName = null; + public $lowValue = null; + public $highValue = null; + public $numNulls = null; + public $numDVs = null; + public $avgColLen = null; + public $maxColLen = null; + public $numTrues = null; + public $numFalses = null; + public $lastAnalyzed = null; + public $histogram = null; + public $isTblLevel = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'colName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'colType', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'partName', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'lowValue', + 'type' => TType::DOUBLE, + ), + 7 => array( + 'var' => 'highValue', + 'type' => TType::DOUBLE, + ), + 8 => array( + 'var' => 'numNulls', + 'type' => TType::I64, + ), + 9 => array( + 'var' => 'numDVs', + 'type' => TType::I64, + ), + 10 => array( + 'var' => 'avgColLen', + 'type' => TType::DOUBLE, + ), + 11 => array( + 'var' => 'maxColLen', + 'type' => TType::I64, + ), + 12 => array( + 'var' => 'numTrues', + 'type' => TType::I64, + ), + 13 => array( + 'var' => 'numFalses', + 'type' => TType::I64, + ), + 14 => array( + 'var' => 'lastAnalyzed', + 'type' => TType::I64, + ), + 15 => array( + 'var' => 'histogram', + 'type' => TType::STRING, + ), + 16 => array( + 'var' => 'isTblLevel', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['colName'])) { + $this->colName = $vals['colName']; + } + if (isset($vals['colType'])) { + $this->colType = $vals['colType']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['partName'])) { + $this->partName = $vals['partName']; + } + 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']; + } + if (isset($vals['avgColLen'])) { + $this->avgColLen = $vals['avgColLen']; + } + if (isset($vals['maxColLen'])) { + $this->maxColLen = $vals['maxColLen']; + } + if (isset($vals['numTrues'])) { + $this->numTrues = $vals['numTrues']; + } + if (isset($vals['numFalses'])) { + $this->numFalses = $vals['numFalses']; + } + if (isset($vals['lastAnalyzed'])) { + $this->lastAnalyzed = $vals['lastAnalyzed']; + } + if (isset($vals['histogram'])) { + $this->histogram = $vals['histogram']; + } + if (isset($vals['isTblLevel'])) { + $this->isTblLevel = $vals['isTblLevel']; + } + } + } + + 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::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->colName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->colType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->lowValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->highValue); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numNulls); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numDVs); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::DOUBLE) { + $xfer += $input->readDouble($this->avgColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->maxColLen); + } else { + $xfer += $input->skip($ftype); + } + break; + case 12: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numTrues); + } else { + $xfer += $input->skip($ftype); + } + break; + case 13: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->numFalses); + } else { + $xfer += $input->skip($ftype); + } + break; + case 14: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->lastAnalyzed); + } else { + $xfer += $input->skip($ftype); + } + break; + case 15: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->histogram); + } else { + $xfer += $input->skip($ftype); + } + break; + case 16: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isTblLevel); + } 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->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->colName !== null) { + $xfer += $output->writeFieldBegin('colName', TType::STRING, 2); + $xfer += $output->writeString($this->colName); + $xfer += $output->writeFieldEnd(); + } + if ($this->colType !== null) { + $xfer += $output->writeFieldBegin('colType', TType::STRING, 3); + $xfer += $output->writeString($this->colType); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 4); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partName !== null) { + $xfer += $output->writeFieldBegin('partName', TType::STRING, 5); + $xfer += $output->writeString($this->partName); + $xfer += $output->writeFieldEnd(); + } + if ($this->lowValue !== null) { + $xfer += $output->writeFieldBegin('lowValue', TType::DOUBLE, 6); + $xfer += $output->writeDouble($this->lowValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->highValue !== null) { + $xfer += $output->writeFieldBegin('highValue', TType::DOUBLE, 7); + $xfer += $output->writeDouble($this->highValue); + $xfer += $output->writeFieldEnd(); + } + if ($this->numNulls !== null) { + $xfer += $output->writeFieldBegin('numNulls', TType::I64, 8); + $xfer += $output->writeI64($this->numNulls); + $xfer += $output->writeFieldEnd(); + } + if ($this->numDVs !== null) { + $xfer += $output->writeFieldBegin('numDVs', TType::I64, 9); + $xfer += $output->writeI64($this->numDVs); + $xfer += $output->writeFieldEnd(); + } + if ($this->avgColLen !== null) { + $xfer += $output->writeFieldBegin('avgColLen', TType::DOUBLE, 10); + $xfer += $output->writeDouble($this->avgColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxColLen !== null) { + $xfer += $output->writeFieldBegin('maxColLen', TType::I64, 11); + $xfer += $output->writeI64($this->maxColLen); + $xfer += $output->writeFieldEnd(); + } + if ($this->numTrues !== null) { + $xfer += $output->writeFieldBegin('numTrues', TType::I64, 12); + $xfer += $output->writeI64($this->numTrues); + $xfer += $output->writeFieldEnd(); + } + if ($this->numFalses !== null) { + $xfer += $output->writeFieldBegin('numFalses', TType::I64, 13); + $xfer += $output->writeI64($this->numFalses); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAnalyzed !== null) { + $xfer += $output->writeFieldBegin('lastAnalyzed', TType::I64, 14); + $xfer += $output->writeI64($this->lastAnalyzed); + $xfer += $output->writeFieldEnd(); + } + if ($this->histogram !== null) { + $xfer += $output->writeFieldBegin('histogram', TType::STRING, 15); + $xfer += $output->writeString($this->histogram); + $xfer += $output->writeFieldEnd(); + } + if ($this->isTblLevel !== null) { + $xfer += $output->writeFieldBegin('isTblLevel', TType::BOOL, 16); + $xfer += $output->writeBool($this->isTblLevel); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class Schema { static $_TSPEC; @@ -4476,4 +4848,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 4599ea9..8e41b03 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -75,6 +75,11 @@ 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 write_column_statistics( stats_obj)' + print ' ColumnStatistics get_column_statistics_by_table(string db_name, string tbl_name, string col_name)' + print ' ColumnStatistics get_column_statistics_by_partition(string db_name, string tbl_name, string part_name, string col_name)' + print ' bool delete_column_statistics_by_partition(string db_name, string tbl_name, string part_name, string col_name)' + print ' bool delete_column_statistics_by_table(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()' @@ -463,6 +468,36 @@ elif cmd == 'get_index_names': sys.exit(1) pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) +elif cmd == 'write_column_statistics': + if len(args) != 1: + print 'write_column_statistics requires 1 args' + sys.exit(1) + pp.pprint(client.write_column_statistics(eval(args[0]),)) + +elif cmd == 'get_column_statistics_by_table': + if len(args) != 3: + print 'get_column_statistics_by_table requires 3 args' + sys.exit(1) + pp.pprint(client.get_column_statistics_by_table(args[0],args[1],args[2],)) + +elif cmd == 'get_column_statistics_by_partition': + if len(args) != 4: + print 'get_column_statistics_by_partition requires 4 args' + sys.exit(1) + pp.pprint(client.get_column_statistics_by_partition(args[0],args[1],args[2],args[3],)) + +elif cmd == 'delete_column_statistics_by_partition': + if len(args) != 4: + print 'delete_column_statistics_by_partition requires 4 args' + sys.exit(1) + pp.pprint(client.delete_column_statistics_by_partition(args[0],args[1],args[2],args[3],)) + +elif cmd == 'delete_column_statistics_by_table': + if len(args) != 3: + print 'delete_column_statistics_by_table requires 3 args' + sys.exit(1) + pp.pprint(client.delete_column_statistics_by_table(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 73dcf36..6cc9064 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -483,6 +483,51 @@ class Iface(fb303.FacebookService.Iface): """ pass + def write_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + pass + + def get_column_statistics_by_table(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + pass + + def get_column_statistics_by_partition(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + pass + + def delete_column_statistics_by_partition(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + pass + + def delete_column_statistics_by_table(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + pass + def create_role(self, role): """ Parameters: @@ -2612,6 +2657,216 @@ class Client(fb303.FacebookService.Client, Iface): raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); + def write_column_statistics(self, stats_obj): + """ + Parameters: + - stats_obj + """ + self.send_write_column_statistics(stats_obj) + return self.recv_write_column_statistics() + + def send_write_column_statistics(self, stats_obj): + self._oprot.writeMessageBegin('write_column_statistics', TMessageType.CALL, self._seqid) + args = write_column_statistics_args() + args.stats_obj = stats_obj + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_write_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 = write_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, "write_column_statistics failed: unknown result"); + + def get_column_statistics_by_table(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + self.send_get_column_statistics_by_table(db_name, tbl_name, col_name) + return self.recv_get_column_statistics_by_table() + + def send_get_column_statistics_by_table(self, db_name, tbl_name, col_name): + self._oprot.writeMessageBegin('get_column_statistics_by_table', TMessageType.CALL, self._seqid) + args = get_column_statistics_by_table_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_column_statistics_by_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_column_statistics_by_table_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_column_statistics_by_table failed: unknown result"); + + def get_column_statistics_by_partition(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + self.send_get_column_statistics_by_partition(db_name, tbl_name, part_name, col_name) + return self.recv_get_column_statistics_by_partition() + + def send_get_column_statistics_by_partition(self, db_name, tbl_name, part_name, col_name): + self._oprot.writeMessageBegin('get_column_statistics_by_partition', TMessageType.CALL, self._seqid) + args = get_column_statistics_by_partition_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_column_statistics_by_partition(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_column_statistics_by_partition_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_column_statistics_by_partition failed: unknown result"); + + def delete_column_statistics_by_partition(self, db_name, tbl_name, part_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - part_name + - col_name + """ + self.send_delete_column_statistics_by_partition(db_name, tbl_name, part_name, col_name) + return self.recv_delete_column_statistics_by_partition() + + def send_delete_column_statistics_by_partition(self, db_name, tbl_name, part_name, col_name): + self._oprot.writeMessageBegin('delete_column_statistics_by_partition', TMessageType.CALL, self._seqid) + args = delete_column_statistics_by_partition_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_column_statistics_by_partition(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = delete_column_statistics_by_partition_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_column_statistics_by_partition failed: unknown result"); + + def delete_column_statistics_by_table(self, db_name, tbl_name, col_name): + """ + Parameters: + - db_name + - tbl_name + - col_name + """ + self.send_delete_column_statistics_by_table(db_name, tbl_name, col_name) + return self.recv_delete_column_statistics_by_table() + + def send_delete_column_statistics_by_table(self, db_name, tbl_name, col_name): + self._oprot.writeMessageBegin('delete_column_statistics_by_table', TMessageType.CALL, self._seqid) + args = delete_column_statistics_by_table_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_column_statistics_by_table(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = delete_column_statistics_by_table_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_column_statistics_by_table failed: unknown result"); + def create_role(self, role): """ Parameters: @@ -3139,6 +3394,11 @@ 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["write_column_statistics"] = Processor.process_write_column_statistics + self._processMap["get_column_statistics_by_table"] = Processor.process_get_column_statistics_by_table + self._processMap["get_column_statistics_by_partition"] = Processor.process_get_column_statistics_by_partition + self._processMap["delete_column_statistics_by_partition"] = Processor.process_delete_column_statistics_by_partition + self._processMap["delete_column_statistics_by_table"] = Processor.process_delete_column_statistics_by_table 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 @@ -4063,6 +4323,106 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_write_column_statistics(self, seqid, iprot, oprot): + args = write_column_statistics_args() + args.read(iprot) + iprot.readMessageEnd() + result = write_column_statistics_result() + try: + result.success = self._handler.write_column_statistics(args.stats_obj) + except NoSuchObjectException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + except InvalidInputException, o4: + result.o4 = o4 + oprot.writeMessageBegin("write_column_statistics", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_column_statistics_by_table(self, seqid, iprot, oprot): + args = get_column_statistics_by_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_column_statistics_by_table_result() + try: + result.success = self._handler.get_column_statistics_by_table(args.db_name, args.tbl_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_column_statistics_by_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_column_statistics_by_partition(self, seqid, iprot, oprot): + args = get_column_statistics_by_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_column_statistics_by_partition_result() + try: + result.success = self._handler.get_column_statistics_by_partition(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_column_statistics_by_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_delete_column_statistics_by_partition(self, seqid, iprot, oprot): + args = delete_column_statistics_by_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_column_statistics_by_partition_result() + try: + result.success = self._handler.delete_column_statistics_by_partition(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_column_statistics_by_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_delete_column_statistics_by_table(self, seqid, iprot, oprot): + args = delete_column_statistics_by_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = delete_column_statistics_by_table_result() + try: + result.success = self._handler.delete_column_statistics_by_table(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_column_statistics_by_table", 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) @@ -13541,6 +13901,992 @@ class get_index_names_result: def __ne__(self, other): return not (self == other) +class write_column_statistics_args: + """ + Attributes: + - stats_obj + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'stats_obj', (TType.STRUCT,(ColumnStatistics, ColumnStatistics.thrift_spec)), None, ), # 1 + ) + + 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: + 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.LIST: + self.stats_obj = [] + (_etype490, _size487) = iprot.readListBegin() + for _i491 in xrange(_size487): + _elem492 = ColumnStatistics() + _elem492.read(iprot) + self.stats_obj.append(_elem492) + 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('write_column_statistics_args') + if self.stats_obj is not None: + oprot.writeFieldBegin('stats_obj', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.stats_obj)) + for iter493 in self.stats_obj: + iter493.write(oprot) + oprot.writeListEnd() + 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 write_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', (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, 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 = 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() + 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('write_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 get_column_statistics_by_table_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('get_column_statistics_by_table_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 get_column_statistics_by_table_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_column_statistics_by_table_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 get_column_statistics_by_partition_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('get_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_table_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_column_statistics_by_table_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_column_statistics_by_table_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_column_statistics_by_table_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: @@ -13876,10 +15222,10 @@ class get_role_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) @@ -13902,8 +15248,8 @@ class get_role_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.o1 is not None: @@ -14376,11 +15722,11 @@ class list_roles_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype497, _size494) = iprot.readListBegin() - for _i498 in xrange(_size494): - _elem499 = Role() - _elem499.read(iprot) - self.success.append(_elem499) + (_etype504, _size501) = iprot.readListBegin() + for _i505 in xrange(_size501): + _elem506 = Role() + _elem506.read(iprot) + self.success.append(_elem506) iprot.readListEnd() else: iprot.skip(ftype) @@ -14403,8 +15749,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 iter500 in self.success: - iter500.write(oprot) + for iter507 in self.success: + iter507.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -14472,10 +15818,10 @@ class get_privilege_set_args: elif fid == 3: if ftype == TType.LIST: self.group_names = [] - (_etype504, _size501) = iprot.readListBegin() - for _i505 in xrange(_size501): - _elem506 = iprot.readString(); - self.group_names.append(_elem506) + (_etype511, _size508) = iprot.readListBegin() + for _i512 in xrange(_size508): + _elem513 = iprot.readString(); + self.group_names.append(_elem513) iprot.readListEnd() else: iprot.skip(ftype) @@ -14500,8 +15846,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 iter507 in self.group_names: - oprot.writeString(iter507) + for iter514 in self.group_names: + oprot.writeString(iter514) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -14708,11 +16054,11 @@ class list_privileges_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype511, _size508) = iprot.readListBegin() - for _i512 in xrange(_size508): - _elem513 = HiveObjectPrivilege() - _elem513.read(iprot) - self.success.append(_elem513) + (_etype518, _size515) = iprot.readListBegin() + for _i519 in xrange(_size515): + _elem520 = HiveObjectPrivilege() + _elem520.read(iprot) + self.success.append(_elem520) iprot.readListEnd() else: iprot.skip(ftype) @@ -14735,8 +16081,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 iter514 in self.success: - iter514.write(oprot) + for iter521 in self.success: + iter521.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 is not None: @@ -15061,10 +16407,10 @@ class set_ugi_args: elif fid == 2: if ftype == TType.LIST: self.group_names = [] - (_etype518, _size515) = iprot.readListBegin() - for _i519 in xrange(_size515): - _elem520 = iprot.readString(); - self.group_names.append(_elem520) + (_etype525, _size522) = iprot.readListBegin() + for _i526 in xrange(_size522): + _elem527 = iprot.readString(); + self.group_names.append(_elem527) iprot.readListEnd() else: iprot.skip(ftype) @@ -15085,8 +16431,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 iter521 in self.group_names: - oprot.writeString(iter521) + for iter528 in self.group_names: + oprot.writeString(iter528) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -15135,10 +16481,10 @@ class set_ugi_result: if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype525, _size522) = iprot.readListBegin() - for _i526 in xrange(_size522): - _elem527 = iprot.readString(); - self.success.append(_elem527) + (_etype532, _size529) = iprot.readListBegin() + for _i533 in xrange(_size529): + _elem534 = iprot.readString(); + self.success.append(_elem534) iprot.readListEnd() else: iprot.skip(ftype) @@ -15161,8 +16507,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 iter528 in self.success: - oprot.writeString(iter528) + for iter535 in self.success: + oprot.writeString(iter535) 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..39da72f 100644 --- metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -2142,6 +2142,246 @@ class Index: def __ne__(self, other): return not (self == other) +class ColumnStatistics: + """ + Attributes: + - tableName + - colName + - colType + - dbName + - partName + - lowValue + - highValue + - numNulls + - numDVs + - avgColLen + - maxColLen + - numTrues + - numFalses + - lastAnalyzed + - histogram + - isTblLevel + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'colName', None, None, ), # 2 + (3, TType.STRING, 'colType', None, None, ), # 3 + (4, TType.STRING, 'dbName', None, None, ), # 4 + (5, TType.STRING, 'partName', None, None, ), # 5 + (6, TType.DOUBLE, 'lowValue', None, None, ), # 6 + (7, TType.DOUBLE, 'highValue', None, None, ), # 7 + (8, TType.I64, 'numNulls', None, None, ), # 8 + (9, TType.I64, 'numDVs', None, None, ), # 9 + (10, TType.DOUBLE, 'avgColLen', None, None, ), # 10 + (11, TType.I64, 'maxColLen', None, None, ), # 11 + (12, TType.I64, 'numTrues', None, None, ), # 12 + (13, TType.I64, 'numFalses', None, None, ), # 13 + (14, TType.I64, 'lastAnalyzed', None, None, ), # 14 + (15, TType.STRING, 'histogram', None, None, ), # 15 + (16, TType.BOOL, 'isTblLevel', None, None, ), # 16 + ) + + def __init__(self, tableName=None, colName=None, colType=None, dbName=None, partName=None, lowValue=None, highValue=None, numNulls=None, numDVs=None, avgColLen=None, maxColLen=None, numTrues=None, numFalses=None, lastAnalyzed=None, histogram=None, isTblLevel=None,): + self.tableName = tableName + self.colName = colName + self.colType = colType + self.dbName = dbName + self.partName = partName + self.lowValue = lowValue + self.highValue = highValue + self.numNulls = numNulls + self.numDVs = numDVs + self.avgColLen = avgColLen + self.maxColLen = maxColLen + self.numTrues = numTrues + self.numFalses = numFalses + self.lastAnalyzed = lastAnalyzed + self.histogram = histogram + self.isTblLevel = isTblLevel + + 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.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.colName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.colType = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.partName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.DOUBLE: + self.lowValue = iprot.readDouble(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.DOUBLE: + self.highValue = iprot.readDouble(); + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I64: + self.numNulls = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.numDVs = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.DOUBLE: + self.avgColLen = iprot.readDouble(); + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I64: + self.maxColLen = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.I64: + self.numTrues = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.I64: + self.numFalses = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.I64: + self.lastAnalyzed = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.STRING: + self.histogram = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.BOOL: + self.isTblLevel = iprot.readBool(); + 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.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.colName is not None: + oprot.writeFieldBegin('colName', TType.STRING, 2) + oprot.writeString(self.colName) + oprot.writeFieldEnd() + if self.colType is not None: + oprot.writeFieldBegin('colType', TType.STRING, 3) + oprot.writeString(self.colType) + oprot.writeFieldEnd() + if self.dbName is not None: + oprot.writeFieldBegin('dbName', TType.STRING, 4) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.partName is not None: + oprot.writeFieldBegin('partName', TType.STRING, 5) + oprot.writeString(self.partName) + oprot.writeFieldEnd() + if self.lowValue is not None: + oprot.writeFieldBegin('lowValue', TType.DOUBLE, 6) + oprot.writeDouble(self.lowValue) + oprot.writeFieldEnd() + if self.highValue is not None: + oprot.writeFieldBegin('highValue', TType.DOUBLE, 7) + oprot.writeDouble(self.highValue) + oprot.writeFieldEnd() + if self.numNulls is not None: + oprot.writeFieldBegin('numNulls', TType.I64, 8) + oprot.writeI64(self.numNulls) + oprot.writeFieldEnd() + if self.numDVs is not None: + oprot.writeFieldBegin('numDVs', TType.I64, 9) + oprot.writeI64(self.numDVs) + oprot.writeFieldEnd() + if self.avgColLen is not None: + oprot.writeFieldBegin('avgColLen', TType.DOUBLE, 10) + oprot.writeDouble(self.avgColLen) + oprot.writeFieldEnd() + if self.maxColLen is not None: + oprot.writeFieldBegin('maxColLen', TType.I64, 11) + oprot.writeI64(self.maxColLen) + oprot.writeFieldEnd() + if self.numTrues is not None: + oprot.writeFieldBegin('numTrues', TType.I64, 12) + oprot.writeI64(self.numTrues) + oprot.writeFieldEnd() + if self.numFalses is not None: + oprot.writeFieldBegin('numFalses', TType.I64, 13) + oprot.writeI64(self.numFalses) + oprot.writeFieldEnd() + if self.lastAnalyzed is not None: + oprot.writeFieldBegin('lastAnalyzed', TType.I64, 14) + oprot.writeI64(self.lastAnalyzed) + oprot.writeFieldEnd() + if self.histogram is not None: + oprot.writeFieldBegin('histogram', TType.STRING, 15) + oprot.writeString(self.histogram) + oprot.writeFieldEnd() + if self.isTblLevel is not None: + oprot.writeFieldBegin('isTblLevel', TType.BOOL, 16) + oprot.writeBool(self.isTblLevel) + 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 Schema: """ Attributes: @@ -2995,3 +3235,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..09f6dde 100644 --- metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -448,6 +448,52 @@ class Index ::Thrift::Struct.generate_accessors self end +class ColumnStatistics + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + COLNAME = 2 + COLTYPE = 3 + DBNAME = 4 + PARTNAME = 5 + LOWVALUE = 6 + HIGHVALUE = 7 + NUMNULLS = 8 + NUMDVS = 9 + AVGCOLLEN = 10 + MAXCOLLEN = 11 + NUMTRUES = 12 + NUMFALSES = 13 + LASTANALYZED = 14 + HISTOGRAM = 15 + ISTBLLEVEL = 16 + + FIELDS = { + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + COLNAME => {:type => ::Thrift::Types::STRING, :name => 'colName'}, + COLTYPE => {:type => ::Thrift::Types::STRING, :name => 'colType'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + PARTNAME => {:type => ::Thrift::Types::STRING, :name => 'partName'}, + 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'}, + AVGCOLLEN => {:type => ::Thrift::Types::DOUBLE, :name => 'avgColLen'}, + MAXCOLLEN => {:type => ::Thrift::Types::I64, :name => 'maxColLen'}, + NUMTRUES => {:type => ::Thrift::Types::I64, :name => 'numTrues'}, + NUMFALSES => {:type => ::Thrift::Types::I64, :name => 'numFalses'}, + LASTANALYZED => {:type => ::Thrift::Types::I64, :name => 'lastAnalyzed'}, + HISTOGRAM => {:type => ::Thrift::Types::STRING, :name => 'histogram'}, + ISTBLLEVEL => {:type => ::Thrift::Types::BOOL, :name => 'isTblLevel'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + class Schema include ::Thrift::Struct, ::Thrift::Struct_Union FIELDSCHEMAS = 1 @@ -713,3 +759,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 d1f3d9c..3e359c7 100644 --- metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb +++ metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb @@ -932,6 +932,101 @@ module ThriftHiveMetastore raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_names failed: unknown result') end + def write_column_statistics(stats_obj) + send_write_column_statistics(stats_obj) + return recv_write_column_statistics() + end + + def send_write_column_statistics(stats_obj) + send_message('write_column_statistics', Write_column_statistics_args, :stats_obj => stats_obj) + end + + def recv_write_column_statistics() + result = receive_message(Write_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, 'write_column_statistics failed: unknown result') + end + + def get_column_statistics_by_table(db_name, tbl_name, col_name) + send_get_column_statistics_by_table(db_name, tbl_name, col_name) + return recv_get_column_statistics_by_table() + end + + def send_get_column_statistics_by_table(db_name, tbl_name, col_name) + send_message('get_column_statistics_by_table', Get_column_statistics_by_table_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name) + end + + def recv_get_column_statistics_by_table() + result = receive_message(Get_column_statistics_by_table_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_column_statistics_by_table failed: unknown result') + end + + def get_column_statistics_by_partition(db_name, tbl_name, part_name, col_name) + send_get_column_statistics_by_partition(db_name, tbl_name, part_name, col_name) + return recv_get_column_statistics_by_partition() + end + + def send_get_column_statistics_by_partition(db_name, tbl_name, part_name, col_name) + send_message('get_column_statistics_by_partition', Get_column_statistics_by_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name) + end + + def recv_get_column_statistics_by_partition() + result = receive_message(Get_column_statistics_by_partition_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_column_statistics_by_partition failed: unknown result') + end + + def delete_column_statistics_by_partition(db_name, tbl_name, part_name, col_name) + send_delete_column_statistics_by_partition(db_name, tbl_name, part_name, col_name) + return recv_delete_column_statistics_by_partition() + end + + def send_delete_column_statistics_by_partition(db_name, tbl_name, part_name, col_name) + send_message('delete_column_statistics_by_partition', Delete_column_statistics_by_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :col_name => col_name) + end + + def recv_delete_column_statistics_by_partition() + result = receive_message(Delete_column_statistics_by_partition_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_column_statistics_by_partition failed: unknown result') + end + + def delete_column_statistics_by_table(db_name, tbl_name, col_name) + send_delete_column_statistics_by_table(db_name, tbl_name, col_name) + return recv_delete_column_statistics_by_table() + end + + def send_delete_column_statistics_by_table(db_name, tbl_name, col_name) + send_message('delete_column_statistics_by_table', Delete_column_statistics_by_table_args, :db_name => db_name, :tbl_name => tbl_name, :col_name => col_name) + end + + def recv_delete_column_statistics_by_table() + result = receive_message(Delete_column_statistics_by_table_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_column_statistics_by_table failed: unknown result') + end + def create_role(role) send_create_role(role) return recv_create_role() @@ -1892,6 +1987,91 @@ module ThriftHiveMetastore write_result(result, oprot, 'get_index_names', seqid) end + def process_write_column_statistics(seqid, iprot, oprot) + args = read_args(iprot, Write_column_statistics_args) + result = Write_column_statistics_result.new() + begin + result.success = @handler.write_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, 'write_column_statistics', seqid) + end + + def process_get_column_statistics_by_table(seqid, iprot, oprot) + args = read_args(iprot, Get_column_statistics_by_table_args) + result = Get_column_statistics_by_table_result.new() + begin + result.success = @handler.get_column_statistics_by_table(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_column_statistics_by_table', seqid) + end + + def process_get_column_statistics_by_partition(seqid, iprot, oprot) + args = read_args(iprot, Get_column_statistics_by_partition_args) + result = Get_column_statistics_by_partition_result.new() + begin + result.success = @handler.get_column_statistics_by_partition(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_column_statistics_by_partition', seqid) + end + + def process_delete_column_statistics_by_partition(seqid, iprot, oprot) + args = read_args(iprot, Delete_column_statistics_by_partition_args) + result = Delete_column_statistics_by_partition_result.new() + begin + result.success = @handler.delete_column_statistics_by_partition(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_column_statistics_by_partition', seqid) + end + + def process_delete_column_statistics_by_table(seqid, iprot, oprot) + args = read_args(iprot, Delete_column_statistics_by_table_args) + result = Delete_column_statistics_by_table_result.new() + begin + result.success = @handler.delete_column_statistics_by_table(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_column_statistics_by_table', seqid) + end + def process_create_role(seqid, iprot, oprot) args = read_args(iprot, Create_role_args) result = Create_role_result.new() @@ -4181,6 +4361,226 @@ module ThriftHiveMetastore ::Thrift::Struct.generate_accessors self end + class Write_column_statistics_args + include ::Thrift::Struct, ::Thrift::Struct_Union + STATS_OBJ = 1 + + FIELDS = { + STATS_OBJ => {:type => ::Thrift::Types::LIST, :name => 'stats_obj', :element => {:type => ::Thrift::Types::STRUCT, :class => ColumnStatistics}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Write_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_column_statistics_by_table_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_column_statistics_by_table_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_partition_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_column_statistics_by_table_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_column_statistics_by_table_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 5e4e4a4..e57a5e0 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -54,6 +54,7 @@ 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.ConfigValSecurityException; import org.apache.hadoop.hive.metastore.api.Constants; import org.apache.hadoop.hive.metastore.api.Database; @@ -64,6 +65,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; @@ -603,7 +605,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(); @@ -736,7 +738,12 @@ public class HiveMetaStore extends ThriftHiveMetastore { success = true; } catch (IOException e) { throw new MetaException(e.getMessage()); - } finally { + } catch (InvalidInputException e) { + throw new MetaException(e.getMessage()); + } catch (InvalidObjectException e) { + throw new MetaException(e.getMessage()); + } + finally { endFunction("drop_database", success); } } @@ -990,7 +997,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; @@ -1124,10 +1131,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); @@ -1177,7 +1187,13 @@ public class HiveMetaStore extends ThriftHiveMetastore { success = true; } catch (IOException e) { throw new MetaException(e.getMessage()); - } finally { + } catch (InvalidInputException e) { + throw new MetaException(e.getMessage()); + } catch (InvalidObjectException e) { + throw new MetaException(e.getMessage()); + } + finally { + endFunction("drop_table", success); } @@ -1589,7 +1605,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; @@ -1672,7 +1688,12 @@ 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()); - } finally { + } catch (InvalidInputException e) { + throw new MetaException(e.getMessage()); + } catch (InvalidObjectException e) { + throw new MetaException(e.getMessage()); + } + finally { endFunction("drop_partition", ret); } return ret; @@ -2140,7 +2161,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 { @@ -2165,6 +2186,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); } @@ -2327,7 +2352,13 @@ public class HiveMetaStore extends ThriftHiveMetastore { indexName, deleteData); } catch (IOException e) { throw new MetaException(e.getMessage()); - } finally { + } catch (InvalidInputException e) { + throw new MetaException(e.getMessage()); + } catch (InvalidObjectException e) { + throw new MetaException(e.getMessage()); + } + + finally { endFunction("drop_index_by_name", ret); } @@ -2337,7 +2368,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; @@ -2451,6 +2482,195 @@ public class HiveMetaStore extends ThriftHiveMetastore { return ret; } + private String caseConvertPartName(String partName) throws MetaException { + int count = 0; + Map partSpec = Warehouse.makeEscSpecFromName(partName); + String convertedPartName = new String(); + + for (Map.Entry entry : partSpec.entrySet()) { + String partColName = entry.getKey(); + String partColVal = entry.getValue(); + + if (count > 0) { + convertedPartName += "/"; + } + convertedPartName += partColName.toLowerCase() + "=" + partColVal; + count++; + } + return convertedPartName; + } + + public ColumnStatistics get_column_statistics_by_table(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().getColumnStatisticsByTable(dbName, tableName, colName); + } finally { + endFunction("get_column_statistics_by_table: ", statsObj != null); + } + + return statsObj; + } + + public ColumnStatistics get_column_statistics_by_partition(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 = caseConvertPartName(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().getColumnStatisticsByPartition(dbName, tableName, convertedPartName, + partVals, colName); + } finally { + endFunction("get_column_statistics_by_partition: ", statsObj != null); + } + + return statsObj; + } + + + public boolean write_column_statistics(List statsObjs) + throws NoSuchObjectException,InvalidObjectException,MetaException,TException, InvalidInputException + { + + boolean isTblLevel = statsObjs.get(0).isIsTblLevel(); + String dbName = null; + String tableName = null; + String partName = null; + String colName = null; + + for (ColumnStatistics statsObj:statsObjs) { + + if (isTblLevel != statsObj.isIsTblLevel()) { + throw new InvalidInputException(); + } + + dbName = statsObj.getDbName().toLowerCase(); + tableName = statsObj.getTableName().toLowerCase(); + colName = statsObj.getColName().toLowerCase(); + partName = null; + + if (!isTblLevel) { + partName = caseConvertPartName(statsObj.getPartName()); + statsObj.setPartName(partName); + } + + statsObj.setDbName(dbName); + statsObj.setTableName(tableName); + statsObj.setColName(colName); + + long time = System.currentTimeMillis() / 1000; + statsObj.setLastAnalyzed(time); + + if (isTblLevel) { + startFunction("write_column_statistics: db=" + dbName + " table=" + + tableName + " column=" + colName); + } else { + startFunction("write_column_statistics: db=" + dbName + " table=" + + tableName + " partition=" + partName + + " column=" + colName); + } + + } + + boolean ret = false; + + try { + + if (isTblLevel) { + ret = getMS().writeColumnStatistics(statsObjs, null); + } else { + List partVals = getPartValsFromName(getMS(), dbName, + tableName, partName); + ret = getMS().writeColumnStatistics(statsObjs, partVals); + } + } finally { + endFunction("write_column_statistics: ", ret != false); + } + + return ret; + } + + public boolean delete_column_statistics_by_partition(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 = caseConvertPartName(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_column_statistics_by_table(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) @@ -3124,6 +3344,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 4367f7a..ae64f2c 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; @@ -930,6 +932,109 @@ public class HiveMetaStoreClient implements IMetaStoreClient { return client.get_indexes(dbName, tblName, max); } + + /** + * write column stats to persisitent store + * + * @param statsObj + * @return boolean indicating the status of the operation + * @throws NoSuchObjectException + * @throws InvalidObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + */ + + public boolean writeColumnStatistics(List statsObj) + throws NoSuchObjectException, InvalidObjectException, MetaException, TException, InvalidInputException{ + return client.write_column_statistics(statsObj); + } + + /** + * Get column statistics given dbName, tableName and colName + * + * @param dbName + * @param tableName + * @param colName + * @return Column Stats Object for a given db, table and col + * @throws NoSuchObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + * @throws InvalidObjectException + */ + + public ColumnStatistics getColumnStatisticsByTable(String dbName, String tableName, + String colName) + throws NoSuchObjectException, MetaException, TException, InvalidInputException, InvalidObjectException { + return client.get_column_statistics_by_table(dbName, tableName, colName); + } + + /** + * Get column statistics given dbName, tableName, partitionName and colName + * + * @param dbName + * @param tableName + * @param partitionName + * @param colName + * @return Column Stats Object for a given db, table, partition and col + * @throws NoSuchObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + * @throws InvalidObjectException + */ + + public ColumnStatistics getColumnStatisticsByPartition(String dbName, String tableName, + String partitionName, String colName) + throws NoSuchObjectException, MetaException, TException, InvalidInputException, InvalidObjectException { + return client.get_column_statistics_by_partition(dbName, tableName, partitionName, colName); + } + + + /** + * + * @param dbName + * @param tableName + * @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, InvalidObjectException, MetaException, + TException, InvalidInputException + { + return client.delete_column_statistics_by_partition(dbName, tableName, partName, colName); + } + + /** + * + * @param dbName + * @param tableName + * @param colName + * @return boolean indicating outcome of the operation + * @throws NoSuchObjectException + * @throws InvalidObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + */ + + public boolean deleteTableColumnStatistics(String dbName, String tableName, + String colName) + throws NoSuchObjectException, InvalidObjectException, MetaException, + TException, InvalidInputException + { + return client.delete_column_statistics_by_table(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 f1a6c8b..09cc6a6 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; @@ -706,6 +708,96 @@ public interface IMetaStoreClient { String name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; + + /** + * + * @param statsObj + * @return boolean indicating status of operation + * @throws NoSuchObjectException + * @throws InvalidObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + */ + + public boolean writeColumnStatistics(List statsObj) + throws NoSuchObjectException, InvalidObjectException, MetaException, TException, InvalidInputException; + + + /** + * + * @param dbName + * @param tableName + * @param colName + * @return ColumnStatistics Obj with the relevant stats + * @throws NoSuchObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + * @throws InvalidObjectException + */ + + public ColumnStatistics getColumnStatisticsByTable(String dbName, String tableName, String colName) + throws NoSuchObjectException, MetaException, TException, + InvalidInputException, InvalidObjectException; + + /** + * + * @param dbName + * @param tableName + * @param partitionName + * @param colName + * @return ColumnStatistics Obj with the relevant stats + * @throws NoSuchObjectException + * @throws MetaException + * @throws TException + * @throws InvalidInputException + * @throws InvalidObjectException + */ + + public ColumnStatistics getColumnStatisticsByPartition(String dbName, String tableName, + String partitionName, String colName) + throws NoSuchObjectException, MetaException, TException, + InvalidInputException, InvalidObjectException; + + + + /** + * + * @param dbName + * @param tableName + * @param partName + * @param colName + * @return boolean indicating the outcome of the operation + * @throws NoSuchObjectException + * @throws MetaException + * @throws InvalidObjectException + * @throws TException + * @throws InvalidInputException + */ + + public boolean deletePartitionColumnStatistics(String dbName, String tableName, + String partName, String colName) throws + NoSuchObjectException, MetaException, InvalidObjectException, TException, InvalidInputException; + + /** + * + * @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 diff --git metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java index 045b550..e6ef75e 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -54,12 +54,14 @@ 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.ColumnStatistics; 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.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.MetaException; @@ -89,6 +91,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; @@ -98,6 +101,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; @@ -671,7 +675,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(); @@ -699,6 +703,10 @@ public class ObjectStore implements RawStore, Configurable { if (partColGrants != null && partColGrants.size() > 0) { pm.deletePersistentAll(partColGrants); } + // delete column statistics if present + deleteTableColumnStatistics(dbName, tableName, null); + + preDropStorageDescriptor(tbl.getSd()); // then remove the table @@ -1265,7 +1273,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(); @@ -1285,8 +1293,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(); @@ -1314,6 +1326,13 @@ 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(); + + deletePartitionColumnStatistics(dbName, tableName, partName, part.getValues(), null); + + preDropStorageDescriptor(part.getSd()); pm.deletePersistent(part); } @@ -3974,6 +3993,593 @@ public class ObjectStore implements RawStore, Configurable { return join(storedVals,','); } + // Methods to persist, maintain and retrieve Column Statistics + + private MTableColumnStatistics convertToMTableColumnStatistics(ColumnStatistics statsObj) + throws NoSuchObjectException, MetaException, InvalidObjectException + { + if (statsObj == null) { + throw new InvalidObjectException("Invalid column stats object"); + } + + MTable table = getMTable(statsObj.getDbName(), statsObj.getTableName()); + + if (table == null) { + throw new NoSuchObjectException("Table for which stats is gathered doesn't exist."); + } + + return new MTableColumnStatistics(table, statsObj.getDbName(),statsObj.getTableName(), + statsObj.getColName(), statsObj.getColType(), + statsObj.getLowValue(), statsObj.getHighValue(), + statsObj.getNumNulls(), statsObj.getNumDVs(), statsObj.getAvgColLen(), + statsObj.getMaxColLen(), statsObj.getNumTrues(), statsObj.getNumFalses(), + statsObj.getLastAnalyzed(), statsObj.getHistogram()); + + } + + private ColumnStatistics convertToTableColumnStatistics(MTableColumnStatistics statsObj) + throws MetaException + { + if (statsObj == null) { + return null; + } + + // pass null for partName and set isTblLevel to true + return new ColumnStatistics(statsObj.getTableName(), statsObj.getColName(), + statsObj.getColType(), statsObj.getDbName(), null,statsObj.getLowValue(), + statsObj.getHighValue(), statsObj.getNumNulls(), statsObj.getNumDVs(), + statsObj.getAvgColLen(), statsObj.getMaxColLen(), statsObj.getNumTrues(), + statsObj.getNumFalses(), statsObj.getLastAnalyzed(), statsObj.getHistogram(), true); + } + + + private MPartitionColumnStatistics convertToMPartitionColumnStatistics(ColumnStatistics statsObj, + List partVal) + throws MetaException + { + + if (statsObj == null) { + return null; + } + + MPartition partition = getMPartition(statsObj.getDbName(), statsObj.getTableName(), partVal); + + return new MPartitionColumnStatistics(partition, statsObj.getDbName(), statsObj.getTableName(), + statsObj.getPartName(), statsObj.getColName(), statsObj.getColType(), statsObj.getLowValue(), + statsObj.getHighValue(),statsObj.getNumNulls(), statsObj.getNumDVs(), + statsObj.getAvgColLen(), statsObj.getMaxColLen(), statsObj.getNumTrues(), + statsObj.getNumFalses(), statsObj.getLastAnalyzed(), statsObj.getHistogram()); + + } + + private boolean writeMTableColumnStatistics(MTableColumnStatistics mStatsObj) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException + { + + boolean committed = false; + + String dbName = mStatsObj.getDbName(); + String tableName = mStatsObj.getTableName(); + String colName = mStatsObj.getColName(); + + try { + + openTransaction(); + MTable mTable = getMTable(mStatsObj.getDbName(), mStatsObj.getTableName()); + boolean foundCol = false; + + if (mTable == null) { + throw new + NoSuchObjectException("Table 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 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.setHistogram(mStatsObj.getHistogram()); + 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()); + + committed = commitTransaction(); + + } else { + pm.makePersistent(mStatsObj); + committed = commitTransaction(); + } + } finally { + if (!committed) { + rollbackTransaction(); + return false; + } else { + return true; + } + } + + } + + private boolean writeMPartitionColumnStatistics(MPartitionColumnStatistics mStatsObj, + List partVal) + throws NoSuchObjectException, MetaException, InvalidObjectException + { + boolean committed = false; + String dbName = mStatsObj.getDbName(); + String tableName = mStatsObj.getTableName(); + String partName = mStatsObj.getPartitionName(); + String colName = mStatsObj.getColName(); + + try { + + openTransaction(); + + MTable mTable = getMTable(mStatsObj.getDbName(), mStatsObj.getTableName()); + boolean foundCol = false; + + if (mTable == null) { + throw new + NoSuchObjectException("Table for which stats gathering is requested doesn't exist."); + } + + MPartition mPartition = + getMPartition(mStatsObj.getDbName(), mStatsObj.getTableName(), partVal); + + if (mPartition == null) { + throw new + NoSuchObjectException("Partition 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 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.setHistogram(mStatsObj.getHistogram()); + 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()); + + committed = commitTransaction(); + + + } else { + + pm.makePersistent(mStatsObj); + committed = commitTransaction(); + + } + + } finally { + if (!committed) { + rollbackTransaction(); + return false; + } else { + return true; + } + } + } + + public boolean writeColumnStatistics(List statsObjs, List partVal) + throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException + { + + boolean isTblLevel = statsObjs.get(0).isIsTblLevel(); + boolean ret = false; + + if (isTblLevel) { + + for (ColumnStatistics statsObj:statsObjs) { + MTableColumnStatistics mStatsObj = convertToMTableColumnStatistics(statsObj); + ret = writeMTableColumnStatistics(mStatsObj); + if (!ret) { + break; + } + } + + } else { + + for(ColumnStatistics statsObj:statsObjs) { + MPartitionColumnStatistics mStatsObj = + convertToMPartitionColumnStatistics(statsObj, partVal); + ret = writeMPartitionColumnStatistics(mStatsObj, partVal); + if (!ret) { + break; + } + + } + } + return ret; + } + + 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_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 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 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 getColumnStatisticsByTable(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 the specified column doesn't exist."); + } + + statsObj = convertToTableColumnStatistics(mStatsObj); + return statsObj; + } + + public ColumnStatistics getColumnStatisticsByPartition(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 the specified column doesn't exist."); + } + + statsObj = convertToPartColumnStatistics(mStatsObj); + return statsObj; + + } + + private ColumnStatistics convertToPartColumnStatistics(MPartitionColumnStatistics mStatsObj) + { + + if (mStatsObj == null) { + return null; + } + + return new ColumnStatistics(mStatsObj.getTableName(), mStatsObj.getColName(), mStatsObj.getColType(), + mStatsObj.getDbName(), mStatsObj.getPartitionName(),mStatsObj.getLowValue(), + mStatsObj.getHighValue(), mStatsObj.getNumNulls(), mStatsObj.getNumDVs(), + mStatsObj.getAvgColLen(), mStatsObj.getMaxColLen(), mStatsObj.getNumTrues(), + mStatsObj.getNumFalses(), mStatsObj.getLastAnalyzed(), mStatsObj.getHistogram(), false); + + } + + 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_column_statistics_by_partition is null"); + } + + try { + openTransaction(); + MTable mTable = getMTable(dbName.trim(), tableName.trim()); + boolean foundCol = false; + + if (mTable == null) { + throw new NoSuchObjectException("Table for which stats is requested doesn't exist."); + } + + MPartition mPartition = + getMPartition(dbName, tableName, partVal); + + if (mPartition == null) { + throw new + NoSuchObjectException("Partition 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 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(); + + } finally { + if (!committed) { + rollbackTransaction(); + } + return mStatsObj; + } + } + + 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 for which stats deletion is requested doesn't exist"); + } + + MPartition mPartition = + getMPartition(dbName, tableName, partVals); + + if (mPartition == null) { + throw new + NoSuchObjectException("Partition 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 { + LOG.debug("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 { + LOG.debug("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 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 { + LOG.debug("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 { + LOG.debug("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; @@ -3987,6 +4593,8 @@ public class ObjectStore implements RawStore, Configurable { query.declareParameters("java.lang.Long curTime, java.lang.Long expiryTime"); delCnt = query.deletePersistentAll(curTime, expiryTime); commited = commitTransaction(); + + } finally { if (!commited) { @@ -3996,4 +4604,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 11c7f23..9ed6cd3 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; @@ -302,5 +304,100 @@ 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 in case of partition level column stats + * @return Boolean indicating the outcome of the operation + * @throws NoSuchObjectException + * @throws MetaException + * @throws InvalidObjectException + * @throws InvalidInputException + */ + public abstract boolean writeColumnStatistics(List 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 getColumnStatisticsByTable(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 getColumnStatisticsByPartition(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..ba0dcc1 --- /dev/null +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java @@ -0,0 +1,224 @@ +/** + * 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; + + +/** + * + * 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 tableName; + private String partitionName; + private String colName; + private String colType; + private String dbName; + private double lowValue; + private double highValue; + private long numNulls; + private long numDVs; + private double avgColLen; + private long maxColLen; + private long numTrues; + private long numFalses; + private long lastAnalyzed; + private String histogram; + + public MPartitionColumnStatistics() {} + + /** + * @param partition + * @param tableName + * @param partitionName + * @param colName + * @param colType + * @param lowValue + * @param highValue + * @param numNulls + * @param numDVs + * @param avgColLen + * @param maxColLen + * @param numTrues + * @param numFalses + * @param lastAnaylzed + */ + public MPartitionColumnStatistics(MPartition partition, String dbName, String tableName, + String partitionName, String colName, String colType, + double lowValue, double highValue, long numNulls,long numDVs, double avgColLen, + long maxColLen, long numTrues,long numFalses, long lastAnalyzed, String histogram) { + + // ?? + super(); + + this.setPartition(partition); + this.dbName = dbName; + this.tableName = tableName; + this.partitionName = partitionName; + this.colName = colName; + this.colType = colType; + this.lowValue = lowValue; + this.highValue = highValue; + this.numNulls = numNulls; + this.numDVs = numDVs; + this.avgColLen = avgColLen; + this.maxColLen = maxColLen; + this.numTrues = numTrues; + this.numFalses = numFalses; + this.lastAnalyzed = lastAnalyzed; + this.histogram = histogram; + + } + + 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 double getLowValue() { + return lowValue; + } + + public void setLowValue(double lowValue) { + this.lowValue = lowValue; + } + + public double getHighValue() { + return highValue; + } + + public void setHighValue(double highValue) { + this.highValue = highValue; + } + + 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 String getHistogram() { + return histogram; + } + + public void setHistogram(String histogram) { + this.histogram = histogram; + } + + 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; + } + +} \ 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..2b549fd --- /dev/null +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java @@ -0,0 +1,297 @@ +/** + * 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; + + +/** + * + * 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 tableName; + private String colName; + private String colType; + private String dbName; + private double lowValue; + private double highValue; + private long numNulls; + private long numDVs; + private double avgColLen; + private long maxColLen; + private long numTrues; + private long numFalses; + private long lastAnalyzed; + private String histogram; + + public MTableColumnStatistics() {} + + /** + * @param table + * @param tableName + * @param colName + * @param colType + * @param lowValue + * @param highValue + * @param numNulls + * @param numDVs + * @param avgColLen + * @param maxColLen + * @param numTrues + * @param numFalses + * @param lastAnaylzed + */ + public MTableColumnStatistics(MTable table, String dbName, String tableName, String colName, + String colType, double lowValue, double highValue, long numNulls, long numDVs, + double avgColLen, long maxColLen, long numTrues, long numFalses, long lastAnalyzed, + String histogram) { + + // ?? + super(); + + this.table = table; + this.dbName = dbName; + this.tableName = tableName; + this.colName = colName; + this.colType = colType; + this.lowValue = lowValue; + this.highValue = highValue; + this.numNulls = numNulls; + this.numDVs = numDVs; + this.avgColLen = avgColLen; + this.maxColLen = maxColLen; + this.numTrues = numTrues; + this.numFalses = numFalses; + this.lastAnalyzed = lastAnalyzed; + this.histogram = histogram; + + } + + /** + * @return the table + */ + public MTable getTable() { + return table; + } + + /** + * @param table + */ + public void setTable(MTable table) { + this.table = table; + } + + /** + * @return the tableName + */ + public String getTableName() { + return tableName; + } + + /** + * @param tableName + */ + public void setTableName(String tableName) { + this.tableName = tableName; + } + + /** + * @return the colName + */ + public String getColName() { + return colName; + } + + /** + * @param colName + */ + public void setColName(String colName) { + this.colName = colName; + } + + public String getColType() { + return colType; + } + + public void setColType(String colType) { + this.colType = colType; + } + + /** + * @return the lowValue + */ + public double getLowValue() { + return lowValue; + } + + /** + * @param lowValue + */ + public void setLowValue(double lowValue) { + this.lowValue = lowValue; + } + + /** + * @return the highValue + */ + public double getHighValue() { + return highValue; + } + + /** + * @param highValue + */ + public void setHighValue(double highValue) { + this.highValue = highValue; + } + + /** + * @return the numNulls + */ + public long getNumNulls() { + return numNulls; + } + + /** + * @param numNulls the numNulls to set + */ + public void setNumNulls(long numNulls) { + this.numNulls = numNulls; + } + + /** + * @return the numDVs + */ + public long getNumDVs() { + return numDVs; + } + + /** + * @param numDVs the numDVs to set + */ + public void setNumDVs(long numDVs) { + this.numDVs = numDVs; + } + + /** + * @return the avgColLen + */ + public double getAvgColLen() { + return avgColLen; + } + + /** + * @param avgColLen the avgColLen to set + */ + public void setAvgColLen(double avgColLen) { + this.avgColLen = avgColLen; + } + + /** + * @return the maxColLen + */ + public long getMaxColLen() { + return maxColLen; + } + + /** + * @param maxColLen the maxColLen to set + */ + public void setMaxColLen(long maxColLen) { + this.maxColLen = maxColLen; + } + + /** + * @return the numTrues + */ + public long getNumTrues() { + return numTrues; + } + + /** + * @param numTrues the numTrues to set + */ + public void setNumTrues(long numTrues) { + this.numTrues = numTrues; + } + + /** + * @return the numFalses + */ + public long getNumFalses() { + return numFalses; + } + + /** + * @param numFalses the numFalses to set + */ + public void setNumFalses(long numFalses) { + this.numFalses = numFalses; + } + + /** + * @return the lastAnalyzed + */ + public long getLastAnalyzed() { + return lastAnalyzed; + } + + /** + * @param lastAnalyzed the lastAnalyzed to set + */ + public void setLastAnalyzed(long lastAnalyzed) { + this.lastAnalyzed = lastAnalyzed; + } + + /** + * @return the dbName + */ + public String getDbName() { + return dbName; + } + + /** + * @param dbName the dbName to set + */ + public void setDbName(String dbName) { + this.dbName = dbName; + } + + /** + * @return the histogram + */ + public String getHistogram() { + return histogram; + } + + /** + * @param histogram the histogram to set + */ + public void setHistogram(String histogram) { + this.histogram = histogram; + } + +} diff --git metastore/src/model/package.jdo metastore/src/model/package.jdo index 38ce6d5..32f5d30 100644 --- metastore/src/model/package.jdo +++ metastore/src/model/package.jdo @@ -751,5 +751,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java index 4e152f4..77b70bc 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; @@ -504,4 +506,45 @@ public class DummyRawStoreForJdoConnection implements RawStore { return 0; } + + + @Override + public ColumnStatistics getColumnStatisticsByTable(String dbName, String tableName, String colName) + throws MetaException, NoSuchObjectException { + // TODO Auto-generated method stub + return null; + } + + + @Override + public boolean deleteTableColumnStatistics(String dbName, String tableName, + String colName) + throws NoSuchObjectException, MetaException, InvalidObjectException { + // TODO Auto-generated method stub + 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 getColumnStatisticsByPartition(String dbName, String tableName, String partName, + List partVal, String colName) throws MetaException, NoSuchObjectException, + InvalidInputException, InvalidObjectException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean writeColumnStatistics(List statsObj, List partVals) + throws NoSuchObjectException, MetaException, InvalidObjectException { + // TODO Auto-generated method stub + 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 369eebe..86e669c 100644 --- metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java +++ metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java @@ -37,6 +37,7 @@ 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.ConfigValSecurityException; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; @@ -1228,6 +1229,156 @@ 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.0; + double highValue = 1200000.0; + long numNulls = 3; + long numDVs = 22; + double avgColLen = 0.0; + long maxColLen = 0; + long numTrues = 0; + long numFalses = 0; + long lastAnalyzed = 0; + String colType = "Long"; + String histogram = new String("Height-Balanced"); + boolean isTblLevel = true; + String partName = null; + + List statsObjs = new ArrayList(); + + ColumnStatistics statsObj = new ColumnStatistics(tblName, colName[0], colType, dbName, + partName,lowValue, highValue, numNulls, numDVs, avgColLen, maxColLen, numTrues, numFalses, + lastAnalyzed, histogram, isTblLevel); + + statsObjs.add(statsObj); + + // write stats obj persistently + client.writeColumnStatistics(statsObjs); + + // retrieve the stats obj that was just written + ColumnStatistics statsObj2 = client.getColumnStatisticsByTable(dbName, tblName, colName[0]); + + // compare stats obj to ensure what we get is what we wrote + assertNotNull(statsObj2); + assertEquals(statsObj2.getDbName(), dbName); + assertEquals(statsObj2.getTableName(), tblName); + assertEquals(statsObj2.getColName(), colName[0]); + assertEquals(statsObj2.getLowValue(), lowValue); + assertEquals(statsObj2.getHighValue(), highValue); + assertEquals(statsObj2.getNumNulls(), numNulls); + assertEquals(statsObj2.getNumDVs(), numDVs); + assertEquals(statsObj2.getAvgColLen(), avgColLen); + assertEquals(statsObj2.getMaxColLen(), maxColLen); + assertEquals(statsObj2.getNumTrues(), numTrues); + assertEquals(statsObj2.getNumFalses(), numFalses); + assertEquals(statsObj2.getHistogram(), histogram); + assertEquals(statsObj2.isIsTblLevel(), isTblLevel); + + statsObj = new ColumnStatistics(tblName, colName[1], colType, dbName, partName, + lowValue, highValue, numNulls, numDVs, avgColLen, maxColLen, numTrues, numFalses, + lastAnalyzed, histogram, isTblLevel); + + statsObjs.add(statsObj); + client.writeColumnStatistics(statsObjs); + + // 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); + + statsObjs.clear(); + statsObjs.add(statsObj); + + client.writeColumnStatistics(statsObjs); + + // 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 obj to represent stats for "name" at partition level + statsObj = new ColumnStatistics(tblName, colName[1], colType, dbName, partName, + lowValue, highValue, numNulls, numDVs, avgColLen, maxColLen, numTrues, numFalses, + lastAnalyzed, histogram, isTblLevel); + + List statsObjs2 = new ArrayList(); + statsObjs2.add(statsObj); + + client.writeColumnStatistics(statsObjs2); + + statsObj2 = client.getColumnStatisticsByPartition(dbName, tblName, partName, colName[1]); + + // compare stats obj to ensure what we get is what we wrote + assertNotNull(statsObj2); + assertEquals(statsObj2.getDbName(), dbName); + assertEquals(statsObj2.getTableName(), tblName); + assertEquals(statsObj2.getColName(), colName[1]); + assertEquals(statsObj2.getPartName(), partName); + assertEquals(statsObj2.getLowValue(), lowValue); + assertEquals(statsObj2.getHighValue(), highValue); + assertEquals(statsObj2.getNumNulls(), numNulls); + assertEquals(statsObj2.getNumDVs(), numDVs); + assertEquals(statsObj2.getAvgColLen(), avgColLen); + assertEquals(statsObj2.getMaxColLen(), maxColLen); + assertEquals(statsObj2.getNumTrues(), numTrues); + assertEquals(statsObj2.getNumFalses(), numFalses); + assertEquals(statsObj2.getHistogram(), histogram); + assertEquals(statsObj2.isIsTblLevel(), isTblLevel); + + // test stats deletion at partition level + client.deletePartitionColumnStatistics(dbName, tblName, partName, colName[1]); + + client.writeColumnStatistics(statsObjs2); + + statsObj = new ColumnStatistics(tblName, colName[0], colType, dbName, partName, + lowValue, highValue, numNulls, numDVs, avgColLen, maxColLen, numTrues, numFalses, + lastAnalyzed, histogram, isTblLevel); + + statsObjs2.add(statsObj); + client.writeColumnStatistics(statsObjs2); + + } 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"; @@ -2299,5 +2450,4 @@ public abstract class TestHiveMetaStore extends TestCase { createPartitions(dbName, tbl, values); } - } diff --git ql/build.xml ql/build.xml index 5de3f78..e2fffc1 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 40f370b..024a9c7 100644 --- ql/ivy.xml +++ ql/ivy.xml @@ -72,7 +72,8 @@ transitive="false"/> - + + diff --git ql/src/gen/thrift/gen-cpp/queryplan_types.cpp ql/src/gen/thrift/gen-cpp/queryplan_types.cpp index 6ba73e4..244e377 100644 --- ql/src/gen/thrift/gen-cpp/queryplan_types.cpp +++ ql/src/gen/thrift/gen-cpp/queryplan_types.cpp @@ -92,7 +92,8 @@ int _kStageTypeValues[] = { StageType::MAPREDLOCAL, StageType::MOVE, StageType::STATS, - StageType::DEPENDENCY_COLLECTION + StageType::DEPENDENCY_COLLECTION, + StageType::COLUMNSTATS }; const char* _kStageTypeNames[] = { "CONDITIONAL", @@ -105,9 +106,10 @@ const char* _kStageTypeNames[] = { "MAPREDLOCAL", "MOVE", "STATS", - "DEPENDENCY_COLLECTION" + "DEPENDENCY_COLLECTION", + "COLUMNSTATS" }; -const std::map _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..530f6b0 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ColumnStatsTask.java @@ -0,0 +1,354 @@ +/** + * 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.ColumnStatistics; +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 setDoubleValue(ColumnStatistics cStatsObj, String fName, double d) { + + if (fName.equals("max")) { + cStatsObj.setHighValue((long) d); + } else if (fName.equals("min")) { + cStatsObj.setLowValue((long) d); + } else if (fName.equals("avglength")) { + cStatsObj.setAvgColLen(d); + } + } + + private void setLongValue(ColumnStatistics cStatsObj, String fName, long v) { + + if (fName.equals("max")) { + cStatsObj.setHighValue(v); + } else if (fName.equals("min")) { + cStatsObj.setLowValue(v); + } else if (fName.equals("countnulls")) { + cStatsObj.setNumNulls(v); + } else if (fName.equals("numdistinctvalues")) { + cStatsObj.setNumDVs(v); + } else if (fName.equals("maxlength")) { + cStatsObj.setMaxColLen(v); + } else if (fName.equals("counttrues")) { + cStatsObj.setNumTrues(v); + } else if (fName.equals("countfalses")) { + cStatsObj.setNumFalses(v); + } + } + + private void setStringValue(ColumnStatistics cStatsObj, String fName, String s) { + + if (fName.equals("columntype")) { + cStatsObj.setColType(s.toLowerCase()); + } + } + + private List unpackRow(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 partitionName = null; + String[] colName = work.getColStats().getColName(); + boolean isTblLevel = work.getColStats().isTblLevel(); + + List statsObj = new ArrayList(); + StructObjectInspector soi = (StructObjectInspector) oi; + List fields = soi.getAllStructFieldRefs(); + List list = soi.getStructFieldsDataAsList(o); + + if (!isTblLevel) { + partitionName = constructPartName(); + } + + 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(); + ColumnStatistics tStatsObj = getColumnStatsObj(dbName, tableName, partitionName, + colName[i], isTblLevel); + unpack(foi, f, fieldName, tStatsObj); + statsObj.add(tStatsObj); + } + return statsObj; + } + + private void unpack(ObjectInspector oi, Object o, String fName, ColumnStatistics cStatsObj) { + + switch (oi.getCategory()) { + + case STRUCT: + + 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(); + unpack(foi, f, fieldName, cStatsObj); + + } + break; + + case PRIMITIVE: + + PrimitiveObjectInspector poi = (PrimitiveObjectInspector) oi; + + switch (poi.getPrimitiveCategory()) { + + case LONG: { + long v = ((LongObjectInspector) poi).get(o); + setLongValue(cStatsObj, fName, v); + break; + } + + case DOUBLE: { + double d = ((DoubleObjectInspector) poi).get(o); + setDoubleValue(cStatsObj, fName, d); + break; + } + + case STRING: { + String s = ((StringObjectInspector) poi).getPrimitiveJavaObject(o); + setStringValue(cStatsObj, fName, s); + break; + } + + default: { + throw new RuntimeException("Hive internal error."); + } + } + } + } + + 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 ColumnStatistics getColumnStatsObj(String dbName, String tableName, + String partName, String colName, boolean isTblLevel) + { + + ColumnStatistics cStatsObj = new ColumnStatistics(); + cStatsObj.setDbName(dbName); + cStatsObj.setTableName(tableName); + cStatsObj.setColName(colName); + cStatsObj.setIsTblLevel(isTblLevel); + + if (!isTblLevel) { + partName = constructPartName(); + cStatsObj.setPartName(partName); + } else { + cStatsObj.setPartName(null); + } + + cStatsObj.setHistogram("none"); + + return cStatsObj; + } + + 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 + List cStatsObj = unpackRow(io.oi, io.o); + + // Persist stats to metastore + try { + db.writeColumnStatistics(cStatsObj); + } catch (HiveException 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(); + } + + List cStatsObj = unpackRow(io.oi, io.o); + + // Persist stats to metastore + try { + db.writeColumnStatistics(cStatsObj); + } catch (Exception e) { + e.printStackTrace(); + } + + return 0; + } + + @Override + public int execute(DriverContext driverContext) { + + try { + if (work.getColStats().isTblLevel()) { + return persistTableStats(); + } else { + return persistPartitionStats(); + } + } catch (HiveException 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"; + } + + /* + * Potentially dead code :) + */ + @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); + } + } +} 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/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 271554c..140a464 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; @@ -2145,6 +2145,16 @@ public class Hive { return indexes; } + public boolean writeColumnStatistics(List statsObj) throws HiveException { + try { + return getMSC().writeColumnStatistics(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 3874862..00b0442 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java @@ -239,9 +239,15 @@ public abstract class BaseSemanticAnalyzer { } public abstract void analyzeInternal(ASTNode ast) throws SemanticException; + public abstract void init(); - 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 b4ee673..c825c2c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java @@ -19,9 +19,7 @@ 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_IFEXISTS; -import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_IFNOTEXISTS; import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_SHOWDATABASES; import java.io.Serializable; @@ -647,10 +645,10 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer { for (int i = 1; i < ast.getChildCount(); i++) { ASTNode childNode = (ASTNode) ast.getChild(i); switch (childNode.getToken().getType()) { - case TOK_IFNOTEXISTS: + case HiveParser.TOK_IFNOTEXISTS: ifNotExists = true; break; - case TOK_DATABASECOMMENT: + case HiveParser.TOK_DATABASECOMMENT: dbComment = unescapeSQLString(childNode.getChild(0).getText()); break; case HiveParser.TOK_DATABASEPROPERTIES: @@ -2425,4 +2423,10 @@ public class DDLSemanticAnalyzer extends BaseSemanticAnalyzer { } } } + + @Override + public void init() { + // TODO Auto-generated method stub + + } } 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..39d63fe 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())); @@ -86,4 +86,10 @@ public class ExplainSemanticAnalyzer extends BaseSemanticAnalyzer { public List getResultSchema() { return fieldList; } + + @Override + public void init() { + // TODO Auto-generated method stub + + } } 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..7917b09 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. @@ -134,4 +123,10 @@ public class ExportSemanticAnalyzer extends BaseSemanticAnalyzer { toURI.getScheme().equals("hdfs") ? true : false)); } + @Override + public void init() { + // TODO Auto-generated method stub + + } + } 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..5894c71 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 = @@ -76,4 +73,10 @@ public class FunctionSemanticAnalyzer extends BaseSemanticAnalyzer { DropFunctionDesc desc = new DropFunctionDesc(functionName); rootTasks.add(TaskFactory.get(new FunctionWork(desc), conf)); } + + @Override + public void init() { + // TODO Auto-generated method stub + + } } 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 e969fbe..fca8b82 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g +++ ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g @@ -843,7 +843,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 @@ -2417,6 +2417,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..2127381 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java @@ -540,4 +540,10 @@ public class ImportSemanticAnalyzer extends BaseSemanticAnalyzer { return null; } + @Override + public void init() { + // TODO Auto-generated method stub + + } + } diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java index 22fa20f..dade268 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java @@ -304,4 +304,10 @@ public class LoadSemanticAnalyzer extends BaseSemanticAnalyzer { childTask.addDependentTask(statTask); } } + + @Override + public void init() { + // TODO Auto-generated method stub + + } } 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..3f00b44 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 isAnalyzeRwt; private CreateTableDesc tblDesc = null; // table descriptor of the final // results @@ -222,5 +223,20 @@ public class QB { skewedColNames = tbl.getSkewedColNames(); } return skewedColNames; + + } + + /** + * @return the isAnalyzeRwt + */ + public boolean isAnalyzeRwt() { + return isAnalyzeRwt; + } + + /** + * @param isAnalyzeRwt the isAnalyzeRwt to set + */ + public void setAnalyzeRwt(boolean isAnalyzeRwt) { + this.isAnalyzeRwt = isAnalyzeRwt; } } 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 4e2b88a..eed5695 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,13 @@ 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 +123,7 @@ public class QBParseInfo { aliasToLateralViews = new HashMap>(); tableSpecs = new HashMap(); + } public void setAggregationExprsForClause(String clause, @@ -496,4 +504,45 @@ public class QBParseInfo { 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; + } + +} \ No newline at end of file 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 97d1f09..4d631ec 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; @@ -114,6 +115,8 @@ 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.parse.QBParseInfo.ClauseType; 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; @@ -265,7 +268,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(); @@ -813,7 +816,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); @@ -835,11 +841,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(); @@ -7031,19 +7039,70 @@ 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 setups 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.isAnalyzeRwt(); + + 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()); } @@ -7069,7 +7128,7 @@ public class SemanticAnalyzer extends BaseSemanticAnalyzer { globalLimitCtx.disableOpt(); } - } else { + } else if (!isCStats) { for (LoadTableDesc ltd : loadTableWork) { Task tsk = TaskFactory.get(new MoveWork(null, null, ltd, null, false), conf); @@ -7172,6 +7231,14 @@ 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. @@ -7405,15 +7472,41 @@ 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"); @@ -7456,6 +7549,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()); @@ -8355,4 +8449,14 @@ 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 ad1a14c..b0401a9 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java @@ -18,6 +18,7 @@ package org.apache.hadoop.hive.ql.parse; +import java.io.IOException; import java.util.HashMap; import org.apache.hadoop.hive.conf.HiveConf; @@ -90,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 { @@ -196,6 +198,17 @@ public final class SemanticAnalyzerFactory { case HiveParser.TOK_CREATEFUNCTION: case HiveParser.TOK_DROPFUNCTION: return new FunctionSemanticAnalyzer(conf); + + case HiveParser.TOK_ANALYZE: + try { + return new StatsSemanticAnalyzer(conf, tree); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } 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..ed4bcaf --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/parse/StatsSemanticAnalyzer.java @@ -0,0 +1,425 @@ +/** + * 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. + * + */ +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 String tableName; + private boolean isTblLvl; + private String[] partName; + private String[] partNameWoValue; + private String[] colNames; + + 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 isRewritable(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 isPartitionLvlStats(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 String genPartitionClause(ASTNode tree) { + + PartitionList partList = null; + String whereClause = new String(" where "); + boolean predPresent = false; + String groupByClause = new String(" group by "); + boolean aggPresent = false; + String 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 += partKeys[i] + " = " + partValues[i]; + predPresent = true; + } else { + whereClause += " and " + partKeys[i] + " = " + partValues[i]; + } + + partName[j] = new String(partKeys[i] + "=" + + partValues[i].substring(1, partValues[i].length() - 1)); + j += 1; + + } else { + if (!aggPresent) { + groupByClause += partKeys[i]; + aggPresent = true; + } else { + groupByClause += "," + partKeys[i]; + } + + partNameWoValue[k] = new String(partKeys[i]); + k += 1; + } + } + + // attach the predicate and group by to the return clause + if (predPresent) { + retClause = new String(whereClause); + } + if (aggPresent) { + + retClause += new String(groupByClause); + } + + return retClause; + } + + public StatsSemanticAnalyzer(HiveConf conf, ASTNode tree) + throws SemanticException, IOException, ParseException { + + super(conf); + + /* + * 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 (isRewritable(tree)) { + + tableName = new String(getTableName(tree)); + colNames = getColumnName(tree); + + // Save away the original AST + originalTree = tree; + + // Rewrite the query to select compute_stats(...) group by + rewrittenQuery = new String("select "); + for (int i = 0; i < colNames.length; i++) { + if (i > 0) { + rewrittenQuery += new String(" , "); + } + rewrittenQuery += new String("compute_stats(") + colNames[i] + new String(")"); + } + rewrittenQuery += " from " + tableName; + isRewritten = true; + + + /* + * If partition level stats is requested, add predicate and group by as needed to rewritten + * query + */ + if (isPartitionLvlStats(tree)) { + + isTblLvl = false; + rewrittenQuery += genPartitionClause(tree); + + } else { + isTblLvl = true; + } + + rewrittenQuery = new VariableSubstitution().substitute(conf, rewrittenQuery); + + // Parse the rewritten query string + ctx = new Context(conf); + + ctx.setCmd(rewrittenQuery); + + ParseDriver pd = new ParseDriver(); + rewrittenTree = pd.parse(rewrittenQuery, ctx); + 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.setAnalyzeRwt(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 init() { + + } + + @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(); + } + + @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(); + } +} 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..046a54d --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsDesc.java @@ -0,0 +1,90 @@ +/** + * 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; + } + +} 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..046f7b5 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/plan/ColumnStatsWork.java @@ -0,0 +1,81 @@ +/** + * 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; + + } + + /** + * @return the fWork + */ + public FetchWork getfWork() { + return fWork; + } + + /** + * @param fWork + * the fWork to set + */ + public void setfWork(FetchWork fWork) { + this.fWork = fWork; + } + + /** + * @return the colStats + */ + public ColumnStatsDesc getColStats() { + return colStats; + } + + /** + * @param colStats + * the colStats to set + */ + public void setColStats(ColumnStatsDesc colStats) { + this.colStats = colStats; + } +} 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 cb54753..b19e44a 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..96672c1 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/DoubleNumDistinctValueEstimator.java @@ -0,0 +1,41 @@ +/** + * 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() { + super(); + } + + public DoubleNumDistinctValueEstimator(String s) { + super(s); + + } + + 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..67feddc --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFComputeStats.java @@ -0,0 +1,1458 @@ +/** + * 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 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.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.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 != 1) { + throw new UDFArgumentTypeException(parameters.length - 1, + "Exactly one argument is 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 + ArrayList foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + ArrayList 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); + + //printDebugOutput("GenericUDAFBooleanStatsEvaluator: terminatePartial", agg); + + 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); + + //printDebugOutput("GenericUDAFBooleanStatsEvaluator: merge", agg); + + } + } + + @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); + + //printDebugOutput("GenericUDAFBooleanStatsEvaluator: terminate", agg); + + return result; + } + } + + /** + * GenericUDAFLongStatsEvaluator. + * + */ + public static class GenericUDAFLongStatsEvaluator 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 columnType; + WritableStringObjectInspector columnTypeFieldOI; + + StructField minField; + WritableLongObjectInspector minFieldOI; + + StructField maxField; + WritableLongObjectInspector maxFieldOI; + + StructField countNullsField; + WritableLongObjectInspector countNullsFieldOI; + + StructField ndvField; + WritableStringObjectInspector ndvFieldOI; + + + /* 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]; + + 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(); + + } + + // initialize output + if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) { + + ArrayList foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + + ArrayList fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("Min"); + fname.add("Max"); + fname.add("CountNulls"); + fname.add("BitVector"); + + 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 Text(); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + + } else { + + ArrayList foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + ArrayList 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 */ + }; + + @Override + public AggregationBuffer getNewAggregationBuffer() throws HiveException { + LongStatsAgg result = new LongStatsAgg(); + result.numDV = new LongNumDistinctValueEstimator(); + reset(result); + return result; + } + + @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.numDV.reset(); + } + + 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 { + + assert (parameters.length == 1); + + Object p = parameters[0]; + LongStatsAgg myagg = (LongStatsAgg) agg; + + //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); + + //printDebugOutput("GenericUDAFLongStatsEvaluator: terminatePartial", agg); + + return partialResult; + } + + @Override + public void merge(AggregationBuffer agg, Object partial) + throws HiveException { + if (partial != null) { + LongStatsAgg myagg = (LongStatsAgg) agg; + + // 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.numDV.mergeEstimators(o); + + //printDebugOutput("GenericUDAFLongStatsEvaluator: merge", agg); + + } + } + + @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); + + //printDebugOutput("GenericUDAFLongStatsEvaluator: terminate", agg); + + return result; + } + } + + /** + * GenericUDAFDoubleStatsEvaluator. + * + */ + public static class GenericUDAFDoubleStatsEvaluator 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 minField; + WritableDoubleObjectInspector minFieldOI; + + StructField maxField; + WritableDoubleObjectInspector maxFieldOI; + + StructField countNullsField; + WritableLongObjectInspector countNullsFieldOI; + + StructField ndvField; + WritableStringObjectInspector ndvFieldOI; + + + /* 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(); + + 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(); + + } + + // initialize output + if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) { + + ArrayList foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + + ArrayList fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("Min"); + fname.add("Max"); + fname.add("CountNulls"); + fname.add("BitVector"); + + partialResult = new Object[5]; + partialResult[0] = new Text(); + partialResult[1] = new DoubleWritable(0); + partialResult[2] = new DoubleWritable(0); + partialResult[3] = new LongWritable(0); + partialResult[4] = new Text(); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + + } else { + + ArrayList foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + ArrayList 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 */ + }; + + @Override + public AggregationBuffer getNewAggregationBuffer() throws HiveException { + DoubleStatsAgg result = new DoubleStatsAgg(); + result.numDV = new DoubleNumDistinctValueEstimator(); + reset(result); + return result; + } + + @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.numDV.reset(); + } + + 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; + + // 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); + + //printDebugOutput("GenericUDAFDoubleStatsEvaluator: terminatePartial", agg); + + return partialResult; + } + + @Override + public void merge(AggregationBuffer agg, Object partial) + throws HiveException { + if (partial != null) { + DoubleStatsAgg myagg = (DoubleStatsAgg) agg; + + // 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); + + //TODO: Change API to deserialize which takes in a string and creates an object and calls merge + NumDistinctValueEstimator o = new NumDistinctValueEstimator(v); + myagg.numDV.mergeEstimators(o); + + //printDebugOutput("GenericUDAFDoubleStatsEvaluator: merge", agg); + + } + + } + + @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); + + //printDebugOutput("GenericUDAFDoubleStatsEvaluator: terminate", agg); + + return result; + } + } + + + /** + * GenericUDAFStringStatsEvaluator. + * + */ + public static class GenericUDAFStringStatsEvaluator 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", "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; + + /* 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(); + + ndvField = soi.getStructFieldRef("BitVector"); + ndvFieldOI = (WritableStringObjectInspector) ndvField.getFieldObjectInspector(); + + } + + // initialize output + if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) { + + ArrayList 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); + + ArrayList fname = new ArrayList(); + fname.add("ColumnType"); + fname.add("MaxLength"); + fname.add("SumLength"); + fname.add("Count"); + fname.add("CountNulls"); + fname.add("BitVector"); + + 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 LongWritable(0); + partialResult[5] = new Text(); + + return ObjectInspectorFactory.getStandardStructObjectInspector(fname, + foi); + + } else { + + ArrayList foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + ArrayList 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 */ + }; + + @Override + public AggregationBuffer getNewAggregationBuffer() throws HiveException { + StringStatsAgg result = new StringStatsAgg(); + result.numDV = new StringNumDistinctValueEstimator(); + reset(result); + return result; + } + + @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.numDV.reset(); + } + + 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; + + // 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); + + //printDebugOutput("GenericUDAFStringStatsEvaluator: terminatePartial", agg); + + return partialResult; + } + + @Override + public void merge(AggregationBuffer agg, Object partial) + throws HiveException { + if (partial != null) { + StringStatsAgg myagg = (StringStatsAgg) 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); + + // Merge numDistinctValue Estimators + partialValue = soi.getStructFieldData(partial, ndvField); + String v = ndvFieldOI.getPrimitiveJavaObject(partialValue); + NumDistinctValueEstimator o = new NumDistinctValueEstimator(v); + myagg.numDV.mergeEstimators(o); + + //printDebugOutput("GenericUDAFStringStatsEvaluator: merge", agg); + + } + } + + @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); + + //printDebugOutput("GenericUDAFStringStatsEvaluator: terminate", agg); + + 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) { + + ArrayList foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + ArrayList 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 { + + ArrayList foi = new ArrayList(); + foi.add(PrimitiveObjectInspectorFactory.writableStringObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableDoubleObjectInspector); + foi.add(PrimitiveObjectInspectorFactory.writableLongObjectInspector); + + ArrayList 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); + + //printDebugOutput("GenericUDAFBinaryStatsEvaluator: terminatePartial:", myagg); + + 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); + + //printDebugOutput("GenericUDAFBinaryStatsEvaluator: merge:", agg); + + } + } + + @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); + + //printDebugOutput("GenericUDAFBinaryStatsEvaluator: terminate:", agg); + + 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..0a6b570 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/LongNumDistinctValueEstimator.java @@ -0,0 +1,46 @@ +/** + * 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() { + super(); + } + + public LongNumDistinctValueEstimator(String s) { + super(s); + + } + + @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..ca9abda --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/udf/generic/NumDistinctValueEstimator.java @@ -0,0 +1,380 @@ +/** + * 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 = 31; + //TODO: make this a config param - take in accuracy percentage + private final int numBitVectors = 64; + + // 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() { + + 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); + } + + if (b[i] < 0) { + b[i] = b[i] + (1 << bitVectorSize); + } + + } + } + + + + public NumDistinctValueEstimator(String s) { + + FastBitSet b[] = deserialize(s); + + 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; + 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; + 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 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